@openclaw/discord 2026.5.7 → 2026.5.10-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 (110) hide show
  1. package/dist/{access-CHY9FK3X.js → access-R4X7pYt4.js} +1 -1
  2. package/dist/action-runtime-api.js +1 -1
  3. package/dist/{allow-list-ek-1hMKN.js → allow-list-4wnZg5P9.js} +2 -6
  4. package/dist/api.js +18 -16
  5. package/dist/{approval-handler.runtime-BBZRYAGs.js → approval-handler.runtime-B5BCBw4D.js} +3 -4
  6. package/dist/{approval-native-CBdZsAR7.js → approval-native-CrCc3b4u.js} +2 -2
  7. package/dist/{approval-shared-Ck6TxKgo.js → approval-shared-Ckk65xSG.js} +1 -1
  8. package/dist/{audit-CCJ0h49k.js → audit-BRBe8xFv.js} +4 -4
  9. package/dist/{channel-UXGa9PGc.js → channel-DTBEGHsT.js} +53 -31
  10. package/dist/{channel-actions-Br29_1nE.js → channel-actions-CHgoSpPF.js} +27 -1
  11. package/dist/{channel-actions.runtime-ChmNUig1.js → channel-actions.runtime-E5Plubuu.js} +5 -5
  12. package/dist/channel-config-api.js +1 -1
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/{channel.setup-D_xyQu_h.js → channel.setup-EQXuueIk.js} +3 -3
  15. package/dist/chunk-DYl-_5RL.js +179 -0
  16. package/dist/{components-D5LnN7ZQ.js → components-BJOShoIU.js} +2 -3
  17. package/dist/{config-schema-Cc953rAs.js → config-schema-BGn5I3_3.js} +46 -1
  18. package/dist/contract-api.js +7 -7
  19. package/dist/{conversation-identity-DHhS0ez3.js → conversation-identity-BPQm_uhV.js} +1 -1
  20. package/dist/{directory-config-DoETeOOx.js → directory-config-JBaFwbAQ.js} +1 -1
  21. package/dist/directory-contract-api.js +1 -1
  22. package/dist/{directory-live-DJ0V5asB.js → directory-live-B4kW11z5.js} +2 -2
  23. package/dist/{discord-eZlimVfW.js → discord-DtHMmZqJ.js} +58 -15
  24. package/dist/{doctor-Bo-yifB3.js → doctor-CPV4Ch3V.js} +3 -3
  25. package/dist/{doctor-contract-Bso46EOQ.js → doctor-contract-BGjjFBdq.js} +1 -1
  26. package/dist/doctor-contract-api.js +1 -1
  27. package/dist/{handle-action.guild-admin-sJiQymg8.js → handle-action.guild-admin-DSeMCHvR.js} +6 -3
  28. package/dist/{inbound-context-CRylwjg0.js → inbound-context-BAwOn5Iq.js} +1 -1
  29. package/dist/manager.runtime-DGvCDWI5.js +2082 -0
  30. package/dist/{message-handler-C9Ohf-ea.js → message-handler-BWHSteQf.js} +7 -7
  31. package/dist/{message-handler.preflight-BrvazsYn.js → message-handler.preflight-q7ose9Ta.js} +31 -42
  32. package/dist/{message-handler.process-CEnzuLiN.js → message-handler.process-BN8bE7AE.js} +81 -64
  33. package/dist/{message-utils-9kaGF59d.js → message-utils-DEjCwCRz.js} +2 -2
  34. package/dist/normalize-Cu94FOqy.js +58 -0
  35. package/dist/{outbound-adapter-DNsTVJfH.js → outbound-adapter-Bt8FL3yO.js} +78 -17
  36. package/dist/{outbound-session-route-DK9qkPgP.js → outbound-session-route-BaJRt05p.js} +1 -1
  37. package/dist/{pluralkit-OFss_pIy.js → pluralkit-CUfobeQu.js} +1 -1
  38. package/dist/{preflight-audio-CRmUxxuM.js → preflight-audio-BcsH127L.js} +1 -1
  39. package/dist/{preview-streaming-Cc_oeIPP.js → preview-streaming-DCPAe24T.js} +1 -0
  40. package/dist/{probe.runtime-CMgUDax3.js → probe.runtime-4Q9GD7FG.js} +1 -1
  41. package/dist/{provider-CuOh6z_b.js → provider-DBvvDP9A.js} +185 -225
  42. package/dist/{provider-session.runtime-CCESIHVo.js → provider-session.runtime-DepAOR1U.js} +3 -3
  43. package/dist/provider.runtime-BlbOt97W.js +2 -0
  44. package/dist/{reply-delivery-D9aKHtDH.js → reply-delivery-vHSqaKKo.js} +9 -6
  45. package/dist/{resolve-allowlist-common-_e1cWOb3.js → resolve-allowlist-common-ZcVU4OMA.js} +1 -1
  46. package/dist/{resolve-channels-kyuvrXJg.js → resolve-channels-D9Dubj_y.js} +3 -3
  47. package/dist/{resolve-users-CAwh4EBq.js → resolve-users-DlzKsLQe.js} +2 -2
  48. package/dist/route-resolution-foWW8_D1.js +268 -0
  49. package/dist/runtime-api.actions.js +2 -2
  50. package/dist/runtime-api.js +25 -25
  51. package/dist/runtime-api.lookup.js +6 -6
  52. package/dist/runtime-api.monitor-CsetE9pd.js +6 -0
  53. package/dist/runtime-api.monitor.js +7 -7
  54. package/dist/runtime-api.send.js +5 -5
  55. package/dist/runtime-api.threads.js +5 -5
  56. package/dist/{runtime-D8alY00g.js → runtime-oXRGbcb5.js} +7 -7
  57. package/dist/runtime-setter-api.js +1 -1
  58. package/dist/secret-contract-api.js +1 -1
  59. package/dist/{security-audit-BtRd_VhN.js → security-audit-BQ_sGK3J.js} +1 -1
  60. package/dist/security-audit-contract-api.js +1 -1
  61. package/dist/{security-audit.runtime-Dm1LW9KX.js → security-audit.runtime-B7Gmz2DX.js} +1 -1
  62. package/dist/security-contract-api.js +1 -1
  63. package/dist/{send-8S_HKJpQ.js → send-BSBMchf8.js} +83 -57
  64. package/dist/{send.components-A42c_5tQ.js → send.components-BoEhxys4.js} +22 -15
  65. package/dist/{send.outbound-D3tonSz8.js → send.outbound-B2DK2loZ.js} +22 -11
  66. package/dist/send.receipt-BAZw2Zsz.js +35 -0
  67. package/dist/{send.shared-BQGiUPvZ.js → send.shared-DzwpAEMP.js} +26 -7
  68. package/dist/session-key-api.js +1 -1
  69. package/dist/setup-plugin-api.js +1 -1
  70. package/dist/{shared-BEW4H3bj.js → shared-CBsrEG5q.js} +8 -8
  71. package/dist/{shared-interactive-KgJjCqnB.js → shared-interactive-D39V9Wtn.js} +3 -3
  72. package/dist/{subagent-hooks-T0LPLh4H.js → subagent-hooks-BDy1pJD5.js} +2 -2
  73. package/dist/subagent-hooks-api.js +1 -1
  74. package/dist/{system-events-_fzSG--3.js → system-events-BeVImqnV.js} +1 -1
  75. package/dist/target-parsing-D-H7nnh2.js +51 -0
  76. package/dist/target-resolver-DzOelJEt.js +85 -0
  77. package/dist/targets-Dj-qyUaE.js +3 -0
  78. package/dist/test-api.js +4 -4
  79. package/dist/{thread-bindings-CMpZjP50.js → thread-bindings-DUzBL8jL.js} +7 -7
  80. package/dist/{thread-bindings.discord-api-CwWGoyei.js → thread-bindings.discord-api-dpSDYFKX.js} +7 -7
  81. package/dist/{thread-bindings.manager-BtxfLfWf.js → thread-bindings.manager-DTuwm8Tk.js} +5 -6
  82. package/dist/{thread-bindings.session-updates-jcZSiRPI.js → thread-bindings.session-updates-BhcGQTJb.js} +1 -1
  83. package/dist/{threading-BMmpA2JR.js → threading-CTUnZtNi.js} +4 -5
  84. package/dist/timeouts.js +1 -1
  85. package/dist/{typing-Bw6NKWLZ.js → typing-BYeVSviE.js} +2 -3
  86. package/openclaw.plugin.json +222 -1
  87. package/package.json +5 -5
  88. package/dist/manager.runtime-Cug1PoeZ.js +0 -1025
  89. package/dist/provider.runtime-B68g3qLv.js +0 -2
  90. package/dist/rolldown-runtime-C3SqQTfK.js +0 -28
  91. package/dist/route-resolution-BWErj5Cn.js +0 -236
  92. package/dist/runtime-api.monitor-DzkCxeBL.js +0 -6
  93. package/dist/target-resolver-DA84_xbt.js +0 -365
  94. package/dist/targets-FwL1BPTU.js +0 -2
  95. /package/dist/{agent-components.runtime-Dof1YMSz.js → agent-components.runtime-zT8qPsnM.js} +0 -0
  96. /package/dist/{audit-core-CejGc3hO.js → audit-core-CG37TsZm.js} +0 -0
  97. /package/dist/{channel-access-DFIQqbYm.js → channel-access-BL-wemES.js} +0 -0
  98. /package/dist/{doctor-shared-Cqvfgv9m.js → doctor-shared-D_QLzu30.js} +0 -0
  99. /package/dist/{mentions-BPZUaFk7.js → mentions-f806C7MB.js} +0 -0
  100. /package/dist/{preflight-audio.runtime-DPVbpZid.js → preflight-audio.runtime-fXnUxxBa.js} +0 -0
  101. /package/dist/{probe-E80IMT1X.js → probe-CjO53qsc.js} +0 -0
  102. /package/dist/{runtime-K9RT6Egn.js → runtime-BqCoo-zp.js} +0 -0
  103. /package/dist/{secret-config-contract-5S9U9pjx.js → secret-config-contract-BCQNNS7N.js} +0 -0
  104. /package/dist/{security-contract-BE8rsdPq.js → security-contract-DrbQqyyW.js} +0 -0
  105. /package/dist/{security-doctor-DiilN216.js → security-doctor-BJH5YIGL.js} +0 -0
  106. /package/dist/{sender-identity-BGUfyvOC.js → sender-identity-CDOVm5Dk.js} +0 -0
  107. /package/dist/{session-contract-CuW9Nlxg.js → session-contract-D871HDFG.js} +0 -0
  108. /package/dist/{session-key-normalization-B5La-jFM.js → session-key-normalization-BQNCS1gu.js} +0 -0
  109. /package/dist/{thread-bindings.state-WU4duXKY.js → thread-bindings.state-DwgDYzBM.js} +0 -0
  110. /package/dist/{timeouts-CdsmBWWs.js → timeouts-C3FYXWJX.js} +0 -0
@@ -1,7 +1,9 @@
1
+ import { m as DiscordError } from "./discord-DtHMmZqJ.js";
1
2
  import { s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
2
- import { o as normalizeDiscordOutboundTarget, s as chunkDiscordTextWithMode } from "./target-resolver-DA84_xbt.js";
3
- import { m as DiscordError } from "./discord-eZlimVfW.js";
4
- import { c as readDiscordComponentSpec } from "./components-D5LnN7ZQ.js";
3
+ import { t as chunkDiscordTextWithMode } from "./chunk-DYl-_5RL.js";
4
+ import { i as normalizeDiscordOutboundTarget } from "./normalize-Cu94FOqy.js";
5
+ import { t as createDiscordSendReceipt } from "./send.receipt-BAZw2Zsz.js";
6
+ import { c as readDiscordComponentSpec } from "./components-BJOShoIU.js";
5
7
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/text-runtime";
6
8
  import { resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
7
9
  import { resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
@@ -85,11 +87,11 @@ function normalizeDiscordApprovalPayload(payload) {
85
87
  let discordComponentSendPromise;
86
88
  let discordSharedInteractivePromise;
87
89
  async function sendDiscordComponentMessageLazy(...args) {
88
- discordComponentSendPromise ??= import("./send.components-A42c_5tQ.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
90
+ discordComponentSendPromise ??= import("./send.components-BoEhxys4.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
89
91
  return await (await discordComponentSendPromise)(...args);
90
92
  }
91
93
  function loadDiscordSharedInteractive() {
92
- discordSharedInteractivePromise ??= import("./shared-interactive-KgJjCqnB.js").then((n) => n.r);
94
+ discordSharedInteractivePromise ??= import("./shared-interactive-D39V9Wtn.js").then((n) => n.r);
93
95
  return discordSharedInteractivePromise;
94
96
  }
95
97
  function addPayloadTextFallback(spec, payload) {
@@ -114,7 +116,7 @@ async function buildDiscordPresentationPayload(params) {
114
116
  }
115
117
  async function resolveDiscordComponentSpec(payload) {
116
118
  const discordData = payload.channelData?.discord;
117
- const rawComponentSpec = discordData?.presentationComponents ?? readDiscordComponentSpec(discordData?.components);
119
+ const rawComponentSpec = discordData?.presentationComponents ?? (discordData?.components && typeof discordData.components === "object" && !Array.isArray(discordData.components) ? readDiscordComponentSpec(discordData.components) : null);
118
120
  if (rawComponentSpec) return addPayloadTextFallback(rawComponentSpec, payload);
119
121
  if (!payload.interactive) return;
120
122
  const interactiveSpec = (await loadDiscordSharedInteractive()).buildDiscordInteractiveComponents(payload.interactive);
@@ -124,7 +126,7 @@ async function resolveDiscordComponentSpec(payload) {
124
126
  //#region extensions/discord/src/outbound-send-context.ts
125
127
  let discordSendRuntimePromise;
126
128
  async function loadDiscordSendRuntime() {
127
- discordSendRuntimePromise ??= import("./send-8S_HKJpQ.js").then((n) => n.t);
129
+ discordSendRuntimePromise ??= import("./send-BSBMchf8.js").then((n) => n.t);
128
130
  return await discordSendRuntimePromise;
129
131
  }
130
132
  function resolveDiscordOutboundTarget(params) {
@@ -204,20 +206,70 @@ async function sendDiscordOutboundPayload(params) {
204
206
  return attachChannelToResult("discord", lastResult);
205
207
  }
206
208
  const componentSpec = await resolveDiscordComponentSpec(payload);
207
- if (!componentSpec) return await sendTextMediaPayload({
208
- channel: "discord",
209
- ctx: {
210
- ...ctx,
211
- payload
212
- },
213
- adapter: params.fallbackAdapter
214
- });
209
+ if (!componentSpec) {
210
+ const discordData = payload.channelData?.discord && typeof payload.channelData.discord === "object" && !Array.isArray(payload.channelData.discord) ? payload.channelData.discord : {};
211
+ const nativeComponents = Array.isArray(discordData.components) ? discordData.components : void 0;
212
+ const embeds = Array.isArray(discordData.embeds) ? discordData.embeds : void 0;
213
+ const filename = normalizeOptionalString(discordData.filename);
214
+ if (nativeComponents || embeds?.length || filename) return attachChannelToResult("discord", await sendPayloadMediaSequenceOrFallback({
215
+ text: payload.text ?? "",
216
+ mediaUrls,
217
+ fallbackResult: {
218
+ messageId: "",
219
+ channelId: sendContext.target,
220
+ receipt: createDiscordSendReceipt({
221
+ platformMessageIds: [],
222
+ channelId: sendContext.target,
223
+ kind: "unknown"
224
+ })
225
+ },
226
+ sendNoMedia: async () => await sendContext.withRetry(async () => await sendContext.send(sendContext.target, payload.text ?? "", {
227
+ verbose: false,
228
+ components: nativeComponents,
229
+ embeds,
230
+ filename,
231
+ replyTo: sendContext.resolveReplyTo(),
232
+ accountId: ctx.accountId ?? void 0,
233
+ silent: ctx.silent ?? void 0,
234
+ cfg: ctx.cfg,
235
+ ...sendContext.formatting
236
+ })),
237
+ send: async ({ text, mediaUrl, isFirst }) => await sendContext.withRetry(async () => await sendContext.send(sendContext.target, text, {
238
+ verbose: false,
239
+ mediaUrl,
240
+ mediaAccess: ctx.mediaAccess,
241
+ mediaLocalRoots: ctx.mediaLocalRoots,
242
+ mediaReadFile: ctx.mediaReadFile,
243
+ components: isFirst ? nativeComponents : void 0,
244
+ embeds: isFirst ? embeds : void 0,
245
+ filename: isFirst ? filename : void 0,
246
+ replyTo: sendContext.resolveReplyTo(),
247
+ accountId: ctx.accountId ?? void 0,
248
+ silent: ctx.silent ?? void 0,
249
+ cfg: ctx.cfg,
250
+ ...sendContext.formatting
251
+ }))
252
+ }));
253
+ return await sendTextMediaPayload({
254
+ channel: "discord",
255
+ ctx: {
256
+ ...ctx,
257
+ payload
258
+ },
259
+ adapter: params.fallbackAdapter
260
+ });
261
+ }
215
262
  return attachChannelToResult("discord", await sendPayloadMediaSequenceOrFallback({
216
263
  text: payload.text ?? "",
217
264
  mediaUrls,
218
265
  fallbackResult: {
219
266
  messageId: "",
220
- channelId: sendContext.target
267
+ channelId: sendContext.target,
268
+ receipt: createDiscordSendReceipt({
269
+ platformMessageIds: [],
270
+ channelId: sendContext.target,
271
+ kind: "unknown"
272
+ })
221
273
  },
222
274
  sendNoMedia: async () => await sendContext.withRetry(async () => await sendDiscordComponentMessageLazy(sendContext.target, componentSpec, {
223
275
  replyTo: sendContext.resolveReplyTo(),
@@ -264,7 +316,7 @@ function stripDiscordInternalRuntimeScaffolding(text) {
264
316
  }
265
317
  let discordThreadBindingsPromise;
266
318
  function loadDiscordThreadBindings() {
267
- discordThreadBindingsPromise ??= import("./thread-bindings-CMpZjP50.js").then((n) => n.t);
319
+ discordThreadBindingsPromise ??= import("./thread-bindings-DUzBL8jL.js").then((n) => n.t);
268
320
  return discordThreadBindingsPromise;
269
321
  }
270
322
  function resolveDiscordWebhookIdentity(params) {
@@ -317,6 +369,15 @@ const discordOutbound = {
317
369
  context: true,
318
370
  divider: true
319
371
  },
372
+ deliveryCapabilities: { durableFinal: {
373
+ text: true,
374
+ media: true,
375
+ payload: true,
376
+ silent: true,
377
+ replyTo: true,
378
+ thread: true,
379
+ messageSendingHooks: true
380
+ } },
320
381
  renderPresentation: async ({ payload, presentation }) => {
321
382
  return await buildDiscordPresentationPayload({
322
383
  payload,
@@ -1,4 +1,4 @@
1
- import { c as parseDiscordTarget } from "./target-resolver-DA84_xbt.js";
1
+ import { t as parseDiscordTarget } from "./target-parsing-D-H7nnh2.js";
2
2
  import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing";
3
3
  import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
4
4
  //#region extensions/discord/src/outbound-session-route.ts
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
1
+ import { Pt as __exportAll } from "./discord-DtHMmZqJ.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 });
@@ -4,7 +4,7 @@ import { getFileExtension } from "openclaw/plugin-sdk/media-mime";
4
4
  //#region extensions/discord/src/monitor/preflight-audio.ts
5
5
  let discordPreflightAudioRuntimePromise;
6
6
  function loadDiscordPreflightAudioRuntime() {
7
- discordPreflightAudioRuntimePromise ??= import("./preflight-audio.runtime-DPVbpZid.js");
7
+ discordPreflightAudioRuntimePromise ??= import("./preflight-audio.runtime-fXnUxxBa.js");
8
8
  return discordPreflightAudioRuntimePromise;
9
9
  }
10
10
  const AUDIO_ATTACHMENT_MIME_BY_EXT = new Map([
@@ -1,6 +1,7 @@
1
1
  import { resolveChannelPreviewStreamMode } from "openclaw/plugin-sdk/channel-streaming";
2
2
  //#region extensions/discord/src/preview-streaming.ts
3
3
  function resolveDiscordPreviewStreamMode(params = {}) {
4
+ if (params.streaming === void 0 && params.streamMode === void 0) return "progress";
4
5
  return resolveChannelPreviewStreamMode(params, "off");
5
6
  }
6
7
  //#endregion
@@ -1,2 +1,2 @@
1
- import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-E80IMT1X.js";
1
+ import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-CjO53qsc.js";
2
2
  export { fetchDiscordApplicationId, fetchDiscordApplicationSummary, parseApplicationIdFromToken, probeDiscord, resolveDiscordPrivilegedIntentsFromFlags };