@openclaw/discord 2026.5.31-beta.2 → 2026.5.31-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/{allow-list-BnkWtVpA.js → allow-list-C-MqM-B_.js} +1 -1
- package/dist/api.js +12 -12
- package/dist/{approval-handler.runtime-DSFfzXpo.js → approval-handler.runtime-DQiJ1Z0k.js} +3 -3
- package/dist/{audit-kgIklCyI.js → audit-eI8e8RpG.js} +3 -3
- package/dist/{channel-D0gX0yj6.js → channel-CEcqsGv4.js} +18 -18
- package/dist/{channel-actions-DDoc4V7x.js → channel-actions-BaPDAWN_.js} +2 -2
- package/dist/{channel-actions.runtime-CqZfnMaA.js → channel-actions.runtime-BEMDJjP1.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-BNZm3eed.js → channel.setup-DbGXTREm.js} +2 -2
- package/dist/{components-DcLQ2JkV.js → components-CCbYVuVr.js} +66 -27
- package/dist/contract-api.js +2 -2
- package/dist/{conversation-identity-BURFgcfI.js → conversation-identity-CEP1KbK0.js} +2 -2
- package/dist/{directory-config-B9Jw1Q2R.js → directory-config-j1bfTue_.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CDWUg-nA.js → directory-live-BjBs64RV.js} +2 -2
- package/dist/{handle-action.guild-admin-Dpa-kUzu.js → handle-action.guild-admin-CqUsOA2L.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{manager.runtime-BWBENHRA.js → manager.runtime-GXQRqG8a.js} +7 -7
- package/dist/{message-handler-HO8BbZmQ.js → message-handler-CNU-L8ef.js} +6 -6
- package/dist/{message-handler.preflight-DxHBPQvD.js → message-handler.preflight-DaQIDMY6.js} +12 -12
- package/dist/{message-handler.process-Cq3j7A9k.js → message-handler.process-B61wYezH.js} +18 -17
- package/dist/{message-utils-D_3KTxh_.js → message-utils-C3eyx-ih.js} +1 -1
- package/dist/{outbound-adapter-BkPkILpq.js → outbound-adapter-C6Da39L-.js} +6 -6
- package/dist/{pluralkit-Ds9aZAM4.js → pluralkit-BEEldePl.js} +1 -1
- package/dist/{provider-BK8hjk_y.js → provider-CHlc1TDX.js} +32 -28
- package/dist/{provider-session.runtime-CYMFlLg9.js → provider-session.runtime-BO12DuAF.js} +3 -3
- package/dist/provider.runtime-BTiF5ENi.js +2 -0
- package/dist/{resolve-allowlist-common-BIf3417N.js → resolve-allowlist-common-B3p7cT8F.js} +1 -1
- package/dist/{resolve-channels-DK-3f_aA.js → resolve-channels-DLNfxFQP.js} +3 -3
- package/dist/{resolve-users-DUDPsfWt.js → resolve-users-QTyD8qgI.js} +2 -2
- package/dist/{runtime-Blf_d9E7.js → runtime-Dds0Ww1n.js} +8 -8
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +19 -19
- package/dist/runtime-api.lookup.js +4 -4
- package/dist/runtime-api.monitor-BfCA2SYy.js +6 -0
- package/dist/runtime-api.monitor.js +5 -5
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-BHkA8a-k.js → send-CyyRF1yd.js} +3 -3
- package/dist/{send.components-CUHzDapa.js → send.components-a9JQeeH5.js} +4 -4
- package/dist/{send.outbound-DSKZbjML.js → send.outbound-DhMLobqR.js} +3 -3
- package/dist/{send.receipt-CjsWpitW.js → send.receipt-Z8V6yMOY.js} +38 -11
- package/dist/{send.shared-Cluujl6W.js → send.shared-B3QxPnR3.js} +5 -5
- package/dist/{sender-identity-BFp5w0F8.js → sender-identity-CEsfDF0L.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{subagent-hooks-7jAn9HT5.js → subagent-hooks-65qGV_Ft.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-BjuNA9Zs.js → system-events-NnSID6Q5.js} +2 -2
- package/dist/{target-resolver-BYuWNVQp.js → target-resolver-BKGK0ftO.js} +2 -2
- package/dist/targets-Cv797U29.js +3 -0
- package/dist/{thread-bindings-CKruJE91.js → thread-bindings-BesPuVYd.js} +4 -4
- package/dist/{thread-bindings.discord-api-BjLUwwSP.js → thread-bindings.discord-api-D8MZQPER.js} +4 -4
- package/dist/{thread-bindings.manager-Dji7SZHG.js → thread-bindings.manager-DbgHc5KB.js} +19 -19
- package/dist/{transcripts-source-O73_YIDs.js → transcripts-source-Cegx0wdw.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-CKW0i8du.js → typing-C7RXECnL.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/dist/provider.runtime-RfQSSM_v.js +0 -2
- package/dist/runtime-api.monitor-LVbgPRHA.js +0 -6
- package/dist/targets-BNDUOdvI.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-Dds0Ww1n.js";
|
|
2
2
|
export { handleDiscordAction };
|
|
@@ -43,7 +43,7 @@ function normalizeDiscordAllowList(raw, prefixes) {
|
|
|
43
43
|
ids.add(maybeId);
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
|
-
const prefix = prefixes.find((
|
|
46
|
+
const prefix = prefixes.find((entryLocal) => text.startsWith(entryLocal));
|
|
47
47
|
if (prefix) {
|
|
48
48
|
const candidate = text.slice(prefix.length);
|
|
49
49
|
if (candidate) ids.add(candidate);
|
package/dist/api.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, Ut as resolveDiscordChannelId, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId, o as normalizeDiscordOutboundTarget } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, Ut as resolveDiscordChannelId, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId, o as normalizeDiscordOutboundTarget } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
3
|
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-P19jm1lf.js";
|
|
4
|
-
import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForInteraction, c as buildDiscordComponentMessage, d as readDiscordComponentSpec, f as resolveDiscordComponentAttachmentName, g as buildDiscordModalCustomId, h as buildDiscordComponentCustomId, l as buildDiscordComponentMessageFlags, m as DISCORD_MODAL_CUSTOM_ID_KEY, n as formatDiscordComponentEventText, o as DiscordFormModal, p as DISCORD_COMPONENT_CUSTOM_ID_KEY, r as buildDiscordInteractiveComponents, s as createDiscordFormModal, u as DISCORD_COMPONENT_ATTACHMENT_PREFIX, v as parseDiscordComponentCustomIdForInteraction, y as parseDiscordModalCustomId } from "./components-
|
|
4
|
+
import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForInteraction, c as buildDiscordComponentMessage, d as readDiscordComponentSpec, f as resolveDiscordComponentAttachmentName, g as buildDiscordModalCustomId, h as buildDiscordComponentCustomId, l as buildDiscordComponentMessageFlags, m as DISCORD_MODAL_CUSTOM_ID_KEY, n as formatDiscordComponentEventText, o as DiscordFormModal, p as DISCORD_COMPONENT_CUSTOM_ID_KEY, r as buildDiscordInteractiveComponents, s as createDiscordFormModal, u as DISCORD_COMPONENT_ATTACHMENT_PREFIX, v as parseDiscordComponentCustomIdForInteraction, y as parseDiscordModalCustomId } from "./components-CCbYVuVr.js";
|
|
5
5
|
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-BmXlcjYW.js";
|
|
6
|
-
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-
|
|
7
|
-
import "./targets-
|
|
8
|
-
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-
|
|
9
|
-
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-
|
|
6
|
+
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-BKGK0ftO.js";
|
|
7
|
+
import "./targets-Cv797U29.js";
|
|
8
|
+
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CEP1KbK0.js";
|
|
9
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-CEcqsGv4.js";
|
|
10
10
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
11
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
12
|
-
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-
|
|
13
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
14
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
15
|
-
import { t as fetchPluralKitMessageInfo } from "./pluralkit-
|
|
11
|
+
import { t as discordSetupPlugin } from "./channel.setup-DbGXTREm.js";
|
|
12
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-65qGV_Ft.js";
|
|
13
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CqUsOA2L.js";
|
|
14
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-j1bfTue_.js";
|
|
15
|
+
import { t as fetchPluralKitMessageInfo } from "./pluralkit-BEEldePl.js";
|
|
16
16
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
|
|
17
17
|
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Bh_65L5C.js";
|
|
18
18
|
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-CEJ3--Uw.js";
|
|
19
19
|
import { resolveOpenProviderRuntimeGroupPolicy as resolveDiscordRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
20
20
|
//#region extensions/discord/api.ts
|
|
21
|
-
const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-
|
|
21
|
+
const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-BEMDJjP1.js")).handleDiscordMessageAction(...args);
|
|
22
22
|
//#endregion
|
|
23
23
|
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
|
-
import { B as Container, J as Separator, K as Row, R as Button, Wt as __exportAll, X as TextDisplay, ft as editChannelMessage, j as serializePayload, nt as createUserDmChannel, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-
|
|
1
|
+
import { B as Container, J as Separator, K as Row, R as Button, Wt as __exportAll, X as TextDisplay, ft as editChannelMessage, j as serializePayload, nt as createUserDmChannel, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
|
-
import { F as createDiscordClient, b as stripUndefinedFields } from "./send.shared-
|
|
4
|
-
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-
|
|
3
|
+
import { F as createDiscordClient, b as stripUndefinedFields } from "./send.shared-B3QxPnR3.js";
|
|
4
|
+
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CEP1KbK0.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ButtonStyle } from "discord-api-types/v10";
|
|
7
7
|
import { logDebug, logError } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
|
-
import { O as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
4
|
-
import "./send-
|
|
3
|
+
import { O as fetchChannelPermissionsDiscord } from "./send.shared-B3QxPnR3.js";
|
|
4
|
+
import "./send-CyyRF1yd.js";
|
|
5
5
|
import { n as collectDiscordAuditChannelIdsForAccount, t as auditDiscordChannelPermissionsWithFetcher } from "./audit-core-xwjIczO0.js";
|
|
6
6
|
//#region extensions/discord/src/audit.ts
|
|
7
7
|
var audit_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { a as projectCredentialSnapshotFields, n as PAIRING_APPROVED_MESSAGE, o as resolveConfiguredFromCredentialStatuses, r as buildTokenChannelStatusSummary, t as DEFAULT_ACCOUNT_ID } from "./channel-api-CAJ0wMoV.js";
|
|
4
|
-
import { x as resolveDiscordOutboundSessionRoute } from "./components-
|
|
4
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-CCbYVuVr.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
|
-
import { c as shouldSuppressLocalDiscordExecApprovalPrompt, n as resolveDiscordCurrentConversationIdentity, r as getDiscordApprovalCapability } from "./conversation-identity-
|
|
6
|
+
import { c as shouldSuppressLocalDiscordExecApprovalPrompt, n as resolveDiscordCurrentConversationIdentity, r as getDiscordApprovalCapability } from "./conversation-identity-CEP1KbK0.js";
|
|
7
7
|
import { r as resolveRequiredDiscordChannelPermissions } from "./audit-core-xwjIczO0.js";
|
|
8
|
-
import { t as discordMessageActions$1 } from "./channel-actions-
|
|
8
|
+
import { t as discordMessageActions$1 } from "./channel-actions-BaPDAWN_.js";
|
|
9
9
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DoDFvU_h.js";
|
|
10
|
-
import { n as discordOutbound } from "./outbound-adapter-
|
|
10
|
+
import { n as discordOutbound } from "./outbound-adapter-C6Da39L-.js";
|
|
11
11
|
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-BMGLQw74.js";
|
|
12
12
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
13
13
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -125,13 +125,13 @@ let discordProbeRuntimePromise;
|
|
|
125
125
|
let discordAuditModulePromise;
|
|
126
126
|
let discordSendModulePromise;
|
|
127
127
|
let discordDirectoryLiveModulePromise;
|
|
128
|
-
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
129
|
-
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
130
|
-
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
131
|
-
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-
|
|
132
|
-
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-
|
|
128
|
+
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-j1bfTue_.js").then((n) => n.t));
|
|
129
|
+
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-DLNfxFQP.js").then((n) => n.n));
|
|
130
|
+
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-QTyD8qgI.js").then((n) => n.n));
|
|
131
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-DbgHc5KB.js").then((n) => n.a));
|
|
132
|
+
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-BKGK0ftO.js").then((n) => n.r));
|
|
133
133
|
async function loadDiscordProviderRuntime() {
|
|
134
|
-
discordProviderRuntimePromise ??= import("./provider.runtime-
|
|
134
|
+
discordProviderRuntimePromise ??= import("./provider.runtime-BTiF5ENi.js");
|
|
135
135
|
return await discordProviderRuntimePromise;
|
|
136
136
|
}
|
|
137
137
|
async function loadDiscordProbeRuntime() {
|
|
@@ -139,15 +139,15 @@ async function loadDiscordProbeRuntime() {
|
|
|
139
139
|
return await discordProbeRuntimePromise;
|
|
140
140
|
}
|
|
141
141
|
async function loadDiscordAuditModule() {
|
|
142
|
-
discordAuditModulePromise ??= import("./audit-
|
|
142
|
+
discordAuditModulePromise ??= import("./audit-eI8e8RpG.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-CyyRF1yd.js").then((n) => n.t);
|
|
147
147
|
return await discordSendModulePromise;
|
|
148
148
|
}
|
|
149
149
|
async function loadDiscordDirectoryLiveModule() {
|
|
150
|
-
discordDirectoryLiveModulePromise ??= import("./directory-live-
|
|
150
|
+
discordDirectoryLiveModulePromise ??= import("./directory-live-BjBs64RV.js").then((n) => n.t);
|
|
151
151
|
return await discordDirectoryLiveModulePromise;
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
@@ -512,9 +512,9 @@ const discordPlugin = createChatChannelPlugin({
|
|
|
512
512
|
token: account.token,
|
|
513
513
|
inputs,
|
|
514
514
|
missingTokenNote: "missing Discord token",
|
|
515
|
-
resolveWithToken: async ({ token, inputs }) => (await loadDiscordResolveChannelsModule()).resolveDiscordChannelAllowlist({
|
|
515
|
+
resolveWithToken: async ({ token, inputs: inputsValue }) => (await loadDiscordResolveChannelsModule()).resolveDiscordChannelAllowlist({
|
|
516
516
|
token,
|
|
517
|
-
entries:
|
|
517
|
+
entries: inputsValue
|
|
518
518
|
}),
|
|
519
519
|
mapResolved: (entry) => ({
|
|
520
520
|
input: entry.input,
|
|
@@ -528,9 +528,9 @@ const discordPlugin = createChatChannelPlugin({
|
|
|
528
528
|
token: account.token,
|
|
529
529
|
inputs,
|
|
530
530
|
missingTokenNote: "missing Discord token",
|
|
531
|
-
resolveWithToken: async ({ token, inputs }) => (await loadDiscordResolveUsersModule()).resolveDiscordUserAllowlist({
|
|
531
|
+
resolveWithToken: async ({ token, inputs: inputsLocal }) => (await loadDiscordResolveUsersModule()).resolveDiscordUserAllowlist({
|
|
532
532
|
token,
|
|
533
|
-
entries:
|
|
533
|
+
entries: inputsLocal
|
|
534
534
|
}),
|
|
535
535
|
mapResolved: (entry) => ({
|
|
536
536
|
input: entry.input,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
2
2
|
import { r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-CCbYVuVr.js";
|
|
4
4
|
import { i as withDiscordInboundEventDeliveryMetadata } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createUnionActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -34,7 +34,7 @@ function resolveDiscordActionExecutionMode({ action }) {
|
|
|
34
34
|
}
|
|
35
35
|
let discordChannelActionsRuntimePromise;
|
|
36
36
|
async function loadDiscordChannelActionsRuntime() {
|
|
37
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-
|
|
37
|
+
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-BEMDJjP1.js");
|
|
38
38
|
return await discordChannelActionsRuntimePromise;
|
|
39
39
|
}
|
|
40
40
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Ut as resolveDiscordChannelId } from "./send.receipt-
|
|
2
|
-
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-
|
|
3
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
4
|
-
import "./targets-
|
|
1
|
+
import { Ut as resolveDiscordChannelId } from "./send.receipt-Z8V6yMOY.js";
|
|
2
|
+
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-CCbYVuVr.js";
|
|
3
|
+
import { t as handleDiscordAction } from "./runtime-Dds0Ww1n.js";
|
|
4
|
+
import "./targets-Cv797U29.js";
|
|
5
5
|
import "./action-runtime-api.js";
|
|
6
6
|
import { r as notifyDiscordInboundEventOutboundSuccess } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
7
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
7
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CqUsOA2L.js";
|
|
8
8
|
import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
10
10
|
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-CEcqsGv4.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as inspectDiscordConfiguredToken } from "./account-inspect-DDZtT5C8.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, m as resolveDiscordToken, o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-BMGLQw74.js";
|
|
4
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
5
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
4
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-DLNfxFQP.js";
|
|
5
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-QTyD8qgI.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createLegacyCompatChannelDmPolicy, createSetupTranslator, createStandardChannelSetupStatus, parseMentionOrPrefixedId, patchChannelConfigForAccount, promptLegacyChannelAllowFromForAccount, resolveEntriesWithOptionalToken, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as Container, F as Modal, G as RoleSelectMenu, H as LinkButton, Ht as parseDiscordTarget, I as RadioGroup, J as Separator, K as Row, L as TextInput, N as CheckboxGroup, P as Label, Q as UserSelectMenu, R as Button, U as MediaGallery, V as File, W as MentionableSelectMenu, Wt as __exportAll, X as TextDisplay, Y as StringSelectMenu, Z as Thumbnail, et as parseCustomId, q as Section, z as ChannelSelectMenu } from "./send.receipt-
|
|
1
|
+
import { B as Container, F as Modal, G as RoleSelectMenu, H as LinkButton, Ht as parseDiscordTarget, I as RadioGroup, J as Separator, K as Row, L as TextInput, N as CheckboxGroup, P as Label, Q as UserSelectMenu, R as Button, U as MediaGallery, V as File, W as MentionableSelectMenu, Wt as __exportAll, X as TextDisplay, Y as StringSelectMenu, Z as Thumbnail, et as parseCustomId, q as Section, z as ChannelSelectMenu } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing";
|
|
4
4
|
import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
|
|
5
5
|
import { ButtonStyle, MessageFlags, TextInputStyle } from "discord-api-types/v10";
|
|
6
6
|
import crypto from "node:crypto";
|
|
7
|
-
import { reduceInteractiveReply } from "openclaw/plugin-sdk/interactive-runtime";
|
|
7
|
+
import { reduceInteractiveReply, resolveMessagePresentationControlValue } from "openclaw/plugin-sdk/interactive-runtime";
|
|
8
8
|
//#region extensions/discord/src/outbound-session-route.ts
|
|
9
9
|
function resolveDiscordOutboundSessionRoute(params) {
|
|
10
10
|
const parsed = parseDiscordTarget(params.target, { defaultKind: resolveDiscordOutboundTargetKindHint(params) });
|
|
@@ -138,6 +138,12 @@ function readOptionalString(value) {
|
|
|
138
138
|
const trimmed = value.trim();
|
|
139
139
|
return trimmed ? trimmed : void 0;
|
|
140
140
|
}
|
|
141
|
+
function readOptionalCallbackDataKind(value, label) {
|
|
142
|
+
const kind = readOptionalString(value);
|
|
143
|
+
if (kind === void 0) return;
|
|
144
|
+
if (kind === "command" || kind === "callback") return kind;
|
|
145
|
+
throw new Error(`${label} must be one of command, callback`);
|
|
146
|
+
}
|
|
141
147
|
function readOptionalStringArray(value, label) {
|
|
142
148
|
if (value === void 0) return;
|
|
143
149
|
if (!Array.isArray(value)) throw new Error(`${label} must be an array`);
|
|
@@ -219,6 +225,7 @@ function parseButtonSpec(raw, label) {
|
|
|
219
225
|
style,
|
|
220
226
|
url,
|
|
221
227
|
callbackData: readOptionalString(obj.callbackData),
|
|
228
|
+
callbackDataKind: readOptionalCallbackDataKind(obj.callbackDataKind, `${label}.callbackDataKind`),
|
|
222
229
|
emoji: readOptionalEmoji(obj.emoji, `${label}.emoji`),
|
|
223
230
|
disabled: typeof obj.disabled === "boolean" ? obj.disabled : void 0,
|
|
224
231
|
allowedUsers: readOptionalStringArray(obj.allowedUsers, `${label}.allowedUsers`)
|
|
@@ -238,6 +245,7 @@ function parseSelectSpec(raw, label) {
|
|
|
238
245
|
return {
|
|
239
246
|
type,
|
|
240
247
|
callbackData: readOptionalString(obj.callbackData),
|
|
248
|
+
callbackDataKind: readOptionalCallbackDataKind(obj.callbackDataKind, `${label}.callbackDataKind`),
|
|
241
249
|
placeholder: readOptionalString(obj.placeholder),
|
|
242
250
|
minValues: readOptionalInteger(obj.minValues, `${label}.minValues`, {
|
|
243
251
|
min: 0,
|
|
@@ -463,6 +471,7 @@ function createButtonComponent(params) {
|
|
|
463
471
|
kind: params.modalId ? "modal-trigger" : "button",
|
|
464
472
|
label: params.spec.label,
|
|
465
473
|
...params.spec.callbackData !== void 0 ? { callbackData: params.spec.callbackData } : {},
|
|
474
|
+
...params.spec.callbackDataKind !== void 0 ? { callbackDataKind: params.spec.callbackDataKind } : {},
|
|
466
475
|
...params.modalId !== void 0 ? { modalId: params.modalId } : {},
|
|
467
476
|
...params.spec.reusable !== void 0 ? { reusable: params.spec.reusable } : {},
|
|
468
477
|
...params.spec.allowedUsers !== void 0 ? { allowedUsers: params.spec.allowedUsers } : {}
|
|
@@ -478,6 +487,7 @@ function createSelectComponent(params) {
|
|
|
478
487
|
kind: "select",
|
|
479
488
|
label,
|
|
480
489
|
...params.spec.callbackData !== void 0 ? { callbackData: params.spec.callbackData } : {},
|
|
490
|
+
...params.spec.callbackDataKind !== void 0 ? { callbackDataKind: params.spec.callbackDataKind } : {},
|
|
481
491
|
selectType,
|
|
482
492
|
...options ? { options } : {},
|
|
483
493
|
...params.spec.allowedUsers !== void 0 ? { allowedUsers: params.spec.allowedUsers } : {}
|
|
@@ -679,7 +689,7 @@ function buildDiscordComponentMessage(params) {
|
|
|
679
689
|
const lastChild = containerChildren.at(-1);
|
|
680
690
|
if (lastChild instanceof Row) {
|
|
681
691
|
const row = lastChild;
|
|
682
|
-
const hasSelect = row.components.some((
|
|
692
|
+
const hasSelect = row.components.some((entryLocal) => isSelectComponent(entryLocal));
|
|
683
693
|
if (row.components.length < 5 && !hasSelect) row.addComponent(component);
|
|
684
694
|
else containerChildren.push(new Row([component]));
|
|
685
695
|
} else containerChildren.push(new Row([component]));
|
|
@@ -822,6 +832,21 @@ var shared_interactive_exports = /* @__PURE__ */ __exportAll({
|
|
|
822
832
|
function resolveDiscordInteractiveButtonStyle(style) {
|
|
823
833
|
return style ?? "secondary";
|
|
824
834
|
}
|
|
835
|
+
function applyDiscordButtonCallback(spec, button) {
|
|
836
|
+
const callbackData = resolveMessagePresentationControlValue(button);
|
|
837
|
+
if (!callbackData) return;
|
|
838
|
+
spec.callbackData = callbackData;
|
|
839
|
+
if (button.action?.type === "command" || button.action?.type === "callback") spec.callbackDataKind = button.action.type;
|
|
840
|
+
}
|
|
841
|
+
function resolveDiscordSelectOptionValue(option) {
|
|
842
|
+
return resolveMessagePresentationControlValue(option);
|
|
843
|
+
}
|
|
844
|
+
function resolveDiscordSelectCallbackDataKind(options) {
|
|
845
|
+
const renderableOptions = options.filter((option) => resolveDiscordSelectOptionValue(option));
|
|
846
|
+
if (renderableOptions.length > 0 && renderableOptions.every((option) => option.action?.type === "command")) return "command";
|
|
847
|
+
if (renderableOptions.length > 0 && renderableOptions.every((option) => option.action?.type === "callback")) return "callback";
|
|
848
|
+
if (renderableOptions.some((option) => option.action)) return "mixed";
|
|
849
|
+
}
|
|
825
850
|
const DISCORD_INTERACTIVE_BUTTON_ROW_SIZE = 5;
|
|
826
851
|
/**
|
|
827
852
|
* @deprecated Use buildDiscordPresentationComponents with MessagePresentation.
|
|
@@ -845,7 +870,7 @@ function buildDiscordInteractiveComponents(interactive) {
|
|
|
845
870
|
label: button.label,
|
|
846
871
|
style: button.url ? "link" : resolveDiscordInteractiveButtonStyle(button.style)
|
|
847
872
|
};
|
|
848
|
-
|
|
873
|
+
applyDiscordButtonCallback(spec, button);
|
|
849
874
|
if (button.url) spec.url = button.url;
|
|
850
875
|
if (button.disabled === true) spec.disabled = true;
|
|
851
876
|
if (button.reusable === true) spec.reusable = true;
|
|
@@ -854,17 +879,24 @@ function buildDiscordInteractiveComponents(interactive) {
|
|
|
854
879
|
});
|
|
855
880
|
return state;
|
|
856
881
|
}
|
|
857
|
-
if (block.type === "select" && block.options.length > 0)
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
882
|
+
if (block.type === "select" && block.options.length > 0) {
|
|
883
|
+
const options = block.options.map((option) => ({
|
|
884
|
+
label: option.label,
|
|
885
|
+
value: resolveDiscordSelectOptionValue(option)
|
|
886
|
+
})).filter((option) => Boolean(option.value));
|
|
887
|
+
if (options.length === 0) return state;
|
|
888
|
+
const callbackDataKind = resolveDiscordSelectCallbackDataKind(block.options);
|
|
889
|
+
if (callbackDataKind === "mixed") return state;
|
|
890
|
+
state.push({
|
|
891
|
+
type: "actions",
|
|
892
|
+
select: {
|
|
893
|
+
type: "string",
|
|
894
|
+
placeholder: block.placeholder,
|
|
895
|
+
options,
|
|
896
|
+
callbackDataKind
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
}
|
|
868
900
|
return state;
|
|
869
901
|
});
|
|
870
902
|
return blocks.length > 0 ? { blocks } : void 0;
|
|
@@ -895,17 +927,24 @@ function buildDiscordPresentationComponents(presentation) {
|
|
|
895
927
|
appendDiscordPresentationButtonBlocks(spec, block.buttons);
|
|
896
928
|
continue;
|
|
897
929
|
}
|
|
898
|
-
if (block.type === "select" && block.options.length > 0)
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
930
|
+
if (block.type === "select" && block.options.length > 0) {
|
|
931
|
+
const options = block.options.map((option) => ({
|
|
932
|
+
label: option.label,
|
|
933
|
+
value: resolveDiscordSelectOptionValue(option)
|
|
934
|
+
})).filter((option) => Boolean(option.value));
|
|
935
|
+
if (options.length === 0) continue;
|
|
936
|
+
const callbackDataKind = resolveDiscordSelectCallbackDataKind(block.options);
|
|
937
|
+
if (callbackDataKind === "mixed") continue;
|
|
938
|
+
spec.blocks?.push({
|
|
939
|
+
type: "actions",
|
|
940
|
+
select: {
|
|
941
|
+
type: "string",
|
|
942
|
+
placeholder: block.placeholder,
|
|
943
|
+
options,
|
|
944
|
+
callbackDataKind
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
}
|
|
909
948
|
}
|
|
910
949
|
return spec.blocks?.length ? spec : void 0;
|
|
911
950
|
}
|
|
@@ -918,7 +957,7 @@ function appendDiscordPresentationButtonBlocks(spec, buttons) {
|
|
|
918
957
|
label: button.label,
|
|
919
958
|
style: button.url ? "link" : resolveDiscordInteractiveButtonStyle(button.style)
|
|
920
959
|
};
|
|
921
|
-
|
|
960
|
+
applyDiscordButtonCallback(component, button);
|
|
922
961
|
if (button.url) component.url = button.url;
|
|
923
962
|
if (button.disabled === true) component.disabled = true;
|
|
924
963
|
if (button.reusable === true) component.reusable = true;
|
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-BjM-1hr9.js";
|
|
3
3
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-DSHk7I2w.js";
|
|
4
4
|
import { t as deriveLegacySessionChatType } from "./session-contract-BO5tlIdl.js";
|
|
5
|
-
import { i as testing, n as createThreadBindingManager } from "./thread-bindings.manager-
|
|
6
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
5
|
+
import { i as testing, n as createThreadBindingManager } from "./thread-bindings.manager-DbgHc5KB.js";
|
|
6
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-j1bfTue_.js";
|
|
7
7
|
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Bh_65L5C.js";
|
|
8
8
|
export { collectDiscordSecurityAuditFindings, collectRuntimeConfigAssignments, collectUnsupportedSecretRefConfigCandidates, createThreadBindingManager, deriveLegacySessionChatType, testing as discordThreadBindingTesting, legacyConfigRules, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, normalizeCompatibilityConfig, secretTargetRegistryEntries, unsupportedSecretRefSurfacePatterns };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
@@ -231,7 +231,7 @@ function createDiscordApprovalCapability(configOverride) {
|
|
|
231
231
|
request,
|
|
232
232
|
configOverride
|
|
233
233
|
}),
|
|
234
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
234
|
+
load: async () => (await import("./approval-handler.runtime-DQiJ1Z0k.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
235
235
|
})
|
|
236
236
|
});
|
|
237
237
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-j1bfTue_.js";
|
|
2
2
|
export { listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { n as fetchDiscord } from "./api-BmXlcjYW.js";
|
|
4
|
-
import { a as normalizeDiscordSlug } from "./allow-list-
|
|
4
|
+
import { a as normalizeDiscordSlug } from "./allow-list-C-MqM-B_.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
7
7
|
//#region extensions/discord/src/directory-cache.ts
|
package/dist/{handle-action.guild-admin-Dpa-kUzu.js → handle-action.guild-admin-CqUsOA2L.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-Dds0Ww1n.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
@@ -241,7 +241,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
241
241
|
message: "deleteDays must be an integer from 0 to 7"
|
|
242
242
|
})
|
|
243
243
|
});
|
|
244
|
-
const
|
|
244
|
+
const senderUserIdLocal = normalizeOptionalString(ctx.requesterSenderId);
|
|
245
245
|
return await handleDiscordAction({
|
|
246
246
|
action: moderation.action,
|
|
247
247
|
accountId: accountId ?? void 0,
|
|
@@ -251,7 +251,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
251
251
|
until: moderation.until,
|
|
252
252
|
reason: moderation.reason,
|
|
253
253
|
deleteMessageDays: moderation.deleteMessageDays,
|
|
254
|
-
senderUserId
|
|
254
|
+
senderUserId: senderUserIdLocal
|
|
255
255
|
}, cfg);
|
|
256
256
|
}
|
|
257
257
|
if (action === "thread-list") {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { registerDiscordSubagentHooks } from "./subagent-hooks-api.js";
|
|
2
|
-
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-
|
|
2
|
+
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-Cegx0wdw.js";
|
|
3
3
|
import "./transcripts-source-api.js";
|
|
4
4
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
5
5
|
//#region extensions/discord/index.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-
|
|
4
|
-
import { o as formatMention } from "./send.outbound-
|
|
3
|
+
import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-C-MqM-B_.js";
|
|
4
|
+
import { o as formatMention } from "./send.outbound-DhMLobqR.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
|
-
import { f as buildDiscordGroupSystemPrompt, o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-
|
|
6
|
+
import { f as buildDiscordGroupSystemPrompt, o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-CHlc1TDX.js";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { asBoolean, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
@@ -2406,7 +2406,7 @@ var DiscordVoiceManager$1 = class {
|
|
|
2406
2406
|
const clearSessionIfCurrent = () => {
|
|
2407
2407
|
if (this.sessions.get(guildId)?.connection === connection) this.sessions.delete(guildId);
|
|
2408
2408
|
};
|
|
2409
|
-
const stopEntry = (entry,
|
|
2409
|
+
const stopEntry = (entry, optionsLocal) => {
|
|
2410
2410
|
if (stopped) return;
|
|
2411
2411
|
stopped = true;
|
|
2412
2412
|
if (speakingHandler) connection.receiver.speaking.off("start", speakingHandler);
|
|
@@ -2420,10 +2420,10 @@ var DiscordVoiceManager$1 = class {
|
|
|
2420
2420
|
entry.realtime?.close();
|
|
2421
2421
|
entry.realtime = void 0;
|
|
2422
2422
|
player.stop();
|
|
2423
|
-
if (
|
|
2423
|
+
if (optionsLocal.destroyConnection) destroyVoiceConnectionSafely({
|
|
2424
2424
|
connection,
|
|
2425
2425
|
voiceSdk,
|
|
2426
|
-
reason:
|
|
2426
|
+
reason: optionsLocal.reason
|
|
2427
2427
|
});
|
|
2428
2428
|
};
|
|
2429
2429
|
const entry = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as createDiscordRestClient } from "./send.shared-
|
|
2
|
-
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
1
|
+
import { I as createDiscordRestClient } from "./send.shared-B3QxPnR3.js";
|
|
2
|
+
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-D8MZQPER.js";
|
|
3
3
|
import { a as mergeAbortSignals } from "./timeouts-CEJ3--Uw.js";
|
|
4
|
-
import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-
|
|
5
|
-
import { t as sendTyping } from "./typing-
|
|
4
|
+
import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-C3eyx-ih.js";
|
|
5
|
+
import { t as sendTyping } from "./typing-C7RXECnL.js";
|
|
6
6
|
import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { createChannelRunQueue, createTypingCallbacks, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
8
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
@@ -178,7 +178,7 @@ function resolveDiscordAcceptedTypingPrestart(ctx) {
|
|
|
178
178
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
179
179
|
let messageProcessRuntimePromise;
|
|
180
180
|
async function loadMessageProcessRuntime() {
|
|
181
|
-
messageProcessRuntimePromise ??= import("./message-handler.process-
|
|
181
|
+
messageProcessRuntimePromise ??= import("./message-handler.process-B61wYezH.js");
|
|
182
182
|
return await messageProcessRuntimePromise;
|
|
183
183
|
}
|
|
184
184
|
async function processDiscordQueuedMessage(params) {
|
|
@@ -307,7 +307,7 @@ function createDiscordReplyTypingFeedback(params) {
|
|
|
307
307
|
//#region extensions/discord/src/monitor/message-handler.ts
|
|
308
308
|
let messagePreflightRuntimePromise;
|
|
309
309
|
async function loadMessagePreflightRuntime() {
|
|
310
|
-
messagePreflightRuntimePromise ??= import("./message-handler.preflight-
|
|
310
|
+
messagePreflightRuntimePromise ??= import("./message-handler.preflight-DaQIDMY6.js");
|
|
311
311
|
return await messagePreflightRuntimePromise;
|
|
312
312
|
}
|
|
313
313
|
function isNonEmptyString(value) {
|
package/dist/{message-handler.preflight-DxHBPQvD.js → message-handler.preflight-DaQIDMY6.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-
|
|
1
|
+
import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { S as resolveTimestampMs, _ as resolveGroupDmAllow, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, n as isDiscordGroupAllowedByPolicy, x as resolveDiscordSystemLocation } from "./allow-list-
|
|
4
|
-
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-
|
|
3
|
+
import { S as resolveTimestampMs, _ as resolveGroupDmAllow, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, n as isDiscordGroupAllowedByPolicy, x as resolveDiscordSystemLocation } from "./allow-list-C-MqM-B_.js";
|
|
4
|
+
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-CEP1KbK0.js";
|
|
5
5
|
import { l as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-DYp4FVEB.js";
|
|
6
|
-
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
7
|
-
import "./thread-bindings-
|
|
8
|
-
import { D as resolveDiscordTextCommandAccess, E as resolveDiscordDmCommandAccess, _ as resolveDiscordEffectiveRoute, g as resolveDiscordConversationRoute, h as buildDiscordRoutePeer, v as shouldIgnoreStaleDiscordRouteBinding, y as handleDiscordDmCommandDecision } from "./provider-
|
|
9
|
-
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-
|
|
10
|
-
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
6
|
+
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-D8MZQPER.js";
|
|
7
|
+
import "./thread-bindings-BesPuVYd.js";
|
|
8
|
+
import { D as resolveDiscordTextCommandAccess, E as resolveDiscordDmCommandAccess, _ as resolveDiscordEffectiveRoute, g as resolveDiscordConversationRoute, h as buildDiscordRoutePeer, v as shouldIgnoreStaleDiscordRouteBinding, y as handleDiscordDmCommandDecision } from "./provider-CHlc1TDX.js";
|
|
9
|
+
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-C3eyx-ih.js";
|
|
10
|
+
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
|
|
11
11
|
import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
12
|
import { getChildLogger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
13
13
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
@@ -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-CyyRF1yd.js").then((n) => n.t);
|
|
32
32
|
return await discordSendRuntimePromise;
|
|
33
33
|
}
|
|
34
34
|
function resolveDiscordDmPairingSenderId(sender) {
|
|
@@ -426,7 +426,7 @@ let preflightAudioRuntimePromise;
|
|
|
426
426
|
let systemEventsRuntimePromise;
|
|
427
427
|
let discordThreadingRuntimePromise;
|
|
428
428
|
async function loadPluralKitRuntime() {
|
|
429
|
-
pluralkitRuntimePromise ??= import("./pluralkit-
|
|
429
|
+
pluralkitRuntimePromise ??= import("./pluralkit-BEEldePl.js").then((n) => n.n);
|
|
430
430
|
return await pluralkitRuntimePromise;
|
|
431
431
|
}
|
|
432
432
|
async function loadPreflightAudioRuntime() {
|
|
@@ -434,11 +434,11 @@ async function loadPreflightAudioRuntime() {
|
|
|
434
434
|
return await preflightAudioRuntimePromise;
|
|
435
435
|
}
|
|
436
436
|
async function loadSystemEventsRuntime() {
|
|
437
|
-
systemEventsRuntimePromise ??= import("./system-events-
|
|
437
|
+
systemEventsRuntimePromise ??= import("./system-events-NnSID6Q5.js");
|
|
438
438
|
return await systemEventsRuntimePromise;
|
|
439
439
|
}
|
|
440
440
|
async function loadDiscordThreadingRuntime() {
|
|
441
|
-
discordThreadingRuntimePromise ??= import("./provider-
|
|
441
|
+
discordThreadingRuntimePromise ??= import("./provider-CHlc1TDX.js").then((n) => n.x);
|
|
442
442
|
return await discordThreadingRuntimePromise;
|
|
443
443
|
}
|
|
444
444
|
function isPreflightAborted(abortSignal) {
|