@openclaw/discord 2026.5.5-beta.2 → 2026.5.6-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 +14 -15
- package/dist/{approval-handler.runtime-TRKg9NzZ.js → approval-handler.runtime-BBZRYAGs.js} +2 -2
- package/dist/{approval-native-DJs5M8fw.js → approval-native-CBdZsAR7.js} +2 -2
- package/dist/{approval-shared-GfJeMdLu.js → approval-shared-Ck6TxKgo.js} +1 -1
- package/dist/audit-CCJ0h49k.js +24 -0
- package/dist/{audit-CdKtgVPO.js → audit-core-CejGc3hO.js} +29 -26
- package/dist/{channel-D8E-S2xn.js → channel-UXGa9PGc.js} +33 -21
- package/dist/{channel-actions-BvEKvoM5.js → channel-actions-Br29_1nE.js} +1 -1
- package/dist/{channel-actions.runtime-BNZAM-9-.js → channel-actions.runtime-ChmNUig1.js} +4 -4
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-C-HEMkxU.js → channel.setup-D_xyQu_h.js} +3 -3
- package/dist/{config-schema-CC1qhiTN.js → config-schema-Cc953rAs.js} +4 -0
- package/dist/contract-api.js +7 -7
- package/dist/{conversation-identity-BN9wSmxJ.js → conversation-identity-DHhS0ez3.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{doctor-Bgzf3Du2.js → doctor-Bo-yifB3.js} +3 -3
- package/dist/{doctor-contract-Dxq4VIkE.js → doctor-contract-Bso46EOQ.js} +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-nTLXjfyh.js → handle-action.guild-admin-sJiQymg8.js} +1 -1
- package/dist/{manager.runtime-B0TEyget.js → manager.runtime-Cug1PoeZ.js} +12 -6
- package/dist/{message-handler-CSPx1uqO.js → message-handler-C9Ohf-ea.js} +7 -7
- package/dist/{message-handler.preflight-FbHEumdA.js → message-handler.preflight-BrvazsYn.js} +12 -12
- package/dist/{message-handler.process-CVZ-6HNh.js → message-handler.process-CEnzuLiN.js} +13 -13
- package/dist/{message-utils-Dmgu-7fC.js → message-utils-9kaGF59d.js} +2 -2
- package/dist/{outbound-adapter-FG0CgK3I.js → outbound-adapter-DNsTVJfH.js} +4 -4
- package/dist/{outbound-session-route-uHGLDP-Y.js → outbound-session-route-DK9qkPgP.js} +1 -1
- package/dist/{preflight-audio-BpYtUAT6.js → preflight-audio-CRmUxxuM.js} +1 -1
- package/dist/{probe.runtime-ch3eJ1Ar.js → probe.runtime-CMgUDax3.js} +1 -1
- package/dist/{provider-DqqLCjug.js → provider-CuOh6z_b.js} +25 -25
- package/dist/{provider-session.runtime-BMF3HBc2.js → provider-session.runtime-CCESIHVo.js} +3 -3
- package/dist/provider.runtime-B68g3qLv.js +2 -0
- package/dist/{reply-delivery-QiXSsCCR.js → reply-delivery-D9aKHtDH.js} +3 -3
- package/dist/{resolve-channels-VAqom3Dn.js → resolve-channels-kyuvrXJg.js} +1 -1
- package/dist/{resolve-users-DPJkRKx1.js → resolve-users-CAwh4EBq.js} +1 -1
- package/dist/{route-resolution-DODkzE43.js → route-resolution-BWErj5Cn.js} +1 -1
- package/dist/{runtime-NObmZxWs.js → runtime-D8alY00g.js} +6 -6
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +22 -22
- package/dist/runtime-api.lookup.js +4 -4
- package/dist/runtime-api.monitor-DzkCxeBL.js +6 -0
- package/dist/runtime-api.monitor.js +6 -6
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +5 -5
- package/dist/secret-contract-api.js +1 -1
- package/dist/{security-audit-Cdz2iq3m.js → security-audit-BtRd_VhN.js} +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit.runtime-DBV1T1_N.js → security-audit.runtime-Dm1LW9KX.js} +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-Rz5xnelg.js → send-8S_HKJpQ.js} +2 -2
- package/dist/{send.components-CoCE4aan.js → send.components-A42c_5tQ.js} +3 -3
- package/dist/{send.outbound-DN-HfmW2.js → send.outbound-D3tonSz8.js} +1 -1
- package/dist/{send.shared-BWZyuxM-.js → send.shared-BQGiUPvZ.js} +3 -79
- package/dist/session-key-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-Ugd3DMEH.js → shared-BEW4H3bj.js} +8 -8
- package/dist/{subagent-hooks-DgpxQHUn.js → subagent-hooks-T0LPLh4H.js} +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{normalize-B-ktw-T_.js → target-resolver-DA84_xbt.js} +91 -1
- package/dist/targets-FwL1BPTU.js +2 -0
- package/dist/test-api.js +4 -4
- package/dist/{thread-bindings-C7GN5ebh.js → thread-bindings-CMpZjP50.js} +6 -6
- package/dist/{thread-bindings.discord-api-CfZnSqIb.js → thread-bindings.discord-api-CwWGoyei.js} +6 -6
- package/dist/{thread-bindings.manager-BxPG0IHV.js → thread-bindings.manager-BtxfLfWf.js} +4 -4
- package/dist/{thread-bindings.session-updates-TTP020qQ.js → thread-bindings.session-updates-jcZSiRPI.js} +1 -1
- package/dist/{threading-Bi95Nz8h.js → threading-BMmpA2JR.js} +3 -3
- package/dist/timeouts.js +1 -1
- package/dist/{typing-BSi1dUHm.js → typing-Bw6NKWLZ.js} +1 -1
- package/openclaw.plugin.json +14 -0
- package/package.json +4 -4
- package/dist/provider.runtime-2FGjVR8w.js +0 -2
- package/dist/runtime-api.monitor-DPIfax5N.js +0 -6
- package/dist/targets-DcNwQ9vN.js +0 -3
- /package/dist/{access-B9ujuUtS.js → access-CHY9FK3X.js} +0 -0
- /package/dist/{agent-components.runtime-DUhLr9hy.js → agent-components.runtime-Dof1YMSz.js} +0 -0
- /package/dist/{channel-access-ewDxhd9q.js → channel-access-DFIQqbYm.js} +0 -0
- /package/dist/{directory-config-DElx_Gr4.js → directory-config-DoETeOOx.js} +0 -0
- /package/dist/{doctor-shared-DU8RcnF5.js → doctor-shared-Cqvfgv9m.js} +0 -0
- /package/dist/{inbound-context-e_oBBJtF.js → inbound-context-CRylwjg0.js} +0 -0
- /package/dist/{pluralkit-voQvSN3g.js → pluralkit-OFss_pIy.js} +0 -0
- /package/dist/{preflight-audio.runtime-BAGmU6uO.js → preflight-audio.runtime-DPVbpZid.js} +0 -0
- /package/dist/{preview-streaming-BzkA67Qa.js → preview-streaming-Cc_oeIPP.js} +0 -0
- /package/dist/{probe-DmHUl6wI.js → probe-E80IMT1X.js} +0 -0
- /package/dist/{resolve-allowlist-common-Cl2N5YLW.js → resolve-allowlist-common-_e1cWOb3.js} +0 -0
- /package/dist/{secret-config-contract-CoGryS5c.js → secret-config-contract-5S9U9pjx.js} +0 -0
- /package/dist/{security-contract-ei3Mz8Sa.js → security-contract-BE8rsdPq.js} +0 -0
- /package/dist/{security-doctor-CzTzpXV8.js → security-doctor-DiilN216.js} +0 -0
- /package/dist/{sender-identity-BiSDAk2P.js → sender-identity-BGUfyvOC.js} +0 -0
- /package/dist/{session-contract-goJZckp2.js → session-contract-CuW9Nlxg.js} +0 -0
- /package/dist/{session-key-normalization-Daag9II6.js → session-key-normalization-B5La-jFM.js} +0 -0
- /package/dist/{system-events-B-xNU7II.js → system-events-_fzSG--3.js} +0 -0
- /package/dist/{thread-bindings.state-Dzu1gCE7.js → thread-bindings.state-WU4duXKY.js} +0 -0
- /package/dist/{timeouts-C7jeTtGs.js → timeouts-CdsmBWWs.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-D8alY00g.js";
|
|
2
2
|
export { handleDiscordAction };
|
package/dist/api.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { a as mergeDiscordAccountConfig, f as resolveDiscordMaxLinesPerMessage, i as listEnabledDiscordAccounts, l as resolveDiscordAccountConfig, o as resolveDefaultDiscordAccountId, r as listDiscordAccountIds, s as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-CaHGiVB4.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
|
-
import {
|
|
4
|
-
import { A as resolveDiscordTarget, j as parseDiscordSendTarget } from "./send.shared-BWZyuxM-.js";
|
|
3
|
+
import { a as normalizeDiscordMessagingTarget, c as parseDiscordTarget, i as looksLikeDiscordTargetId, l as resolveDiscordChannelId, n as resolveDiscordTarget, o as normalizeDiscordOutboundTarget, r as parseDiscordSendTarget } from "./target-resolver-DA84_xbt.js";
|
|
5
4
|
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-DzNBVTto.js";
|
|
6
5
|
import { _ as parseDiscordModalCustomIdForInteraction, a as buildDiscordComponentMessage, c as readDiscordComponentSpec, d as DISCORD_MODAL_CUSTOM_ID_KEY, f as buildDiscordComponentCustomId, g as parseDiscordModalCustomId, h as parseDiscordComponentCustomIdForInteraction, i as createDiscordFormModal, l as resolveDiscordComponentAttachmentName, m as parseDiscordComponentCustomId, n as formatDiscordComponentEventText, o as buildDiscordComponentMessageFlags, p as buildDiscordModalCustomId, r as DiscordFormModal, s as DISCORD_COMPONENT_ATTACHMENT_PREFIX, u as DISCORD_COMPONENT_CUSTOM_ID_KEY } from "./components-D5LnN7ZQ.js";
|
|
7
6
|
import { t as buildDiscordInteractiveComponents } from "./shared-interactive-KgJjCqnB.js";
|
|
8
|
-
import "./targets-
|
|
9
|
-
import { a as shouldSuppressLocalDiscordExecApprovalPrompt, i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers, r as isDiscordExecApprovalApprover } from "./approval-shared-
|
|
10
|
-
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-
|
|
11
|
-
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-
|
|
12
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
13
|
-
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-
|
|
14
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
15
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
16
|
-
import { t as fetchPluralKitMessageInfo } from "./pluralkit-
|
|
17
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
18
|
-
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-
|
|
19
|
-
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-
|
|
7
|
+
import "./targets-FwL1BPTU.js";
|
|
8
|
+
import { a as shouldSuppressLocalDiscordExecApprovalPrompt, i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers, r as isDiscordExecApprovalApprover } from "./approval-shared-Ck6TxKgo.js";
|
|
9
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-UXGa9PGc.js";
|
|
10
|
+
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-B5La-jFM.js";
|
|
11
|
+
import { t as discordSetupPlugin } from "./channel.setup-D_xyQu_h.js";
|
|
12
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-T0LPLh4H.js";
|
|
13
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-sJiQymg8.js";
|
|
14
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-DoETeOOx.js";
|
|
15
|
+
import { t as fetchPluralKitMessageInfo } from "./pluralkit-OFss_pIy.js";
|
|
16
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-E80IMT1X.js";
|
|
17
|
+
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-BtRd_VhN.js";
|
|
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-CdsmBWWs.js";
|
|
20
19
|
import { resolveOpenProviderRuntimeGroupPolicy as resolveDiscordRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
21
20
|
//#region extensions/discord/api.ts
|
|
22
|
-
const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-
|
|
21
|
+
const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-ChmNUig1.js")).handleDiscordMessageAction(...args);
|
|
23
22
|
//#endregion
|
|
24
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,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
3
|
import { $ as createChannelMessage, A as Button, B as Separator, H as TextDisplay, J as createUserDmChannel, M as Container, R as Row, it as editChannelMessage, nt as deleteChannelMessage, w as serializePayload } from "./discord-eZlimVfW.js";
|
|
4
|
-
import {
|
|
5
|
-
import { i as isDiscordExecApprovalClientEnabled, t as shouldHandleDiscordApprovalRequest } from "./approval-shared-
|
|
4
|
+
import { A as createDiscordClient, y as stripUndefinedFields } from "./send.shared-BQGiUPvZ.js";
|
|
5
|
+
import { i as isDiscordExecApprovalClientEnabled, t as shouldHandleDiscordApprovalRequest } from "./approval-shared-Ck6TxKgo.js";
|
|
6
6
|
import { logDebug, logError, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
7
7
|
import { ButtonStyle } from "discord-api-types/v10";
|
|
8
8
|
import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
|
|
2
|
-
import { c as createChannelNativeOriginTargetResolver, i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers, o as createApproverRestrictedNativeApprovalCapability, r as isDiscordExecApprovalApprover, s as createChannelApproverDmTargetResolver, t as shouldHandleDiscordApprovalRequest } from "./approval-shared-
|
|
2
|
+
import { c as createChannelNativeOriginTargetResolver, i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers, o as createApproverRestrictedNativeApprovalCapability, r as isDiscordExecApprovalApprover, s as createChannelApproverDmTargetResolver, t as shouldHandleDiscordApprovalRequest } from "./approval-shared-Ck6TxKgo.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
4
4
|
import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
5
5
|
import { resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -140,7 +140,7 @@ function createDiscordApprovalCapability(configOverride) {
|
|
|
140
140
|
request,
|
|
141
141
|
configOverride
|
|
142
142
|
}),
|
|
143
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
143
|
+
load: async () => (await import("./approval-handler.runtime-BBZRYAGs.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
144
144
|
})
|
|
145
145
|
});
|
|
146
146
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
|
|
2
|
-
import {
|
|
2
|
+
import { c as parseDiscordTarget } from "./target-resolver-DA84_xbt.js";
|
|
3
3
|
import { createChannelApproverDmTargetResolver, createChannelNativeOriginTargetResolver, doesApprovalRequestMatchChannelAccount } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
4
4
|
import { getExecApprovalReplyMetadata, isChannelExecApprovalClientEnabledFromConfig, matchesApprovalRequestFilters } from "openclaw/plugin-sdk/approval-client-runtime";
|
|
5
5
|
import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
|
+
import { T as fetchChannelPermissionsDiscord } from "./send.shared-BQGiUPvZ.js";
|
|
4
|
+
import "./send-8S_HKJpQ.js";
|
|
5
|
+
import { n as collectDiscordAuditChannelIdsForAccount, t as auditDiscordChannelPermissionsWithFetcher } from "./audit-core-CejGc3hO.js";
|
|
6
|
+
//#region extensions/discord/src/audit.ts
|
|
7
|
+
var audit_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
auditDiscordChannelPermissions: () => auditDiscordChannelPermissions,
|
|
9
|
+
collectDiscordAuditChannelIds: () => collectDiscordAuditChannelIds
|
|
10
|
+
});
|
|
11
|
+
function collectDiscordAuditChannelIds(params) {
|
|
12
|
+
return collectDiscordAuditChannelIdsForAccount(inspectDiscordAccount({
|
|
13
|
+
cfg: params.cfg,
|
|
14
|
+
accountId: params.accountId
|
|
15
|
+
}).config);
|
|
16
|
+
}
|
|
17
|
+
async function auditDiscordChannelPermissions(params) {
|
|
18
|
+
return await auditDiscordChannelPermissionsWithFetcher({
|
|
19
|
+
...params,
|
|
20
|
+
fetchChannelPermissions: fetchChannelPermissionsDiscord
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { audit_exports as n, collectDiscordAuditChannelIds as r, auditDiscordChannelPermissions as t };
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
|
|
2
|
-
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
|
-
import { T as fetchChannelPermissionsDiscord } from "./send.shared-BWZyuxM-.js";
|
|
4
|
-
import "./send-Rz5xnelg.js";
|
|
5
1
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
2
|
+
import { ChannelType } from "discord-api-types/v10";
|
|
6
3
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
7
4
|
//#region extensions/discord/src/audit-core.ts
|
|
8
|
-
const
|
|
5
|
+
const REQUIRED_TEXT_CHANNEL_PERMISSIONS = ["ViewChannel", "SendMessages"];
|
|
6
|
+
const REQUIRED_VOICE_CHANNEL_PERMISSIONS = [
|
|
7
|
+
"ViewChannel",
|
|
8
|
+
"Connect",
|
|
9
|
+
"Speak",
|
|
10
|
+
"SendMessages",
|
|
11
|
+
"ReadMessageHistory"
|
|
12
|
+
];
|
|
13
|
+
function resolveRequiredDiscordChannelPermissions(channelType) {
|
|
14
|
+
if (channelType === ChannelType.GuildVoice || channelType === ChannelType.GuildStageVoice) return [...REQUIRED_VOICE_CHANNEL_PERMISSIONS];
|
|
15
|
+
return [...REQUIRED_TEXT_CHANNEL_PERMISSIONS];
|
|
16
|
+
}
|
|
9
17
|
function shouldAuditChannelConfig(config) {
|
|
10
18
|
if (!config) return true;
|
|
11
19
|
if (config.enabled === false) return false;
|
|
@@ -36,6 +44,20 @@ function collectDiscordAuditChannelIdsForGuilds(guilds) {
|
|
|
36
44
|
unresolvedChannels: keys.length - channelIds.length
|
|
37
45
|
};
|
|
38
46
|
}
|
|
47
|
+
function collectDiscordAuditChannelIdsForAccount(config) {
|
|
48
|
+
const collected = collectDiscordAuditChannelIdsForGuilds(config.guilds);
|
|
49
|
+
const channelIds = new Set(collected.channelIds);
|
|
50
|
+
let unresolvedVoiceChannels = 0;
|
|
51
|
+
for (const entry of config.voice?.autoJoin ?? []) {
|
|
52
|
+
const channelId = normalizeOptionalString(entry?.channelId) ?? "";
|
|
53
|
+
if (/^\d+$/.test(channelId)) channelIds.add(channelId);
|
|
54
|
+
else if (channelId) unresolvedVoiceChannels++;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
channelIds: [...channelIds].toSorted((a, b) => a.localeCompare(b)),
|
|
58
|
+
unresolvedChannels: collected.unresolvedChannels + unresolvedVoiceChannels
|
|
59
|
+
};
|
|
60
|
+
}
|
|
39
61
|
async function auditDiscordChannelPermissionsWithFetcher(params) {
|
|
40
62
|
const started = Date.now();
|
|
41
63
|
const token = normalizeOptionalString(params.token) ?? "";
|
|
@@ -46,7 +68,6 @@ async function auditDiscordChannelPermissionsWithFetcher(params) {
|
|
|
46
68
|
channels: [],
|
|
47
69
|
elapsedMs: Date.now() - started
|
|
48
70
|
};
|
|
49
|
-
const required = [...REQUIRED_CHANNEL_PERMISSIONS];
|
|
50
71
|
const channels = [];
|
|
51
72
|
for (const channelId of params.channelIds) try {
|
|
52
73
|
const perms = await params.fetchChannelPermissions(channelId, {
|
|
@@ -54,7 +75,7 @@ async function auditDiscordChannelPermissionsWithFetcher(params) {
|
|
|
54
75
|
token,
|
|
55
76
|
accountId: params.accountId ?? void 0
|
|
56
77
|
});
|
|
57
|
-
const missing =
|
|
78
|
+
const missing = resolveRequiredDiscordChannelPermissions(perms.channelType).filter((p) => !perms.permissions.includes(p));
|
|
58
79
|
channels.push({
|
|
59
80
|
channelId,
|
|
60
81
|
ok: missing.length === 0,
|
|
@@ -81,22 +102,4 @@ async function auditDiscordChannelPermissionsWithFetcher(params) {
|
|
|
81
102
|
};
|
|
82
103
|
}
|
|
83
104
|
//#endregion
|
|
84
|
-
|
|
85
|
-
var audit_exports = /* @__PURE__ */ __exportAll({
|
|
86
|
-
auditDiscordChannelPermissions: () => auditDiscordChannelPermissions,
|
|
87
|
-
collectDiscordAuditChannelIds: () => collectDiscordAuditChannelIds
|
|
88
|
-
});
|
|
89
|
-
function collectDiscordAuditChannelIds(params) {
|
|
90
|
-
return collectDiscordAuditChannelIdsForGuilds(inspectDiscordAccount({
|
|
91
|
-
cfg: params.cfg,
|
|
92
|
-
accountId: params.accountId
|
|
93
|
-
}).config.guilds);
|
|
94
|
-
}
|
|
95
|
-
async function auditDiscordChannelPermissions(params) {
|
|
96
|
-
return await auditDiscordChannelPermissionsWithFetcher({
|
|
97
|
-
...params,
|
|
98
|
-
fetchChannelPermissions: fetchChannelPermissionsDiscord
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
export { audit_exports as n, collectDiscordAuditChannelIds as r, auditDiscordChannelPermissions as t };
|
|
105
|
+
export { collectDiscordAuditChannelIdsForAccount as n, resolveRequiredDiscordChannelPermissions as r, auditDiscordChannelPermissionsWithFetcher as t };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
|
|
2
2
|
import { a as projectCredentialSnapshotFields, n as PAIRING_APPROVED_MESSAGE, o as resolveConfiguredFromCredentialStatuses, r as buildTokenChannelStatusSummary, t as DEFAULT_ACCOUNT_ID } from "./channel-api-CTSWMrnD.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-
|
|
3
|
+
import { a as normalizeDiscordMessagingTarget, c as parseDiscordTarget, i as looksLikeDiscordTargetId, n as resolveDiscordTarget } from "./target-resolver-DA84_xbt.js";
|
|
4
|
+
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-DK9qkPgP.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-K9RT6Egn.js";
|
|
6
|
-
import { a as shouldSuppressLocalDiscordExecApprovalPrompt } from "./approval-shared-
|
|
7
|
-
import { t as getDiscordApprovalCapability } from "./approval-native-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
11
|
-
import { n as
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
6
|
+
import { a as shouldSuppressLocalDiscordExecApprovalPrompt } from "./approval-shared-Ck6TxKgo.js";
|
|
7
|
+
import { t as getDiscordApprovalCapability } from "./approval-native-CBdZsAR7.js";
|
|
8
|
+
import { r as resolveRequiredDiscordChannelPermissions } from "./audit-core-CejGc3hO.js";
|
|
9
|
+
import { t as discordMessageActions$1 } from "./channel-actions-Br29_1nE.js";
|
|
10
|
+
import { n as resolveDiscordCurrentConversationIdentity } from "./conversation-identity-DHhS0ez3.js";
|
|
11
|
+
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-jcZSiRPI.js";
|
|
12
|
+
import { n as discordOutbound } from "./outbound-adapter-DNsTVJfH.js";
|
|
13
|
+
import { i as discordSecurityAdapter, n as discordConfigAdapter, r as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-BEW4H3bj.js";
|
|
14
|
+
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-B5La-jFM.js";
|
|
14
15
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/text-runtime";
|
|
15
16
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
16
17
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -126,24 +127,24 @@ let discordProbeRuntimePromise;
|
|
|
126
127
|
let discordAuditModulePromise;
|
|
127
128
|
let discordSendModulePromise;
|
|
128
129
|
let discordDirectoryLiveModulePromise;
|
|
129
|
-
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
130
|
-
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
131
|
-
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
132
|
-
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-
|
|
130
|
+
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-DoETeOOx.js").then((n) => n.t));
|
|
131
|
+
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-kyuvrXJg.js").then((n) => n.n));
|
|
132
|
+
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-CAwh4EBq.js").then((n) => n.n));
|
|
133
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-BtxfLfWf.js").then((n) => n.a));
|
|
133
134
|
async function loadDiscordProviderRuntime() {
|
|
134
|
-
discordProviderRuntimePromise ??= import("./provider.runtime-
|
|
135
|
+
discordProviderRuntimePromise ??= import("./provider.runtime-B68g3qLv.js");
|
|
135
136
|
return await discordProviderRuntimePromise;
|
|
136
137
|
}
|
|
137
138
|
async function loadDiscordProbeRuntime() {
|
|
138
|
-
discordProbeRuntimePromise ??= import("./probe.runtime-
|
|
139
|
+
discordProbeRuntimePromise ??= import("./probe.runtime-CMgUDax3.js");
|
|
139
140
|
return await discordProbeRuntimePromise;
|
|
140
141
|
}
|
|
141
142
|
async function loadDiscordAuditModule() {
|
|
142
|
-
discordAuditModulePromise ??= import("./audit-
|
|
143
|
+
discordAuditModulePromise ??= import("./audit-CCJ0h49k.js").then((n) => n.n);
|
|
143
144
|
return await discordAuditModulePromise;
|
|
144
145
|
}
|
|
145
146
|
async function loadDiscordSendModule() {
|
|
146
|
-
discordSendModulePromise ??= import("./send-
|
|
147
|
+
discordSendModulePromise ??= import("./send-8S_HKJpQ.js").then((n) => n.t);
|
|
147
148
|
return await discordSendModulePromise;
|
|
148
149
|
}
|
|
149
150
|
async function loadDiscordDirectoryLiveModule() {
|
|
@@ -311,7 +312,6 @@ function collectDiscordStatusIssues(accounts) {
|
|
|
311
312
|
}
|
|
312
313
|
//#endregion
|
|
313
314
|
//#region extensions/discord/src/channel.ts
|
|
314
|
-
const REQUIRED_DISCORD_PERMISSIONS = ["ViewChannel", "SendMessages"];
|
|
315
315
|
const DISCORD_ACCOUNT_STARTUP_STAGGER_MS = 1e4;
|
|
316
316
|
function startDiscordStartupProbe(params) {
|
|
317
317
|
(async () => {
|
|
@@ -451,7 +451,19 @@ const discordPlugin = createChatChannelPlugin({
|
|
|
451
451
|
resolveOutboundSessionRoute: (params) => resolveDiscordOutboundSessionRoute(params),
|
|
452
452
|
targetResolver: {
|
|
453
453
|
looksLikeId: looksLikeDiscordTargetId,
|
|
454
|
-
hint: "<channelId|user:ID|channel:ID>"
|
|
454
|
+
hint: "<channelId|user:ID|channel:ID>",
|
|
455
|
+
resolveTarget: async ({ cfg, accountId, input, preferredKind }) => {
|
|
456
|
+
const target = await resolveDiscordTarget(input, {
|
|
457
|
+
cfg,
|
|
458
|
+
accountId: accountId ?? void 0
|
|
459
|
+
}, { defaultKind: preferredKind === "user" ? "user" : "channel" });
|
|
460
|
+
return target ? {
|
|
461
|
+
to: target.normalized,
|
|
462
|
+
kind: target.kind,
|
|
463
|
+
display: target.raw,
|
|
464
|
+
source: "normalized"
|
|
465
|
+
} : null;
|
|
466
|
+
}
|
|
455
467
|
}
|
|
456
468
|
},
|
|
457
469
|
approvalCapability: getDiscordApprovalCapability(),
|
|
@@ -607,7 +619,7 @@ const discordPlugin = createChatChannelPlugin({
|
|
|
607
619
|
token,
|
|
608
620
|
accountId: account.accountId ?? void 0
|
|
609
621
|
});
|
|
610
|
-
const missingRequired =
|
|
622
|
+
const missingRequired = resolveRequiredDiscordChannelPermissions(perms.channelType).filter((permission) => !perms.permissions.includes(permission));
|
|
611
623
|
details.permissions = {
|
|
612
624
|
channelId: perms.channelId,
|
|
613
625
|
guildId: perms.guildId,
|
|
@@ -6,7 +6,7 @@ import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
|
6
6
|
//#region extensions/discord/src/channel-actions.ts
|
|
7
7
|
let discordChannelActionsRuntimePromise;
|
|
8
8
|
async function loadDiscordChannelActionsRuntime() {
|
|
9
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-
|
|
9
|
+
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-ChmNUig1.js");
|
|
10
10
|
return await discordChannelActionsRuntimePromise;
|
|
11
11
|
}
|
|
12
12
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { l as resolveDiscordChannelId } from "./target-resolver-DA84_xbt.js";
|
|
2
|
+
import { t as handleDiscordAction } from "./runtime-D8alY00g.js";
|
|
3
3
|
import { n as buildDiscordPresentationComponents, t as buildDiscordInteractiveComponents } from "./shared-interactive-KgJjCqnB.js";
|
|
4
|
-
import "./targets-
|
|
4
|
+
import "./targets-FwL1BPTU.js";
|
|
5
5
|
import "./action-runtime-api.js";
|
|
6
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
6
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-sJiQymg8.js";
|
|
7
7
|
import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/text-runtime";
|
|
8
8
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
9
9
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DiscordChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as DiscordChannelConfigSchema } from "./config-schema-Cc953rAs.js";
|
|
2
2
|
export { DiscordChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./channel-
|
|
1
|
+
import { t as discordPlugin } from "./channel-UXGa9PGc.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as resolveDiscordToken } from "./token-BZtonk7d.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, o as resolveDefaultDiscordAccountId } from "./accounts-CaHGiVB4.js";
|
|
3
|
-
import { r as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-
|
|
4
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
5
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
3
|
+
import { r as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-BEW4H3bj.js";
|
|
4
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-kyuvrXJg.js";
|
|
5
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-CAwh4EBq.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/text-runtime";
|
|
@@ -202,6 +202,10 @@ const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordConfigSchema,
|
|
|
202
202
|
label: "Discord Voice Reconnect Grace (ms)",
|
|
203
203
|
help: "Grace period for a disconnected Discord voice session to enter Signalling or Connecting before OpenClaw destroys it. Default: 15000."
|
|
204
204
|
},
|
|
205
|
+
"voice.captureSilenceGraceMs": {
|
|
206
|
+
label: "Discord Voice Capture Silence Grace (ms)",
|
|
207
|
+
help: "Silence window after Discord reports a speaker ended before OpenClaw finalizes the audio segment for transcription. Default: 2500."
|
|
208
|
+
},
|
|
205
209
|
"voice.tts": {
|
|
206
210
|
label: "Discord Voice Text-to-Speech",
|
|
207
211
|
help: "Optional TTS overrides for Discord voice playback (merged with messages.tts)."
|
package/dist/contract-api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
2
|
-
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-
|
|
3
|
-
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-
|
|
4
|
-
import { t as deriveLegacySessionChatType } from "./session-contract-
|
|
5
|
-
import { r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-
|
|
6
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
7
|
-
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-Bso46EOQ.js";
|
|
2
|
+
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-5S9U9pjx.js";
|
|
3
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-BE8rsdPq.js";
|
|
4
|
+
import { t as deriveLegacySessionChatType } from "./session-contract-CuW9Nlxg.js";
|
|
5
|
+
import { r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-BtxfLfWf.js";
|
|
6
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-DoETeOOx.js";
|
|
7
|
+
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-BtRd_VhN.js";
|
|
8
8
|
export { collectDiscordSecurityAuditFindings, collectRuntimeConfigAssignments, collectUnsupportedSecretRefConfigCandidates, createThreadBindingManager, deriveLegacySessionChatType, __testing as discordThreadBindingTesting, legacyConfigRules, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, normalizeCompatibilityConfig, secretTargetRegistryEntries, unsupportedSecretRefSurfacePatterns };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as parseDiscordTarget } from "./target-resolver-DA84_xbt.js";
|
|
2
2
|
import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
3
3
|
//#region extensions/discord/src/conversation-identity.ts
|
|
4
4
|
function normalizeDiscordTarget(raw, defaultKind) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-DoETeOOx.js";
|
|
2
2
|
export { listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-CaHGiVB4.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-BcQAxhKY.js";
|
|
3
|
-
import { n as normalizeCompatibilityConfig } from "./doctor-contract-
|
|
4
|
-
import { t as DISCORD_LEGACY_CONFIG_RULES } from "./doctor-shared-
|
|
5
|
-
import { t as isDiscordMutableAllowEntry } from "./security-doctor-
|
|
3
|
+
import { n as normalizeCompatibilityConfig } from "./doctor-contract-Bso46EOQ.js";
|
|
4
|
+
import { t as DISCORD_LEGACY_CONFIG_RULES } from "./doctor-shared-Cqvfgv9m.js";
|
|
5
|
+
import { t as isDiscordMutableAllowEntry } from "./security-doctor-DiilN216.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
7
7
|
import { collectProviderDangerousNameMatchingScopes } from "openclaw/plugin-sdk/runtime-doctor";
|
|
8
8
|
//#region extensions/discord/src/doctor.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-
|
|
1
|
+
import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-Cc_oeIPP.js";
|
|
2
2
|
import { asObjectRecord, normalizeLegacyChannelAliases } from "openclaw/plugin-sdk/runtime-doctor";
|
|
3
3
|
//#region extensions/discord/src/doctor-contract.ts
|
|
4
4
|
const LEGACY_TTS_PROVIDER_KEYS = [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-Bso46EOQ.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/{handle-action.guild-admin-nTLXjfyh.js → handle-action.guild-admin-sJiQymg8.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-D8alY00g.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
4
4
|
import { readNumberParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
@@ -4,8 +4,8 @@ import { n as formatDiscordUserTag } from "./format-D8TsaXxW.js";
|
|
|
4
4
|
import { a as normalizeDiscordSlug, m as resolveDiscordOwnerAccess } from "./allow-list-ek-1hMKN.js";
|
|
5
5
|
import { t as formatMention } from "./mentions-BPZUaFk7.js";
|
|
6
6
|
import { t as getDiscordRuntime } from "./runtime-K9RT6Egn.js";
|
|
7
|
-
import { t as buildDiscordGroupSystemPrompt } from "./inbound-context-
|
|
8
|
-
import { n as resolveDiscordVoiceEnabled, t as authorizeDiscordVoiceIngress } from "./access-
|
|
7
|
+
import { t as buildDiscordGroupSystemPrompt } from "./inbound-context-CRylwjg0.js";
|
|
8
|
+
import { n as resolveDiscordVoiceEnabled, t as authorizeDiscordVoiceIngress } from "./access-CHY9FK3X.js";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import { normalizeOptionalString, stripInlineDirectiveTagsForDisplay } from "openclaw/plugin-sdk/text-runtime";
|
|
11
11
|
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
@@ -271,18 +271,23 @@ function loadDiscordVoiceSdk() {
|
|
|
271
271
|
//#endregion
|
|
272
272
|
//#region extensions/discord/src/voice/prompt.ts
|
|
273
273
|
const DISCORD_VOICE_SPOKEN_OUTPUT_CONTRACT = [
|
|
274
|
+
"You are OpenClaw's Discord voice interface in a live voice channel.",
|
|
274
275
|
"Discord voice reply requirements:",
|
|
275
276
|
"- Return only the concise text that should be spoken aloud in the voice channel.",
|
|
277
|
+
"- Treat the transcript as speech-to-text from a live conversation; repair obvious transcription artifacts and ignore repeated partial fragments caused by voice buffering.",
|
|
278
|
+
"- If the transcript is garbled, incomplete, or missing the user's intent, ask one brief clarifying question instead of guessing.",
|
|
279
|
+
"- If the request needs deeper reasoning, current information, or tools, use the available tools before answering.",
|
|
276
280
|
"- Do not call the tts tool; Discord voice will synthesize and play the returned text.",
|
|
277
281
|
"- Do not reply with NO_REPLY unless no spoken response is appropriate.",
|
|
278
|
-
"- Keep the response brief and conversational."
|
|
282
|
+
"- Keep the response brief, natural, and conversational. Prefer one to three short sentences.",
|
|
283
|
+
"- Avoid markdown tables, code fences, citations, and visual formatting unless the user explicitly asks for something that cannot be spoken naturally."
|
|
279
284
|
].join("\n");
|
|
280
285
|
function formatVoiceIngressPrompt(transcript, speakerLabel) {
|
|
281
286
|
const cleanedTranscript = transcript.trim();
|
|
282
287
|
const cleanedLabel = speakerLabel?.trim();
|
|
283
288
|
return [DISCORD_VOICE_SPOKEN_OUTPUT_CONTRACT, cleanedLabel ? [`Voice transcript from speaker "${cleanedLabel}":`, cleanedTranscript].join("\n") : cleanedTranscript].join("\n\n");
|
|
284
289
|
}
|
|
285
|
-
const CAPTURE_FINALIZE_GRACE_MS =
|
|
290
|
+
const CAPTURE_FINALIZE_GRACE_MS = 2500;
|
|
286
291
|
const VOICE_CONNECT_READY_TIMEOUT_MS = 3e4;
|
|
287
292
|
const VOICE_RECONNECT_GRACE_MS = 15e3;
|
|
288
293
|
const PLAYBACK_READY_TIMEOUT_MS = 6e4;
|
|
@@ -866,12 +871,13 @@ var DiscordVoiceManager$1 = class {
|
|
|
866
871
|
return clearVoiceCaptureFinalizeTimer(entry.capture, userId, generation);
|
|
867
872
|
}
|
|
868
873
|
scheduleCaptureFinalize(entry, userId, reason) {
|
|
874
|
+
const graceMs = resolveVoiceTimeoutMs(this.params.discordConfig.voice?.captureSilenceGraceMs, CAPTURE_FINALIZE_GRACE_MS);
|
|
869
875
|
scheduleVoiceCaptureFinalize({
|
|
870
876
|
state: entry.capture,
|
|
871
877
|
userId,
|
|
872
|
-
delayMs:
|
|
878
|
+
delayMs: graceMs,
|
|
873
879
|
onFinalize: () => {
|
|
874
|
-
logVoiceVerbose(`capture finalize: guild ${entry.guildId} channel ${entry.channelId} user ${userId} reason=${reason} grace=${
|
|
880
|
+
logVoiceVerbose(`capture finalize: guild ${entry.guildId} channel ${entry.channelId} user ${userId} reason=${reason} grace=${graceMs}ms`);
|
|
875
881
|
}
|
|
876
882
|
});
|
|
877
883
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as resolveDiscordChannelParentSafe, n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-
|
|
3
|
-
import { a as mergeAbortSignals } from "./timeouts-
|
|
4
|
-
import { l as resolveDiscordMessageChannelId, r as resolveDiscordMessageText, s as hasDiscordMessageStickers } from "./message-utils-
|
|
5
|
-
import { t as sendTyping } from "./typing-
|
|
1
|
+
import { j as createDiscordRestClient } from "./send.shared-BQGiUPvZ.js";
|
|
2
|
+
import { a as resolveDiscordChannelParentSafe, n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-DFIQqbYm.js";
|
|
3
|
+
import { a as mergeAbortSignals } from "./timeouts-CdsmBWWs.js";
|
|
4
|
+
import { l as resolveDiscordMessageChannelId, r as resolveDiscordMessageText, s as hasDiscordMessageStickers } from "./message-utils-9kaGF59d.js";
|
|
5
|
+
import { t as sendTyping } from "./typing-Bw6NKWLZ.js";
|
|
6
6
|
import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
8
8
|
import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
|
|
@@ -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-CEnzuLiN.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-BrvazsYn.js");
|
|
177
177
|
return await messagePreflightRuntimePromise;
|
|
178
178
|
}
|
|
179
179
|
function isNonEmptyString(value) {
|
package/dist/{message-handler.preflight-FbHEumdA.js → message-handler.preflight-BrvazsYn.js}
RENAMED
|
@@ -2,13 +2,13 @@ import { o as resolveDefaultDiscordAccountId } from "./accounts-CaHGiVB4.js";
|
|
|
2
2
|
import { S as Message, ot as getChannelMessage, t as discord_exports } from "./discord-eZlimVfW.js";
|
|
3
3
|
import { i as resolveTimestampMs, n as formatDiscordUserTag, r as resolveDiscordSystemLocation } from "./format-D8TsaXxW.js";
|
|
4
4
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, m as resolveDiscordOwnerAccess, n as isDiscordGroupAllowedByPolicy } from "./allow-list-ek-1hMKN.js";
|
|
5
|
-
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-
|
|
6
|
-
import { l as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-
|
|
7
|
-
import "./thread-bindings-
|
|
8
|
-
import { n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-
|
|
9
|
-
import { c as resolveDiscordChannelInfo, l as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-
|
|
10
|
-
import { a as shouldIgnoreStaleDiscordRouteBinding, i as resolveDiscordEffectiveRoute, o as handleDiscordDmCommandDecision, r as resolveDiscordConversationRoute, s as resolveDiscordDmCommandAccess, t as buildDiscordRoutePeer } from "./route-resolution-
|
|
11
|
-
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
5
|
+
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-DHhS0ez3.js";
|
|
6
|
+
import { l as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-WU4duXKY.js";
|
|
7
|
+
import "./thread-bindings-CMpZjP50.js";
|
|
8
|
+
import { n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-DFIQqbYm.js";
|
|
9
|
+
import { c as resolveDiscordChannelInfo, l as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-9kaGF59d.js";
|
|
10
|
+
import { a as shouldIgnoreStaleDiscordRouteBinding, i as resolveDiscordEffectiveRoute, o as handleDiscordDmCommandDecision, r as resolveDiscordConversationRoute, s as resolveDiscordDmCommandAccess, t as buildDiscordRoutePeer } from "./route-resolution-BWErj5Cn.js";
|
|
11
|
+
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-BGUfyvOC.js";
|
|
12
12
|
import { logDebug, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
13
13
|
import { getChildLogger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
14
14
|
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-8S_HKJpQ.js").then((n) => n.t);
|
|
32
32
|
return await discordSendRuntimePromise;
|
|
33
33
|
}
|
|
34
34
|
async function resolveDiscordDmPreflightAccess(params) {
|
|
@@ -428,19 +428,19 @@ let preflightAudioRuntimePromise;
|
|
|
428
428
|
let systemEventsRuntimePromise;
|
|
429
429
|
let discordThreadingRuntimePromise;
|
|
430
430
|
async function loadPluralKitRuntime() {
|
|
431
|
-
pluralkitRuntimePromise ??= import("./pluralkit-
|
|
431
|
+
pluralkitRuntimePromise ??= import("./pluralkit-OFss_pIy.js").then((n) => n.n);
|
|
432
432
|
return await pluralkitRuntimePromise;
|
|
433
433
|
}
|
|
434
434
|
async function loadPreflightAudioRuntime() {
|
|
435
|
-
preflightAudioRuntimePromise ??= import("./preflight-audio-
|
|
435
|
+
preflightAudioRuntimePromise ??= import("./preflight-audio-CRmUxxuM.js");
|
|
436
436
|
return await preflightAudioRuntimePromise;
|
|
437
437
|
}
|
|
438
438
|
async function loadSystemEventsRuntime() {
|
|
439
|
-
systemEventsRuntimePromise ??= import("./system-events-
|
|
439
|
+
systemEventsRuntimePromise ??= import("./system-events-_fzSG--3.js");
|
|
440
440
|
return await systemEventsRuntimePromise;
|
|
441
441
|
}
|
|
442
442
|
async function loadDiscordThreadingRuntime() {
|
|
443
|
-
discordThreadingRuntimePromise ??= import("./threading-
|
|
443
|
+
discordThreadingRuntimePromise ??= import("./threading-BMmpA2JR.js").then((n) => n.t);
|
|
444
444
|
return await discordThreadingRuntimePromise;
|
|
445
445
|
}
|
|
446
446
|
function isPreflightAborted(abortSignal) {
|