@openclaw/discord 2026.5.16-beta.3 → 2026.5.16-beta.5
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/{account-inspect-B_N30NV0.js → account-inspect-DCXwNu_u.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-DnNVBDfc.js → accounts-ltxKLzxN.js} +4 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/api.js +17 -17
- package/dist/{approval-handler.runtime-CS97g4S1.js → approval-handler.runtime-CpNuGEHP.js} +3 -3
- package/dist/{audit-BZOw16KT.js → audit-CniGmJUL.js} +3 -3
- package/dist/{channel-DdqtpKwY.js → channel-BN96pzUF.js} +18 -18
- package/dist/{channel-actions-0dOFg3Mu.js → channel-actions-DRqDFJUk.js} +17 -10
- package/dist/{channel-actions.runtime-BB30vneH.js → channel-actions.runtime-DVnGrlsm.js} +32 -11
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-BwmvzHMR.js → channel.setup-D1j7U4B3.js} +4 -4
- package/dist/{components-Cgm7XT8-.js → components-KsP3ijoj.js} +36 -3
- package/dist/{config-schema-D0eb2vPJ.js → config-schema-jz2FX2x5.js} +4 -0
- package/dist/contract-api.js +7 -7
- package/dist/{conversation-identity-Dh8wIQ_K.js → conversation-identity-CYgemFy7.js} +2 -2
- package/dist/{directory-config-CW_JusGS.js → directory-config-B5jO6mjo.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-MrDSKsMf.js → directory-live-D5VrQBC7.js} +1 -1
- package/dist/{doctor-CWTWiBru.js → doctor-CzcS8Yt1.js} +5 -5
- package/dist/{doctor-contract-ftWAMvBl.js → doctor-contract-AkgUZQHW.js} +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-DOW3XfEG.js → handle-action.guild-admin-CqCngm8I.js} +1 -1
- package/dist/inbound-event-delivery-D8zHG9Lz.js +65 -0
- package/dist/{manager.runtime-BU2-AM3y.js → manager.runtime-M7DBhy6O.js} +4 -4
- package/dist/{message-handler-CgU3pJi2.js → message-handler-COfX_LVy.js} +7 -7
- package/dist/{message-handler.preflight-DFw-r_C5.js → message-handler.preflight-C8r_m521.js} +28 -14
- package/dist/{message-handler.process-Ce7Xh_dH.js → message-handler.process-C-2YTjrL.js} +139 -34
- package/dist/{message-utils-CY91O2k2.js → message-utils-BZriBbcg.js} +2 -2
- package/dist/{outbound-adapter-Fe4Ee_GO.js → outbound-adapter-C54-43UU.js} +35 -8
- package/dist/{preflight-audio-DFGpAvzi.js → preflight-audio-B0keJeQe.js} +1 -1
- package/dist/{probe-CiBYm-vD.js → probe-BLDNbk41.js} +1 -1
- package/dist/{probe.runtime-9hi1GYNU.js → probe.runtime-DKB38YvU.js} +1 -1
- package/dist/{provider-C4J1o-3R.js → provider-BdUg28Bu.js} +48 -34
- package/dist/{provider-session.runtime-Y2zL_aqr.js → provider-session.runtime-B0l5ERJI.js} +3 -3
- package/dist/provider.runtime-BXfPVafJ.js +2 -0
- package/dist/{resolve-allowlist-common-DybgkAjk.js → resolve-allowlist-common-C8L5MYFl.js} +1 -1
- package/dist/{resolve-channels-u7_agBcm.js → resolve-channels-AxDQ4jXh.js} +1 -1
- package/dist/{resolve-users-Bc25I6OP.js → resolve-users-D7w0icpA.js} +1 -1
- package/dist/{runtime-ToiiUiXe.js → runtime-CqTcWrem.js} +7 -7
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +22 -22
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-Vhw0bH2K.js +5 -0
- package/dist/runtime-api.monitor.js +5 -5
- 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-CLPZKYi4.js → security-audit-Dx3j4a0l.js} +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit.runtime-CCm9leFJ.js → security-audit.runtime-C5nnf0k8.js} +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-CvXckvRn.js → send-DuW4qqIK.js} +3 -3
- package/dist/{send.components-BlNbbG3H.js → send.components-BjAjvjmT.js} +4 -4
- package/dist/{send.outbound-BKh71kjw.js → send.outbound-PAYV11wW.js} +3 -3
- package/dist/{send.shared-Bdj-DP6-.js → send.shared-CJ6oJrVc.js} +2 -2
- package/dist/session-key-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-LuaeDRhK.js → shared-CYe5A_Bs.js} +9 -9
- package/dist/{subagent-hooks-vwV-pjIA.js → subagent-hooks-CnPSppNz.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{target-resolver-BsGT9hI7.js → target-resolver-CgtNlbhO.js} +2 -2
- package/dist/{targets-DwW6OieO.js → targets-Z4SW2zZs.js} +1 -1
- package/dist/test-api.js +4 -4
- package/dist/{thread-bindings-BwcE40jS.js → thread-bindings-CXZ2h9DB.js} +5 -5
- package/dist/{thread-bindings.discord-api-BtXi8-Fz.js → thread-bindings.discord-api-_zMU4M2x.js} +4 -4
- package/dist/{thread-bindings.manager-BL5QlX3G.js → thread-bindings.manager-XKdkYEit.js} +3 -3
- package/dist/{thread-bindings.session-updates-ZnRRzzgf.js → thread-bindings.session-updates-CgOqEOPe.js} +1 -1
- package/dist/timeouts.js +1 -1
- package/dist/{typing-C_8U8J7E.js → typing-DudlJ-Fv.js} +1 -1
- package/openclaw.plugin.json +14 -0
- package/package.json +4 -4
- package/dist/provider.runtime-DMPCr3Hh.js +0 -2
- package/dist/runtime-api.monitor-dlMXA_pv.js +0 -5
- /package/dist/{agent-components.runtime-CEMbMQcQ.js → agent-components.runtime-BIemD2Iz.js} +0 -0
- /package/dist/{inbound-context-BdfOEkhj.js → inbound-context-CzEAvKgx.js} +0 -0
- /package/dist/{pluralkit-B2AqgTHV.js → pluralkit-BHV93ojA.js} +0 -0
- /package/dist/{preflight-audio.runtime-Drc-OFcp.js → preflight-audio.runtime-DT1Hmhsq.js} +0 -0
- /package/dist/{preview-streaming-CXTZydhx.js → preview-streaming-nClS_TQx.js} +0 -0
- /package/dist/{secret-config-contract-B3347_eU.js → secret-config-contract-57_WV6qt.js} +0 -0
- /package/dist/{security-contract-DyCRvz_Q.js → security-contract-BWDASKVo.js} +0 -0
- /package/dist/{security-doctor-Cp-NqNdS.js → security-doctor-DepqtNCI.js} +0 -0
- /package/dist/{sender-identity-BTGL3VbF.js → sender-identity-DC0FdEcU.js} +0 -0
- /package/dist/{session-contract-ugfEa9Xc.js → session-contract-Dwhw3RTY.js} +0 -0
- /package/dist/{session-key-normalization-B7h83qD2.js → session-key-normalization-DnCXUKGA.js} +0 -0
- /package/dist/{system-events-Bnit0zkQ.js → system-events-CEehp53f.js} +0 -0
- /package/dist/{thread-bindings.state-BdBeo7Rx.js → thread-bindings.state-CSphZOiL.js} +0 -0
- /package/dist/{timeouts-snXNwR4m.js → timeouts-CEwuGaWT.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as mergeDiscordAccountConfig, l as resolveDiscordAccountConfig, o as resolveDefaultDiscordAccountId } from "./accounts-
|
|
1
|
+
import { a as mergeDiscordAccountConfig, l as resolveDiscordAccountConfig, o as resolveDefaultDiscordAccountId } from "./accounts-ltxKLzxN.js";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
3
3
|
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
1
|
+
import { t as inspectDiscordAccount } from "./account-inspect-DCXwNu_u.js";
|
|
2
2
|
//#region extensions/discord/account-inspect-api.ts
|
|
3
3
|
function inspectDiscordReadOnlyAccount(cfg, accountId) {
|
|
4
4
|
return inspectDiscordAccount({
|
|
@@ -95,7 +95,10 @@ function resolveDiscordToken(cfg, opts = {}) {
|
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region extensions/discord/src/accounts.ts
|
|
98
|
-
const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("discord"
|
|
98
|
+
const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("discord", { implicitDefaultAccount: {
|
|
99
|
+
channelKeys: ["token"],
|
|
100
|
+
envVars: ["DISCORD_BOT_TOKEN"]
|
|
101
|
+
} });
|
|
99
102
|
const listDiscordAccountIds = listAccountIds;
|
|
100
103
|
const resolveDefaultDiscordAccountId = resolveDefaultAccountId;
|
|
101
104
|
function resolveDiscordAccountConfig(cfg, accountId) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-CqTcWrem.js";
|
|
2
2
|
export { handleDiscordAction };
|
package/dist/api.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { Ht as parseDiscordTarget, Ut as resolveDiscordChannelId, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId, o as normalizeDiscordOutboundTarget } from "./send.receipt-nKLxvA1s.js";
|
|
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-
|
|
3
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
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-
|
|
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-ltxKLzxN.js";
|
|
3
|
+
import { t as inspectDiscordAccount } from "./account-inspect-DCXwNu_u.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-KsP3ijoj.js";
|
|
5
5
|
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-DgQLz1wq.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-
|
|
10
|
-
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-
|
|
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-
|
|
16
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
17
|
-
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-
|
|
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-
|
|
6
|
+
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-CgtNlbhO.js";
|
|
7
|
+
import "./targets-Z4SW2zZs.js";
|
|
8
|
+
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CYgemFy7.js";
|
|
9
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-BN96pzUF.js";
|
|
10
|
+
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-DnCXUKGA.js";
|
|
11
|
+
import { t as discordSetupPlugin } from "./channel.setup-D1j7U4B3.js";
|
|
12
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-CnPSppNz.js";
|
|
13
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CqCngm8I.js";
|
|
14
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-B5jO6mjo.js";
|
|
15
|
+
import { t as fetchPluralKitMessageInfo } from "./pluralkit-BHV93ojA.js";
|
|
16
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BLDNbk41.js";
|
|
17
|
+
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Dx3j4a0l.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-CEwuGaWT.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-DVnGrlsm.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
1
|
import { B as Container, J as Separator, K as Row, M as serializePayload, R as Button, Wt as __exportAll, X as TextDisplay, ft as editChannelMessage, nt as createUserDmChannel, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-nKLxvA1s.js";
|
|
2
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
3
|
-
import { M as createDiscordClient, b as stripUndefinedFields } from "./send.shared-
|
|
4
|
-
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-DCXwNu_u.js";
|
|
3
|
+
import { M as createDiscordClient, b as stripUndefinedFields } from "./send.shared-CJ6oJrVc.js";
|
|
4
|
+
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CYgemFy7.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ButtonStyle } from "discord-api-types/v10";
|
|
7
7
|
import { logDebug, logError } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Wt as __exportAll } from "./send.receipt-nKLxvA1s.js";
|
|
2
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
3
|
-
import { E as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
4
|
-
import "./send-
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-DCXwNu_u.js";
|
|
3
|
+
import { E as fetchChannelPermissionsDiscord } from "./send.shared-CJ6oJrVc.js";
|
|
4
|
+
import "./send-DuW4qqIK.js";
|
|
5
5
|
import { n as collectDiscordAuditChannelIdsForAccount, t as auditDiscordChannelPermissionsWithFetcher } from "./audit-core-DRyoXREU.js";
|
|
6
6
|
//#region extensions/discord/src/audit.ts
|
|
7
7
|
var audit_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Ht as parseDiscordTarget, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId } from "./send.receipt-nKLxvA1s.js";
|
|
2
|
-
import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-
|
|
2
|
+
import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-ltxKLzxN.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-JudoSiJv.js";
|
|
4
|
-
import { x as resolveDiscordOutboundSessionRoute } from "./components-
|
|
4
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-KsP3ijoj.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-Tqtvj5GX.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-CYgemFy7.js";
|
|
7
7
|
import { r as resolveRequiredDiscordChannelPermissions } from "./audit-core-DRyoXREU.js";
|
|
8
|
-
import { t as discordMessageActions$1 } from "./channel-actions-
|
|
9
|
-
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
10
|
-
import { n as discordOutbound } from "./outbound-adapter-
|
|
11
|
-
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-
|
|
12
|
-
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-
|
|
8
|
+
import { t as discordMessageActions$1 } from "./channel-actions-DRqDFJUk.js";
|
|
9
|
+
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-CgOqEOPe.js";
|
|
10
|
+
import { n as discordOutbound } from "./outbound-adapter-C54-43UU.js";
|
|
11
|
+
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-CYe5A_Bs.js";
|
|
12
|
+
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-DnCXUKGA.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";
|
|
@@ -126,29 +126,29 @@ let discordProbeRuntimePromise;
|
|
|
126
126
|
let discordAuditModulePromise;
|
|
127
127
|
let discordSendModulePromise;
|
|
128
128
|
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-
|
|
133
|
-
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-
|
|
129
|
+
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-B5jO6mjo.js").then((n) => n.t));
|
|
130
|
+
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-AxDQ4jXh.js").then((n) => n.n));
|
|
131
|
+
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-D7w0icpA.js").then((n) => n.n));
|
|
132
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-XKdkYEit.js").then((n) => n.a));
|
|
133
|
+
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-CgtNlbhO.js").then((n) => n.r));
|
|
134
134
|
async function loadDiscordProviderRuntime() {
|
|
135
|
-
discordProviderRuntimePromise ??= import("./provider.runtime-
|
|
135
|
+
discordProviderRuntimePromise ??= import("./provider.runtime-BXfPVafJ.js");
|
|
136
136
|
return await discordProviderRuntimePromise;
|
|
137
137
|
}
|
|
138
138
|
async function loadDiscordProbeRuntime() {
|
|
139
|
-
discordProbeRuntimePromise ??= import("./probe.runtime-
|
|
139
|
+
discordProbeRuntimePromise ??= import("./probe.runtime-DKB38YvU.js");
|
|
140
140
|
return await discordProbeRuntimePromise;
|
|
141
141
|
}
|
|
142
142
|
async function loadDiscordAuditModule() {
|
|
143
|
-
discordAuditModulePromise ??= import("./audit-
|
|
143
|
+
discordAuditModulePromise ??= import("./audit-CniGmJUL.js").then((n) => n.n);
|
|
144
144
|
return await discordAuditModulePromise;
|
|
145
145
|
}
|
|
146
146
|
async function loadDiscordSendModule() {
|
|
147
|
-
discordSendModulePromise ??= import("./send-
|
|
147
|
+
discordSendModulePromise ??= import("./send-DuW4qqIK.js").then((n) => n.t);
|
|
148
148
|
return await discordSendModulePromise;
|
|
149
149
|
}
|
|
150
150
|
async function loadDiscordDirectoryLiveModule() {
|
|
151
|
-
discordDirectoryLiveModulePromise ??= import("./directory-live-
|
|
151
|
+
discordDirectoryLiveModulePromise ??= import("./directory-live-D5VrQBC7.js").then((n) => n.t);
|
|
152
152
|
return await discordDirectoryLiveModulePromise;
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-
|
|
2
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
1
|
+
import { r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-ltxKLzxN.js";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-DCXwNu_u.js";
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-KsP3ijoj.js";
|
|
4
|
+
import { i as withDiscordInboundEventDeliveryMetadata } from "./inbound-event-delivery-D8zHG9Lz.js";
|
|
4
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
6
|
import { createUnionActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
6
7
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
7
8
|
//#region extensions/discord/src/channel-actions.ts
|
|
8
9
|
let discordChannelActionsRuntimePromise;
|
|
9
10
|
async function loadDiscordChannelActionsRuntime() {
|
|
10
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-
|
|
11
|
+
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-DVnGrlsm.js");
|
|
11
12
|
return await discordChannelActionsRuntimePromise;
|
|
12
13
|
}
|
|
13
14
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
@@ -125,6 +126,10 @@ const discordMessageActions = {
|
|
|
125
126
|
},
|
|
126
127
|
prepareSendPayload: ({ ctx, payload }) => {
|
|
127
128
|
if (ctx.action !== "send") return null;
|
|
129
|
+
const payloadWithDeliveryMetadata = withDiscordInboundEventDeliveryMetadata(payload, {
|
|
130
|
+
sessionKey: ctx.sessionKey,
|
|
131
|
+
inboundEventKind: ctx.inboundEventKind
|
|
132
|
+
});
|
|
128
133
|
const rawComponents = ctx.params.components;
|
|
129
134
|
if (typeof rawComponents === "function") return null;
|
|
130
135
|
const componentSpec = rawComponents && typeof rawComponents === "object" && !Array.isArray(rawComponents) ? readDiscordComponentSpec(rawComponents) : void 0;
|
|
@@ -132,12 +137,12 @@ const discordMessageActions = {
|
|
|
132
137
|
const embeds = Array.isArray(ctx.params.embeds) ? ctx.params.embeds : void 0;
|
|
133
138
|
if ((componentSpec || nativeComponents) && embeds?.length) return null;
|
|
134
139
|
const filename = normalizeOptionalString(ctx.params.filename);
|
|
135
|
-
if (!componentSpec && !nativeComponents && !embeds?.length && !filename) return
|
|
136
|
-
const discordData =
|
|
140
|
+
if (!componentSpec && !nativeComponents && !embeds?.length && !filename) return payloadWithDeliveryMetadata;
|
|
141
|
+
const discordData = payloadWithDeliveryMetadata.channelData?.discord && typeof payloadWithDeliveryMetadata.channelData.discord === "object" && !Array.isArray(payloadWithDeliveryMetadata.channelData.discord) ? payloadWithDeliveryMetadata.channelData.discord : {};
|
|
137
142
|
return {
|
|
138
|
-
...
|
|
143
|
+
...payloadWithDeliveryMetadata,
|
|
139
144
|
channelData: {
|
|
140
|
-
...
|
|
145
|
+
...payloadWithDeliveryMetadata.channelData,
|
|
141
146
|
discord: {
|
|
142
147
|
...discordData,
|
|
143
148
|
...componentSpec ? { components: componentSpec } : {},
|
|
@@ -148,7 +153,7 @@ const discordMessageActions = {
|
|
|
148
153
|
}
|
|
149
154
|
};
|
|
150
155
|
},
|
|
151
|
-
handleAction: async ({ action, params, cfg, accountId, requesterSenderId, toolContext, mediaAccess, mediaLocalRoots, mediaReadFile }) => {
|
|
156
|
+
handleAction: async ({ action, params, cfg, accountId, requesterSenderId, toolContext, mediaAccess, mediaLocalRoots, mediaReadFile, sessionKey, inboundEventKind }) => {
|
|
152
157
|
return await (await loadDiscordChannelActionsRuntime()).handleDiscordMessageAction({
|
|
153
158
|
action,
|
|
154
159
|
params,
|
|
@@ -158,7 +163,9 @@ const discordMessageActions = {
|
|
|
158
163
|
toolContext,
|
|
159
164
|
mediaAccess,
|
|
160
165
|
mediaLocalRoots,
|
|
161
|
-
mediaReadFile
|
|
166
|
+
mediaReadFile,
|
|
167
|
+
...sessionKey ? { sessionKey } : {},
|
|
168
|
+
...inboundEventKind ? { inboundEventKind } : {}
|
|
162
169
|
});
|
|
163
170
|
}
|
|
164
171
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Ut as resolveDiscordChannelId } from "./send.receipt-nKLxvA1s.js";
|
|
2
|
-
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-
|
|
3
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
4
|
-
import "./targets-
|
|
2
|
+
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-KsP3ijoj.js";
|
|
3
|
+
import { t as handleDiscordAction } from "./runtime-CqTcWrem.js";
|
|
4
|
+
import "./targets-Z4SW2zZs.js";
|
|
5
5
|
import "./action-runtime-api.js";
|
|
6
|
-
import {
|
|
6
|
+
import { r as notifyDiscordInboundEventOutboundSuccess } from "./inbound-event-delivery-D8zHG9Lz.js";
|
|
7
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CqCngm8I.js";
|
|
7
8
|
import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
9
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
9
10
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -24,6 +25,12 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
24
25
|
mediaLocalRoots: ctx.mediaLocalRoots,
|
|
25
26
|
mediaReadFile: ctx.mediaReadFile
|
|
26
27
|
};
|
|
28
|
+
const notifyVisibleOutbound = (to, fallbackSessionKey) => notifyDiscordInboundEventOutboundSuccess({
|
|
29
|
+
sessionKey: ctx.sessionKey ?? fallbackSessionKey ?? void 0,
|
|
30
|
+
to,
|
|
31
|
+
accountId,
|
|
32
|
+
inboundEventKind: ctx.inboundEventKind
|
|
33
|
+
});
|
|
27
34
|
const readTarget = () => {
|
|
28
35
|
const target = readStringParam(params, "channelId") ?? readStringParam(params, "to") ?? readCurrentDiscordTarget(ctx.toolContext);
|
|
29
36
|
if (!target) throw new Error("Discord channel target is required (use channel:<id>).");
|
|
@@ -55,7 +62,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
55
62
|
const sessionKey = readStringParam(params, "__sessionKey");
|
|
56
63
|
const agentId = readStringParam(params, "__agentId");
|
|
57
64
|
const threadName = readStringParam(params, "threadName");
|
|
58
|
-
|
|
65
|
+
const result = await handleDiscordAction({
|
|
59
66
|
action: "sendMessage",
|
|
60
67
|
accountId: accountId ?? void 0,
|
|
61
68
|
to,
|
|
@@ -72,6 +79,8 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
72
79
|
__sessionKey: sessionKey ?? void 0,
|
|
73
80
|
__agentId: agentId ?? void 0
|
|
74
81
|
}, cfg, actionOptions);
|
|
82
|
+
notifyVisibleOutbound(to, sessionKey);
|
|
83
|
+
return result;
|
|
75
84
|
}
|
|
76
85
|
if (action === "upload-file") {
|
|
77
86
|
const to = readSendTarget();
|
|
@@ -84,7 +93,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
84
93
|
const suppressEmbeds = readBooleanParam(params, "suppressEmbeds");
|
|
85
94
|
const sessionKey = readStringParam(params, "__sessionKey");
|
|
86
95
|
const agentId = readStringParam(params, "__agentId");
|
|
87
|
-
|
|
96
|
+
const result = await handleDiscordAction({
|
|
88
97
|
action: "sendMessage",
|
|
89
98
|
accountId: accountId ?? void 0,
|
|
90
99
|
to,
|
|
@@ -97,6 +106,8 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
97
106
|
__sessionKey: sessionKey ?? void 0,
|
|
98
107
|
__agentId: agentId ?? void 0
|
|
99
108
|
}, cfg, actionOptions);
|
|
109
|
+
notifyVisibleOutbound(to, sessionKey);
|
|
110
|
+
return result;
|
|
100
111
|
}
|
|
101
112
|
if (action === "poll") {
|
|
102
113
|
const to = readStringParam(params, "to", { required: true });
|
|
@@ -107,7 +118,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
107
118
|
integer: true,
|
|
108
119
|
strict: true
|
|
109
120
|
});
|
|
110
|
-
|
|
121
|
+
const result = await handleDiscordAction({
|
|
111
122
|
action: "poll",
|
|
112
123
|
accountId: accountId ?? void 0,
|
|
113
124
|
to,
|
|
@@ -117,6 +128,8 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
117
128
|
durationHours: durationHours ?? void 0,
|
|
118
129
|
content: readStringParam(params, "message")
|
|
119
130
|
}, cfg, actionOptions);
|
|
131
|
+
notifyVisibleOutbound(to);
|
|
132
|
+
return result;
|
|
120
133
|
}
|
|
121
134
|
if (action === "react") {
|
|
122
135
|
const messageId = normalizeOptionalStringifiedId(resolveReactionMessageId({
|
|
@@ -198,7 +211,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
198
211
|
const content = readStringParam(params, "message");
|
|
199
212
|
const autoArchiveMinutes = readNumberParam(params, "autoArchiveMin", { integer: true });
|
|
200
213
|
const appliedTags = readStringArrayParam(params, "appliedTags");
|
|
201
|
-
|
|
214
|
+
const result = await handleDiscordAction({
|
|
202
215
|
action: "threadCreate",
|
|
203
216
|
accountId: accountId ?? void 0,
|
|
204
217
|
channelId: resolveChannelId(),
|
|
@@ -208,19 +221,24 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
208
221
|
autoArchiveMinutes,
|
|
209
222
|
appliedTags: appliedTags ?? void 0
|
|
210
223
|
}, cfg, actionOptions);
|
|
224
|
+
notifyVisibleOutbound(resolveChannelId());
|
|
225
|
+
return result;
|
|
211
226
|
}
|
|
212
227
|
if (action === "sticker") {
|
|
228
|
+
const to = readStringParam(params, "to", { required: true });
|
|
213
229
|
const stickerIds = readStringArrayParam(params, "stickerId", {
|
|
214
230
|
required: true,
|
|
215
231
|
label: "sticker-id"
|
|
216
232
|
}) ?? [];
|
|
217
|
-
|
|
233
|
+
const result = await handleDiscordAction({
|
|
218
234
|
action: "sticker",
|
|
219
235
|
accountId: accountId ?? void 0,
|
|
220
|
-
to
|
|
236
|
+
to,
|
|
221
237
|
stickerIds,
|
|
222
238
|
content: readStringParam(params, "message")
|
|
223
239
|
}, cfg, actionOptions);
|
|
240
|
+
notifyVisibleOutbound(to);
|
|
241
|
+
return result;
|
|
224
242
|
}
|
|
225
243
|
if (action === "set-presence") return await handleDiscordAction({
|
|
226
244
|
action: "setPresence",
|
|
@@ -235,7 +253,10 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
235
253
|
ctx,
|
|
236
254
|
resolveChannelId
|
|
237
255
|
});
|
|
238
|
-
if (adminResult !== void 0)
|
|
256
|
+
if (adminResult !== void 0) {
|
|
257
|
+
if (action === "thread-reply") notifyVisibleOutbound(readStringParam(params, "threadId") ?? readTarget());
|
|
258
|
+
return adminResult;
|
|
259
|
+
}
|
|
239
260
|
throw new Error(`Action ${action} is not supported for provider ${providerId}.`);
|
|
240
261
|
}
|
|
241
262
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DiscordChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as DiscordChannelConfigSchema } from "./config-schema-jz2FX2x5.js";
|
|
2
2
|
export { DiscordChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./channel-
|
|
1
|
+
import { t as discordPlugin } from "./channel-BN96pzUF.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, m as resolveDiscordToken, o as resolveDefaultDiscordAccountId } from "./accounts-
|
|
2
|
-
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-
|
|
3
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
4
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
1
|
+
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, m as resolveDiscordToken, o as resolveDefaultDiscordAccountId } from "./accounts-ltxKLzxN.js";
|
|
2
|
+
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-CYe5A_Bs.js";
|
|
3
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-AxDQ4jXh.js";
|
|
4
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-D7w0icpA.js";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -4,7 +4,7 @@ import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing";
|
|
|
4
4
|
import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
|
|
5
5
|
import { ButtonStyle, MessageFlags, TextInputStyle } from "discord-api-types/v10";
|
|
6
6
|
import crypto from "node:crypto";
|
|
7
|
-
import {
|
|
7
|
+
import { reduceInteractiveReply } from "openclaw/plugin-sdk/interactive-runtime";
|
|
8
8
|
//#region extensions/discord/src/outbound-session-route.ts
|
|
9
9
|
function resolveDiscordOutboundSessionRoute(params) {
|
|
10
10
|
const parsed = parseDiscordTarget(params.target, { defaultKind: resolveDiscordOutboundTargetKindHint(params) });
|
|
@@ -778,6 +778,9 @@ function resolveDiscordInteractiveButtonStyle(style) {
|
|
|
778
778
|
return style ?? "secondary";
|
|
779
779
|
}
|
|
780
780
|
const DISCORD_INTERACTIVE_BUTTON_ROW_SIZE = 5;
|
|
781
|
+
/**
|
|
782
|
+
* @deprecated Use buildDiscordPresentationComponents with MessagePresentation.
|
|
783
|
+
*/
|
|
781
784
|
function buildDiscordInteractiveComponents(interactive) {
|
|
782
785
|
const blocks = reduceInteractiveReply(interactive, [], (state, block) => {
|
|
783
786
|
if (block.type === "text") {
|
|
@@ -840,10 +843,40 @@ function buildDiscordPresentationComponents(presentation) {
|
|
|
840
843
|
continue;
|
|
841
844
|
}
|
|
842
845
|
}
|
|
843
|
-
const
|
|
844
|
-
|
|
846
|
+
for (const block of presentation.blocks) {
|
|
847
|
+
if (block.type === "buttons") {
|
|
848
|
+
appendDiscordPresentationButtonBlocks(spec, block.buttons);
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
if (block.type === "select" && block.options.length > 0) spec.blocks?.push({
|
|
852
|
+
type: "actions",
|
|
853
|
+
select: {
|
|
854
|
+
type: "string",
|
|
855
|
+
placeholder: block.placeholder,
|
|
856
|
+
options: block.options.map((option) => ({
|
|
857
|
+
label: option.label,
|
|
858
|
+
value: option.value
|
|
859
|
+
}))
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
}
|
|
845
863
|
return spec.blocks?.length ? spec : void 0;
|
|
846
864
|
}
|
|
865
|
+
function appendDiscordPresentationButtonBlocks(spec, buttons) {
|
|
866
|
+
if (buttons.length === 0) return;
|
|
867
|
+
for (let index = 0; index < buttons.length; index += DISCORD_INTERACTIVE_BUTTON_ROW_SIZE) spec.blocks?.push({
|
|
868
|
+
type: "actions",
|
|
869
|
+
buttons: buttons.slice(index, index + DISCORD_INTERACTIVE_BUTTON_ROW_SIZE).map((button) => {
|
|
870
|
+
const component = {
|
|
871
|
+
label: button.label,
|
|
872
|
+
style: button.url ? "link" : resolveDiscordInteractiveButtonStyle(button.style)
|
|
873
|
+
};
|
|
874
|
+
if (button.value) component.callbackData = button.value;
|
|
875
|
+
if (button.url) component.url = button.url;
|
|
876
|
+
return component;
|
|
877
|
+
})
|
|
878
|
+
});
|
|
879
|
+
}
|
|
847
880
|
//#endregion
|
|
848
881
|
//#region extensions/discord/src/components.ts
|
|
849
882
|
var components_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -82,6 +82,10 @@ const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordConfigSchema,
|
|
|
82
82
|
label: "Discord Progress Max Lines",
|
|
83
83
|
help: "Maximum number of compact progress lines to keep below the draft label (default: 8)."
|
|
84
84
|
},
|
|
85
|
+
"streaming.progress.maxLineChars": {
|
|
86
|
+
label: "Discord Progress Max Line Chars",
|
|
87
|
+
help: "Maximum characters per compact progress line before truncation (default: 120). Prose cuts at word boundaries; commands and paths keep useful suffixes."
|
|
88
|
+
},
|
|
85
89
|
"streaming.progress.toolProgress": {
|
|
86
90
|
label: "Discord Progress Tool Lines",
|
|
87
91
|
help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery."
|
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-AkgUZQHW.js";
|
|
2
|
+
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-57_WV6qt.js";
|
|
3
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-BWDASKVo.js";
|
|
4
|
+
import { t as deriveLegacySessionChatType } from "./session-contract-Dwhw3RTY.js";
|
|
5
|
+
import { r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-XKdkYEit.js";
|
|
6
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-B5jO6mjo.js";
|
|
7
|
+
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Dx3j4a0l.js";
|
|
8
8
|
export { collectDiscordSecurityAuditFindings, collectRuntimeConfigAssignments, collectUnsupportedSecretRefConfigCandidates, createThreadBindingManager, deriveLegacySessionChatType, __testing as discordThreadBindingTesting, legacyConfigRules, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, normalizeCompatibilityConfig, secretTargetRegistryEntries, unsupportedSecretRefSurfacePatterns };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ht as parseDiscordTarget } from "./send.receipt-nKLxvA1s.js";
|
|
2
|
-
import { r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-
|
|
2
|
+
import { r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-ltxKLzxN.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";
|
|
5
5
|
import { createChannelApproverDmTargetResolver, createChannelNativeOriginTargetResolver, doesApprovalRequestMatchChannelAccount, resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-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-CpNuGEHP.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
233
233
|
})
|
|
234
234
|
});
|
|
235
235
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Wt as __exportAll } from "./send.receipt-nKLxvA1s.js";
|
|
2
|
-
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, o as resolveDefaultDiscordAccountId } from "./accounts-
|
|
2
|
+
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, o as resolveDefaultDiscordAccountId } from "./accounts-ltxKLzxN.js";
|
|
3
3
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
5
5
|
//#region extensions/discord/src/directory-config.ts
|
|
@@ -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-B5jO6mjo.js";
|
|
2
2
|
export { listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Wt as __exportAll } from "./send.receipt-nKLxvA1s.js";
|
|
2
|
-
import { p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-
|
|
2
|
+
import { p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-ltxKLzxN.js";
|
|
3
3
|
import { n as fetchDiscord } from "./api-DgQLz1wq.js";
|
|
4
4
|
import { a as normalizeDiscordSlug } from "./allow-list-CBI-M84K.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as resolveDefaultDiscordAccountId } from "./accounts-
|
|
2
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
3
|
-
import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-
|
|
4
|
-
import { n as normalizeCompatibilityConfig } from "./doctor-contract-
|
|
5
|
-
import { t as isDiscordMutableAllowEntry } from "./security-doctor-
|
|
1
|
+
import { o as resolveDefaultDiscordAccountId } from "./accounts-ltxKLzxN.js";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-DCXwNu_u.js";
|
|
3
|
+
import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-CYe5A_Bs.js";
|
|
4
|
+
import { n as normalizeCompatibilityConfig } from "./doctor-contract-AkgUZQHW.js";
|
|
5
|
+
import { t as isDiscordMutableAllowEntry } from "./security-doctor-DepqtNCI.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-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-nClS_TQx.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-AkgUZQHW.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/{handle-action.guild-admin-DOW3XfEG.js → handle-action.guild-admin-CqCngm8I.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-CqTcWrem.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";
|