@openclaw/discord 2026.5.7 → 2026.5.9-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.
- package/dist/{access-CHY9FK3X.js → access-Lk7H_e7y.js} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/{allow-list-ek-1hMKN.js → allow-list-Dtho5Hww.js} +1 -1
- package/dist/api.js +19 -17
- package/dist/{approval-handler.runtime-BBZRYAGs.js → approval-handler.runtime-CqvKEAqO.js} +3 -3
- package/dist/{approval-native-CBdZsAR7.js → approval-native-W5mtrjYy.js} +2 -2
- package/dist/{approval-shared-Ck6TxKgo.js → approval-shared-D0FVj8b_.js} +1 -1
- package/dist/{audit-CCJ0h49k.js → audit-CrCPCVFG.js} +3 -3
- package/dist/{channel-UXGa9PGc.js → channel-CRTWY5R-.js} +53 -31
- package/dist/{channel-actions-Br29_1nE.js → channel-actions-BRgtLo8F.js} +27 -1
- package/dist/{channel-actions.runtime-ChmNUig1.js → channel-actions.runtime-gosyu06g.js} +5 -5
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-D_xyQu_h.js → channel.setup-BQlXR1Gt.js} +3 -3
- package/dist/chunk-BDgKaWaV.js +179 -0
- package/dist/{components-D5LnN7ZQ.js → components-BWdIitIb.js} +2 -2
- package/dist/{config-schema-Cc953rAs.js → config-schema-D1DUqXws.js} +46 -1
- package/dist/contract-api.js +7 -7
- package/dist/{conversation-identity-DHhS0ez3.js → conversation-identity-6hcTVj3L.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DJ0V5asB.js → directory-live-D3kbmVAu.js} +3 -3
- package/dist/{discord-eZlimVfW.js → discord-Du6FnKAq.js} +30 -13
- package/dist/{doctor-Bo-yifB3.js → doctor-Ys2-q5bc.js} +3 -3
- package/dist/{doctor-contract-Bso46EOQ.js → doctor-contract-DSB2zzJA.js} +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-sJiQymg8.js → handle-action.guild-admin-LM6kZ6zE.js} +6 -3
- package/dist/{inbound-context-CRylwjg0.js → inbound-context-BobVUBqo.js} +1 -1
- package/dist/{manager.runtime-Cug1PoeZ.js → manager.runtime-C_cPd048.js} +802 -134
- package/dist/{mentions-BPZUaFk7.js → mentions-CiPUID82.js} +1 -1
- package/dist/{message-handler-C9Ohf-ea.js → message-handler-C2ZQV7ZQ.js} +7 -7
- package/dist/{message-handler.preflight-BrvazsYn.js → message-handler.preflight-B5hN7RpX.js} +15 -15
- package/dist/{message-handler.process-CEnzuLiN.js → message-handler.process-Dns8D7t2.js} +82 -65
- package/dist/{message-utils-9kaGF59d.js → message-utils-B3uf0_3D.js} +2 -2
- package/dist/normalize-DBcng6RL.js +58 -0
- package/dist/{outbound-adapter-DNsTVJfH.js → outbound-adapter-jP0OgIyW.js} +78 -17
- package/dist/{outbound-session-route-DK9qkPgP.js → outbound-session-route-BaJRt05p.js} +1 -1
- package/dist/{preflight-audio-CRmUxxuM.js → preflight-audio-6J0vFNtu.js} +1 -1
- package/dist/{preview-streaming-Cc_oeIPP.js → preview-streaming-CXrFDP2T.js} +1 -0
- package/dist/{probe-E80IMT1X.js → probe-91lU5eh8.js} +1 -1
- package/dist/{probe.runtime-CMgUDax3.js → probe.runtime-DV37RDCU.js} +1 -1
- package/dist/{provider-CuOh6z_b.js → provider-D_QVXvp8.js} +53 -50
- package/dist/{provider-session.runtime-CCESIHVo.js → provider-session.runtime-CcPDguh6.js} +3 -3
- package/dist/provider.runtime-O7G03kik.js +2 -0
- package/dist/{reply-delivery-D9aKHtDH.js → reply-delivery-DKTZ6HkK.js} +10 -7
- package/dist/{resolve-allowlist-common-_e1cWOb3.js → resolve-allowlist-common-LhuVITjh.js} +2 -2
- package/dist/{resolve-channels-kyuvrXJg.js → resolve-channels-DjpVRJdT.js} +3 -3
- package/dist/{resolve-users-CAwh4EBq.js → resolve-users-DrZYxZSX.js} +2 -2
- package/dist/{route-resolution-BWErj5Cn.js → route-resolution-CYRPDKY4.js} +3 -3
- package/dist/{runtime-D8alY00g.js → runtime-BHAwVXEa.js} +7 -7
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +25 -25
- package/dist/runtime-api.lookup.js +6 -6
- package/dist/runtime-api.monitor--iuvLjPX.js +6 -0
- package/dist/runtime-api.monitor.js +7 -7
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +5 -5
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/{security-audit-BtRd_VhN.js → security-audit-D8IaFuCm.js} +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit.runtime-Dm1LW9KX.js → security-audit.runtime-DO1398sV.js} +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-8S_HKJpQ.js → send-C3peGbWO.js} +83 -56
- package/dist/{send.components-A42c_5tQ.js → send.components-Dsk3IzS_.js} +22 -14
- package/dist/{send.outbound-D3tonSz8.js → send.outbound-CXyInQ3c.js} +22 -11
- package/dist/send.receipt-DXimpUGs.js +35 -0
- package/dist/{send.shared-BQGiUPvZ.js → send.shared-BydEWvYg.js} +26 -7
- package/dist/{sender-identity-BGUfyvOC.js → sender-identity-DVJCrDxs.js} +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-BEW4H3bj.js → shared-BWD6uc0p.js} +8 -8
- package/dist/{shared-interactive-KgJjCqnB.js → shared-interactive-BZCU0ZJ8.js} +2 -2
- package/dist/{subagent-hooks-T0LPLh4H.js → subagent-hooks-DtbWOdAK.js} +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-_fzSG--3.js → system-events-Dsc8MFYs.js} +2 -2
- package/dist/target-parsing-D-H7nnh2.js +51 -0
- package/dist/target-resolver-D7t8FMhO.js +85 -0
- package/dist/targets-DzAZIwg4.js +3 -0
- package/dist/test-api.js +4 -4
- package/dist/{thread-bindings-CMpZjP50.js → thread-bindings-B90pBWJg.js} +6 -6
- package/dist/{thread-bindings.discord-api-CwWGoyei.js → thread-bindings.discord-api-Dvf789Je.js} +7 -7
- package/dist/{thread-bindings.manager-BtxfLfWf.js → thread-bindings.manager-AwZ5Vble.js} +5 -5
- package/dist/{thread-bindings.session-updates-jcZSiRPI.js → thread-bindings.session-updates-B_AcsXSf.js} +1 -1
- package/dist/{threading-BMmpA2JR.js → threading-Dku_cGS8.js} +4 -4
- package/dist/timeouts.js +1 -1
- package/dist/{typing-Bw6NKWLZ.js → typing-BIjMmOZB.js} +2 -2
- package/openclaw.plugin.json +222 -1
- package/package.json +5 -5
- package/dist/provider.runtime-B68g3qLv.js +0 -2
- package/dist/runtime-api.monitor-DzkCxeBL.js +0 -6
- package/dist/target-resolver-DA84_xbt.js +0 -365
- package/dist/targets-FwL1BPTU.js +0 -2
- /package/dist/{agent-components.runtime-Dof1YMSz.js → agent-components.runtime-caj0h9y4.js} +0 -0
- /package/dist/{api-DzNBVTto.js → api-DaTujGTe.js} +0 -0
- /package/dist/{audit-core-CejGc3hO.js → audit-core-CIvZE94W.js} +0 -0
- /package/dist/{channel-access-DFIQqbYm.js → channel-access-CXAdcM95.js} +0 -0
- /package/dist/{directory-cache-D93eSrpB.js → directory-cache-D3l2v2_L.js} +0 -0
- /package/dist/{directory-config-DoETeOOx.js → directory-config-S2852QcC.js} +0 -0
- /package/dist/{doctor-shared-Cqvfgv9m.js → doctor-shared-DtOaqWzy.js} +0 -0
- /package/dist/{format-D8TsaXxW.js → format-XDPCvGK4.js} +0 -0
- /package/dist/{pluralkit-OFss_pIy.js → pluralkit-EXKKni07.js} +0 -0
- /package/dist/{preflight-audio.runtime-DPVbpZid.js → preflight-audio.runtime-3hiRefuj.js} +0 -0
- /package/dist/{runtime-K9RT6Egn.js → runtime-EoVRXYxX.js} +0 -0
- /package/dist/{secret-config-contract-5S9U9pjx.js → secret-config-contract-BA9jVaKx.js} +0 -0
- /package/dist/{security-contract-BE8rsdPq.js → security-contract-B7i5uqn6.js} +0 -0
- /package/dist/{security-doctor-DiilN216.js → security-doctor-2SGSPibT.js} +0 -0
- /package/dist/{session-contract-CuW9Nlxg.js → session-contract-DwjfF970.js} +0 -0
- /package/dist/{session-key-normalization-B5La-jFM.js → session-key-normalization-DvI2OlyS.js} +0 -0
- /package/dist/{thread-bindings.state-WU4duXKY.js → thread-bindings.state-CBwtFsbB.js} +0 -0
- /package/dist/{timeouts-CdsmBWWs.js → timeouts-BxAzVpSG.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as parseDiscordTarget } from "./target-parsing-D-H7nnh2.js";
|
|
2
2
|
import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
3
3
|
//#region extensions/discord/src/conversation-identity.ts
|
|
4
4
|
function normalizeDiscordTarget(raw, defaultKind) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-S2852QcC.js";
|
|
2
2
|
export { listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { t as normalizeDiscordToken } from "./token-BZtonk7d.js";
|
|
3
3
|
import { s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
|
|
4
|
-
import { t as rememberDiscordDirectoryUser } from "./directory-cache-
|
|
5
|
-
import { n as fetchDiscord } from "./api-
|
|
6
|
-
import { a as normalizeDiscordSlug } from "./allow-list-
|
|
4
|
+
import { t as rememberDiscordDirectoryUser } from "./directory-cache-D3l2v2_L.js";
|
|
5
|
+
import { n as fetchDiscord } from "./api-DaTujGTe.js";
|
|
6
|
+
import { a as normalizeDiscordSlug } from "./allow-list-Dtho5Hww.js";
|
|
7
7
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/text-runtime";
|
|
8
8
|
//#region extensions/discord/src/directory-live.ts
|
|
9
9
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { ApplicationCommandOptionType, ApplicationCommandType, ButtonStyle, ComponentType, GatewayDispatchEvents, InteractionContextType, InteractionResponseType, InteractionType, MessageFlags, Routes, TextInputStyle } from "discord-api-types/v10";
|
|
3
3
|
import { createHash, randomBytes } from "node:crypto";
|
|
4
|
-
import fs from "node:fs/promises";
|
|
5
4
|
import path from "node:path";
|
|
5
|
+
import { privateFileStore } from "openclaw/plugin-sdk/security-runtime";
|
|
6
6
|
import { Type } from "typebox";
|
|
7
7
|
import { Check } from "typebox/value";
|
|
8
8
|
import { inspect } from "node:util";
|
|
@@ -255,9 +255,8 @@ var DiscordCommandDeployer = class {
|
|
|
255
255
|
const storePath = this.params.hashStorePath;
|
|
256
256
|
if (!storePath) return;
|
|
257
257
|
try {
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
if (!parsed.hashes || typeof parsed.hashes !== "object") return;
|
|
258
|
+
const parsed = await privateFileStore(path.dirname(storePath)).readJsonIfExists(path.basename(storePath));
|
|
259
|
+
if (!parsed?.hashes || typeof parsed.hashes !== "object") return;
|
|
261
260
|
for (const [key, value] of Object.entries(parsed.hashes)) if (typeof value === "string" && key.trim() && value.trim()) this.hashes.set(key, value);
|
|
262
261
|
} catch {}
|
|
263
262
|
}
|
|
@@ -265,14 +264,11 @@ var DiscordCommandDeployer = class {
|
|
|
265
264
|
const storePath = this.params.hashStorePath;
|
|
266
265
|
if (!storePath) return;
|
|
267
266
|
try {
|
|
268
|
-
await
|
|
269
|
-
const tmpPath = `${storePath}.${process.pid}.${Date.now()}.tmp`;
|
|
270
|
-
await fs.writeFile(tmpPath, `${JSON.stringify({
|
|
267
|
+
await privateFileStore(path.dirname(storePath)).writeJson(path.basename(storePath), {
|
|
271
268
|
version: 1,
|
|
272
269
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
273
270
|
hashes: Object.fromEntries([...this.hashes.entries()].toSorted(([left], [right]) => left.localeCompare(right)))
|
|
274
|
-
},
|
|
275
|
-
await fs.rename(tmpPath, storePath);
|
|
271
|
+
}, { trailingNewline: true });
|
|
276
272
|
} catch {}
|
|
277
273
|
}
|
|
278
274
|
get rest() {
|
|
@@ -1071,6 +1067,7 @@ const DEFAULT_SLOW_LISTENER_THRESHOLD_MS = 3e4;
|
|
|
1071
1067
|
var DiscordEventQueue = class {
|
|
1072
1068
|
constructor(options = {}) {
|
|
1073
1069
|
this.queue = [];
|
|
1070
|
+
this.queueHead = 0;
|
|
1074
1071
|
this.processing = 0;
|
|
1075
1072
|
this.processedCount = 0;
|
|
1076
1073
|
this.droppedCount = 0;
|
|
@@ -1083,7 +1080,7 @@ var DiscordEventQueue = class {
|
|
|
1083
1080
|
};
|
|
1084
1081
|
}
|
|
1085
1082
|
enqueue(params) {
|
|
1086
|
-
if (this.
|
|
1083
|
+
if (this.pendingQueueSize >= this.options.maxQueueSize) {
|
|
1087
1084
|
this.droppedCount += 1;
|
|
1088
1085
|
return Promise.reject(/* @__PURE__ */ new Error(`Discord event queue is full for ${params.eventType}; maxQueueSize=${this.options.maxQueueSize}`));
|
|
1089
1086
|
}
|
|
@@ -1098,7 +1095,7 @@ var DiscordEventQueue = class {
|
|
|
1098
1095
|
}
|
|
1099
1096
|
getMetrics() {
|
|
1100
1097
|
return {
|
|
1101
|
-
queueSize: this.
|
|
1098
|
+
queueSize: this.pendingQueueSize,
|
|
1102
1099
|
processing: this.processing,
|
|
1103
1100
|
processed: this.processedCount,
|
|
1104
1101
|
dropped: this.droppedCount,
|
|
@@ -1107,9 +1104,29 @@ var DiscordEventQueue = class {
|
|
|
1107
1104
|
maxConcurrency: this.options.maxConcurrency
|
|
1108
1105
|
};
|
|
1109
1106
|
}
|
|
1107
|
+
get pendingQueueSize() {
|
|
1108
|
+
return Math.max(0, this.queue.length - this.queueHead);
|
|
1109
|
+
}
|
|
1110
|
+
takeNextJob() {
|
|
1111
|
+
if (this.queueHead >= this.queue.length) {
|
|
1112
|
+
this.queue.length = 0;
|
|
1113
|
+
this.queueHead = 0;
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
const job = this.queue[this.queueHead];
|
|
1117
|
+
this.queueHead += 1;
|
|
1118
|
+
if (this.queueHead >= this.queue.length) {
|
|
1119
|
+
this.queue.length = 0;
|
|
1120
|
+
this.queueHead = 0;
|
|
1121
|
+
} else if (this.queueHead > 256 && this.queueHead * 2 > this.queue.length) {
|
|
1122
|
+
this.queue.splice(0, this.queueHead);
|
|
1123
|
+
this.queueHead = 0;
|
|
1124
|
+
}
|
|
1125
|
+
return job;
|
|
1126
|
+
}
|
|
1110
1127
|
processNext() {
|
|
1111
|
-
while (this.processing < this.options.maxConcurrency && this.
|
|
1112
|
-
const job = this.
|
|
1128
|
+
while (this.processing < this.options.maxConcurrency && this.pendingQueueSize > 0) {
|
|
1129
|
+
const job = this.takeNextJob();
|
|
1113
1130
|
if (!job) return;
|
|
1114
1131
|
this.processing += 1;
|
|
1115
1132
|
this.runJob(job).then(job.resolve, job.reject).finally(() => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-CaHGiVB4.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
|
-
import { n as normalizeCompatibilityConfig } from "./doctor-contract-
|
|
4
|
-
import { t as DISCORD_LEGACY_CONFIG_RULES } from "./doctor-shared-
|
|
5
|
-
import { t as isDiscordMutableAllowEntry } from "./security-doctor-
|
|
3
|
+
import { n as normalizeCompatibilityConfig } from "./doctor-contract-DSB2zzJA.js";
|
|
4
|
+
import { t as DISCORD_LEGACY_CONFIG_RULES } from "./doctor-shared-DtOaqWzy.js";
|
|
5
|
+
import { t as isDiscordMutableAllowEntry } from "./security-doctor-2SGSPibT.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
7
7
|
import { collectProviderDangerousNameMatchingScopes } from "openclaw/plugin-sdk/runtime-doctor";
|
|
8
8
|
//#region extensions/discord/src/doctor.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-
|
|
1
|
+
import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-CXrFDP2T.js";
|
|
2
2
|
import { asObjectRecord, normalizeLegacyChannelAliases } from "openclaw/plugin-sdk/runtime-doctor";
|
|
3
3
|
//#region extensions/discord/src/doctor-contract.ts
|
|
4
4
|
const LEGACY_TTS_PROVIDER_KEYS = [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DSB2zzJA.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/{handle-action.guild-admin-sJiQymg8.js → handle-action.guild-admin-LM6kZ6zE.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as readDiscordChannelCreateParams, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { a as readDiscordChannelCreateParams, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-BHAwVXEa.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
4
4
|
import { readNumberParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
@@ -251,7 +251,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
251
251
|
}
|
|
252
252
|
if (action === "thread-reply") {
|
|
253
253
|
const content = readStringParam(actionParams, "message", { required: true });
|
|
254
|
-
const mediaUrl = readStringParam(actionParams, "media", { trim: false });
|
|
254
|
+
const mediaUrl = readStringParam(actionParams, "media", { trim: false }) ?? readStringParam(actionParams, "path", { trim: false }) ?? readStringParam(actionParams, "filePath", { trim: false });
|
|
255
255
|
const replyTo = readStringParam(actionParams, "replyTo");
|
|
256
256
|
const channelId = readStringParam(actionParams, "threadId") ?? resolveChannelId();
|
|
257
257
|
return await handleDiscordAction({
|
|
@@ -261,7 +261,10 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
261
261
|
content,
|
|
262
262
|
mediaUrl: mediaUrl ?? void 0,
|
|
263
263
|
replyTo: replyTo ?? void 0
|
|
264
|
-
}, cfg
|
|
264
|
+
}, cfg, {
|
|
265
|
+
mediaLocalRoots: ctx.mediaLocalRoots,
|
|
266
|
+
mediaReadFile: ctx.mediaReadFile
|
|
267
|
+
});
|
|
265
268
|
}
|
|
266
269
|
if (action === "search") {
|
|
267
270
|
const guildId = readStringParam(actionParams, "guildId", { required: true });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as resolveDiscordOwnerAllowFrom, p as resolveDiscordMemberAllowed } from "./allow-list-
|
|
1
|
+
import { h as resolveDiscordOwnerAllowFrom, p as resolveDiscordMemberAllowed } from "./allow-list-Dtho5Hww.js";
|
|
2
2
|
import { buildUntrustedChannelMetadata, wrapExternalContent } from "openclaw/plugin-sdk/security-runtime";
|
|
3
3
|
//#region extensions/discord/src/monitor/inbound-context.ts
|
|
4
4
|
function createDiscordSupplementalContextAccessChecker(params) {
|