@openclaw/discord 2026.7.1-beta.6 → 2026.7.2-beta.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 (92) hide show
  1. package/dist/action-runtime-api.js +1 -1
  2. package/dist/{allow-list-C-MqM-B_.js → allow-list-B7qOH5xu.js} +22 -1
  3. package/dist/{api-DPRqYi4Z.js → api--f62GFaS.js} +38 -23
  4. package/dist/api.js +15 -15
  5. package/dist/approval-custom-id-NYPYj9Po.js +58 -0
  6. package/dist/{approval-handler.runtime-Bw2pZNk1.js → approval-handler.runtime-DeyIiw5I.js} +28 -23
  7. package/dist/approval-message-safety-C-8BL6Kv.js +47 -0
  8. package/dist/{audit-MLpDpN3Z.js → audit-Df2w046a.js} +3 -3
  9. package/dist/{channel-actions-D_fjVUZ_.js → channel-actions-ChpBSRcu.js} +6 -4
  10. package/dist/{channel-actions.runtime-CVHlFqQg.js → channel-actions.runtime-D8V8tyCq.js} +41 -12
  11. package/dist/channel-config-api.js +1 -1
  12. package/dist/{channel-DGWPH5u3.js → channel-nYmJ7FKQ.js} +275 -62
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/{channel.setup-tZcpIn4e.js → channel.setup-DyihrqHH.js} +3 -3
  15. package/dist/{components-BIBizbtZ.js → components-BVrfRS-F.js} +78 -52
  16. package/dist/config-api-B18fR8M5.js +3 -0
  17. package/dist/{config-schema-BgIhO3ko.js → config-schema-_bUKcWRm.js} +42 -82
  18. package/dist/conversation-identity-BpkAzklg.js +94 -0
  19. package/dist/{directory-config-ByaUKL1f.js → directory-config-BUe-qq_C.js} +1 -1
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-BX79ImQA.js → directory-live-DZByMdPO.js} +6 -6
  22. package/dist/{doctor-Bgoxm5AN.js → doctor-bMaWXFKu.js} +5 -4
  23. package/dist/doctor-contract-api.js +1 -1
  24. package/dist/{doctor-contract-CU7lnZTF.js → doctor-contract-wId6pV41.js} +41 -37
  25. package/dist/{handle-action.guild-admin-CgJSNVui.js → handle-action.guild-admin-C_PQcBEV.js} +12 -12
  26. package/dist/index.js +1 -1
  27. package/dist/legacy-state-migrations-api.js +24 -2
  28. package/dist/{manager.runtime-DaB-CTrt.js → manager.runtime-3RVMVkyx.js} +546 -154
  29. package/dist/{message-handler-DcgvugZt.js → message-handler-CIxWq5Yh.js} +8 -9
  30. package/dist/{message-handler.preflight-DvLXiYVH.js → message-handler.preflight-BI86IbHz.js} +46 -22
  31. package/dist/{message-handler.process-Cjf30P_B.js → message-handler.process-bPS_9_tb.js} +241 -107
  32. package/dist/{message-utils-B_3yA5bN.js → message-utils-D4j07taS.js} +2 -3
  33. package/dist/{outbound-adapter-82RWi_SR.js → outbound-adapter-Czny0Fae.js} +16 -68
  34. package/dist/outbound-components-oJKLj62G.js +99 -0
  35. package/dist/pluralkit-UXq1OyUI.js +40 -0
  36. package/dist/{probe-D1ImJEo2.js → probe-DxjMBeVG.js} +1 -1
  37. package/dist/{probe.runtime-B1dsEeBD.js → probe.runtime-Bc8Oo6e8.js} +1 -1
  38. package/dist/{provider-BkfbC9FQ.js → provider-DWvDNb4J.js} +702 -236
  39. package/dist/{provider-session.runtime-BDjyFw6Y.js → provider-session.runtime-D5pCGibh.js} +3 -3
  40. package/dist/provider.runtime-C2iIfbTs.js +2 -0
  41. package/dist/{resolve-allowlist-common-CWbE8XlH.js → resolve-allowlist-common-B9S8LLBd.js} +5 -5
  42. package/dist/{resolve-channels-CcpvWoRa.js → resolve-channels-BrkWOKdG.js} +7 -7
  43. package/dist/{resolve-users-DJamun9s.js → resolve-users-OjrXXvJP.js} +5 -5
  44. package/dist/{runtime-C6rRmQ6l.js → runtime-C618lis9.js} +223 -33
  45. package/dist/runtime-api.actions.js +2 -2
  46. package/dist/runtime-api.js +23 -23
  47. package/dist/runtime-api.lookup.js +5 -5
  48. package/dist/runtime-api.monitor-DSbfGnzS.js +6 -0
  49. package/dist/runtime-api.monitor.js +7 -7
  50. package/dist/runtime-api.send.js +5 -5
  51. package/dist/runtime-api.threads.js +5 -5
  52. package/dist/{send-iJ0B4bAX.js → send-BFpa_DHn.js} +21 -12
  53. package/dist/{send.components-D0I39utR.js → send.components-BaXQJKWT.js} +15 -10
  54. package/dist/{send.outbound-Bj61Q3a0.js → send.outbound-BlA6VzSE.js} +22 -12
  55. package/dist/{send.receipt-BpBQED_5.js → send.receipt-aegk69an.js} +59 -75
  56. package/dist/{send.shared-wAwMhHDN.js → send.shared-Xz7IMVpu.js} +44 -20
  57. package/dist/{sender-identity-CEsfDF0L.js → sender-identity-C62lBe18.js} +1 -1
  58. package/dist/session-binding-contract-api.js +1 -1
  59. package/dist/setup-plugin-api.js +1 -1
  60. package/dist/{shared-BQVKfnev.js → shared-BLYBt5SA.js} +3 -3
  61. package/dist/{subagent-hooks-B-bJxxGg.js → subagent-hooks-DKJ4p-Oy.js} +2 -2
  62. package/dist/subagent-hooks-api.js +1 -1
  63. package/dist/{system-events-DVnqSyTt.js → system-events-DKwfE-2z.js} +2 -2
  64. package/dist/{target-resolver-CwHaSLt3.js → target-resolver-BQyEHyeS.js} +2 -2
  65. package/dist/targets-DvItNIvP.js +3 -0
  66. package/dist/thread-binding-api-BDZJD4na.js +4 -0
  67. package/dist/thread-binding-api.js +1 -3
  68. package/dist/{thread-bindings-DsTxqu3E.js → thread-bindings-BbzjUuNB.js} +26 -43
  69. package/dist/{thread-bindings.discord-api-BjIf9lGs.js → thread-bindings.discord-api-DJD3qwIN.js} +8 -10
  70. package/dist/{thread-bindings.manager-Bwmtqc3E.js → thread-bindings.manager-BIBm6bQd.js} +4 -4
  71. package/dist/{thread-bindings.session-updates-Chs3HgGa.js → thread-bindings.session-updates-eRcJlzIU.js} +1 -1
  72. package/dist/{thread-bindings.state-iSWjCYjB.js → thread-bindings.state-9VAxhVf6.js} +3 -14
  73. package/dist/{timeouts-C5TBc_9x.js → timeouts-ZRc9Lw4y.js} +3 -15
  74. package/dist/timeouts.js +1 -1
  75. package/dist/{transcripts-source-BvvM5Ns9.js → transcripts-source-CLZ5X8fh.js} +1 -1
  76. package/dist/transcripts-source-api.js +1 -1
  77. package/dist/{typing-BVcJgILg.js → typing-BnYT7Szq.js} +2 -2
  78. package/node_modules/p-map/index.d.ts +155 -0
  79. package/node_modules/p-map/index.js +284 -0
  80. package/node_modules/p-map/license +9 -0
  81. package/node_modules/p-map/package.json +57 -0
  82. package/node_modules/p-map/readme.md +190 -0
  83. package/npm-shrinkwrap.json +16 -3
  84. package/openclaw.plugin.json +70 -2
  85. package/package.json +6 -4
  86. package/dist/config-api-JiPdJeb0.js +0 -2
  87. package/dist/conversation-identity-DWC5d8Sy.js +0 -272
  88. package/dist/pluralkit-DcD-3EcL.js +0 -24
  89. package/dist/preview-streaming-DXT8oJdo.js +0 -8
  90. package/dist/provider.runtime-WrJXikSv.js +0 -2
  91. package/dist/runtime-api.monitor-C2_WVtJf.js +0 -6
  92. package/dist/targets-69w7c3vU.js +0 -3
@@ -1,8 +1,7 @@
1
- import { I as createDiscordRestClient } from "./send.shared-wAwMhHDN.js";
2
- import { o as mergeAbortSignals } from "./timeouts-C5TBc_9x.js";
3
- import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-BjIf9lGs.js";
4
- import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-B_3yA5bN.js";
5
- import { t as sendTyping } from "./typing-BVcJgILg.js";
1
+ import { I as createDiscordRestClient } from "./send.shared-Xz7IMVpu.js";
2
+ import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-DJD3qwIN.js";
3
+ import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-D4j07taS.js";
4
+ import { t as sendTyping } from "./typing-BnYT7Szq.js";
6
5
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
7
6
  import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
8
7
  import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
@@ -178,10 +177,10 @@ function resolveDiscordAcceptedTypingPrestart(ctx) {
178
177
  }
179
178
  //#endregion
180
179
  //#region extensions/discord/src/monitor/message-run-queue.ts
181
- const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-Cjf30P_B.js"));
180
+ const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-bPS_9_tb.js"));
182
181
  async function processDiscordQueuedMessage(params) {
183
182
  const processDiscordMessageImpl = params.testing?.processDiscordMessage ?? (await loadMessageProcessRuntime()).processDiscordMessage;
184
- const abortSignal = mergeAbortSignals([params.job.runtime.abortSignal, params.lifecycleSignal]);
183
+ const abortSignal = params.job.runtime.abortSignal && params.lifecycleSignal ? AbortSignal.any([params.job.runtime.abortSignal, params.lifecycleSignal]) : params.job.runtime.abortSignal ?? params.lifecycleSignal;
185
184
  try {
186
185
  await processDiscordMessageImpl(materializeDiscordInboundJob(params.job, abortSignal));
187
186
  await commitDiscordInboundReplay({
@@ -307,7 +306,7 @@ function createDiscordReplyTypingFeedback(params) {
307
306
  }
308
307
  //#endregion
309
308
  //#region extensions/discord/src/monitor/message-handler.ts
310
- const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-DvLXiYVH.js"));
309
+ const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-BI86IbHz.js"));
311
310
  function isNonEmptyString(value) {
312
311
  return typeof value === "string" && value.length > 0;
313
312
  }
@@ -530,4 +529,4 @@ function createDiscordMessageHandler(params) {
530
529
  return handler;
531
530
  }
532
531
  //#endregion
533
- export { createDiscordReplyTypingFeedback as n, createDiscordMessageHandler as t };
532
+ export { createDiscordReplyTypingFeedback as n, DiscordRetryableInboundError as r, createDiscordMessageHandler as t };
@@ -1,14 +1,14 @@
1
- import { N as Message, d as discord_exports, vt as getChannelMessage } from "./send.receipt-BpBQED_5.js";
1
+ import { F as Message, bt as getChannelMessage, d as discord_exports } from "./send.receipt-aegk69an.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-C-MqM-B_.js";
4
- import { t as resolveDiscordConversationIdentity } from "./conversation-identity-DWC5d8Sy.js";
5
- import { d as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-iSWjCYjB.js";
6
- import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C5TBc_9x.js";
7
- import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-BjIf9lGs.js";
8
- import "./thread-bindings-DsTxqu3E.js";
9
- import { D as resolveDiscordDmCommandAccess, O as resolveDiscordTextCommandAccess, _ as resolveDiscordConversationRoute, b as handleDiscordDmCommandDecision, g as buildDiscordRoutePeer, v as resolveDiscordEffectiveRoute, y as shouldIgnoreStaleDiscordRouteBinding } from "./provider-BkfbC9FQ.js";
10
- import { a as resolveForwardedMediaList, d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-B_3yA5bN.js";
11
- import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
3
+ import { C as resolveTimestampMs, S as resolveDiscordSystemLocation, _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, i as normalizeDiscordDisplaySlug, n as isDiscordGroupAllowedByPolicy, p as resolveDiscordMemberAccessState, v as resolveGroupDmAllow, x as formatDiscordUserTag } from "./allow-list-B7qOH5xu.js";
4
+ import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-ZRc9Lw4y.js";
5
+ import { t as resolveDiscordConversationIdentity } from "./conversation-identity-BpkAzklg.js";
6
+ import { d as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-9VAxhVf6.js";
7
+ import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-DJD3qwIN.js";
8
+ import "./thread-bindings-BbzjUuNB.js";
9
+ import { A as resolveDiscordTextCommandAccess, S as handleDiscordDmCommandDecision, b as resolveDiscordEffectiveRoute, k as resolveDiscordDmCommandAccess, v as buildDiscordRoutePeer, x as shouldIgnoreStaleDiscordRouteBinding, y as resolveDiscordConversationRoute } from "./provider-DWvDNb4J.js";
10
+ import { a as resolveForwardedMediaList, d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-D4j07taS.js";
11
+ import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-C62lBe18.js";
12
12
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
13
13
  import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
14
14
  import { MessageReferenceType, MessageType } from "discord-api-types/v10";
@@ -25,7 +25,7 @@ import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runti
25
25
  import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
26
26
  //#region extensions/discord/src/monitor/message-handler.dm-preflight.ts
27
27
  const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
28
- const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-iJ0B4bAX.js").then((n) => n.t));
28
+ const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-BFpa_DHn.js").then((n) => n.t));
29
29
  function resolveDiscordDmPairingSenderId(sender) {
30
30
  return sender.isPluralKit ? `pk:${sender.id}` : sender.id;
31
31
  }
@@ -183,8 +183,7 @@ function copyRuntimeMessageFields(source, target) {
183
183
  const channelDescriptor = Object.getOwnPropertyDescriptor(source, "channel");
184
184
  if (channelDescriptor) Object.defineProperty(target, "channel", channelDescriptor);
185
185
  }
186
- function shouldHydrateDiscordMessage(params) {
187
- if (hasMissingReferencedMessagePayload(params.message)) return true;
186
+ function shouldHydrateDiscordMessagePayload(params) {
188
187
  let currentText;
189
188
  try {
190
189
  currentText = resolveDiscordMessageText(params.message, { includeForwarded: true });
@@ -202,18 +201,42 @@ function hasMissingReferencedMessagePayload(message) {
202
201
  if (message.type != null && message.type !== MessageType.Reply) return false;
203
202
  return !Object.hasOwn(readMessageRawData(message), "referenced_message");
204
203
  }
204
+ async function hydrateDiscordReplyReference(params) {
205
+ if (!hasMissingReferencedMessagePayload(params.message)) return params.message;
206
+ const reference = params.message.messageReference;
207
+ const referencedMessageId = reference?.message_id;
208
+ if (!referencedMessageId) return params.message;
209
+ const referencedChannelId = reference.channel_id ?? params.messageChannelId;
210
+ try {
211
+ const referenced = await getChannelMessage(params.client.rest, referencedChannelId, referencedMessageId);
212
+ if (!referenced) return params.message;
213
+ return mergeFetchedDiscordMessage(params.message, {
214
+ ...readMessageRawData(params.message),
215
+ referenced_message: referenced
216
+ });
217
+ } catch (err) {
218
+ logVerbose(`discord: failed to hydrate referenced message ${referencedMessageId}: ${String(err)}`);
219
+ return params.message;
220
+ }
221
+ }
205
222
  async function hydrateDiscordMessageIfNeeded(params) {
206
223
  params.channelInfo;
207
- if (!shouldHydrateDiscordMessage({ message: params.message })) return params.message;
208
- try {
224
+ let hydrated = params.message;
225
+ if (shouldHydrateDiscordMessagePayload({ message: params.message })) try {
209
226
  const fetched = await getChannelMessage(params.client.rest, params.messageChannelId, params.message.id);
210
- if (!fetched) return params.message;
211
- logVerbose(`discord: hydrated inbound payload via REST for ${params.message.id}`);
212
- return mergeFetchedDiscordMessage(params.message, fetched);
227
+ if (fetched) {
228
+ logVerbose(`discord: hydrated inbound payload via REST for ${params.message.id}`);
229
+ hydrated = mergeFetchedDiscordMessage(params.message, fetched);
230
+ }
213
231
  } catch (err) {
214
232
  logVerbose(`discord: failed to hydrate message ${params.message.id}: ${String(err)}`);
215
233
  return params.message;
216
234
  }
235
+ return hydrateDiscordReplyReference({
236
+ client: params.client,
237
+ message: hydrated,
238
+ messageChannelId: params.messageChannelId
239
+ });
217
240
  }
218
241
  //#endregion
219
242
  //#region extensions/discord/src/monitor/message-handler.preflight-channel-access.ts
@@ -424,10 +447,10 @@ function logDiscordPreflightInboundSummary(params) {
424
447
  }
425
448
  //#endregion
426
449
  //#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
427
- const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-DcD-3EcL.js").then((n) => n.n));
450
+ const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-UXq1OyUI.js").then((n) => n.n));
428
451
  const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-DYL2ABgA.js"));
429
- const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-DVnqSyTt.js"));
430
- const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./provider-BkfbC9FQ.js").then((n) => n.S));
452
+ const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-DKwfE-2z.js"));
453
+ const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./provider-DWvDNb4J.js").then((n) => n.w));
431
454
  function isPreflightAborted(abortSignal) {
432
455
  return Boolean(abortSignal?.aborted);
433
456
  }
@@ -439,7 +462,8 @@ async function resolveDiscordPreflightPluralKitInfo(params) {
439
462
  const { fetchPluralKitMessageInfo } = await loadPluralKitRuntime();
440
463
  const info = await fetchPluralKitMessageInfo({
441
464
  messageId: params.message.id,
442
- config: params.config
465
+ config: params.config,
466
+ signal: params.abortSignal
443
467
  });
444
468
  return isPreflightAborted(params.abortSignal) ? null : info;
445
469
  } catch (err) {