@openclaw/discord 2026.5.4-beta.1 → 2026.5.4-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.
- package/dist/action-runtime-api.js +1 -1
- package/dist/api.js +6 -6
- 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-plugin-api.js +1 -1
- package/dist/{channel-DpLugi97.js → channel-wqYExrBU.js} +7 -7
- 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-BEt0EFbs.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-C-iW2rRu.js → message-handler.process-B-CiOj1K.js} +8 -7
- package/dist/{outbound-adapter-B-mzejZP.js → outbound-adapter-FG0CgK3I.js} +3 -3
- package/dist/{provider-BaklPvax.js → provider-CnLt-Y4Z.js} +171 -63
- package/dist/{provider-session.runtime-DOwaBuWH.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-B4mrR-_Z.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/{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/package.json +5 -5
- package/dist/provider.runtime-DIcvr97w.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
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-
|
|
14
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
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 discordPlugin } from "./channel-
|
|
1
|
+
import { t as discordPlugin } from "./channel-wqYExrBU.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -4,11 +4,11 @@ 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-
|
|
11
|
+
import { n as discordOutbound } from "./outbound-adapter-FG0CgK3I.js";
|
|
12
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";
|
|
@@ -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() {
|
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";
|
|
@@ -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) {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { t as normalizeDiscordToken } from "./token-BZtonk7d.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, f as resolveDiscordMaxLinesPerMessage, s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
|
|
3
3
|
import { a as chunkDiscordTextWithMode } from "./normalize-B-ktw-T_.js";
|
|
4
|
-
import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-
|
|
4
|
+
import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-CoCE4aan.js";
|
|
5
5
|
import { c as setPresence, i as unregisterGateway, r as registerGateway } from "./gateway-registry-BKG4KIVC.js";
|
|
6
6
|
import { A as Button, B as Separator, C as User, D as Modal, G as BaseMessageInteractiveComponent, H as TextDisplay, M as Container, R as Row, S as Message, V as StringSelectMenu, a as MessageReactionRemoveListener, b as CommandWithSubcommands, d as Client, f as Plugin, h as RateLimitError, i as MessageReactionAddListener, l as ThreadUpdateListener, n as InteractionCreateListener, o as PresenceUpdateListener, r as MessageCreateListener, s as ReadyListener, t as discord_exports, x as Guild, y as Command } from "./discord-eZlimVfW.js";
|
|
7
|
-
import {
|
|
7
|
+
import { L as DISCORD_REST_TIMEOUT_MS, N as createDiscordRestClient, R as validateDiscordProxyUrl, z as withValidatedDiscordProxy } from "./send.shared-BWZyuxM-.js";
|
|
8
8
|
import { a as summarizeDiscordResponseBody, i as isDiscordRateLimitResponseBody } from "./api-DzNBVTto.js";
|
|
9
9
|
import { n as formatDiscordUserTag, t as formatDiscordReactionEmoji } from "./format-D8TsaXxW.js";
|
|
10
10
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, i as normalizeDiscordDisplaySlug, l as resolveDiscordChannelPolicyCommandAuthorizer, m as resolveDiscordOwnerAccess, n as isDiscordGroupAllowedByPolicy, o as resolveDiscordAllowListMatch, r as normalizeDiscordAllowList, v as shouldEmitDiscordReactionNotification } from "./allow-list-ek-1hMKN.js";
|
|
11
11
|
import { t as formatMention } from "./mentions-BPZUaFk7.js";
|
|
12
12
|
import { _ as parseDiscordModalCustomIdForInteraction, g as parseDiscordModalCustomId, h as parseDiscordComponentCustomIdForInteraction, m as parseDiscordComponentCustomId } from "./components-D5LnN7ZQ.js";
|
|
13
13
|
import { i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers } from "./approval-shared-GfJeMdLu.js";
|
|
14
|
-
import "./approval-native-
|
|
14
|
+
import "./approval-native-DJs5M8fw.js";
|
|
15
15
|
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-BN9wSmxJ.js";
|
|
16
16
|
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-VAqom3Dn.js";
|
|
17
17
|
import { t as resolveDiscordUserAllowlist } from "./resolve-users-DPJkRKx1.js";
|
|
18
|
-
import { a as isThreadArchived, d as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-
|
|
18
|
+
import { a as isThreadArchived, d as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-CfZnSqIb.js";
|
|
19
19
|
import { i as resolveDiscordChannelParentIdSafe, n as resolveDiscordChannelInfoSafe, o as resolveDiscordChannelTopicSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-ewDxhd9q.js";
|
|
20
20
|
import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DmHUl6wI.js";
|
|
21
21
|
import { o as raceWithTimeout, s as withAbortTimeout } from "./timeouts-C7jeTtGs.js";
|
|
22
22
|
import { c as resolveDiscordChannelInfo } from "./message-utils-Dmgu-7fC.js";
|
|
23
23
|
import { i as resolveDiscordThreadParentInfo } from "./threading-Bi95Nz8h.js";
|
|
24
|
-
import { c as resolveDiscordDmAccessGroupEntries, i as resolveDiscordEffectiveRoute, n as resolveDiscordBoundConversationRoute, o as handleDiscordDmCommandDecision, s as resolveDiscordDmCommandAccess } from "./route-resolution-
|
|
24
|
+
import { c as resolveDiscordDmAccessGroupEntries, i as resolveDiscordEffectiveRoute, n as resolveDiscordBoundConversationRoute, o as handleDiscordDmCommandDecision, s as resolveDiscordDmCommandAccess } from "./route-resolution-DODkzE43.js";
|
|
25
25
|
import { t as resolveDiscordSenderIdentity } from "./sender-identity-BiSDAk2P.js";
|
|
26
26
|
import { n as buildDiscordInboundAccessContext, t as buildDiscordGroupSystemPrompt } from "./inbound-context-e_oBBJtF.js";
|
|
27
27
|
import { n as resolveDiscordVoiceEnabled, t as authorizeDiscordVoiceIngress } from "./access-B9ujuUtS.js";
|
|
28
|
-
import { n as buildDirectLabel, r as buildGuildLabel, t as deliverDiscordReply } from "./reply-delivery-
|
|
29
|
-
import "./approval-handler.runtime-
|
|
28
|
+
import { n as buildDirectLabel, r as buildGuildLabel, t as deliverDiscordReply } from "./reply-delivery-QiXSsCCR.js";
|
|
29
|
+
import "./approval-handler.runtime-TRKg9NzZ.js";
|
|
30
30
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
31
31
|
import { chunkItems, logDebug, logError, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, summarizeStringEntries, withTimeout } from "openclaw/plugin-sdk/text-runtime";
|
|
32
32
|
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
@@ -77,13 +77,15 @@ import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
|
|
|
77
77
|
import { createConnectedChannelStatusPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
78
78
|
import { EventEmitter } from "node:events";
|
|
79
79
|
import * as ws from "ws";
|
|
80
|
+
import { Agent } from "node:https";
|
|
80
81
|
import * as httpsProxyAgent from "https-proxy-agent";
|
|
81
82
|
import { captureHttpExchange, captureWsEvent, resolveDebugProxySettings, resolveEffectiveDebugProxyUrl } from "openclaw/plugin-sdk/proxy-capture";
|
|
83
|
+
import * as dns from "node:dns";
|
|
82
84
|
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
83
85
|
import { runInboundReplyTurn } from "openclaw/plugin-sdk/inbound-reply-dispatch";
|
|
84
86
|
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
|
|
85
87
|
import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
|
|
86
|
-
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
88
|
+
import { Agent as Agent$1, ProxyAgent, fetch as fetch$1 } from "undici";
|
|
87
89
|
//#region extensions/discord/src/monitor/listeners.queue.ts
|
|
88
90
|
const DISCORD_SLOW_LISTENER_THRESHOLD_MS = 3e4;
|
|
89
91
|
const discordEventQueueLog = createSubsystemLogger("discord/event-queue");
|
|
@@ -2828,6 +2830,27 @@ function buildDiscordCommandOptions(params) {
|
|
|
2828
2830
|
//#endregion
|
|
2829
2831
|
//#region extensions/discord/src/monitor/native-command.ts
|
|
2830
2832
|
const log = createSubsystemLogger("discord/native-command");
|
|
2833
|
+
function resolveDiscordCommandOwnerAllowFrom(cfg) {
|
|
2834
|
+
const raw = cfg.commands?.ownerAllowFrom;
|
|
2835
|
+
if (!Array.isArray(raw) || raw.length === 0) return;
|
|
2836
|
+
const entries = [];
|
|
2837
|
+
for (const entry of raw) {
|
|
2838
|
+
const trimmed = normalizeOptionalString(String(entry ?? "")) ?? "";
|
|
2839
|
+
if (!trimmed) continue;
|
|
2840
|
+
const separatorIndex = trimmed.indexOf(":");
|
|
2841
|
+
if (separatorIndex > 0) {
|
|
2842
|
+
const prefix = trimmed.slice(0, separatorIndex).toLowerCase();
|
|
2843
|
+
if (prefix === "discord") {
|
|
2844
|
+
const remainder = normalizeOptionalString(trimmed.slice(separatorIndex + 1)) ?? "";
|
|
2845
|
+
if (remainder) entries.push(remainder);
|
|
2846
|
+
continue;
|
|
2847
|
+
}
|
|
2848
|
+
if (prefix !== "user" && prefix !== "pk") continue;
|
|
2849
|
+
}
|
|
2850
|
+
entries.push(trimmed);
|
|
2851
|
+
}
|
|
2852
|
+
return entries.length > 0 ? entries : void 0;
|
|
2853
|
+
}
|
|
2831
2854
|
function createDiscordNativeCommand(params) {
|
|
2832
2855
|
const { command, cfg, discordConfig, accountId, sessionPrefix, ephemeralDefault, threadBindings } = params;
|
|
2833
2856
|
const fallbackCommandDefinition = createNativeCommandDefinition(command);
|
|
@@ -2931,7 +2954,8 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
2931
2954
|
cfg,
|
|
2932
2955
|
accountId
|
|
2933
2956
|
}) ?? [];
|
|
2934
|
-
const
|
|
2957
|
+
const commandOwnerAllowFrom = resolveDiscordCommandOwnerAllowFrom(cfg);
|
|
2958
|
+
const { ownerAllowList: discordOwnerAllowList, ownerAllowed: discordOwnerOk } = resolveDiscordOwnerAccess({
|
|
2935
2959
|
allowFrom: configuredDmAllowFrom,
|
|
2936
2960
|
sender: {
|
|
2937
2961
|
id: sender.id,
|
|
@@ -2940,6 +2964,19 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
2940
2964
|
},
|
|
2941
2965
|
allowNameMatching
|
|
2942
2966
|
});
|
|
2967
|
+
const { ownerAllowed: commandOwnerOk } = resolveDiscordOwnerAccess({
|
|
2968
|
+
allowFrom: commandOwnerAllowFrom,
|
|
2969
|
+
sender: {
|
|
2970
|
+
id: sender.id,
|
|
2971
|
+
name: sender.name,
|
|
2972
|
+
tag: sender.tag
|
|
2973
|
+
},
|
|
2974
|
+
allowNameMatching
|
|
2975
|
+
});
|
|
2976
|
+
const commandOwnerAllowAll = commandOwnerAllowFrom?.includes("*") === true;
|
|
2977
|
+
const senderIsCommandOwner = commandOwnerOk || commandOwnerAllowAll;
|
|
2978
|
+
const ownerAllowListConfigured = discordOwnerAllowList != null;
|
|
2979
|
+
const ownerOk = discordOwnerOk;
|
|
2943
2980
|
const commandsAllowFromAccess = resolveDiscordNativeCommandAllowlistAccess({
|
|
2944
2981
|
cfg,
|
|
2945
2982
|
accountId,
|
|
@@ -3081,7 +3118,7 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
3081
3118
|
memberRoleIds,
|
|
3082
3119
|
sender,
|
|
3083
3120
|
allowNameMatching,
|
|
3084
|
-
ownerAllowListConfigured
|
|
3121
|
+
ownerAllowListConfigured,
|
|
3085
3122
|
ownerAllowed: ownerOk
|
|
3086
3123
|
});
|
|
3087
3124
|
if (!commandAuthorized && !await canBypassConfiguredAcpGuildGuards()) {
|
|
@@ -3146,6 +3183,7 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
3146
3183
|
channel: "discord",
|
|
3147
3184
|
channelId,
|
|
3148
3185
|
isAuthorizedSender: commandAuthorized,
|
|
3186
|
+
senderIsOwner: senderIsCommandOwner,
|
|
3149
3187
|
sessionKey: effectiveRoute.sessionKey,
|
|
3150
3188
|
commandBody: prompt,
|
|
3151
3189
|
config: cfg,
|
|
@@ -3230,7 +3268,7 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
3230
3268
|
commandTargetSessionKey,
|
|
3231
3269
|
channel: "discord",
|
|
3232
3270
|
senderId: sender.id,
|
|
3233
|
-
senderIsOwner:
|
|
3271
|
+
senderIsOwner: senderIsCommandOwner,
|
|
3234
3272
|
isAuthorizedSender: commandAuthorized,
|
|
3235
3273
|
isGroup: isGuild || isGroupDm,
|
|
3236
3274
|
defaultGroupActivation: () => !isGuild ? "always" : channelConfig?.requireMention === false ? "always" : "mention",
|
|
@@ -4086,6 +4124,60 @@ function createDiscordAutoPresenceController(params) {
|
|
|
4086
4124
|
};
|
|
4087
4125
|
}
|
|
4088
4126
|
//#endregion
|
|
4127
|
+
//#region extensions/discord/src/network-config.ts
|
|
4128
|
+
const DISCORD_DNS_HOSTS = [
|
|
4129
|
+
"discord.com",
|
|
4130
|
+
"discord.gg",
|
|
4131
|
+
"gateway.discord.gg"
|
|
4132
|
+
];
|
|
4133
|
+
function normalizeHostname(hostname) {
|
|
4134
|
+
return hostname.trim().toLowerCase();
|
|
4135
|
+
}
|
|
4136
|
+
function isDiscordTransportHostname(hostname) {
|
|
4137
|
+
const normalized = normalizeHostname(hostname);
|
|
4138
|
+
if (!normalized) return false;
|
|
4139
|
+
return DISCORD_DNS_HOSTS.some((target) => normalized === target || normalized.endsWith(`.${target}`));
|
|
4140
|
+
}
|
|
4141
|
+
function reorderLookupAddresses(addresses) {
|
|
4142
|
+
if (!Array.isArray(addresses) || addresses.length < 2) return addresses;
|
|
4143
|
+
const ipv4 = addresses.filter((entry) => entry.family === 4);
|
|
4144
|
+
const ipv6 = addresses.filter((entry) => entry.family === 6);
|
|
4145
|
+
if (ipv4.length === 0) return ipv6;
|
|
4146
|
+
if (ipv6.length === 0) return ipv4;
|
|
4147
|
+
return [...ipv4, ...ipv6];
|
|
4148
|
+
}
|
|
4149
|
+
function createDiscordDnsLookup() {
|
|
4150
|
+
return (hostname, options, callback) => {
|
|
4151
|
+
if (!isDiscordTransportHostname(hostname)) return dns.lookup(hostname, options, callback);
|
|
4152
|
+
const lookupOptions = typeof options === "number" ? { family: options } : options === void 0 ? {} : { ...options };
|
|
4153
|
+
if (lookupOptions.family === 4 || lookupOptions.family === 6) return dns.lookup(hostname, lookupOptions, callback);
|
|
4154
|
+
dns.lookup(hostname, {
|
|
4155
|
+
...lookupOptions,
|
|
4156
|
+
all: true
|
|
4157
|
+
}, (err, addresses) => {
|
|
4158
|
+
if (err) {
|
|
4159
|
+
callback(err, "", 4);
|
|
4160
|
+
return;
|
|
4161
|
+
}
|
|
4162
|
+
if (!Array.isArray(addresses)) {
|
|
4163
|
+
callback(/* @__PURE__ */ new Error("Expected all lookup addresses to be an array"), "", 4);
|
|
4164
|
+
return;
|
|
4165
|
+
}
|
|
4166
|
+
const reordered = reorderLookupAddresses(addresses);
|
|
4167
|
+
if (lookupOptions.all === true) {
|
|
4168
|
+
callback(null, reordered);
|
|
4169
|
+
return;
|
|
4170
|
+
}
|
|
4171
|
+
const first = reordered[0];
|
|
4172
|
+
if (!first) {
|
|
4173
|
+
callback(/* @__PURE__ */ new Error("No Discord DNS addresses resolved"), "", 4);
|
|
4174
|
+
return;
|
|
4175
|
+
}
|
|
4176
|
+
callback(null, first.address, first.family);
|
|
4177
|
+
});
|
|
4178
|
+
};
|
|
4179
|
+
}
|
|
4180
|
+
//#endregion
|
|
4089
4181
|
//#region extensions/discord/src/monitor/gateway-handle.ts
|
|
4090
4182
|
const DISCORD_GATEWAY_TRANSPORT_ACTIVITY_EVENT = "openclaw:discord-gateway-transport-activity";
|
|
4091
4183
|
//#endregion
|
|
@@ -4280,6 +4372,7 @@ async function fetchDiscordGatewayMetadataDirect(input, init, capture) {
|
|
|
4280
4372
|
//#endregion
|
|
4281
4373
|
//#region extensions/discord/src/monitor/gateway-plugin.ts
|
|
4282
4374
|
const DISCORD_GATEWAY_HANDSHAKE_TIMEOUT_MS = 3e4;
|
|
4375
|
+
const discordDnsLookup$1 = createDiscordDnsLookup();
|
|
4283
4376
|
const registrationPromises = /* @__PURE__ */ new WeakMap();
|
|
4284
4377
|
function assignGatewayClient(plugin, client) {
|
|
4285
4378
|
plugin.client = client;
|
|
@@ -4415,7 +4508,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
4415
4508
|
env: process.env
|
|
4416
4509
|
});
|
|
4417
4510
|
let fetchImpl = createDiscordGatewayMetadataFetch(debugProxySettings.enabled);
|
|
4418
|
-
let wsAgent;
|
|
4511
|
+
let wsAgent = new Agent({ lookup: discordDnsLookup$1 });
|
|
4419
4512
|
if (proxy) try {
|
|
4420
4513
|
validateDiscordProxyUrl(proxy);
|
|
4421
4514
|
wsAgent = new (params.__testing?.HttpsProxyAgentCtor ?? httpsProxyAgent.HttpsProxyAgent)(proxy);
|
|
@@ -7411,6 +7504,7 @@ const MAX_DISCORD_GATEWAY_READY_TIMEOUT_MS = 12e4;
|
|
|
7411
7504
|
const DISCORD_GATEWAY_READY_TIMEOUT_ENV = "OPENCLAW_DISCORD_READY_TIMEOUT_MS";
|
|
7412
7505
|
const DISCORD_GATEWAY_RUNTIME_READY_TIMEOUT_ENV = "OPENCLAW_DISCORD_RUNTIME_READY_TIMEOUT_MS";
|
|
7413
7506
|
const DISCORD_GATEWAY_READY_POLL_MS = 250;
|
|
7507
|
+
const DISCORD_GATEWAY_READY_RETRY_BACKOFF_MS = 2e3;
|
|
7414
7508
|
const DISCORD_GATEWAY_STARTUP_DISCONNECT_DRAIN_TIMEOUT_MS = 5e3;
|
|
7415
7509
|
const DISCORD_GATEWAY_STARTUP_TERMINATE_CLOSE_TIMEOUT_MS = 1e3;
|
|
7416
7510
|
const DISCORD_GATEWAY_TRANSPORT_ACTIVITY_STATUS_MIN_INTERVAL_MS = 3e4;
|
|
@@ -7645,27 +7739,36 @@ async function waitForGatewayReady(params) {
|
|
|
7645
7739
|
}
|
|
7646
7740
|
return "stopped";
|
|
7647
7741
|
};
|
|
7648
|
-
if (
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7742
|
+
if (!params.gateway) {
|
|
7743
|
+
if (await waitUntilReady() === "timeout") throw new Error(`discord gateway did not reach READY within ${params.readyTimeoutMs}ms`);
|
|
7744
|
+
return;
|
|
7745
|
+
}
|
|
7746
|
+
let attempt = 0;
|
|
7747
|
+
while (!params.abortSignal?.aborted) {
|
|
7748
|
+
if (await waitUntilReady() !== "timeout") return;
|
|
7749
|
+
attempt += 1;
|
|
7750
|
+
const restartAt = Date.now();
|
|
7751
|
+
params.runtime.error?.(danger(`discord: gateway READY wait timed out after ${params.readyTimeoutMs}ms; reconnecting with backoff (attempt ${attempt})`));
|
|
7752
|
+
params.pushStatus?.({
|
|
7753
|
+
connected: false,
|
|
7754
|
+
lastEventAt: restartAt,
|
|
7755
|
+
lastDisconnect: {
|
|
7756
|
+
at: restartAt,
|
|
7757
|
+
error: "startup-not-ready"
|
|
7758
|
+
},
|
|
7759
|
+
lastError: "startup-not-ready"
|
|
7760
|
+
});
|
|
7761
|
+
await params.beforeRestart?.();
|
|
7762
|
+
await restartGatewayAfterReadyTimeout({
|
|
7763
|
+
gateway: params.gateway,
|
|
7764
|
+
abortSignal: params.abortSignal,
|
|
7765
|
+
runtime: params.runtime
|
|
7766
|
+
});
|
|
7767
|
+
if (params.abortSignal?.aborted) return;
|
|
7768
|
+
await new Promise((resolve) => {
|
|
7769
|
+
setTimeout(resolve, DISCORD_GATEWAY_READY_RETRY_BACKOFF_MS).unref?.();
|
|
7770
|
+
});
|
|
7771
|
+
}
|
|
7669
7772
|
}
|
|
7670
7773
|
async function runDiscordGatewayLifecycle(params) {
|
|
7671
7774
|
const gateway = params.gateway;
|
|
@@ -7855,7 +7958,8 @@ async function createDiscordMonitorClient(params) {
|
|
|
7855
7958
|
requestOptions: {
|
|
7856
7959
|
timeout: DISCORD_REST_TIMEOUT_MS,
|
|
7857
7960
|
runtimeProfile: "persistent",
|
|
7858
|
-
maxQueueSize: 1e3
|
|
7961
|
+
maxQueueSize: 1e3,
|
|
7962
|
+
...params.restFetch ? { fetch: params.restFetch } : {}
|
|
7859
7963
|
},
|
|
7860
7964
|
eventQueue: eventQueueOpts
|
|
7861
7965
|
}, {
|
|
@@ -7865,12 +7969,6 @@ async function createDiscordMonitorClient(params) {
|
|
|
7865
7969
|
modals: params.modals
|
|
7866
7970
|
}, constructorPlugins);
|
|
7867
7971
|
if (voicePlugin) registerLatePlugin(client, voicePlugin);
|
|
7868
|
-
if (params.proxyFetch) client.rest = createDiscordRequestClient(params.token, {
|
|
7869
|
-
fetch: params.proxyFetch,
|
|
7870
|
-
timeout: DISCORD_REST_TIMEOUT_MS,
|
|
7871
|
-
runtimeProfile: "persistent",
|
|
7872
|
-
maxQueueSize: 1e3
|
|
7873
|
-
});
|
|
7874
7972
|
const gateway = client.getPlugin("gateway");
|
|
7875
7973
|
await waitForDiscordGatewayPluginRegistration(gateway);
|
|
7876
7974
|
const gatewaySupervisor = params.createGatewaySupervisor({
|
|
@@ -7969,28 +8067,39 @@ function shouldRegisterDiscordReactionListeners(params) {
|
|
|
7969
8067
|
}
|
|
7970
8068
|
//#endregion
|
|
7971
8069
|
//#region extensions/discord/src/monitor/rest-fetch.ts
|
|
8070
|
+
const discordDnsLookup = createDiscordDnsLookup();
|
|
8071
|
+
function createDiscordRestFetchWithDispatcher(dispatcher) {
|
|
8072
|
+
return wrapFetchWithAbortSignal(((input, init) => fetch$1(input, {
|
|
8073
|
+
...init,
|
|
8074
|
+
dispatcher
|
|
8075
|
+
}).then((response) => {
|
|
8076
|
+
captureHttpExchange({
|
|
8077
|
+
url: resolveRequestUrl(input),
|
|
8078
|
+
method: init?.method ?? "GET",
|
|
8079
|
+
requestHeaders: init?.headers,
|
|
8080
|
+
requestBody: init?.body ?? null,
|
|
8081
|
+
response,
|
|
8082
|
+
flowId: randomUUID(),
|
|
8083
|
+
meta: { subsystem: "discord-rest" }
|
|
8084
|
+
});
|
|
8085
|
+
return response;
|
|
8086
|
+
})));
|
|
8087
|
+
}
|
|
7972
8088
|
function resolveDiscordRestFetch(proxyUrl, runtime) {
|
|
7973
|
-
const
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
}).then((response) => {
|
|
7979
|
-
captureHttpExchange({
|
|
7980
|
-
url: resolveRequestUrl(input),
|
|
7981
|
-
method: init?.method ?? "GET",
|
|
7982
|
-
requestHeaders: init?.headers,
|
|
7983
|
-
requestBody: init?.body ?? null,
|
|
7984
|
-
response,
|
|
7985
|
-
flowId: randomUUID(),
|
|
7986
|
-
meta: { subsystem: "discord-rest" }
|
|
7987
|
-
});
|
|
7988
|
-
return response;
|
|
8089
|
+
const effectiveProxyUrl = resolveEffectiveDebugProxyUrl(proxyUrl);
|
|
8090
|
+
if (effectiveProxyUrl) {
|
|
8091
|
+
const fetcher = withValidatedDiscordProxy(effectiveProxyUrl, runtime, (proxy) => createDiscordRestFetchWithDispatcher(new ProxyAgent({
|
|
8092
|
+
uri: proxy,
|
|
8093
|
+
allowH2: false
|
|
7989
8094
|
})));
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
8095
|
+
if (!fetcher) return fetch;
|
|
8096
|
+
runtime.log?.("discord: rest proxy enabled");
|
|
8097
|
+
return fetcher;
|
|
8098
|
+
}
|
|
8099
|
+
return createDiscordRestFetchWithDispatcher(new Agent$1({
|
|
8100
|
+
allowH2: false,
|
|
8101
|
+
connect: { lookup: discordDnsLookup }
|
|
8102
|
+
}));
|
|
7994
8103
|
}
|
|
7995
8104
|
//#endregion
|
|
7996
8105
|
//#region extensions/discord/src/monitor/startup-status.ts
|
|
@@ -8035,7 +8144,7 @@ async function loadDiscordVoiceRuntime() {
|
|
|
8035
8144
|
}
|
|
8036
8145
|
}
|
|
8037
8146
|
async function loadDiscordProviderSessionRuntime() {
|
|
8038
|
-
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-
|
|
8147
|
+
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-7BukaDmt.js");
|
|
8039
8148
|
discordProviderSessionRuntimePromise = promise;
|
|
8040
8149
|
try {
|
|
8041
8150
|
return await promise;
|
|
@@ -8063,7 +8172,6 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
8063
8172
|
const discordRootThreadBindings = cfg.channels?.discord?.threadBindings;
|
|
8064
8173
|
const discordAccountThreadBindings = cfg.channels?.discord?.accounts?.[account.accountId]?.threadBindings;
|
|
8065
8174
|
const discordRestFetch = resolveDiscordRestFetch(rawDiscordCfg.proxy, runtime);
|
|
8066
|
-
const discordProxyFetch = resolveDiscordProxyFetchForAccount(account, cfg, runtime);
|
|
8067
8175
|
const dmConfig = rawDiscordCfg.dm;
|
|
8068
8176
|
const configuredDmAllowFrom = resolveDiscordAccountAllowFrom({
|
|
8069
8177
|
cfg,
|
|
@@ -8240,7 +8348,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
8240
8348
|
accountId: account.accountId,
|
|
8241
8349
|
applicationId,
|
|
8242
8350
|
token,
|
|
8243
|
-
|
|
8351
|
+
restFetch: discordRestFetch,
|
|
8244
8352
|
commands,
|
|
8245
8353
|
components,
|
|
8246
8354
|
modals,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-
|
|
2
|
-
import { n as createNoopThreadBindingManager, r as createThreadBindingManager } from "./thread-bindings.manager-
|
|
3
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
1
|
+
import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-C7GN5ebh.js";
|
|
2
|
+
import { n as createNoopThreadBindingManager, r as createThreadBindingManager } from "./thread-bindings.manager-BxPG0IHV.js";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-kDvsxS8t.js";
|
|
4
4
|
import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
|
|
5
5
|
import { getAcpSessionManager, isAcpRuntimeError } from "openclaw/plugin-sdk/acp-runtime";
|
|
6
6
|
export { createDiscordMessageHandler, createNoopThreadBindingManager, createThreadBindingManager, getAcpSessionManager, isAcpRuntimeError, reconcileAcpThreadBindingsOnStartup, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { i as resolveTimestampMs } from "./format-D8TsaXxW.js";
|
|
2
|
-
import { s as sendVoiceMessageDiscord } from "./send-
|
|
3
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
2
|
+
import { s as sendVoiceMessageDiscord } from "./send-Rz5xnelg.js";
|
|
3
|
+
import { t as sendMessageDiscord } from "./send.outbound-DN-HfmW2.js";
|
|
4
4
|
import { t as resolveDiscordSenderIdentity } from "./sender-identity-BiSDAk2P.js";
|
|
5
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
5
|
+
import { normalizeOptionalString, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-runtime";
|
|
6
|
+
import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
6
7
|
import { buildOutboundSessionContext, deliverOutboundPayloads } from "openclaw/plugin-sdk/outbound-runtime";
|
|
7
8
|
import { resolveAgentAvatar } from "openclaw/plugin-sdk/agent-runtime";
|
|
8
9
|
//#region extensions/discord/src/monitor/reply-context.ts
|
|
@@ -41,6 +42,58 @@ function buildGuildLabel(params) {
|
|
|
41
42
|
return `${guild?.name ?? "Guild"} #${channelName} channel id:${channelId}`;
|
|
42
43
|
}
|
|
43
44
|
//#endregion
|
|
45
|
+
//#region extensions/discord/src/monitor/reply-safety.ts
|
|
46
|
+
const DISCORD_INTERNAL_TRACE_LINE_RE = /^(?:>\s*)?(?:📊|🛠️|📖|📝|🔍|🔎|⚙️)\s*(?:Session Status|Exec|Read|Edit|Write|Patch|Search|Open|Click|Find|Screenshot|Update Plan|Tool Call|Tool Result|Function Call|Shell|Command)\s*:/i;
|
|
47
|
+
const DISCORD_INTERNAL_CHANNEL_LINE_RE = /^(?:>\s*)?(?:analysis|commentary|tool[-_ ]?call|tool[-_ ]?result|function[-_ ]?call|thinking|reasoning)\s*[:=]/i;
|
|
48
|
+
function hasNonEmptyRecord(value) {
|
|
49
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length > 0);
|
|
50
|
+
}
|
|
51
|
+
function hasInteractiveOrPresentationBlocks(value) {
|
|
52
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
53
|
+
const record = value;
|
|
54
|
+
if (typeof record.title === "string" && record.title.trim().length > 0) return true;
|
|
55
|
+
return Array.isArray(record.blocks) && record.blocks.length > 0;
|
|
56
|
+
}
|
|
57
|
+
function hasNonTextReplyPayloadContent(payload) {
|
|
58
|
+
return payload.audioAsVoice === true || hasNonEmptyRecord(payload.channelData) || hasInteractiveOrPresentationBlocks(payload.interactive) || hasInteractiveOrPresentationBlocks(payload.presentation);
|
|
59
|
+
}
|
|
60
|
+
function stripDiscordInternalTraceLines(text) {
|
|
61
|
+
let inFence = false;
|
|
62
|
+
const kept = [];
|
|
63
|
+
for (const line of text.split(/\r?\n/)) {
|
|
64
|
+
if (/^\s*```/.test(line)) {
|
|
65
|
+
inFence = !inFence;
|
|
66
|
+
kept.push(line);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (!inFence) {
|
|
70
|
+
const trimmed = line.trim();
|
|
71
|
+
if (DISCORD_INTERNAL_TRACE_LINE_RE.test(trimmed) || DISCORD_INTERNAL_CHANNEL_LINE_RE.test(trimmed)) continue;
|
|
72
|
+
}
|
|
73
|
+
kept.push(line);
|
|
74
|
+
}
|
|
75
|
+
return kept.join("\n");
|
|
76
|
+
}
|
|
77
|
+
function collapseExcessBlankLines(text) {
|
|
78
|
+
return text.replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n");
|
|
79
|
+
}
|
|
80
|
+
function sanitizeDiscordFrontChannelText(text) {
|
|
81
|
+
return collapseExcessBlankLines(stripDiscordInternalTraceLines(sanitizeAssistantVisibleText(text))).trim();
|
|
82
|
+
}
|
|
83
|
+
function sanitizeDiscordFrontChannelReplyPayloads(payloads) {
|
|
84
|
+
const safePayloads = [];
|
|
85
|
+
for (const payload of payloads) {
|
|
86
|
+
const safeText = typeof payload.text === "string" ? sanitizeDiscordFrontChannelText(payload.text) : payload.text;
|
|
87
|
+
const nextPayload = safeText === payload.text ? payload : {
|
|
88
|
+
...payload,
|
|
89
|
+
text: safeText || void 0
|
|
90
|
+
};
|
|
91
|
+
if (!resolveSendableOutboundReplyParts(nextPayload).hasContent && !hasNonTextReplyPayloadContent(nextPayload)) continue;
|
|
92
|
+
safePayloads.push(nextPayload);
|
|
93
|
+
}
|
|
94
|
+
return safePayloads;
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
44
97
|
//#region extensions/discord/src/monitor/reply-delivery.ts
|
|
45
98
|
function resolveTargetChannelId(target) {
|
|
46
99
|
if (!target.startsWith("channel:")) return;
|
|
@@ -102,12 +155,14 @@ function resolveDiscordDeliveryOptions(params) {
|
|
|
102
155
|
async function deliverDiscordReply(params) {
|
|
103
156
|
params.runtime;
|
|
104
157
|
const delivery = resolveDiscordDeliveryOptions(params);
|
|
105
|
-
|
|
158
|
+
const payloads = sanitizeDiscordFrontChannelReplyPayloads(params.replies);
|
|
159
|
+
if (payloads.length === 0) return;
|
|
160
|
+
if ((await deliverOutboundPayloads({
|
|
106
161
|
cfg: params.cfg,
|
|
107
162
|
channel: "discord",
|
|
108
163
|
to: delivery.to,
|
|
109
164
|
accountId: params.accountId,
|
|
110
|
-
payloads
|
|
165
|
+
payloads,
|
|
111
166
|
replyToId: normalizeOptionalString(params.replyToId),
|
|
112
167
|
replyToMode: delivery.replyToMode,
|
|
113
168
|
formatting: delivery.formatting,
|
|
@@ -125,7 +180,7 @@ async function deliverDiscordReply(params) {
|
|
|
125
180
|
agentId: delivery.agentId,
|
|
126
181
|
requesterAccountId: params.accountId
|
|
127
182
|
})
|
|
128
|
-
});
|
|
183
|
+
})).length === 0) throw new Error(`discord final reply produced no delivered message for ${delivery.to}`);
|
|
129
184
|
}
|
|
130
185
|
//#endregion
|
|
131
186
|
export { resolveReplyContext as i, buildDirectLabel as n, buildGuildLabel as r, deliverDiscordReply as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as canViewDiscordGuildChannel } from "./send.shared-
|
|
1
|
+
import { w as canViewDiscordGuildChannel } from "./send.shared-BWZyuxM-.js";
|
|
2
2
|
import { o as resolveDiscordAllowListMatch, r as normalizeDiscordAllowList } from "./allow-list-ek-1hMKN.js";
|
|
3
3
|
import { deriveLastRoutePolicy, isAcpSessionKey, isSubagentSessionKey, parseAgentSessionKey, resolveAgentIdFromSessionKey, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
4
4
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { o as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-CaHGiVB4.js";
|
|
2
2
|
import { s as resolveDiscordChannelId } from "./normalize-B-ktw-T_.js";
|
|
3
|
-
import { c as jsonResult, d as readNumberParam, f as readReactionParams, g as withNormalizedTimestamp, h as resolvePollMaxSelections, l as parseAvailableTags, m as readStringParam, p as readStringArrayParam, r as sendDiscordComponentMessage, s as assertMediaNotDataUrl, u as readBooleanParam } from "./send.components-
|
|
3
|
+
import { c as jsonResult, d as readNumberParam, f as readReactionParams, g as withNormalizedTimestamp, h as resolvePollMaxSelections, l as parseAvailableTags, m as readStringParam, p as readStringArrayParam, r as sendDiscordComponentMessage, s as assertMediaNotDataUrl, u as readBooleanParam } from "./send.components-CoCE4aan.js";
|
|
4
4
|
import { n as getGateway, o as getPresence } from "./gateway-registry-BKG4KIVC.js";
|
|
5
|
-
import { O as hasAnyGuildPermissionDiscord, P as createDiscordRuntimeAccountContext, T as fetchChannelPermissionsDiscord, d as resolveDiscordTargetChannelId } from "./send.shared-
|
|
6
|
-
import { A as removeRoleDiscord, B as removeChannelPermissionDiscord, C as fetchChannelInfoDiscord, D as kickMemberDiscord, E as fetchVoiceStatusDiscord, F as uploadStickerDiscord, I as createChannelDiscord, L as deleteChannelDiscord, M as timeoutMemberDiscord, N as listGuildEmojisDiscord, O as listGuildChannelsDiscord, P as uploadEmojiDiscord, R as editChannelDiscord, S as createScheduledEventDiscord, T as fetchRoleInfoDiscord, V as setChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as resolveEventCoverImage, k as listScheduledEventsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchMemberInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as moveChannelDiscord } from "./send-
|
|
7
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
5
|
+
import { O as hasAnyGuildPermissionDiscord, P as createDiscordRuntimeAccountContext, T as fetchChannelPermissionsDiscord, d as resolveDiscordTargetChannelId } from "./send.shared-BWZyuxM-.js";
|
|
6
|
+
import { A as removeRoleDiscord, B as removeChannelPermissionDiscord, C as fetchChannelInfoDiscord, D as kickMemberDiscord, E as fetchVoiceStatusDiscord, F as uploadStickerDiscord, I as createChannelDiscord, L as deleteChannelDiscord, M as timeoutMemberDiscord, N as listGuildEmojisDiscord, O as listGuildChannelsDiscord, P as uploadEmojiDiscord, R as editChannelDiscord, S as createScheduledEventDiscord, T as fetchRoleInfoDiscord, V as setChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as resolveEventCoverImage, k as listScheduledEventsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchMemberInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as moveChannelDiscord } from "./send-Rz5xnelg.js";
|
|
7
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DN-HfmW2.js";
|
|
8
8
|
import { c as readDiscordComponentSpec } from "./components-D5LnN7ZQ.js";
|
|
9
|
-
import "./targets-
|
|
9
|
+
import "./targets-DcNwQ9vN.js";
|
|
10
10
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
|
|
11
11
|
import { PermissionFlagsBits } from "discord-api-types/v10";
|
|
12
12
|
//#region extensions/discord/src/actions/runtime.shared.ts
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-
|
|
2
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
1
|
+
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-NObmZxWs.js";
|
|
2
|
+
import { t as discordMessageActions } from "./channel-actions-BvEKvoM5.js";
|
|
3
3
|
export { discordMessageActions, handleDiscordAction, isDiscordModerationAction, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, requiredGuildPermissionForModerationAction };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-uHGLDP-Y.js";
|
|
2
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-CoCE4aan.js";
|
|
3
3
|
import { a as clearPresences, c as setPresence, i as unregisterGateway, n as getGateway, o as getPresence, r as registerGateway, s as presenceCacheSize, t as clearGateways } from "./gateway-registry-BKG4KIVC.js";
|
|
4
|
-
import { C as DiscordSendError, D as hasAllGuildPermissionsDiscord, E as fetchMemberGuildPermissionsDiscord, O as hasAnyGuildPermissionDiscord, T as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
4
|
+
import { C as DiscordSendError, D as hasAllGuildPermissionsDiscord, E as fetchMemberGuildPermissionsDiscord, O as hasAnyGuildPermissionDiscord, T as fetchChannelPermissionsDiscord } from "./send.shared-BWZyuxM-.js";
|
|
5
5
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, g as resolveDiscordShouldRequireMention, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as shouldEmitDiscordReactionNotification } from "./allow-list-ek-1hMKN.js";
|
|
6
6
|
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-DJ0V5asB.js";
|
|
7
|
-
import { A as removeRoleDiscord, B as removeChannelPermissionDiscord, C as fetchChannelInfoDiscord, D as kickMemberDiscord, E as fetchVoiceStatusDiscord, F as uploadStickerDiscord, I as createChannelDiscord, L as deleteChannelDiscord, M as timeoutMemberDiscord, N as listGuildEmojisDiscord, O as listGuildChannelsDiscord, P as uploadEmojiDiscord, R as editChannelDiscord, S as createScheduledEventDiscord, T as fetchRoleInfoDiscord, V as setChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as resolveEventCoverImage, k as listScheduledEventsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchMemberInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as moveChannelDiscord } from "./send-
|
|
8
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
9
|
-
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-
|
|
7
|
+
import { A as removeRoleDiscord, B as removeChannelPermissionDiscord, C as fetchChannelInfoDiscord, D as kickMemberDiscord, E as fetchVoiceStatusDiscord, F as uploadStickerDiscord, I as createChannelDiscord, L as deleteChannelDiscord, M as timeoutMemberDiscord, N as listGuildEmojisDiscord, O as listGuildChannelsDiscord, P as uploadEmojiDiscord, R as editChannelDiscord, S as createScheduledEventDiscord, T as fetchRoleInfoDiscord, V as setChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as resolveEventCoverImage, k as listScheduledEventsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchMemberInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as moveChannelDiscord } from "./send-Rz5xnelg.js";
|
|
8
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DN-HfmW2.js";
|
|
9
|
+
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-NObmZxWs.js";
|
|
10
10
|
import { r as setDiscordRuntime } from "./runtime-K9RT6Egn.js";
|
|
11
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
11
|
+
import { t as discordMessageActions } from "./channel-actions-BvEKvoM5.js";
|
|
12
12
|
import { C as resolveThreadBindingMaxAgeMs, S as resolveThreadBindingMaxAgeExpiresAt, b as resolveThreadBindingIdleTimeoutMs, l as isRecentlyUnboundThreadWebhookMessage, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-Dzu1gCE7.js";
|
|
13
13
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-TTP020qQ.js";
|
|
14
14
|
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-VAqom3Dn.js";
|
|
15
15
|
import { t as resolveDiscordUserAllowlist } from "./resolve-users-DPJkRKx1.js";
|
|
16
|
-
import { d as formatThreadBindingDurationLabel, l as resolveThreadBindingPersona, m as resolveThreadBindingThreadName, p as resolveThreadBindingIntroText, u as resolveThreadBindingPersonaFromRecord } from "./thread-bindings.discord-api-
|
|
17
|
-
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-
|
|
18
|
-
import { i as getThreadBindingManager, n as createNoopThreadBindingManager, r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-
|
|
16
|
+
import { d as formatThreadBindingDurationLabel, l as resolveThreadBindingPersona, m as resolveThreadBindingThreadName, p as resolveThreadBindingIntroText, u as resolveThreadBindingPersonaFromRecord } from "./thread-bindings.discord-api-CfZnSqIb.js";
|
|
17
|
+
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-C7GN5ebh.js";
|
|
18
|
+
import { i as getThreadBindingManager, n as createNoopThreadBindingManager, r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-BxPG0IHV.js";
|
|
19
19
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DmHUl6wI.js";
|
|
20
20
|
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";
|
|
21
21
|
import "./runtime-api.actions.js";
|
|
22
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
22
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-CdKtgVPO.js";
|
|
23
23
|
import "./runtime-api.lookup.js";
|
|
24
|
-
import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-
|
|
24
|
+
import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-CnLt-Y4Z.js";
|
|
25
25
|
import { i as buildDiscordMediaPayload } from "./message-utils-Dmgu-7fC.js";
|
|
26
26
|
import { o as sanitizeDiscordThreadName, r as resolveDiscordReplyTarget } from "./threading-Bi95Nz8h.js";
|
|
27
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
28
|
-
import "./runtime-api.monitor-
|
|
27
|
+
import { t as createDiscordMessageHandler } from "./message-handler-kDvsxS8t.js";
|
|
28
|
+
import "./runtime-api.monitor-B5uT6Cmc.js";
|
|
29
29
|
import "./runtime-api.send.js";
|
|
30
30
|
import "./runtime-api.threads.js";
|
|
31
31
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DiscordSendError, __testing, addRoleDiscord, allowListMatches, auditDiscordChannelPermissions, autoBindSpawnedDiscordSubagent, banMemberDiscord, buildDiscordMediaPayload, clearGateways, clearPresences, collectDiscordAuditChannelIds, createChannelDiscord, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, createNoopThreadBindingManager, createScheduledEventDiscord, createThreadBindingManager, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, discordMessageActions, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, formatThreadBindingDurationLabel, getGateway, getPresence, getThreadBindingManager, handleDiscordAction, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, isRecentlyUnboundThreadWebhookMessage, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, mergeAbortSignals, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, normalizeDiscordSlug, parseApplicationIdFromToken, pinMessageDiscord, presenceCacheSize, probeDiscord, reactMessageDiscord, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, readMessagesDiscord, reconcileAcpThreadBindingsOnStartup, registerBuiltDiscordComponentMessage, registerDiscordListener, registerGateway, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, requiredGuildPermissionForModerationAction, resolveDiscordChannelAllowlist, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordOutboundSessionRoute, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveDiscordUserAllowlist, resolveEventCoverImage, resolveGroupDmAllow, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, sanitizeDiscordThreadName, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, setDiscordRuntime, setPresence, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, shouldEmitDiscordReactionNotification, timeoutMemberDiscord, unbindThreadBindingsBySessionKey, unpinMessageDiscord, unregisterGateway, uploadEmojiDiscord, uploadStickerDiscord, waitForDiscordGatewayPluginRegistration };
|
|
@@ -3,5 +3,5 @@ import { r as setDiscordRuntime } from "./runtime-K9RT6Egn.js";
|
|
|
3
3
|
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-VAqom3Dn.js";
|
|
4
4
|
import { t as resolveDiscordUserAllowlist } from "./resolve-users-DPJkRKx1.js";
|
|
5
5
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DmHUl6wI.js";
|
|
6
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
6
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-CdKtgVPO.js";
|
|
7
7
|
export { auditDiscordChannelPermissions, collectDiscordAuditChannelIds, fetchDiscordApplicationId, fetchDiscordApplicationSummary, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, parseApplicationIdFromToken, probeDiscord, resolveDiscordChannelAllowlist, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordUserAllowlist, setDiscordRuntime };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./allow-list-ek-1hMKN.js";
|
|
2
|
-
import "./provider-
|
|
2
|
+
import "./provider-CnLt-Y4Z.js";
|
|
3
3
|
import "./message-utils-Dmgu-7fC.js";
|
|
4
4
|
import "./threading-Bi95Nz8h.js";
|
|
5
|
-
import "./message-handler-
|
|
5
|
+
import "./message-handler-kDvsxS8t.js";
|
|
6
6
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as clearPresences, c as setPresence, i as unregisterGateway, n as getGateway, o as getPresence, r as registerGateway, s as presenceCacheSize, t as clearGateways } from "./gateway-registry-BKG4KIVC.js";
|
|
2
2
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, g as resolveDiscordShouldRequireMention, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as shouldEmitDiscordReactionNotification } from "./allow-list-ek-1hMKN.js";
|
|
3
3
|
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";
|
|
4
|
-
import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-
|
|
4
|
+
import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-CnLt-Y4Z.js";
|
|
5
5
|
import { i as buildDiscordMediaPayload } from "./message-utils-Dmgu-7fC.js";
|
|
6
6
|
import { o as sanitizeDiscordThreadName, r as resolveDiscordReplyTarget } from "./threading-Bi95Nz8h.js";
|
|
7
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
8
|
-
import "./runtime-api.monitor-
|
|
7
|
+
import { t as createDiscordMessageHandler } from "./message-handler-kDvsxS8t.js";
|
|
8
|
+
import "./runtime-api.monitor-B5uT6Cmc.js";
|
|
9
9
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, allowListMatches, buildDiscordMediaPayload, clearGateways, clearPresences, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, getGateway, getPresence, isDiscordGroupAllowedByPolicy, mergeAbortSignals, monitorDiscordProvider, normalizeDiscordAllowList, normalizeDiscordSlug, presenceCacheSize, registerDiscordListener, registerGateway, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveGroupDmAllow, sanitizeDiscordThreadName, setPresence, shouldEmitDiscordReactionNotification, unregisterGateway, waitForDiscordGatewayPluginRegistration };
|
package/dist/runtime-api.send.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-uHGLDP-Y.js";
|
|
2
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-
|
|
3
|
-
import { C as DiscordSendError, D as hasAllGuildPermissionsDiscord, E as fetchMemberGuildPermissionsDiscord, O as hasAnyGuildPermissionDiscord, T as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
4
|
-
import { A as removeRoleDiscord, B as removeChannelPermissionDiscord, C as fetchChannelInfoDiscord, D as kickMemberDiscord, E as fetchVoiceStatusDiscord, F as uploadStickerDiscord, I as createChannelDiscord, L as deleteChannelDiscord, M as timeoutMemberDiscord, N as listGuildEmojisDiscord, O as listGuildChannelsDiscord, P as uploadEmojiDiscord, R as editChannelDiscord, S as createScheduledEventDiscord, T as fetchRoleInfoDiscord, V as setChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as resolveEventCoverImage, k as listScheduledEventsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchMemberInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as moveChannelDiscord } from "./send-
|
|
5
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-CoCE4aan.js";
|
|
3
|
+
import { C as DiscordSendError, D as hasAllGuildPermissionsDiscord, E as fetchMemberGuildPermissionsDiscord, O as hasAnyGuildPermissionDiscord, T as fetchChannelPermissionsDiscord } from "./send.shared-BWZyuxM-.js";
|
|
4
|
+
import { A as removeRoleDiscord, B as removeChannelPermissionDiscord, C as fetchChannelInfoDiscord, D as kickMemberDiscord, E as fetchVoiceStatusDiscord, F as uploadStickerDiscord, I as createChannelDiscord, L as deleteChannelDiscord, M as timeoutMemberDiscord, N as listGuildEmojisDiscord, O as listGuildChannelsDiscord, P as uploadEmojiDiscord, R as editChannelDiscord, S as createScheduledEventDiscord, T as fetchRoleInfoDiscord, V as setChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as resolveEventCoverImage, k as listScheduledEventsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchMemberInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as moveChannelDiscord } from "./send-Rz5xnelg.js";
|
|
5
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DN-HfmW2.js";
|
|
6
6
|
export { DiscordSendError, addRoleDiscord, banMemberDiscord, createChannelDiscord, createScheduledEventDiscord, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, kickMemberDiscord, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadsDiscord, moveChannelDiscord, pinMessageDiscord, reactMessageDiscord, readMessagesDiscord, registerBuiltDiscordComponentMessage, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, resolveDiscordOutboundSessionRoute, resolveEventCoverImage, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, timeoutMemberDiscord, unpinMessageDiscord, uploadEmojiDiscord, uploadStickerDiscord };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as resolveThreadBindingMaxAgeMs, S as resolveThreadBindingMaxAgeExpiresAt, b as resolveThreadBindingIdleTimeoutMs, l as isRecentlyUnboundThreadWebhookMessage, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-Dzu1gCE7.js";
|
|
2
2
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-TTP020qQ.js";
|
|
3
|
-
import { d as formatThreadBindingDurationLabel, l as resolveThreadBindingPersona, m as resolveThreadBindingThreadName, p as resolveThreadBindingIntroText, u as resolveThreadBindingPersonaFromRecord } from "./thread-bindings.discord-api-
|
|
4
|
-
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-
|
|
5
|
-
import { i as getThreadBindingManager, n as createNoopThreadBindingManager, r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-
|
|
3
|
+
import { d as formatThreadBindingDurationLabel, l as resolveThreadBindingPersona, m as resolveThreadBindingThreadName, p as resolveThreadBindingIntroText, u as resolveThreadBindingPersonaFromRecord } from "./thread-bindings.discord-api-CfZnSqIb.js";
|
|
4
|
+
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-C7GN5ebh.js";
|
|
5
|
+
import { i as getThreadBindingManager, n as createNoopThreadBindingManager, r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-BxPG0IHV.js";
|
|
6
6
|
export { __testing, autoBindSpawnedDiscordSubagent, createNoopThreadBindingManager, createThreadBindingManager, formatThreadBindingDurationLabel, getThreadBindingManager, isRecentlyUnboundThreadWebhookMessage, listThreadBindingsBySessionKey, listThreadBindingsForAccount, reconcileAcpThreadBindingsOnStartup, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, unbindThreadBindingsBySessionKey };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
|
|
3
3
|
import { $ as createChannelMessage, At as putChannelPermission, Ct as getGuildVoiceState, Dt as listGuildRoles, Et as listGuildEmojis, Mt as removeGuildMemberRole, Nt as timeoutGuildMember, Ot as listGuildScheduledEvents, Q as listMessageReactionUsers, St as getGuildMember, Tt as listGuildChannels, X as createOwnMessageReaction, Z as deleteOwnMessageReaction, _ as readDiscordMessage, _t as createGuildEmoji, at as getChannel, bt as deleteChannelPermission, ct as listChannelMessages, dt as searchGuildMessages, et as createThread, ft as sendChannelTyping, g as readDiscordCode, gt as createGuildChannel, h as RateLimitError, ht as createGuildBan, it as editChannelMessage, jt as removeGuildMember, kt as moveGuildChannels, lt as listChannelPins, m as DiscordError, mt as addGuildMemberRole, nt as deleteChannelMessage, ot as getChannelMessage, pt as unpinChannelMessage, rt as editChannel, st as listChannelArchivedThreads, tt as deleteChannel, ut as pinChannelMessage, v as readRetryAfter, vt as createGuildScheduledEvent, wt as listGuildActiveThreads, yt as createGuildSticker } from "./discord-eZlimVfW.js";
|
|
4
|
-
import { C as DiscordSendError, D as hasAllGuildPermissionsDiscord, E as fetchMemberGuildPermissionsDiscord, F as resolveDiscordClientAccountContext, I as resolveDiscordRest, M as createDiscordClient, O as hasAnyGuildPermissionDiscord, S as DISCORD_MAX_STICKER_BYTES, T as fetchChannelPermissionsDiscord, b as DISCORD_MAX_EMOJI_BYTES, i as formatReactionEmoji, k as parseAndResolveRecipient, l as resolveChannelId, o as normalizeEmojiName, r as buildReactionIdentifier, s as normalizeReactionEmoji, t as buildDiscordSendError, w as canViewDiscordGuildChannel, x as DISCORD_MAX_EVENT_COVER_BYTES } from "./send.shared-
|
|
4
|
+
import { C as DiscordSendError, D as hasAllGuildPermissionsDiscord, E as fetchMemberGuildPermissionsDiscord, F as resolveDiscordClientAccountContext, I as resolveDiscordRest, M as createDiscordClient, O as hasAnyGuildPermissionDiscord, S as DISCORD_MAX_STICKER_BYTES, T as fetchChannelPermissionsDiscord, b as DISCORD_MAX_EMOJI_BYTES, i as formatReactionEmoji, k as parseAndResolveRecipient, l as resolveChannelId, o as normalizeEmojiName, r as buildReactionIdentifier, s as normalizeReactionEmoji, t as buildDiscordSendError, w as canViewDiscordGuildChannel, x as DISCORD_MAX_EVENT_COVER_BYTES } from "./send.shared-BWZyuxM-.js";
|
|
5
5
|
import { n as rewriteDiscordKnownMentions } from "./mentions-BPZUaFk7.js";
|
|
6
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
6
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DN-HfmW2.js";
|
|
7
7
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
8
8
|
import { ChannelType } from "discord-api-types/v10";
|
|
9
9
|
import crypto from "node:crypto";
|
|
@@ -4,8 +4,8 @@ import "./config-api-CFZtoMaS.js";
|
|
|
4
4
|
import "./channel-api-CTSWMrnD.js";
|
|
5
5
|
import "./outbound-session-route-uHGLDP-Y.js";
|
|
6
6
|
import { $ as createChannelMessage, it as editChannelMessage, w as serializePayload } from "./discord-eZlimVfW.js";
|
|
7
|
-
import { M as createDiscordClient, h as SUPPRESS_NOTIFICATIONS_FLAG, k as parseAndResolveRecipient, l as resolveChannelId, m as toDiscordFileBlob, t as buildDiscordSendError, u as resolveDiscordChannelType, y as stripUndefinedFields } from "./send.shared-
|
|
8
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
7
|
+
import { M as createDiscordClient, h as SUPPRESS_NOTIFICATIONS_FLAG, k as parseAndResolveRecipient, l as resolveChannelId, m as toDiscordFileBlob, t as buildDiscordSendError, u as resolveDiscordChannelType, y as stripUndefinedFields } from "./send.shared-BWZyuxM-.js";
|
|
8
|
+
import { t as sendMessageDiscord } from "./send.outbound-DN-HfmW2.js";
|
|
9
9
|
import { a as buildDiscordComponentMessage, l as resolveDiscordComponentAttachmentName, o as buildDiscordComponentMessageFlags } from "./components-D5LnN7ZQ.js";
|
|
10
10
|
import { n as getOptionalDiscordRuntime } from "./runtime-K9RT6Egn.js";
|
|
11
11
|
import "openclaw/plugin-sdk/account-id";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
|
|
2
2
|
import { $ as createChannelMessage, et as createThread } from "./discord-eZlimVfW.js";
|
|
3
|
-
import { M as createDiscordClient, _ as resolveDiscordSendComponents, a as normalizeDiscordPollInput, c as normalizeStickerIds, f as sendDiscordMedia, g as buildDiscordMessageRequest, h as SUPPRESS_NOTIFICATIONS_FLAG, k as parseAndResolveRecipient, l as resolveChannelId, n as buildDiscordTextChunks, p as sendDiscordText, t as buildDiscordSendError, u as resolveDiscordChannelType, v as resolveDiscordSendEmbeds } from "./send.shared-
|
|
3
|
+
import { M as createDiscordClient, _ as resolveDiscordSendComponents, a as normalizeDiscordPollInput, c as normalizeStickerIds, f as sendDiscordMedia, g as buildDiscordMessageRequest, h as SUPPRESS_NOTIFICATIONS_FLAG, k as parseAndResolveRecipient, l as resolveChannelId, n as buildDiscordTextChunks, p as sendDiscordText, t as buildDiscordSendError, u as resolveDiscordChannelType, v as resolveDiscordSendEmbeds } from "./send.shared-BWZyuxM-.js";
|
|
4
4
|
import { n as rewriteDiscordKnownMentions } from "./mentions-BPZUaFk7.js";
|
|
5
5
|
import { convertMarkdownTables, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
6
6
|
import { ChannelType } from "discord-api-types/v10";
|
|
@@ -710,4 +710,4 @@ function formatReactionEmoji(emoji) {
|
|
|
710
710
|
return buildReactionIdentifier(emoji);
|
|
711
711
|
}
|
|
712
712
|
//#endregion
|
|
713
|
-
export { resolveDiscordTarget as A,
|
|
713
|
+
export { resolveDiscordTarget as A, DiscordSendError as C, hasAllGuildPermissionsDiscord as D, fetchMemberGuildPermissionsDiscord as E, resolveDiscordClientAccountContext as F, resolveDiscordRest as I, DISCORD_REST_TIMEOUT_MS as L, createDiscordClient as M, createDiscordRestClient as N, hasAnyGuildPermissionDiscord as O, createDiscordRuntimeAccountContext as P, validateDiscordProxyUrl as R, DISCORD_MAX_STICKER_BYTES as S, fetchChannelPermissionsDiscord as T, resolveDiscordSendComponents as _, normalizeDiscordPollInput as a, DISCORD_MAX_EMOJI_BYTES as b, normalizeStickerIds as c, resolveDiscordTargetChannelId as d, sendDiscordMedia as f, buildDiscordMessageRequest as g, SUPPRESS_NOTIFICATIONS_FLAG as h, formatReactionEmoji as i, parseDiscordSendTarget as j, parseAndResolveRecipient as k, resolveChannelId as l, toDiscordFileBlob as m, buildDiscordTextChunks as n, normalizeEmojiName as o, sendDiscordText as p, buildReactionIdentifier as r, normalizeReactionEmoji as s, buildDiscordSendError as t, resolveDiscordChannelType as u, resolveDiscordSendEmbeds as v, canViewDiscordGuildChannel as w, DISCORD_MAX_EVENT_COVER_BYTES as x, stripUndefinedFields as y, withValidatedDiscordProxy as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
|
|
3
|
-
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-
|
|
3
|
+
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-C7GN5ebh.js";
|
|
4
4
|
import { normalizeOptionalLowercaseString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/text-runtime";
|
|
5
5
|
import { formatThreadBindingDisabledError, formatThreadBindingSpawnDisabledError, resolveThreadBindingSpawnPolicy } from "openclaw/plugin-sdk/conversation-runtime";
|
|
6
6
|
//#region extensions/discord/src/subagent-hooks.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region extensions/discord/subagent-hooks-api.ts
|
|
2
2
|
let discordSubagentHooksPromise = null;
|
|
3
3
|
function loadDiscordSubagentHooksModule() {
|
|
4
|
-
discordSubagentHooksPromise ??= import("./subagent-hooks-
|
|
4
|
+
discordSubagentHooksPromise ??= import("./subagent-hooks-DgpxQHUn.js").then((n) => n.i);
|
|
5
5
|
return discordSubagentHooksPromise;
|
|
6
6
|
}
|
|
7
7
|
function registerDiscordSubagentHooks(api) {
|
package/dist/test-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./channel-
|
|
2
|
-
import { n as discordOutbound } from "./outbound-adapter-
|
|
3
|
-
import { t as __testing } from "./thread-bindings.manager-
|
|
1
|
+
import { t as discordPlugin } from "./channel-wqYExrBU.js";
|
|
2
|
+
import { n as discordOutbound } from "./outbound-adapter-FG0CgK3I.js";
|
|
3
|
+
import { t as __testing } from "./thread-bindings.manager-BxPG0IHV.js";
|
|
4
4
|
import { n as buildDiscordInboundAccessContext } from "./inbound-context-e_oBBJtF.js";
|
|
5
5
|
import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-dispatch-runtime";
|
|
6
6
|
//#region extensions/discord/src/monitor/inbound-context.test-helpers.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { o as parseDiscordTarget } from "./normalize-B-ktw-T_.js";
|
|
3
|
-
import "./targets-
|
|
3
|
+
import "./targets-DcNwQ9vN.js";
|
|
4
4
|
import { C as resolveThreadBindingMaxAgeMs$1, O as shouldPersistBindingMutations, S as resolveThreadBindingMaxAgeExpiresAt, T as saveBindingsToDisk, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingToken, f as normalizeThreadId, g as removeBindingRecord, l as isRecentlyUnboundThreadWebhookMessage, n as MANAGERS_BY_ACCOUNT_ID, p as rememberRecentUnboundWebhookEcho, t as BINDINGS_BY_THREAD_ID, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-Dzu1gCE7.js";
|
|
5
5
|
import { n as setThreadBindingMaxAgeBySessionKey, r as resolveBindingIdsForTargetSession, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-TTP020qQ.js";
|
|
6
|
-
import { d as formatThreadBindingDurationLabel, l as resolveThreadBindingPersona, m as resolveThreadBindingThreadName, p as resolveThreadBindingIntroText, s as resolveChannelIdForBinding, u as resolveThreadBindingPersonaFromRecord } from "./thread-bindings.discord-api-
|
|
7
|
-
import { i as getThreadBindingManager, n as createNoopThreadBindingManager, r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-
|
|
6
|
+
import { d as formatThreadBindingDurationLabel, l as resolveThreadBindingPersona, m as resolveThreadBindingThreadName, p as resolveThreadBindingIntroText, s as resolveChannelIdForBinding, u as resolveThreadBindingPersonaFromRecord } from "./thread-bindings.discord-api-CfZnSqIb.js";
|
|
7
|
+
import { i as getThreadBindingManager, n as createNoopThreadBindingManager, r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-BxPG0IHV.js";
|
|
8
8
|
import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
9
9
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
10
10
|
import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
|
package/dist/{thread-bindings.discord-api-BJF6acLK.js → thread-bindings.discord-api-CfZnSqIb.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as resolveDiscordChannelId } from "./normalize-B-ktw-T_.js";
|
|
2
2
|
import { at as getChannel, q as createChannelWebhook } from "./discord-eZlimVfW.js";
|
|
3
|
-
import { N as createDiscordRestClient } from "./send.shared-
|
|
4
|
-
import { c as sendWebhookMessageDiscord, u as createThreadDiscord } from "./send-
|
|
5
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
3
|
+
import { N as createDiscordRestClient } from "./send.shared-BWZyuxM-.js";
|
|
4
|
+
import { c as sendWebhookMessageDiscord, u as createThreadDiscord } from "./send-Rz5xnelg.js";
|
|
5
|
+
import { t as sendMessageDiscord } from "./send.outbound-DN-HfmW2.js";
|
|
6
6
|
import { i as REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL, k as toReusableWebhookKey, m as rememberReusableWebhook, t as BINDINGS_BY_THREAD_ID } from "./thread-bindings.state-Dzu1gCE7.js";
|
|
7
7
|
import { n as resolveDiscordChannelInfoSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-ewDxhd9q.js";
|
|
8
8
|
import { SYSTEM_MARK, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { s as resolveDiscordChannelId } from "./normalize-B-ktw-T_.js";
|
|
3
3
|
import { at as getChannel } from "./discord-eZlimVfW.js";
|
|
4
|
-
import { N as createDiscordRestClient } from "./send.shared-
|
|
4
|
+
import { N as createDiscordRestClient } from "./send.shared-BWZyuxM-.js";
|
|
5
5
|
import { A as DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS, C as resolveThreadBindingMaxAgeMs$1, D as shouldDefaultPersist, E as setBindingRecord, M as THREAD_BINDINGS_SWEEP_INTERVAL_MS, S as resolveThreadBindingMaxAgeExpiresAt, T as saveBindingsToDisk, _ as resetThreadBindingsForTests, a as THREAD_BINDING_TOUCH_PERSIST_MIN_INTERVAL_MS, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingToken, d as normalizeThreadBindingDurationMs, f as normalizeThreadId, g as removeBindingRecord, h as rememberThreadBindingToken, n as MANAGERS_BY_ACCOUNT_ID, o as ensureBindingsLoaded, p as rememberRecentUnboundWebhookEcho, r as PERSIST_BY_ACCOUNT_ID, s as forgetThreadBindingToken, t as BINDINGS_BY_THREAD_ID, u as normalizeTargetKind, v as resolveBindingIdsForSession, w as resolveThreadBindingsPath, x as resolveThreadBindingInactivityExpiresAt, y as resolveBindingRecordKey } from "./thread-bindings.state-Dzu1gCE7.js";
|
|
6
|
-
import { a as isThreadArchived, c as summarizeDiscordError, f as resolveThreadBindingFarewellText, i as isDiscordThreadGoneError, m as resolveThreadBindingThreadName, n as createWebhookForChannel, o as maybeSendBindingMessage, r as findReusableWebhook, s as resolveChannelIdForBinding, t as createThreadForBinding } from "./thread-bindings.discord-api-
|
|
6
|
+
import { a as isThreadArchived, c as summarizeDiscordError, f as resolveThreadBindingFarewellText, i as isDiscordThreadGoneError, m as resolveThreadBindingThreadName, n as createWebhookForChannel, o as maybeSendBindingMessage, r as findReusableWebhook, s as resolveChannelIdForBinding, t as createThreadForBinding } from "./thread-bindings.discord-api-CfZnSqIb.js";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
8
8
|
import { normalizeAccountId, resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
|
|
9
9
|
import { getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/discord",
|
|
3
|
-
"version": "2026.5.4-beta.
|
|
3
|
+
"version": "2026.5.4-beta.3",
|
|
4
4
|
"description": "OpenClaw Discord channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"https-proxy-agent": "^9.0.0",
|
|
14
14
|
"opusscript": "^0.1.1",
|
|
15
15
|
"typebox": "1.1.37",
|
|
16
|
-
"undici": "8.
|
|
16
|
+
"undici": "8.2.0",
|
|
17
17
|
"ws": "^8.20.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"openclaw": "workspace:*"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"openclaw": ">=2026.5.4-beta.
|
|
24
|
+
"openclaw": ">=2026.5.4-beta.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependenciesMeta": {
|
|
27
27
|
"openclaw": {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"allowInvalidConfigRecovery": true
|
|
66
66
|
},
|
|
67
67
|
"compat": {
|
|
68
|
-
"pluginApi": ">=2026.5.4-beta.
|
|
68
|
+
"pluginApi": ">=2026.5.4-beta.3"
|
|
69
69
|
},
|
|
70
70
|
"build": {
|
|
71
|
-
"openclawVersion": "2026.5.4-beta.
|
|
71
|
+
"openclawVersion": "2026.5.4-beta.3"
|
|
72
72
|
},
|
|
73
73
|
"release": {
|
|
74
74
|
"publishToClawHub": true,
|