@openclaw/discord 2026.7.2-beta.7 → 2026.8.1-beta.3

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 (114) hide show
  1. package/dist/{account-inspect-SXiCBCgP.js → account-inspect-D5xmUpnj.js} +49 -43
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/accounts-DNl-oCEw.js +371 -0
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/{active-turn-thread-route-MlKWp8RD.js → active-turn-thread-route-fmHl1HNd.js} +9 -11
  6. package/dist/{activities-api-DTKsuDxf.js → activities-api-KCBAmWxD.js} +133 -175
  7. package/dist/activities-api.js +1 -1
  8. package/dist/{allow-list-DzKrtfah.js → allow-list-BDMimASD.js} +2 -3
  9. package/dist/{api-DnrK9gML.js → api-DNVbJyEy.js} +7 -2
  10. package/dist/api.js +18 -18
  11. package/dist/{approval-handler.runtime-HymvFTYn.js → approval-handler.runtime-B12RCYr8.js} +6 -6
  12. package/dist/{approval-message-safety-DEyKVsAw.js → approval-message-safety-XGFPbDoI.js} +89 -3
  13. package/dist/{audit-CjsrabP8.js → audit-Yc7eZDd6.js} +5 -5
  14. package/dist/{channel-actions-uXFTJX3o.js → channel-actions-Dr2QI8Bf.js} +11 -7
  15. package/dist/{channel-actions.runtime-CIYU90sl.js → channel-actions.runtime-CODTvo7c.js} +99 -97
  16. package/dist/{channel-vKa-76xY.js → channel-cXYzGc4L.js} +102 -104
  17. package/dist/channel-config-api.js +1 -1
  18. package/dist/channel-plugin-api.js +1 -1
  19. package/dist/{channel.setup-CmcwZ_qd.js → channel.setup-CSiwnMgs.js} +16 -54
  20. package/dist/{outbound-session-route-H-HoyH5U.js → components-ezGKo_Yh.js} +69 -142
  21. package/dist/{config-schema-WHRQcY19.js → config-schema-DC5kDtQ5.js} +42 -11
  22. package/dist/conversation-binding-route-D6rCQ5S0.js +43 -0
  23. package/dist/{directory-config-D_LojtCe.js → directory-config-XyCfoqLg.js} +2 -2
  24. package/dist/directory-contract-api.js +1 -1
  25. package/dist/{directory-live-Bw5Ephzv.js → directory-live-Df0NbFJB.js} +7 -4
  26. package/dist/{doctor-Bc4S1qyd.js → doctor-DYY31GrO.js} +34 -13
  27. package/dist/{doctor-contract-CCFMIDk9.js → doctor-contract-DsWvKIXF.js} +2 -3
  28. package/dist/doctor-contract-api.js +147 -2
  29. package/dist/{handle-action.guild-admin-D6VRRW-C.js → handle-action.guild-admin-6Tvvinsa.js} +4 -7
  30. package/dist/{inbound-event-delivery-CEPlt2uz.js → inbound-event-delivery-De2qxTrP.js} +4 -25
  31. package/dist/index.js +5 -4
  32. package/dist/{message-handler-CeiSulIw.js → message-handler-B61q5MOF.js} +118 -33
  33. package/dist/{message-handler.preflight-DibgQFf2.js → message-handler.preflight-Bzg_Hawz.js} +75 -61
  34. package/dist/{message-handler.process-Dnc_oz9y.js → message-handler.process--4_712Ec.js} +236 -296
  35. package/dist/{message-utils-BgTwT_q7.js → message-utils-BXLLnFl6.js} +34 -35
  36. package/dist/{model-picker-preference-primitives-D25pnCOu.js → model-picker-preference-primitives-BHT1LkR_.js} +3 -3
  37. package/dist/{outbound-adapter-DtE-i2OJ.js → outbound-adapter-DxHTOqiN.js} +157 -68
  38. package/dist/{outbound-components-C7GVyfPh.js → outbound-components-B2PL0ooH.js} +3 -3
  39. package/dist/owner-access-Bg41VzAf.js +107 -0
  40. package/dist/{pluralkit-CD4B11JB.js → pluralkit-dUl4v1X3.js} +1 -1
  41. package/dist/{preflight-audio-BjnQZ5yS.js → preflight-audio-DrnqFA8U.js} +22 -28
  42. package/dist/{probe-BeWKhjqX.js → probe-BTdtVRwU.js} +37 -13
  43. package/dist/probe.runtime-Dq5-PRKT.js +2 -0
  44. package/dist/{provider-DfQJX3z5.js → provider-DlK_ynqt.js} +1131 -2021
  45. package/dist/{provider-session.runtime-Bo88k0pV.js → provider-session.runtime-CvvphHvs.js} +3 -3
  46. package/dist/provider.runtime-CzKGRiAF.js +2 -0
  47. package/dist/realtime-session.runtime-ysbMG8v7.js +1351 -0
  48. package/dist/{resolve-allowlist-common-DHERApxi.js → resolve-allowlist-common-DIVXbD1P.js} +3 -3
  49. package/dist/{resolve-channels-BjepAj8b.js → resolve-channels-CGeUoIqb.js} +4 -4
  50. package/dist/{resolve-users-Bc28htgt.js → resolve-users-BtKxLUZv.js} +3 -3
  51. package/dist/{chunk-DX4jpFQP.js → retry-DNsVTeTo.js} +308 -131
  52. package/dist/{runtime-BmW_j_hl.js → runtime-CQovMsH3.js} +12 -15
  53. package/dist/{runtime-_aRC6V2s.js → runtime-D71_VFLr.js} +49 -58
  54. package/dist/runtime-api.actions.js +2 -2
  55. package/dist/runtime-api.js +23 -23
  56. package/dist/runtime-api.lookup.js +5 -5
  57. package/dist/runtime-api.monitor-CzeTYF32.js +6 -0
  58. package/dist/runtime-api.monitor.js +6 -5
  59. package/dist/runtime-api.send.js +6 -6
  60. package/dist/runtime-api.threads.js +5 -6
  61. package/dist/sdk-runtime-37OU6_Yh.js +369 -0
  62. package/dist/{secret-config-contract-B1akrlyY.js → secret-config-contract-B3i6WxV5.js} +53 -25
  63. package/dist/secret-contract-api.js +1 -1
  64. package/dist/security-audit-contract-api.js +1 -1
  65. package/dist/{security-audit.runtime-CPN0xFYz.js → security-audit.runtime-BVKF9VtY.js} +1 -1
  66. package/dist/{send-CdkZ6zeW.js → send-rQIffSYu.js} +180 -91
  67. package/dist/{send.components-5uqwkjgE.js → send.components-ChK1wS7w.js} +32 -46
  68. package/dist/{send.outbound-D-80Ej-t.js → send.outbound-HIkgji_7.js} +57 -34
  69. package/dist/{send.reactions-CtlmGd_o.js → send.reactions-gmJ6yFPo.js} +14 -21
  70. package/dist/{send.receipt-CuwRrpFz.js → send.receipt-Cnhoautb.js} +29 -1
  71. package/dist/{send.shared-jpvAG_u6.js → send.shared-B3fpaLWJ.js} +112 -181
  72. package/dist/{sender-identity-mG_zsdox.js → sender-identity-BJtfyise.js} +1 -1
  73. package/dist/setup-entry.js +0 -5
  74. package/dist/setup-plugin-api.js +1 -1
  75. package/dist/{shared-CXF1tup1.js → shared-CaAaoksy.js} +27 -23
  76. package/dist/subagent-hooks-CNT2ZJTJ.js +49 -0
  77. package/dist/subagent-hooks-api.js +2 -6
  78. package/dist/subagent-progress-FPLqBY1s.js +110 -0
  79. package/dist/{system-events-DdUqf91B.js → system-events-Nuwoq_au.js} +2 -2
  80. package/dist/{target-resolver-C3s_2m0t.js → target-resolver-DIXShHaZ.js} +3 -3
  81. package/dist/targets-B2pf49zc.js +3 -0
  82. package/dist/{thread-bindings-C-M-ly7P.js → thread-bindings-VlymUnbz.js} +29 -28
  83. package/dist/{thread-bindings.manager-DYvSlrva.js → thread-bindings.manager-CngsgErq.js} +258 -29
  84. package/dist/{thread-bindings.session-updates-DAIlp7Px.js → thread-bindings.session-updates-CJb-BpPL.js} +1 -1
  85. package/dist/{thread-bindings.state-Cgi5uRn-.js → thread-bindings.state-D8OMdk4O.js} +3 -16
  86. package/dist/threading-DU6pgeGm.js +456 -0
  87. package/dist/transcripts-source-DeIMNbRh.js +265 -0
  88. package/dist/transcripts-source-api.js +7 -2
  89. package/dist/{typing--Mzo2kM7.js → typing-oLiS5Z13.js} +1 -1
  90. package/dist/voice-runtime-CjNFaynA.js +2549 -0
  91. package/openclaw.plugin.json +215 -25
  92. package/package.json +15 -11
  93. package/skills/discord/SKILL.md +22 -115
  94. package/dist/accounts-DJTf1LtA.js +0 -219
  95. package/dist/channel-api-CAJ0wMoV.js +0 -21
  96. package/dist/legacy-state-migrations-api.js +0 -138
  97. package/dist/manager.runtime-Bjav3pfC.js +0 -3655
  98. package/dist/preflight-audio.runtime-CoCXMM8r.js +0 -7
  99. package/dist/probe.runtime-DqFGFMbZ.js +0 -2
  100. package/dist/provider.runtime-Cy7XZmyh.js +0 -2
  101. package/dist/runtime-api.monitor-CCRubd3-.js +0 -5
  102. package/dist/session-binding-contract-api.js +0 -2
  103. package/dist/subagent-hooks-Dxy7Fmnq.js +0 -120
  104. package/dist/subagent-progress-DI3sYLLo.js +0 -664
  105. package/dist/targets-Dv_RN7vT.js +0 -3
  106. package/dist/thread-bindings.discord-api-BoDNqamb.js +0 -246
  107. package/dist/transcripts-source-DIKGsTGT.js +0 -123
  108. package/node_modules/p-map/index.d.ts +0 -155
  109. package/node_modules/p-map/index.js +0 -285
  110. package/node_modules/p-map/license +0 -9
  111. package/node_modules/p-map/package.json +0 -57
  112. package/node_modules/p-map/readme.md +0 -190
  113. package/dist/{audit-core-xwjIczO0.js → audit-core-BCX8UeFH.js} +1 -1
  114. package/dist/{security-audit-jGnJF__m.js → security-audit-BfJhAXZp.js} +1 -1
@@ -1,9 +1,7 @@
1
1
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
2
- import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
3
- import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
4
2
  import { getFileExtension } from "openclaw/plugin-sdk/media-mime";
3
+ import { createChannelPreflightAudio } from "openclaw/plugin-sdk/media-understanding-runtime";
5
4
  //#region extensions/discord/src/monitor/preflight-audio.ts
6
- const loadDiscordPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio.runtime-CoCXMM8r.js"));
7
5
  const AUDIO_ATTACHMENT_MIME_BY_EXT = /* @__PURE__ */ new Map([
8
6
  [".aac", "audio/aac"],
9
7
  [".caf", "audio/x-caf"],
@@ -22,9 +20,14 @@ function inferAudioAttachmentMime(attachment) {
22
20
  const ext = getFileExtension(attachment.filename ?? attachment.url);
23
21
  return ext ? AUDIO_ATTACHMENT_MIME_BY_EXT.get(ext) : void 0;
24
22
  }
23
+ const discordPreflightAudio = createChannelPreflightAudio({
24
+ channel: "discord",
25
+ isAudio: (attachment) => Boolean(normalizeOptionalString(attachment.url) && inferAudioAttachmentMime(attachment)),
26
+ deferTranscriptEcho: false
27
+ });
25
28
  function collectAudioAttachments(attachments) {
26
29
  if (!Array.isArray(attachments)) return [];
27
- return attachments.filter((att) => normalizeOptionalString(att.url) && inferAudioAttachmentMime(att));
30
+ return attachments.filter(discordPreflightAudio.isAudio);
28
31
  }
29
32
  async function resolveDiscordPreflightAudioMentionContext(params) {
30
33
  const audioAttachments = collectAudioAttachments(params.message.attachments);
@@ -37,30 +40,21 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
37
40
  hasAudioAttachment,
38
41
  hasTypedText
39
42
  };
40
- try {
41
- const { transcribeFirstAudio } = await loadDiscordPreflightAudioRuntime();
42
- if (params.abortSignal?.aborted) return {
43
- hasAudioAttachment,
44
- hasTypedText
45
- };
46
- const media = audioAttachments.flatMap((attachment) => {
47
- const url = normalizeOptionalString(attachment.url);
48
- return url ? [{
49
- url,
50
- contentType: inferAudioAttachmentMime(attachment)
51
- }] : [];
52
- });
53
- if (media.length > 0) {
54
- transcript = await transcribeFirstAudio({
55
- ctx: { media },
56
- cfg: params.cfg,
57
- agentDir: void 0
58
- });
59
- if (params.abortSignal?.aborted) transcript = void 0;
60
- }
61
- } catch (err) {
62
- logVerbose(`discord: audio preflight transcription failed: ${String(err)}`);
63
- }
43
+ const media = audioAttachments.flatMap((attachment) => {
44
+ const url = normalizeOptionalString(attachment.url);
45
+ return url ? [{
46
+ url,
47
+ contentType: inferAudioAttachmentMime(attachment)
48
+ }] : [];
49
+ });
50
+ if (media.length > 0) transcript = await discordPreflightAudio.resolve({
51
+ request: {
52
+ ctx: { media },
53
+ cfg: params.cfg,
54
+ agentDir: void 0
55
+ },
56
+ abortSignal: params.abortSignal
57
+ });
64
58
  }
65
59
  return {
66
60
  hasAudioAttachment,
@@ -1,5 +1,5 @@
1
- import { p as normalizeDiscordToken } from "./accounts-DJTf1LtA.js";
2
- import { n as DiscordApiError, r as fetchDiscord } from "./api-DnrK9gML.js";
1
+ import { m as normalizeDiscordToken } from "./accounts-DNl-oCEw.js";
2
+ import { n as DiscordApiError, r as fetchDiscord } from "./api-DNVbJyEy.js";
3
3
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
4
4
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
5
5
  import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
@@ -135,22 +135,46 @@ function parseApplicationIdFromToken(token) {
135
135
  return;
136
136
  }
137
137
  }
138
- async function fetchDiscordApplicationId(token, timeoutMs, fetcher = fetch) {
138
+ async function probeDiscordApplicationId(token, timeoutMs, fetcher = fetch) {
139
139
  const normalized = normalizeDiscordToken(token, "channels.discord.token");
140
- if (!normalized) return;
140
+ if (!normalized) return {
141
+ kind: "unavailable",
142
+ status: null,
143
+ error: /* @__PURE__ */ new Error("missing token")
144
+ };
141
145
  const parsedApplicationId = parseApplicationIdFromToken(token);
142
- if (parsedApplicationId) return parsedApplicationId;
146
+ if (parsedApplicationId) return {
147
+ kind: "resolved",
148
+ applicationId: parsedApplicationId
149
+ };
143
150
  try {
144
151
  const json = await fetchDiscord("/oauth2/applications/@me", normalized, fetcher, { timeoutMs });
145
- if (json?.id) return json.id;
146
- return;
152
+ if (json?.id) return {
153
+ kind: "resolved",
154
+ applicationId: json.id
155
+ };
156
+ return {
157
+ kind: "unavailable",
158
+ status: null,
159
+ error: /* @__PURE__ */ new Error("Discord application response did not include an id")
160
+ };
147
161
  } catch (error) {
148
- if (error instanceof DiscordApiError) {
149
- if (error.status === 429) throw error;
150
- return;
151
- }
152
- return;
162
+ if (error instanceof DiscordApiError && (error.status === 401 || error.status === 403)) return {
163
+ kind: "rejected",
164
+ status: error.status,
165
+ error
166
+ };
167
+ return {
168
+ kind: "unavailable",
169
+ status: error instanceof DiscordApiError ? error.status : null,
170
+ error
171
+ };
153
172
  }
154
173
  }
174
+ async function fetchDiscordApplicationId(token, timeoutMs, fetcher = fetch) {
175
+ const result = await probeDiscordApplicationId(token, timeoutMs, fetcher);
176
+ if (result.kind === "resolved") return result.applicationId;
177
+ if (result.kind === "unavailable" && result.status === 429) throw result.error;
178
+ }
155
179
  //#endregion
156
- export { resolveDiscordPrivilegedIntentsFromFlags as a, probeDiscord as i, fetchDiscordApplicationSummary as n, parseApplicationIdFromToken as r, fetchDiscordApplicationId as t };
180
+ export { probeDiscordApplicationId as a, probeDiscord as i, fetchDiscordApplicationSummary as n, resolveDiscordPrivilegedIntentsFromFlags as o, parseApplicationIdFromToken as r, fetchDiscordApplicationId as t };
@@ -0,0 +1,2 @@
1
+ import { a as probeDiscordApplicationId, i as probeDiscord, n as fetchDiscordApplicationSummary, o as resolveDiscordPrivilegedIntentsFromFlags, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BTdtVRwU.js";
2
+ export { fetchDiscordApplicationId, fetchDiscordApplicationSummary, parseApplicationIdFromToken, probeDiscord, probeDiscordApplicationId, resolveDiscordPrivilegedIntentsFromFlags };