@openclaw/discord 2026.5.26-beta.2 → 2026.5.27-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-runtime-api.js +1 -1
- package/dist/api.js +12 -12
- package/dist/{approval-handler.runtime-BlGs6D0-.js → approval-handler.runtime-BDxD97LJ.js} +18 -5
- package/dist/{audit-DE8lNdMv.js → audit-BdUjE2tr.js} +3 -3
- package/dist/{channel-XYTSE8wN.js → channel-9YoMy5Jf.js} +16 -16
- package/dist/{channel-actions-DICb5UUl.js → channel-actions-DZfkB0nd.js} +17 -2
- package/dist/{channel-actions.runtime-92Esj8jy.js → channel-actions.runtime-suaDJHH0.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-JaozRxYz.js → channel.setup-B-kHacpx.js} +3 -3
- package/dist/{components-Bpf9ITyn.js → components-Dlc81IU5.js} +1 -1
- package/dist/contract-api.js +3 -3
- package/dist/{conversation-identity-Be5JQPP9.js → conversation-identity-DAEgiGDV.js} +2 -2
- package/dist/{directory-config-oK2sOZ2m.js → directory-config-Cgp0csDd.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-BRjo48ro.js → directory-live-C-ECRrM8.js} +1 -1
- package/dist/{doctor-DBPfLj15.js → doctor-Q80i7GdG.js} +2 -2
- package/dist/{doctor-contract-CLMMYrdF.js → doctor-contract-8-Ia3d_X.js} +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-_LgqCYcN.js → handle-action.guild-admin-DWFTAcfd.js} +30 -12
- package/dist/index.js +1 -1
- package/dist/{manager.runtime-Bs0ngLSw.js → manager.runtime-D6V2SPKr.js} +3 -3
- package/dist/{message-handler-B9n5CtIS.js → message-handler-B5-UG_oD.js} +7 -7
- package/dist/{message-handler.preflight-Cu8cFBgW.js → message-handler.preflight-Ddww-wnF.js} +12 -13
- package/dist/{message-handler.process-DO17vBlT.js → message-handler.process-HWGh2NOP.js} +379 -352
- package/dist/{message-utils-DxHZcpPf.js → message-utils-4w0_DPFE.js} +1 -1
- package/dist/{outbound-adapter-C8lzfSt6.js → outbound-adapter-DYUYRaBd.js} +7 -8
- package/dist/{pluralkit-CTbOoDPp.js → pluralkit-BS1MuvYs.js} +1 -1
- package/dist/{preview-streaming-CQ7PsV9J.js → preview-streaming-DXT8oJdo.js} +1 -1
- package/dist/{provider-D3RwHRhI.js → provider-CO6pih5z.js} +21 -24
- package/dist/{provider-session.runtime-DbNYskMy.js → provider-session.runtime-BD5XLPI8.js} +3 -3
- package/dist/provider.runtime-pUGk7VR5.js +2 -0
- package/dist/{resolve-channels-CIV0C8ST.js → resolve-channels-pD06YNCU.js} +1 -1
- package/dist/{resolve-users-LZKYHrJx.js → resolve-users-BiWLqNNO.js} +1 -1
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +18 -18
- package/dist/runtime-api.lookup.js +4 -4
- package/dist/runtime-api.monitor-BjgSsR6H.js +5 -0
- package/dist/runtime-api.monitor.js +4 -4
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{runtime-DBkHf0qH.js → runtime-xSazIM0F.js} +144 -9
- package/dist/{send-CM1NFFrZ.js → send-BzXZ8iUI.js} +6 -3
- package/dist/{send.components-swKESEWc.js → send.components-AK8K4TwB.js} +4 -4
- package/dist/{send.outbound-BHQPWbwU.js → send.outbound-ZrMnBa8C.js} +3 -3
- package/dist/{send.receipt-D_6lR7zH.js → send.receipt-BzfsP3Bb.js} +1 -1
- package/dist/{send.shared-aYGYz83q.js → send.shared-ehnDGwXx.js} +81 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-BwF8ShpE.js → shared-ToNRC7ax.js} +2 -2
- package/dist/{subagent-hooks-DHA_1pBI.js → subagent-hooks-Di_2iXU8.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-Cr3EqBah.js → system-events-DbqKnNPF.js} +1 -1
- package/dist/{target-resolver-CVgOsap6.js → target-resolver-DXPvq5-L.js} +2 -2
- package/dist/targets-BBVHRaeO.js +3 -0
- package/dist/test-api.js +3 -3
- package/dist/{thread-bindings-Dw4wcHWn.js → thread-bindings-Bw40FTRZ.js} +4 -4
- package/dist/{thread-bindings.discord-api-xCfun-pQ.js → thread-bindings.discord-api-irWYI8YX.js} +4 -4
- package/dist/{thread-bindings.manager-UJ5FvZfO.js → thread-bindings.manager-LoYZzlss.js} +3 -3
- package/dist/{transcripts-source-emawQzBc.js → transcripts-source-CwahHAYt.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-BhIpRSfR.js → typing-Cv09OhaY.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/openclaw.plugin.json +2 -0
- package/package.json +6 -6
- package/dist/provider.runtime-rUg1sHKP.js +0 -2
- package/dist/runtime-api.monitor-CUn-x5uG.js +0 -5
- package/dist/targets-CNDNKpqQ.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-xSazIM0F.js";
|
|
2
2
|
export { handleDiscordAction };
|
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-BzfsP3Bb.js";
|
|
2
2
|
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-dXTfmnSZ.js";
|
|
3
3
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.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-Dlc81IU5.js";
|
|
5
5
|
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-Kq7vtaSO.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-DXPvq5-L.js";
|
|
7
|
+
import "./targets-BBVHRaeO.js";
|
|
8
|
+
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-DAEgiGDV.js";
|
|
9
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-9YoMy5Jf.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-B-kHacpx.js";
|
|
12
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-Di_2iXU8.js";
|
|
13
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-DWFTAcfd.js";
|
|
14
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-Cgp0csDd.js";
|
|
15
|
+
import { t as fetchPluralKitMessageInfo } from "./pluralkit-BS1MuvYs.js";
|
|
16
16
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DfIM7zSY.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-l_PsHQvX.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-suaDJHH0.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-BzfsP3Bb.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.js";
|
|
3
|
-
import {
|
|
4
|
-
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-
|
|
3
|
+
import { F as createDiscordClient, b as stripUndefinedFields } from "./send.shared-ehnDGwXx.js";
|
|
4
|
+
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-DAEgiGDV.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";
|
|
@@ -41,6 +41,9 @@ var approval_handler_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
|
41
41
|
buildExecApprovalCustomId: () => buildExecApprovalCustomId,
|
|
42
42
|
discordApprovalNativeRuntime: () => discordApprovalNativeRuntime
|
|
43
43
|
});
|
|
44
|
+
function isDecisionApprovalAction(action) {
|
|
45
|
+
return action.kind === "decision" && (action.decision === "allow-once" || action.decision === "allow-always" || action.decision === "deny");
|
|
46
|
+
}
|
|
44
47
|
function resolveHandlerContext(params) {
|
|
45
48
|
const context = params.context;
|
|
46
49
|
const accountId = normalizeOptionalString(params.accountId) ?? "";
|
|
@@ -94,11 +97,21 @@ var ExecApprovalActionRow = class extends Row {
|
|
|
94
97
|
}
|
|
95
98
|
};
|
|
96
99
|
function createApprovalActionRow(view) {
|
|
100
|
+
const actions = view.actions.filter(isDecisionApprovalAction);
|
|
101
|
+
if (actions.length === 0) return;
|
|
97
102
|
return new ExecApprovalActionRow({
|
|
98
103
|
approvalId: view.approvalId,
|
|
99
|
-
actions
|
|
104
|
+
actions
|
|
100
105
|
});
|
|
101
106
|
}
|
|
107
|
+
function isCommandOnlyApprovalAction(action) {
|
|
108
|
+
return action.kind === "command" && typeof action.command === "string" && action.command.trim().length > 0;
|
|
109
|
+
}
|
|
110
|
+
function buildPluginCommandActionLines(actions) {
|
|
111
|
+
const commandActions = actions.filter(isCommandOnlyApprovalAction);
|
|
112
|
+
if (commandActions.length === 0) return [];
|
|
113
|
+
return ["### Actions", ...commandActions.map((action) => `- ${action.label}: \`${formatCommandPreview(action.command.trim(), 240)}\``)];
|
|
114
|
+
}
|
|
102
115
|
function buildApprovalMetadataLines(metadata) {
|
|
103
116
|
return metadata.map((item) => `- ${item.label}: ${item.value}`);
|
|
104
117
|
}
|
|
@@ -145,7 +158,7 @@ function createPluginApprovalRequestContainer(params) {
|
|
|
145
158
|
description: "A plugin action needs your approval.",
|
|
146
159
|
commandPreview: formatCommandPreview(params.view.title, 700),
|
|
147
160
|
commandSecondaryPreview: formatOptionalCommandPreview(params.view.description, 1e3),
|
|
148
|
-
metadataLines: buildApprovalMetadataLines(params.view.metadata),
|
|
161
|
+
metadataLines: [...buildApprovalMetadataLines(params.view.metadata), ...buildPluginCommandActionLines(params.view.actions)],
|
|
149
162
|
actionRow: params.actionRow,
|
|
150
163
|
footer: `Expires <t:${expiresAtSeconds}:R> · ID: ${params.view.approvalId}`,
|
|
151
164
|
accentColor
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-BzfsP3Bb.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.js";
|
|
3
|
-
import {
|
|
4
|
-
import "./send-
|
|
3
|
+
import { O as fetchChannelPermissionsDiscord } from "./send.shared-ehnDGwXx.js";
|
|
4
|
+
import "./send-BzXZ8iUI.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,20 +1,20 @@
|
|
|
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-BzfsP3Bb.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-dXTfmnSZ.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-Dlc81IU5.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-DAEgiGDV.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-DZfkB0nd.js";
|
|
9
9
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-D5gY2ZTE.js";
|
|
10
|
-
import { n as discordOutbound } from "./outbound-adapter-
|
|
11
|
-
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-
|
|
10
|
+
import { n as discordOutbound } from "./outbound-adapter-DYUYRaBd.js";
|
|
11
|
+
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-ToNRC7ax.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";
|
|
14
14
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
15
15
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
16
16
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
17
|
-
import { createChannelMessageAdapterFromOutbound } from "openclaw/plugin-sdk/channel-
|
|
17
|
+
import { createChannelMessageAdapterFromOutbound } from "openclaw/plugin-sdk/channel-outbound";
|
|
18
18
|
import { buildLegacyDmAccountAllowlistAdapter, createAccountScopedAllowlistNameResolver, createNestedAllowlistOverrideResolver } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
19
19
|
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
|
20
20
|
import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter } from "openclaw/plugin-sdk/directory-runtime";
|
|
@@ -114,13 +114,13 @@ let discordProbeRuntimePromise;
|
|
|
114
114
|
let discordAuditModulePromise;
|
|
115
115
|
let discordSendModulePromise;
|
|
116
116
|
let discordDirectoryLiveModulePromise;
|
|
117
|
-
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
118
|
-
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
119
|
-
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
120
|
-
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-
|
|
121
|
-
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-
|
|
117
|
+
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-Cgp0csDd.js").then((n) => n.t));
|
|
118
|
+
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-pD06YNCU.js").then((n) => n.n));
|
|
119
|
+
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-BiWLqNNO.js").then((n) => n.n));
|
|
120
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-LoYZzlss.js").then((n) => n.a));
|
|
121
|
+
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-DXPvq5-L.js").then((n) => n.r));
|
|
122
122
|
async function loadDiscordProviderRuntime() {
|
|
123
|
-
discordProviderRuntimePromise ??= import("./provider.runtime-
|
|
123
|
+
discordProviderRuntimePromise ??= import("./provider.runtime-pUGk7VR5.js");
|
|
124
124
|
return await discordProviderRuntimePromise;
|
|
125
125
|
}
|
|
126
126
|
async function loadDiscordProbeRuntime() {
|
|
@@ -128,15 +128,15 @@ async function loadDiscordProbeRuntime() {
|
|
|
128
128
|
return await discordProbeRuntimePromise;
|
|
129
129
|
}
|
|
130
130
|
async function loadDiscordAuditModule() {
|
|
131
|
-
discordAuditModulePromise ??= import("./audit-
|
|
131
|
+
discordAuditModulePromise ??= import("./audit-BdUjE2tr.js").then((n) => n.n);
|
|
132
132
|
return await discordAuditModulePromise;
|
|
133
133
|
}
|
|
134
134
|
async function loadDiscordSendModule() {
|
|
135
|
-
discordSendModulePromise ??= import("./send-
|
|
135
|
+
discordSendModulePromise ??= import("./send-BzXZ8iUI.js").then((n) => n.t);
|
|
136
136
|
return await discordSendModulePromise;
|
|
137
137
|
}
|
|
138
138
|
async function loadDiscordDirectoryLiveModule() {
|
|
139
|
-
discordDirectoryLiveModulePromise ??= import("./directory-live-
|
|
139
|
+
discordDirectoryLiveModulePromise ??= import("./directory-live-C-ECRrM8.js").then((n) => n.t);
|
|
140
140
|
return await discordDirectoryLiveModulePromise;
|
|
141
141
|
}
|
|
142
142
|
//#endregion
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-dXTfmnSZ.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.js";
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-Dlc81IU5.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";
|
|
7
7
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
8
8
|
//#region extensions/discord/src/channel-actions.ts
|
|
9
|
+
const trustedRequesterGuildAdminActions = new Set([
|
|
10
|
+
"emoji-upload",
|
|
11
|
+
"sticker-upload",
|
|
12
|
+
"role-add",
|
|
13
|
+
"role-remove",
|
|
14
|
+
"channel-create",
|
|
15
|
+
"channel-edit",
|
|
16
|
+
"channel-delete",
|
|
17
|
+
"channel-move",
|
|
18
|
+
"category-create",
|
|
19
|
+
"category-edit",
|
|
20
|
+
"category-delete",
|
|
21
|
+
"event-create"
|
|
22
|
+
]);
|
|
9
23
|
let discordChannelActionsRuntimePromise;
|
|
10
24
|
async function loadDiscordChannelActionsRuntime() {
|
|
11
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-
|
|
25
|
+
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-suaDJHH0.js");
|
|
12
26
|
return await discordChannelActionsRuntimePromise;
|
|
13
27
|
}
|
|
14
28
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
@@ -115,6 +129,7 @@ function describeDiscordMessageTool({ cfg, accountId }) {
|
|
|
115
129
|
const discordMessageActions = {
|
|
116
130
|
resolveExecutionMode: ({ action }) => action === "read" || action === "search" ? "gateway" : "local",
|
|
117
131
|
describeMessageTool: describeDiscordMessageTool,
|
|
132
|
+
requiresTrustedRequesterSender: ({ action, toolContext }) => normalizeOptionalString(toolContext?.currentChannelProvider)?.toLowerCase() === "discord" && trustedRequesterGuildAdminActions.has(action),
|
|
118
133
|
extractToolSend: ({ args }) => {
|
|
119
134
|
const action = normalizeOptionalString(args.action) ?? "";
|
|
120
135
|
if (action === "sendMessage") return extractToolSend(args, "sendMessage");
|
|
@@ -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-BzfsP3Bb.js";
|
|
2
|
+
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-Dlc81IU5.js";
|
|
3
|
+
import { t as handleDiscordAction } from "./runtime-xSazIM0F.js";
|
|
4
|
+
import "./targets-BBVHRaeO.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-DWFTAcfd.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-9YoMy5Jf.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, m as resolveDiscordToken, o as resolveDefaultDiscordAccountId } from "./accounts-dXTfmnSZ.js";
|
|
2
2
|
import "./channel-api-CAJ0wMoV.js";
|
|
3
|
-
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-
|
|
4
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
5
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
3
|
+
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-ToNRC7ax.js";
|
|
4
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-pD06YNCU.js";
|
|
5
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-BiWLqNNO.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
8
8
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
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-BzfsP3Bb.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";
|
package/dist/contract-api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-8-Ia3d_X.js";
|
|
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-LoYZzlss.js";
|
|
6
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-Cgp0csDd.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-BzfsP3Bb.js";
|
|
2
2
|
import { r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-dXTfmnSZ.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";
|
|
@@ -229,7 +229,7 @@ function createDiscordApprovalCapability(configOverride) {
|
|
|
229
229
|
request,
|
|
230
230
|
configOverride
|
|
231
231
|
}),
|
|
232
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
232
|
+
load: async () => (await import("./approval-handler.runtime-BDxD97LJ.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
233
233
|
})
|
|
234
234
|
});
|
|
235
235
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-BzfsP3Bb.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, o as resolveDefaultDiscordAccountId } from "./accounts-dXTfmnSZ.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-Cgp0csDd.js";
|
|
2
2
|
export { listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-BzfsP3Bb.js";
|
|
2
2
|
import { p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-dXTfmnSZ.js";
|
|
3
3
|
import { n as fetchDiscord } from "./api-Kq7vtaSO.js";
|
|
4
4
|
import { a as normalizeDiscordSlug } from "./allow-list-BnkWtVpA.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-dXTfmnSZ.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.js";
|
|
3
|
-
import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-
|
|
4
|
-
import { n as normalizeCompatibilityConfig } from "./doctor-contract-
|
|
3
|
+
import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-ToNRC7ax.js";
|
|
4
|
+
import { n as normalizeCompatibilityConfig } from "./doctor-contract-8-Ia3d_X.js";
|
|
5
5
|
import { t as isDiscordMutableAllowEntry } from "./security-doctor-uUo8hTD5.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { collectProviderDangerousNameMatchingScopes } from "openclaw/plugin-sdk/runtime-doctor";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-
|
|
1
|
+
import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-DXT8oJdo.js";
|
|
2
2
|
import { isSupportedRealtimeVoiceActivationName, normalizeRealtimeVoiceActivationNamePrefix } from "openclaw/plugin-sdk/realtime-voice";
|
|
3
3
|
import { asObjectRecord, normalizeLegacyChannelAliases } from "openclaw/plugin-sdk/runtime-doctor";
|
|
4
4
|
//#region extensions/discord/src/doctor-contract.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-8-Ia3d_X.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/{handle-action.guild-admin-_LgqCYcN.js → handle-action.guild-admin-DWFTAcfd.js}
RENAMED
|
@@ -1,12 +1,19 @@
|
|
|
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-xSazIM0F.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { readNumberParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
5
5
|
//#region extensions/discord/src/actions/handle-action.guild-admin.ts
|
|
6
|
+
function readDiscordRequesterSenderId(ctx) {
|
|
7
|
+
return ctx.toolContext?.currentChannelProvider?.trim().toLowerCase() === "discord" ? normalizeOptionalString(ctx.requesterSenderId) : void 0;
|
|
8
|
+
}
|
|
9
|
+
function senderParam(senderUserId) {
|
|
10
|
+
return senderUserId ? { senderUserId } : {};
|
|
11
|
+
}
|
|
6
12
|
async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
7
13
|
const { ctx, resolveChannelId } = params;
|
|
8
14
|
const { action, params: actionParams, cfg } = ctx;
|
|
9
15
|
const accountId = ctx.accountId ?? readStringParam(actionParams, "accountId");
|
|
16
|
+
const senderUserId = readDiscordRequesterSenderId(ctx);
|
|
10
17
|
if (action === "member-info") {
|
|
11
18
|
const userId = readStringParam(actionParams, "userId", { required: true });
|
|
12
19
|
const guildId = readStringParam(actionParams, "guildId", { required: true });
|
|
@@ -47,7 +54,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
47
54
|
guildId,
|
|
48
55
|
name,
|
|
49
56
|
mediaUrl,
|
|
50
|
-
roleIds
|
|
57
|
+
roleIds,
|
|
58
|
+
...senderParam(senderUserId)
|
|
51
59
|
}, cfg);
|
|
52
60
|
}
|
|
53
61
|
if (action === "sticker-upload") {
|
|
@@ -66,7 +74,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
66
74
|
name,
|
|
67
75
|
description,
|
|
68
76
|
tags,
|
|
69
|
-
mediaUrl
|
|
77
|
+
mediaUrl,
|
|
78
|
+
...senderParam(senderUserId)
|
|
70
79
|
}, cfg);
|
|
71
80
|
}
|
|
72
81
|
if (action === "role-add" || action === "role-remove") {
|
|
@@ -78,7 +87,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
78
87
|
accountId: accountId ?? void 0,
|
|
79
88
|
guildId,
|
|
80
89
|
userId,
|
|
81
|
-
roleId
|
|
90
|
+
roleId,
|
|
91
|
+
...senderParam(senderUserId)
|
|
82
92
|
}, cfg);
|
|
83
93
|
}
|
|
84
94
|
if (action === "channel-info") {
|
|
@@ -105,7 +115,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
105
115
|
...readDiscordChannelCreateParams({
|
|
106
116
|
...actionParams,
|
|
107
117
|
guildId
|
|
108
|
-
})
|
|
118
|
+
}),
|
|
119
|
+
...senderParam(senderUserId)
|
|
109
120
|
}, cfg);
|
|
110
121
|
}
|
|
111
122
|
if (action === "channel-edit") {
|
|
@@ -116,7 +127,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
116
127
|
...readDiscordChannelEditParams({
|
|
117
128
|
...actionParams,
|
|
118
129
|
channelId
|
|
119
|
-
})
|
|
130
|
+
}),
|
|
131
|
+
...senderParam(senderUserId)
|
|
120
132
|
}, cfg);
|
|
121
133
|
}
|
|
122
134
|
if (action === "channel-delete") {
|
|
@@ -124,7 +136,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
124
136
|
return await handleDiscordAction({
|
|
125
137
|
action: "channelDelete",
|
|
126
138
|
accountId: accountId ?? void 0,
|
|
127
|
-
channelId
|
|
139
|
+
channelId,
|
|
140
|
+
...senderParam(senderUserId)
|
|
128
141
|
}, cfg);
|
|
129
142
|
}
|
|
130
143
|
if (action === "channel-move") {
|
|
@@ -137,7 +150,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
137
150
|
...actionParams,
|
|
138
151
|
guildId,
|
|
139
152
|
channelId
|
|
140
|
-
})
|
|
153
|
+
}),
|
|
154
|
+
...senderParam(senderUserId)
|
|
141
155
|
}, cfg);
|
|
142
156
|
}
|
|
143
157
|
if (action === "category-create") {
|
|
@@ -149,7 +163,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
149
163
|
accountId: accountId ?? void 0,
|
|
150
164
|
guildId,
|
|
151
165
|
name,
|
|
152
|
-
position: position ?? void 0
|
|
166
|
+
position: position ?? void 0,
|
|
167
|
+
...senderParam(senderUserId)
|
|
153
168
|
}, cfg);
|
|
154
169
|
}
|
|
155
170
|
if (action === "category-edit") {
|
|
@@ -161,7 +176,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
161
176
|
accountId: accountId ?? void 0,
|
|
162
177
|
categoryId,
|
|
163
178
|
name: name ?? void 0,
|
|
164
|
-
position: position ?? void 0
|
|
179
|
+
position: position ?? void 0,
|
|
180
|
+
...senderParam(senderUserId)
|
|
165
181
|
}, cfg);
|
|
166
182
|
}
|
|
167
183
|
if (action === "category-delete") {
|
|
@@ -169,7 +185,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
169
185
|
return await handleDiscordAction({
|
|
170
186
|
action: "categoryDelete",
|
|
171
187
|
accountId: accountId ?? void 0,
|
|
172
|
-
categoryId
|
|
188
|
+
categoryId,
|
|
189
|
+
...senderParam(senderUserId)
|
|
173
190
|
}, cfg);
|
|
174
191
|
}
|
|
175
192
|
if (action === "voice-status") {
|
|
@@ -211,7 +228,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
211
228
|
channelId,
|
|
212
229
|
location,
|
|
213
230
|
entityType,
|
|
214
|
-
image
|
|
231
|
+
image,
|
|
232
|
+
...senderParam(senderUserId)
|
|
215
233
|
}, cfg, { mediaLocalRoots: ctx.mediaLocalRoots });
|
|
216
234
|
}
|
|
217
235
|
if (isDiscordModerationAction(action)) {
|
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-CwahHAYt.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-BzfsP3Bb.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom } from "./accounts-dXTfmnSZ.js";
|
|
3
3
|
import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-BnkWtVpA.js";
|
|
4
|
-
import { i as formatMention } from "./send.outbound-
|
|
4
|
+
import { i as formatMention } from "./send.outbound-ZrMnBa8C.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
|
-
import { o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-
|
|
6
|
+
import { o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-CO6pih5z.js";
|
|
7
7
|
import { t as buildDiscordGroupSystemPrompt } from "./inbound-context-B5EsqsSr.js";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import { asBoolean, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
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-ehnDGwXx.js";
|
|
2
|
+
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-irWYI8YX.js";
|
|
3
3
|
import { a as mergeAbortSignals } from "./timeouts-l_PsHQvX.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-4w0_DPFE.js";
|
|
5
|
+
import { t as sendTyping } from "./typing-Cv09OhaY.js";
|
|
6
6
|
import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
7
|
+
import { createChannelRunQueue } from "openclaw/plugin-sdk/channel-outbound";
|
|
7
8
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
8
9
|
import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
|
|
9
10
|
import { createChannelInboundDebouncer, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
|
|
10
11
|
import { createClaimableDedupe } from "openclaw/plugin-sdk/persistent-dedupe";
|
|
11
|
-
import { createChannelRunQueue } from "openclaw/plugin-sdk/channel-lifecycle";
|
|
12
12
|
//#region extensions/discord/src/monitor/inbound-dedupe.ts
|
|
13
13
|
const RECENT_DISCORD_MESSAGE_TTL_MS = 5 * 6e4;
|
|
14
14
|
const RECENT_DISCORD_MESSAGE_MAX = 5e3;
|
|
@@ -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-HWGh2NOP.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-Ddww-wnF.js");
|
|
177
177
|
return await messagePreflightRuntimePromise;
|
|
178
178
|
}
|
|
179
179
|
function isNonEmptyString(value) {
|
package/dist/{message-handler.preflight-Cu8cFBgW.js → message-handler.preflight-Ddww-wnF.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
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-BzfsP3Bb.js";
|
|
2
2
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-dXTfmnSZ.js";
|
|
3
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-BnkWtVpA.js";
|
|
4
|
-
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-
|
|
4
|
+
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-DAEgiGDV.js";
|
|
5
5
|
import { l as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-BsOnj5NX.js";
|
|
6
|
-
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
7
|
-
import "./thread-bindings-
|
|
8
|
-
import { C as resolveDiscordDmCommandAccess, f as buildDiscordRoutePeer, g as handleDiscordDmCommandDecision, h as shouldIgnoreStaleDiscordRouteBinding, m as resolveDiscordEffectiveRoute, p as resolveDiscordConversationRoute, w as resolveDiscordTextCommandAccess } from "./provider-
|
|
9
|
-
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-
|
|
6
|
+
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-irWYI8YX.js";
|
|
7
|
+
import "./thread-bindings-Bw40FTRZ.js";
|
|
8
|
+
import { C as resolveDiscordDmCommandAccess, f as buildDiscordRoutePeer, g as handleDiscordDmCommandDecision, h as shouldIgnoreStaleDiscordRouteBinding, m as resolveDiscordEffectiveRoute, p as resolveDiscordConversationRoute, w as resolveDiscordTextCommandAccess } from "./provider-CO6pih5z.js";
|
|
9
|
+
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-4w0_DPFE.js";
|
|
10
10
|
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-BFp5w0F8.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";
|
|
@@ -15,9 +15,8 @@ import { formatAllowlistMatchMeta } from "openclaw/plugin-sdk/allow-from";
|
|
|
15
15
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
16
16
|
import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
17
17
|
import { mimeTypeFromFilePath } from "openclaw/plugin-sdk/media-mime";
|
|
18
|
-
import { buildMentionRegexes, classifyChannelInboundEvent, implicitMentionKindWhen, logInboundDrop, matchesMentionWithExplicit, resolveInboundMentionDecision, resolveUnmentionedGroupInboundPolicy, toInboundMediaFacts } from "openclaw/plugin-sdk/channel-inbound";
|
|
18
|
+
import { buildMentionRegexes, classifyChannelInboundEvent, implicitMentionKindWhen, logInboundDrop, matchesMentionWithExplicit, recordDroppedChannelInboundHistory, resolveInboundMentionDecision, resolveUnmentionedGroupInboundPolicy, toInboundMediaFacts } from "openclaw/plugin-sdk/channel-inbound";
|
|
19
19
|
import { logDebug } from "openclaw/plugin-sdk/logging-core";
|
|
20
|
-
import { recordDroppedChannelTurnHistory } from "openclaw/plugin-sdk/inbound-reply-dispatch";
|
|
21
20
|
import { hasControlCommand } from "openclaw/plugin-sdk/command-detection";
|
|
22
21
|
import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runtime";
|
|
23
22
|
import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
|
|
@@ -29,7 +28,7 @@ async function loadConversationRuntime$1() {
|
|
|
29
28
|
return await conversationRuntimePromise$1;
|
|
30
29
|
}
|
|
31
30
|
async function loadDiscordSendRuntime() {
|
|
32
|
-
discordSendRuntimePromise ??= import("./send-
|
|
31
|
+
discordSendRuntimePromise ??= import("./send-BzXZ8iUI.js").then((n) => n.t);
|
|
33
32
|
return await discordSendRuntimePromise;
|
|
34
33
|
}
|
|
35
34
|
async function resolveDiscordDmPreflightAccess(params) {
|
|
@@ -424,7 +423,7 @@ let preflightAudioRuntimePromise;
|
|
|
424
423
|
let systemEventsRuntimePromise;
|
|
425
424
|
let discordThreadingRuntimePromise;
|
|
426
425
|
async function loadPluralKitRuntime() {
|
|
427
|
-
pluralkitRuntimePromise ??= import("./pluralkit-
|
|
426
|
+
pluralkitRuntimePromise ??= import("./pluralkit-BS1MuvYs.js").then((n) => n.n);
|
|
428
427
|
return await pluralkitRuntimePromise;
|
|
429
428
|
}
|
|
430
429
|
async function loadPreflightAudioRuntime() {
|
|
@@ -432,11 +431,11 @@ async function loadPreflightAudioRuntime() {
|
|
|
432
431
|
return await preflightAudioRuntimePromise;
|
|
433
432
|
}
|
|
434
433
|
async function loadSystemEventsRuntime() {
|
|
435
|
-
systemEventsRuntimePromise ??= import("./system-events-
|
|
434
|
+
systemEventsRuntimePromise ??= import("./system-events-DbqKnNPF.js");
|
|
436
435
|
return await systemEventsRuntimePromise;
|
|
437
436
|
}
|
|
438
437
|
async function loadDiscordThreadingRuntime() {
|
|
439
|
-
discordThreadingRuntimePromise ??= import("./provider-
|
|
438
|
+
discordThreadingRuntimePromise ??= import("./provider-CO6pih5z.js").then((n) => n.v);
|
|
440
439
|
return await discordThreadingRuntimePromise;
|
|
441
440
|
}
|
|
442
441
|
function isPreflightAborted(abortSignal) {
|
|
@@ -609,7 +608,7 @@ async function resolveDiscordHistoryMediaForPendingRecord(params) {
|
|
|
609
608
|
}
|
|
610
609
|
async function recordDiscordPendingHistoryEntry(params) {
|
|
611
610
|
if (params.preflight.historyLimit <= 0) return;
|
|
612
|
-
await
|
|
611
|
+
await recordDroppedChannelInboundHistory({
|
|
613
612
|
input: {
|
|
614
613
|
id: params.message.id,
|
|
615
614
|
timestamp: params.entry?.timestamp,
|