@openclaw/discord 2026.5.3 → 2026.5.4-beta.2
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/action-runtime-api.js +1 -1
- package/dist/api.js +7 -7
- package/dist/{approval-handler.runtime-AZort68o.js → approval-handler.runtime-TRKg9NzZ.js} +1 -1
- package/dist/{approval-native-oN9__F3M.js → approval-native-DJs5M8fw.js} +1 -1
- package/dist/{audit-DEbWTFTt.js → audit-CdKtgVPO.js} +2 -2
- package/dist/{channel-actions-ChsoeB3T.js → channel-actions-BvEKvoM5.js} +1 -1
- package/dist/{channel-actions.runtime-BxNUYqD-.js → channel-actions.runtime-BNZAM-9-.js} +3 -3
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-Nf20xyAS.js → channel-wqYExrBU.js} +43 -25
- package/dist/{channel.setup-DHzAG9qO.js → channel.setup-C-HEMkxU.js} +1 -1
- package/dist/{config-schema-BmGtnfiE.js → config-schema-CC1qhiTN.js} +9 -1
- package/dist/contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-B2Zzo2HU.js → handle-action.guild-admin-nTLXjfyh.js} +1 -1
- package/dist/{message-handler-TShaLWeQ.js → message-handler-kDvsxS8t.js} +3 -3
- package/dist/{message-handler.preflight-BsvNIDEw.js → message-handler.preflight-DYhlpFEl.js} +3 -3
- package/dist/{message-handler.process-Be2HA9AV.js → message-handler.process-B-CiOj1K.js} +12 -11
- package/dist/{outbound-adapter-B-mzejZP.js → outbound-adapter-FG0CgK3I.js} +3 -3
- package/dist/{provider-Cy1aml6b.js → provider-CnLt-Y4Z.js} +171 -63
- package/dist/{provider-session.runtime-CD5RUyP3.js → provider-session.runtime-7BukaDmt.js} +3 -3
- package/dist/provider.runtime-gtpKILBo.js +2 -0
- package/dist/{reply-delivery-uCiWAyIt.js → reply-delivery-QiXSsCCR.js} +61 -6
- package/dist/{route-resolution-Bx85WEpX.js → route-resolution-DODkzE43.js} +1 -1
- package/dist/{runtime-SoSwefbS.js → runtime-NObmZxWs.js} +5 -5
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +13 -13
- package/dist/runtime-api.lookup.js +1 -1
- package/dist/{runtime-api.monitor-srLSEVEX.js → runtime-api.monitor-B5uT6Cmc.js} +2 -2
- package/dist/runtime-api.monitor.js +3 -3
- package/dist/runtime-api.send.js +4 -4
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-Dw6Da1m2.js → send-Rz5xnelg.js} +2 -2
- package/dist/{send.components-CJ8gYK3s.js → send.components-CoCE4aan.js} +2 -2
- package/dist/{send.outbound-6KbINW5h.js → send.outbound-DN-HfmW2.js} +1 -1
- package/dist/{send.shared-e9Pd_Em0.js → send.shared-BWZyuxM-.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-C1EMtcxR.js → shared-Ugd3DMEH.js} +1 -1
- package/dist/{subagent-hooks-4TZ3SJrh.js → subagent-hooks-DgpxQHUn.js} +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{targets-B7OfGFt8.js → targets-DcNwQ9vN.js} +1 -1
- package/dist/test-api.js +3 -3
- package/dist/{thread-bindings-DLoian4S.js → thread-bindings-C7GN5ebh.js} +3 -3
- package/dist/{thread-bindings.discord-api-BJF6acLK.js → thread-bindings.discord-api-CfZnSqIb.js} +3 -3
- package/dist/{thread-bindings.manager-CWG9Gd04.js → thread-bindings.manager-BxPG0IHV.js} +2 -2
- package/openclaw.plugin.json +51 -1
- package/package.json +5 -5
- package/dist/provider.runtime-CbW_PYV-.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-NObmZxWs.js";
|
|
2
2
|
export { handleDiscordAction };
|
package/dist/api.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { a as mergeDiscordAccountConfig, f as resolveDiscordMaxLinesPerMessage, i as listEnabledDiscordAccounts, l as resolveDiscordAccountConfig, o as resolveDefaultDiscordAccountId, r as listDiscordAccountIds, s as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-CaHGiVB4.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
3
|
import { i as normalizeDiscordOutboundTarget, n as looksLikeDiscordTargetId, o as parseDiscordTarget, r as normalizeDiscordMessagingTarget, s as resolveDiscordChannelId } from "./normalize-B-ktw-T_.js";
|
|
4
|
-
import { A as resolveDiscordTarget, j as parseDiscordSendTarget } from "./send.shared-
|
|
4
|
+
import { A as resolveDiscordTarget, j as parseDiscordSendTarget } from "./send.shared-BWZyuxM-.js";
|
|
5
5
|
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-DzNBVTto.js";
|
|
6
6
|
import { _ as parseDiscordModalCustomIdForInteraction, a as buildDiscordComponentMessage, c as readDiscordComponentSpec, d as DISCORD_MODAL_CUSTOM_ID_KEY, f as buildDiscordComponentCustomId, g as parseDiscordModalCustomId, h as parseDiscordComponentCustomIdForInteraction, i as createDiscordFormModal, l as resolveDiscordComponentAttachmentName, m as parseDiscordComponentCustomId, n as formatDiscordComponentEventText, o as buildDiscordComponentMessageFlags, p as buildDiscordModalCustomId, r as DiscordFormModal, s as DISCORD_COMPONENT_ATTACHMENT_PREFIX, u as DISCORD_COMPONENT_CUSTOM_ID_KEY } from "./components-D5LnN7ZQ.js";
|
|
7
7
|
import { t as buildDiscordInteractiveComponents } from "./shared-interactive-KgJjCqnB.js";
|
|
8
|
-
import "./targets-
|
|
8
|
+
import "./targets-DcNwQ9vN.js";
|
|
9
9
|
import { a as shouldSuppressLocalDiscordExecApprovalPrompt, i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers, r as isDiscordExecApprovalApprover } from "./approval-shared-GfJeMdLu.js";
|
|
10
|
-
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-
|
|
10
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-wqYExrBU.js";
|
|
11
11
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-Daag9II6.js";
|
|
12
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
13
|
-
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-
|
|
14
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
12
|
+
import { t as discordSetupPlugin } from "./channel.setup-C-HEMkxU.js";
|
|
13
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-DgpxQHUn.js";
|
|
14
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-nTLXjfyh.js";
|
|
15
15
|
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-DElx_Gr4.js";
|
|
16
16
|
import { t as fetchPluralKitMessageInfo } from "./pluralkit-voQvSN3g.js";
|
|
17
17
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DmHUl6wI.js";
|
|
@@ -19,6 +19,6 @@ import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Cdz2i
|
|
|
19
19
|
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C7jeTtGs.js";
|
|
20
20
|
import { resolveOpenProviderRuntimeGroupPolicy as resolveDiscordRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
21
21
|
//#region extensions/discord/api.ts
|
|
22
|
-
const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-
|
|
22
|
+
const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-BNZAM-9-.js")).handleDiscordMessageAction(...args);
|
|
23
23
|
//#endregion
|
|
24
24
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_COMPONENT_ATTACHMENT_PREFIX, DISCORD_COMPONENT_CUSTOM_ID_KEY, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DISCORD_MODAL_CUSTOM_ID_KEY, DiscordApiError, DiscordFormModal, buildDiscordComponentCustomId, buildDiscordComponentMessage, buildDiscordComponentMessageFlags, buildDiscordInteractiveComponents, buildDiscordModalCustomId, collectDiscordSecurityAuditFindings, collectDiscordStatusIssues, createDiscordActionGate, createDiscordFormModal, discordPlugin, discordSetupPlugin, fetchDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchPluralKitMessageInfo, formatDiscordComponentEventText, getDiscordExecApprovalApprovers, handleDiscordMessageAction, handleDiscordSubagentDeliveryTarget, handleDiscordSubagentEnded, handleDiscordSubagentSpawning, inspectDiscordAccount, isDiscordExecApprovalApprover, isDiscordExecApprovalClientEnabled, listDiscordAccountIds, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, listEnabledDiscordAccounts, looksLikeDiscordTargetId, mergeAbortSignals, mergeDiscordAccountConfig, normalizeDiscordMessagingTarget, normalizeDiscordOutboundTarget, normalizeExplicitDiscordSessionKey, parseApplicationIdFromToken, parseDiscordComponentCustomId, parseDiscordComponentCustomIdForInteraction as parseDiscordComponentCustomIdForCarbon, parseDiscordComponentCustomIdForInteraction, parseDiscordModalCustomId, parseDiscordModalCustomIdForInteraction as parseDiscordModalCustomIdForCarbon, parseDiscordModalCustomIdForInteraction, parseDiscordSendTarget, parseDiscordTarget, probeDiscord, readDiscordComponentSpec, requestDiscord, resolveDefaultDiscordAccountId, resolveDiscordAccount, resolveDiscordAccountConfig, resolveDiscordChannelId, resolveDiscordComponentAttachmentName, resolveDiscordGroupRequireMention, resolveDiscordGroupToolPolicy, resolveDiscordMaxLinesPerMessage, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordRuntimeGroupPolicy, resolveDiscordTarget, shouldSuppressLocalDiscordExecApprovalPrompt, tryHandleDiscordMessageActionGuildAdmin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
3
|
import { $ as createChannelMessage, A as Button, B as Separator, H as TextDisplay, J as createUserDmChannel, M as Container, R as Row, it as editChannelMessage, nt as deleteChannelMessage, w as serializePayload } from "./discord-eZlimVfW.js";
|
|
4
|
-
import { M as createDiscordClient, y as stripUndefinedFields } from "./send.shared-
|
|
4
|
+
import { M as createDiscordClient, y as stripUndefinedFields } from "./send.shared-BWZyuxM-.js";
|
|
5
5
|
import { i as isDiscordExecApprovalClientEnabled, t as shouldHandleDiscordApprovalRequest } from "./approval-shared-GfJeMdLu.js";
|
|
6
6
|
import { logDebug, logError, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
7
7
|
import { ButtonStyle } from "discord-api-types/v10";
|
|
@@ -140,7 +140,7 @@ function createDiscordApprovalCapability(configOverride) {
|
|
|
140
140
|
request,
|
|
141
141
|
configOverride
|
|
142
142
|
}),
|
|
143
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
143
|
+
load: async () => (await import("./approval-handler.runtime-TRKg9NzZ.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
144
144
|
})
|
|
145
145
|
});
|
|
146
146
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
|
-
import { T as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
4
|
-
import "./send-
|
|
3
|
+
import { T as fetchChannelPermissionsDiscord } from "./send.shared-BWZyuxM-.js";
|
|
4
|
+
import "./send-Rz5xnelg.js";
|
|
5
5
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
6
6
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
7
7
|
//#region extensions/discord/src/audit-core.ts
|
|
@@ -6,7 +6,7 @@ import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
|
6
6
|
//#region extensions/discord/src/channel-actions.ts
|
|
7
7
|
let discordChannelActionsRuntimePromise;
|
|
8
8
|
async function loadDiscordChannelActionsRuntime() {
|
|
9
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-
|
|
9
|
+
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-BNZAM-9-.js");
|
|
10
10
|
return await discordChannelActionsRuntimePromise;
|
|
11
11
|
}
|
|
12
12
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as resolveDiscordChannelId } from "./normalize-B-ktw-T_.js";
|
|
2
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
2
|
+
import { t as handleDiscordAction } from "./runtime-NObmZxWs.js";
|
|
3
3
|
import { n as buildDiscordPresentationComponents, t as buildDiscordInteractiveComponents } from "./shared-interactive-KgJjCqnB.js";
|
|
4
|
-
import "./targets-
|
|
4
|
+
import "./targets-DcNwQ9vN.js";
|
|
5
5
|
import "./action-runtime-api.js";
|
|
6
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
6
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-nTLXjfyh.js";
|
|
7
7
|
import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/text-runtime";
|
|
8
8
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
9
9
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DiscordChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as DiscordChannelConfigSchema } from "./config-schema-CC1qhiTN.js";
|
|
2
2
|
export { DiscordChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./channel-
|
|
1
|
+
import { t as discordPlugin } from "./channel-wqYExrBU.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -4,12 +4,12 @@ import { n as looksLikeDiscordTargetId, o as parseDiscordTarget, r as normalizeD
|
|
|
4
4
|
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-uHGLDP-Y.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-K9RT6Egn.js";
|
|
6
6
|
import { a as shouldSuppressLocalDiscordExecApprovalPrompt } from "./approval-shared-GfJeMdLu.js";
|
|
7
|
-
import { t as getDiscordApprovalCapability } from "./approval-native-
|
|
8
|
-
import { t as discordMessageActions$1 } from "./channel-actions-
|
|
7
|
+
import { t as getDiscordApprovalCapability } from "./approval-native-DJs5M8fw.js";
|
|
8
|
+
import { t as discordMessageActions$1 } from "./channel-actions-BvEKvoM5.js";
|
|
9
9
|
import { n as resolveDiscordCurrentConversationIdentity } from "./conversation-identity-BN9wSmxJ.js";
|
|
10
10
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-TTP020qQ.js";
|
|
11
|
-
import { n as discordOutbound } from "./outbound-adapter-
|
|
12
|
-
import { i as discordSecurityAdapter, n as discordConfigAdapter, r as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-
|
|
11
|
+
import { n as discordOutbound } from "./outbound-adapter-FG0CgK3I.js";
|
|
12
|
+
import { i as discordSecurityAdapter, n as discordConfigAdapter, r as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-Ugd3DMEH.js";
|
|
13
13
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-Daag9II6.js";
|
|
14
14
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/text-runtime";
|
|
15
15
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
@@ -129,9 +129,9 @@ let discordDirectoryLiveModulePromise;
|
|
|
129
129
|
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-DElx_Gr4.js").then((n) => n.t));
|
|
130
130
|
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-VAqom3Dn.js").then((n) => n.n));
|
|
131
131
|
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DPJkRKx1.js").then((n) => n.n));
|
|
132
|
-
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-
|
|
132
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-BxPG0IHV.js").then((n) => n.a));
|
|
133
133
|
async function loadDiscordProviderRuntime() {
|
|
134
|
-
discordProviderRuntimePromise ??= import("./provider.runtime-
|
|
134
|
+
discordProviderRuntimePromise ??= import("./provider.runtime-gtpKILBo.js");
|
|
135
135
|
return await discordProviderRuntimePromise;
|
|
136
136
|
}
|
|
137
137
|
async function loadDiscordProbeRuntime() {
|
|
@@ -139,11 +139,11 @@ async function loadDiscordProbeRuntime() {
|
|
|
139
139
|
return await discordProbeRuntimePromise;
|
|
140
140
|
}
|
|
141
141
|
async function loadDiscordAuditModule() {
|
|
142
|
-
discordAuditModulePromise ??= import("./audit-
|
|
142
|
+
discordAuditModulePromise ??= import("./audit-CdKtgVPO.js").then((n) => n.n);
|
|
143
143
|
return await discordAuditModulePromise;
|
|
144
144
|
}
|
|
145
145
|
async function loadDiscordSendModule() {
|
|
146
|
-
discordSendModulePromise ??= import("./send-
|
|
146
|
+
discordSendModulePromise ??= import("./send-Rz5xnelg.js").then((n) => n.t);
|
|
147
147
|
return await discordSendModulePromise;
|
|
148
148
|
}
|
|
149
149
|
async function loadDiscordDirectoryLiveModule() {
|
|
@@ -313,6 +313,33 @@ function collectDiscordStatusIssues(accounts) {
|
|
|
313
313
|
//#region extensions/discord/src/channel.ts
|
|
314
314
|
const REQUIRED_DISCORD_PERMISSIONS = ["ViewChannel", "SendMessages"];
|
|
315
315
|
const DISCORD_ACCOUNT_STARTUP_STAGGER_MS = 1e4;
|
|
316
|
+
function startDiscordStartupProbe(params) {
|
|
317
|
+
(async () => {
|
|
318
|
+
try {
|
|
319
|
+
const probe = await (await loadDiscordProbeRuntime()).probeDiscord(params.token, 2500, { includeApplication: true });
|
|
320
|
+
if (params.abortSignal.aborted) return;
|
|
321
|
+
params.setStatus({
|
|
322
|
+
accountId: params.accountId,
|
|
323
|
+
bot: probe.bot,
|
|
324
|
+
application: probe.application
|
|
325
|
+
});
|
|
326
|
+
if (probe.ok) {
|
|
327
|
+
const username = probe.bot?.username?.trim();
|
|
328
|
+
if (username) params.log?.info?.(`[${params.accountId}] Discord bot probe resolved @${username}`);
|
|
329
|
+
} else if (getDiscordRuntime().logging.shouldLogVerbose()) params.log?.debug?.(`[${params.accountId}] bot probe degraded: ${probe.error ?? `status ${probe.status ?? "unknown"}`}`);
|
|
330
|
+
const messageContent = probe.application?.intents?.messageContent;
|
|
331
|
+
if (messageContent === "disabled") params.log?.warn?.(`[${params.accountId}] Discord Message Content Intent is disabled; bot may not respond to channel messages. Enable it in Discord Dev Portal (Bot → Privileged Gateway Intents) or require mentions.`);
|
|
332
|
+
else if (messageContent === "limited") params.log?.info?.(`[${params.accountId}] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.`);
|
|
333
|
+
} catch (err) {
|
|
334
|
+
if (!params.abortSignal.aborted) params.setStatus({
|
|
335
|
+
accountId: params.accountId,
|
|
336
|
+
bot: void 0,
|
|
337
|
+
application: void 0
|
|
338
|
+
});
|
|
339
|
+
if (getDiscordRuntime().logging.shouldLogVerbose()) params.log?.debug?.(`[${params.accountId}] bot probe failed: ${String(err)}`);
|
|
340
|
+
}
|
|
341
|
+
})();
|
|
342
|
+
}
|
|
316
343
|
function shouldTreatDiscordDeliveredTextAsVisible(params) {
|
|
317
344
|
return params.kind === "block" && typeof params.text === "string" && params.text.trim().length > 0;
|
|
318
345
|
}
|
|
@@ -676,23 +703,14 @@ const discordPlugin = createChatChannelPlugin({
|
|
|
676
703
|
}
|
|
677
704
|
}
|
|
678
705
|
const token = account.token.trim();
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
ctx.
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
application: probe.application
|
|
688
|
-
});
|
|
689
|
-
const messageContent = probe.application?.intents?.messageContent;
|
|
690
|
-
if (messageContent === "disabled") ctx.log?.warn(`[${account.accountId}] Discord Message Content Intent is disabled; bot may not respond to channel messages. Enable it in Discord Dev Portal (Bot → Privileged Gateway Intents) or require mentions.`);
|
|
691
|
-
else if (messageContent === "limited") ctx.log?.info(`[${account.accountId}] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.`);
|
|
692
|
-
} catch (err) {
|
|
693
|
-
if (getDiscordRuntime().logging.shouldLogVerbose()) ctx.log?.debug?.(`[${account.accountId}] bot probe failed: ${String(err)}`);
|
|
694
|
-
}
|
|
695
|
-
ctx.log?.info(`[${account.accountId}] starting provider${discordBotLabel}`);
|
|
706
|
+
startDiscordStartupProbe({
|
|
707
|
+
accountId: account.accountId,
|
|
708
|
+
token,
|
|
709
|
+
abortSignal: ctx.abortSignal,
|
|
710
|
+
setStatus: ctx.setStatus,
|
|
711
|
+
log: ctx.log
|
|
712
|
+
});
|
|
713
|
+
ctx.log?.info(`[${account.accountId}] starting provider`);
|
|
696
714
|
return (await loadDiscordProviderRuntime()).monitorDiscordProvider({
|
|
697
715
|
token,
|
|
698
716
|
accountId: account.accountId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as resolveDiscordToken } from "./token-BZtonk7d.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, o as resolveDefaultDiscordAccountId } from "./accounts-CaHGiVB4.js";
|
|
3
|
-
import { r as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-
|
|
3
|
+
import { r as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-Ugd3DMEH.js";
|
|
4
4
|
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-VAqom3Dn.js";
|
|
5
5
|
import { t as resolveDiscordUserAllowlist } from "./resolve-users-DPJkRKx1.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -64,7 +64,11 @@ const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordConfigSchema,
|
|
|
64
64
|
},
|
|
65
65
|
"streaming.preview.toolProgress": {
|
|
66
66
|
label: "Discord Draft Tool Progress",
|
|
67
|
-
help: "Show tool/progress activity in the live draft preview message (default: true). Set false to
|
|
67
|
+
help: "Show tool/progress activity in the live draft preview message (default: true). Set false to hide interim tool updates while the draft preview stays active."
|
|
68
|
+
},
|
|
69
|
+
"streaming.preview.commandText": {
|
|
70
|
+
label: "Discord Draft Command Text",
|
|
71
|
+
help: "Command/exec detail in preview tool-progress lines: \"raw\" preserves released behavior; \"status\" shows only the tool label."
|
|
68
72
|
},
|
|
69
73
|
"streaming.progress.label": {
|
|
70
74
|
label: "Discord Progress Label",
|
|
@@ -82,6 +86,10 @@ const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordConfigSchema,
|
|
|
82
86
|
label: "Discord Progress Tool Lines",
|
|
83
87
|
help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery."
|
|
84
88
|
},
|
|
89
|
+
"streaming.progress.commandText": {
|
|
90
|
+
label: "Discord Progress Command Text",
|
|
91
|
+
help: "Command/exec detail in progress draft lines: \"raw\" preserves released behavior; \"status\" shows only the tool label."
|
|
92
|
+
},
|
|
85
93
|
"retry.attempts": {
|
|
86
94
|
label: "Discord Retry Attempts",
|
|
87
95
|
help: "Max retry attempts for outbound Discord API calls (default: 3)."
|
package/dist/contract-api.js
CHANGED
|
@@ -2,7 +2,7 @@ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doc
|
|
|
2
2
|
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-CoGryS5c.js";
|
|
3
3
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-ei3Mz8Sa.js";
|
|
4
4
|
import { t as deriveLegacySessionChatType } from "./session-contract-goJZckp2.js";
|
|
5
|
-
import { r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-
|
|
5
|
+
import { r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-BxPG0IHV.js";
|
|
6
6
|
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-DElx_Gr4.js";
|
|
7
7
|
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Cdz2iq3m.js";
|
|
8
8
|
export { collectDiscordSecurityAuditFindings, collectRuntimeConfigAssignments, collectUnsupportedSecretRefConfigCandidates, createThreadBindingManager, deriveLegacySessionChatType, __testing as discordThreadBindingTesting, legacyConfigRules, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, normalizeCompatibilityConfig, secretTargetRegistryEntries, unsupportedSecretRefSurfacePatterns };
|
package/dist/{handle-action.guild-admin-B2Zzo2HU.js → handle-action.guild-admin-nTLXjfyh.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-NObmZxWs.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as createDiscordRestClient } from "./send.shared-
|
|
1
|
+
import { N as createDiscordRestClient } from "./send.shared-BWZyuxM-.js";
|
|
2
2
|
import { a as resolveDiscordChannelParentSafe, n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-ewDxhd9q.js";
|
|
3
3
|
import { a as mergeAbortSignals } from "./timeouts-C7jeTtGs.js";
|
|
4
4
|
import { l as resolveDiscordMessageChannelId, r as resolveDiscordMessageText, s as hasDiscordMessageStickers } from "./message-utils-Dmgu-7fC.js";
|
|
@@ -121,7 +121,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
|
|
|
121
121
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
122
122
|
let messageProcessRuntimePromise;
|
|
123
123
|
async function loadMessageProcessRuntime() {
|
|
124
|
-
messageProcessRuntimePromise ??= import("./message-handler.process-
|
|
124
|
+
messageProcessRuntimePromise ??= import("./message-handler.process-B-CiOj1K.js");
|
|
125
125
|
return await messageProcessRuntimePromise;
|
|
126
126
|
}
|
|
127
127
|
async function processDiscordQueuedMessage(params) {
|
|
@@ -173,7 +173,7 @@ function createDiscordMessageRunQueue(params) {
|
|
|
173
173
|
//#region extensions/discord/src/monitor/message-handler.ts
|
|
174
174
|
let messagePreflightRuntimePromise;
|
|
175
175
|
async function loadMessagePreflightRuntime() {
|
|
176
|
-
messagePreflightRuntimePromise ??= import("./message-handler.preflight-
|
|
176
|
+
messagePreflightRuntimePromise ??= import("./message-handler.preflight-DYhlpFEl.js");
|
|
177
177
|
return await messagePreflightRuntimePromise;
|
|
178
178
|
}
|
|
179
179
|
function isNonEmptyString(value) {
|
package/dist/{message-handler.preflight-BsvNIDEw.js → message-handler.preflight-DYhlpFEl.js}
RENAMED
|
@@ -4,10 +4,10 @@ import { i as resolveTimestampMs, n as formatDiscordUserTag, r as resolveDiscord
|
|
|
4
4
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, m as resolveDiscordOwnerAccess, n as isDiscordGroupAllowedByPolicy } from "./allow-list-ek-1hMKN.js";
|
|
5
5
|
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-BN9wSmxJ.js";
|
|
6
6
|
import { l as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-Dzu1gCE7.js";
|
|
7
|
-
import "./thread-bindings-
|
|
7
|
+
import "./thread-bindings-C7GN5ebh.js";
|
|
8
8
|
import { n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-ewDxhd9q.js";
|
|
9
9
|
import { c as resolveDiscordChannelInfo, l as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-Dmgu-7fC.js";
|
|
10
|
-
import { a as shouldIgnoreStaleDiscordRouteBinding, i as resolveDiscordEffectiveRoute, o as handleDiscordDmCommandDecision, r as resolveDiscordConversationRoute, s as resolveDiscordDmCommandAccess, t as buildDiscordRoutePeer } from "./route-resolution-
|
|
10
|
+
import { a as shouldIgnoreStaleDiscordRouteBinding, i as resolveDiscordEffectiveRoute, o as handleDiscordDmCommandDecision, r as resolveDiscordConversationRoute, s as resolveDiscordDmCommandAccess, t as buildDiscordRoutePeer } from "./route-resolution-DODkzE43.js";
|
|
11
11
|
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-BiSDAk2P.js";
|
|
12
12
|
import { logDebug, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
13
13
|
import { getChildLogger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -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-
|
|
31
|
+
discordSendRuntimePromise ??= import("./send-Rz5xnelg.js").then((n) => n.t);
|
|
32
32
|
return await discordSendRuntimePromise;
|
|
33
33
|
}
|
|
34
34
|
async function resolveDiscordDmPreflightAccess(params) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { f as resolveDiscordMaxLinesPerMessage } from "./accounts-CaHGiVB4.js";
|
|
2
2
|
import { a as chunkDiscordTextWithMode, s as resolveDiscordChannelId } from "./normalize-B-ktw-T_.js";
|
|
3
3
|
import { $ as createChannelMessage, it as editChannelMessage, nt as deleteChannelMessage, t as discord_exports } from "./discord-eZlimVfW.js";
|
|
4
|
-
import { N as createDiscordRestClient, P as createDiscordRuntimeAccountContext, d as resolveDiscordTargetChannelId } from "./send.shared-
|
|
4
|
+
import { N as createDiscordRestClient, P as createDiscordRuntimeAccountContext, d as resolveDiscordTargetChannelId } from "./send.shared-BWZyuxM-.js";
|
|
5
5
|
import { i as resolveTimestampMs } from "./format-D8TsaXxW.js";
|
|
6
6
|
import { a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-ek-1hMKN.js";
|
|
7
|
-
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-
|
|
8
|
-
import "./targets-
|
|
7
|
+
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-Rz5xnelg.js";
|
|
8
|
+
import "./targets-DcNwQ9vN.js";
|
|
9
9
|
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-BN9wSmxJ.js";
|
|
10
|
-
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-
|
|
10
|
+
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-FG0CgK3I.js";
|
|
11
11
|
import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-BzkA67Qa.js";
|
|
12
12
|
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C7jeTtGs.js";
|
|
13
13
|
import { a as resolveForwardedMediaList, i as buildDiscordMediaPayload, o as resolveMediaList, r as resolveDiscordMessageText } from "./message-utils-Dmgu-7fC.js";
|
|
14
14
|
import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-Bi95Nz8h.js";
|
|
15
15
|
import { t as sendTyping } from "./typing-BSi1dUHm.js";
|
|
16
16
|
import { n as buildDiscordInboundAccessContext, r as createDiscordSupplementalContextAccessChecker } from "./inbound-context-e_oBBJtF.js";
|
|
17
|
-
import { i as resolveReplyContext, n as buildDirectLabel, r as buildGuildLabel, t as deliverDiscordReply } from "./reply-delivery-
|
|
17
|
+
import { i as resolveReplyContext, n as buildDirectLabel, r as buildGuildLabel, t as deliverDiscordReply } from "./reply-delivery-QiXSsCCR.js";
|
|
18
18
|
import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery, stripReasoningTagsFromText, truncateUtf16Safe } from "openclaw/plugin-sdk/text-runtime";
|
|
19
19
|
import { buildAgentSessionKey, normalizeAccountId, resolveAccountEntry, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
20
20
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
@@ -23,7 +23,7 @@ import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/rep
|
|
|
23
23
|
import { danger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
24
24
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
25
25
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
26
|
-
import { createChannelProgressDraftGate, formatChannelProgressDraftLine, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, resolveChannelProgressDraftMaxLines, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewChunk, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages } from "openclaw/plugin-sdk/channel-streaming";
|
|
26
|
+
import { createChannelProgressDraftGate, formatChannelProgressDraftLine, formatChannelProgressDraftLineForEntry, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, resolveChannelProgressDraftMaxLines, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewChunk, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages } from "openclaw/plugin-sdk/channel-streaming";
|
|
27
27
|
import { recordInboundSession, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/conversation-runtime";
|
|
28
28
|
import { EmbeddedBlockChunker, resolveAckReaction, resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
|
|
29
29
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
@@ -1090,15 +1090,15 @@ async function processDiscordMessage(ctx, observer) {
|
|
|
1090
1090
|
if (isProcessAborted(abortSignal)) return;
|
|
1091
1091
|
await maybeBindStatusReactionsToToolReaction(payload);
|
|
1092
1092
|
await statusReactions.setTool(payload.name);
|
|
1093
|
-
await draftPreview.pushToolProgress(
|
|
1093
|
+
await draftPreview.pushToolProgress(formatChannelProgressDraftLineForEntry(discordConfig, {
|
|
1094
1094
|
event: "tool",
|
|
1095
1095
|
name: payload.name,
|
|
1096
1096
|
phase: payload.phase,
|
|
1097
1097
|
args: payload.args
|
|
1098
|
-
}), { toolName: payload.name });
|
|
1098
|
+
}, payload.detailMode ? { detailMode: payload.detailMode } : void 0), { toolName: payload.name });
|
|
1099
1099
|
},
|
|
1100
1100
|
onItemEvent: async (payload) => {
|
|
1101
|
-
await draftPreview.pushToolProgress(
|
|
1101
|
+
await draftPreview.pushToolProgress(formatChannelProgressDraftLineForEntry(discordConfig, {
|
|
1102
1102
|
event: "item",
|
|
1103
1103
|
itemKind: payload.kind,
|
|
1104
1104
|
title: payload.title,
|
|
@@ -1192,13 +1192,14 @@ async function processDiscordMessage(ctx, observer) {
|
|
|
1192
1192
|
markDispatchIdle();
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
|
+
const finalDeliveryFailed = (dispatchResult?.failedCounts?.final ?? 0) > 0;
|
|
1195
1196
|
if (statusReactionsActive) if (dispatchAborted) if (removeAckAfterReply) statusReactions.clear();
|
|
1196
1197
|
else statusReactions.restoreInitial();
|
|
1197
1198
|
else {
|
|
1198
|
-
if (dispatchError) await statusReactions.setError();
|
|
1199
|
+
if (dispatchError || finalDeliveryFailed) await statusReactions.setError();
|
|
1199
1200
|
else await statusReactions.setDone();
|
|
1200
1201
|
if (removeAckAfterReply) (async () => {
|
|
1201
|
-
await sleep(dispatchError ? DEFAULT_TIMING.errorHoldMs : DEFAULT_TIMING.doneHoldMs);
|
|
1202
|
+
await sleep(dispatchError || finalDeliveryFailed ? DEFAULT_TIMING.errorHoldMs : DEFAULT_TIMING.doneHoldMs);
|
|
1202
1203
|
await statusReactions.clear();
|
|
1203
1204
|
})();
|
|
1204
1205
|
else statusReactions.restoreInitial();
|
|
@@ -85,7 +85,7 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
85
85
|
let discordComponentSendPromise;
|
|
86
86
|
let discordSharedInteractivePromise;
|
|
87
87
|
async function sendDiscordComponentMessageLazy(...args) {
|
|
88
|
-
discordComponentSendPromise ??= import("./send.components-
|
|
88
|
+
discordComponentSendPromise ??= import("./send.components-CoCE4aan.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
|
|
89
89
|
return await (await discordComponentSendPromise)(...args);
|
|
90
90
|
}
|
|
91
91
|
function loadDiscordSharedInteractive() {
|
|
@@ -124,7 +124,7 @@ async function resolveDiscordComponentSpec(payload) {
|
|
|
124
124
|
//#region extensions/discord/src/outbound-send-context.ts
|
|
125
125
|
let discordSendRuntimePromise;
|
|
126
126
|
async function loadDiscordSendRuntime() {
|
|
127
|
-
discordSendRuntimePromise ??= import("./send-
|
|
127
|
+
discordSendRuntimePromise ??= import("./send-Rz5xnelg.js").then((n) => n.t);
|
|
128
128
|
return await discordSendRuntimePromise;
|
|
129
129
|
}
|
|
130
130
|
function resolveDiscordOutboundTarget(params) {
|
|
@@ -264,7 +264,7 @@ function stripDiscordInternalRuntimeScaffolding(text) {
|
|
|
264
264
|
}
|
|
265
265
|
let discordThreadBindingsPromise;
|
|
266
266
|
function loadDiscordThreadBindings() {
|
|
267
|
-
discordThreadBindingsPromise ??= import("./thread-bindings-
|
|
267
|
+
discordThreadBindingsPromise ??= import("./thread-bindings-C7GN5ebh.js").then((n) => n.t);
|
|
268
268
|
return discordThreadBindingsPromise;
|
|
269
269
|
}
|
|
270
270
|
function resolveDiscordWebhookIdentity(params) {
|