@openclaw/discord 2026.6.8-beta.2 → 2026.6.9-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 +13 -13
- package/dist/{approval-handler.runtime-B3gyUd-L.js → approval-handler.runtime-BprBDUQG.js} +3 -3
- package/dist/{audit-BlfewK04.js → audit-DuZUxGjM.js} +3 -3
- package/dist/{channel-b0hY1EJw.js → channel--3YhTUOb.js} +27 -19
- package/dist/{channel-actions-BnPHwCZ_.js → channel-actions-CoudAyAB.js} +12 -6
- package/dist/{channel-actions.runtime-DX5iW6ut.js → channel-actions.runtime-DdOfD3fi.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-By5cfELZ.js → channel.setup-C-y6Jifd.js} +2 -2
- package/dist/{components-D-CYw0-b.js → components-CUmrNvv-.js} +1 -1
- package/dist/{conversation-identity-CKzQAqFF.js → conversation-identity-CN-HPn11.js} +2 -2
- package/dist/{directory-config-Bu7FYOsl.js → directory-config-BCt5KxcX.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-LjENjK6L.js → directory-live-CE7IDmwo.js} +1 -1
- package/dist/{handle-action.guild-admin-BS2qnhXF.js → handle-action.guild-admin-B7SnVS0m.js} +14 -9
- package/dist/index.js +1 -1
- package/dist/{manager.runtime-BU1vkOeO.js → manager.runtime-zMVwNPAT.js} +12 -4
- package/dist/{message-handler-CQVkXHMN.js → message-handler-DE413Oj4.js} +6 -6
- package/dist/{message-handler.preflight-DAnLOeDA.js → message-handler.preflight-BuF-DsE2.js} +10 -10
- package/dist/{message-handler.process-Dp5NQT05.js → message-handler.process-BX8HsMfV.js} +37 -23
- package/dist/{message-utils-Bx993JLN.js → message-utils-s_8KDqAQ.js} +1 -1
- package/dist/{outbound-adapter-CmN7ao1t.js → outbound-adapter-CNievjXH.js} +6 -6
- package/dist/{pluralkit-SYmlmerw.js → pluralkit-BXkU9XmC.js} +1 -1
- package/dist/{provider-DrScDA1p.js → provider-ByZ6xxgi.js} +85 -56
- package/dist/{provider-session.runtime-DXTzSYOJ.js → provider-session.runtime-DMfaQ9Z6.js} +3 -3
- package/dist/provider.runtime-EW-G8l_U.js +2 -0
- package/dist/{resolve-channels-Rautpk8n.js → resolve-channels-t1URw0Qz.js} +1 -1
- package/dist/{resolve-users-Bw7vvtsi.js → resolve-users-Bapkb237.js} +1 -1
- package/dist/{runtime-C80YEJ7Z.js → runtime-C6jV3hf4.js} +24 -10
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +19 -19
- package/dist/runtime-api.lookup.js +4 -4
- package/dist/runtime-api.monitor-5BSxmucu.js +6 -0
- package/dist/runtime-api.monitor.js +4 -4
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-zGsXF-up.js → send-o-Y1DiAT.js} +3 -3
- package/dist/{send.components-ktzrUTkt.js → send.components-B4_oNcOh.js} +4 -4
- package/dist/{send.outbound-C8oC51um.js → send.outbound-DhiXV3UJ.js} +53 -10
- package/dist/{send.receipt-DsQWEQ2O.js → send.receipt-HXIwVvXy.js} +2 -1
- package/dist/{send.shared-Dvo2ZCVG.js → send.shared-DYdjs_Zh.js} +13 -5
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{subagent-hooks-kjrWDeDg.js → subagent-hooks-CbF_Z5F0.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-CvU3Aduf.js → system-events-BxTHlBbM.js} +1 -1
- package/dist/{target-resolver-DMPTzuo7.js → target-resolver-DpC8iueE.js} +2 -2
- package/dist/targets-BEIgHBHc.js +3 -0
- package/dist/{thread-bindings-DO32M2kW.js → thread-bindings-CEVvN75T.js} +4 -4
- package/dist/{thread-bindings.discord-api-304M1PMr.js → thread-bindings.discord-api-B8NfbxEB.js} +4 -4
- package/dist/{thread-bindings.manager-C9YT7wF2.js → thread-bindings.manager-BKfUaXGt.js} +3 -3
- package/dist/{transcripts-source-Chy2OrO_.js → transcripts-source-W6n_8J8g.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-BaivbXIG.js → typing-0-pUmlY9.js} +1 -1
- package/node_modules/undici/README.md +59 -18
- package/node_modules/undici/docs/docs/GettingStarted.md +278 -0
- package/node_modules/undici/docs/docs/api/Agent.md +3 -0
- package/node_modules/undici/docs/docs/api/BalancedPool.md +1 -1
- package/node_modules/undici/docs/docs/api/Client.md +44 -5
- package/node_modules/undici/docs/docs/api/Connector.md +1 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +28 -1
- package/node_modules/undici/docs/docs/api/Dispatcher.md +22 -5
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +6 -9
- package/node_modules/undici/docs/docs/api/Errors.md +12 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +50 -3
- package/node_modules/undici/docs/docs/api/Fetch.md +5 -3
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -3
- package/node_modules/undici/docs/docs/api/MockAgent.md +1 -1
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +1 -1
- package/node_modules/undici/docs/docs/api/Pool.md +4 -1
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +4 -1
- package/node_modules/undici/docs/docs/api/RetryAgent.md +3 -3
- package/node_modules/undici/docs/docs/api/RetryHandler.md +6 -6
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +1 -1
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +3 -3
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -0
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +4 -4
- package/node_modules/undici/lib/core/connect.js +29 -4
- package/node_modules/undici/lib/core/util.js +8 -6
- package/node_modules/undici/lib/dispatcher/client-h1.js +69 -2
- package/node_modules/undici/lib/dispatcher/client-h2.js +160 -37
- package/node_modules/undici/lib/dispatcher/client.js +36 -7
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +1 -0
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +2 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +4 -2
- package/node_modules/undici/lib/handler/redirect-handler.js +36 -11
- package/node_modules/undici/lib/interceptor/dns.js +4 -0
- package/node_modules/undici/lib/interceptor/redirect.js +3 -3
- package/node_modules/undici/lib/mock/mock-call-history.js +1 -1
- package/node_modules/undici/lib/mock/snapshot-agent.js +9 -1
- package/node_modules/undici/lib/util/cache.js +8 -2
- package/node_modules/undici/lib/web/cookies/parse.js +17 -25
- package/node_modules/undici/lib/web/eventsource/eventsource.js +7 -18
- package/node_modules/undici/lib/web/eventsource/util.js +32 -1
- package/node_modules/undici/lib/web/fetch/body.js +43 -0
- package/node_modules/undici/lib/web/fetch/index.js +17 -3
- package/node_modules/undici/lib/web/fetch/request.js +33 -3
- package/node_modules/undici/lib/web/websocket/receiver.js +20 -3
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
- package/node_modules/undici/lib/web/websocket/websocket.js +3 -1
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +5 -0
- package/node_modules/undici/types/connector.d.ts +1 -0
- package/node_modules/undici/types/fetch.d.ts +5 -1
- package/node_modules/undici/types/interceptors.d.ts +1 -1
- package/npm-shrinkwrap.json +7 -7
- package/package.json +5 -5
- package/dist/provider.runtime-nb-6cRoy.js +0 -2
- package/dist/runtime-api.monitor-D8KNDAd5.js +0 -6
- package/dist/targets-CKaNidbk.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-C6jV3hf4.js";
|
|
2
2
|
export { handleDiscordAction };
|
package/dist/api.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, Ut as resolveDiscordChannelId, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId, o as normalizeDiscordOutboundTarget } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, Ut as resolveDiscordChannelId, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId, o as normalizeDiscordOutboundTarget } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
3
|
import { a as mergeDiscordAccountConfig, f as resolveDiscordMaxLinesPerMessage, i as listEnabledDiscordAccounts, l as resolveDiscordAccountConfig, o as resolveDefaultDiscordAccountId, r as listDiscordAccountIds, s as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
|
|
4
|
-
import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForInteraction, c as buildDiscordComponentMessage, d as readDiscordComponentSpec, f as resolveDiscordComponentAttachmentName, g as buildDiscordModalCustomId, h as buildDiscordComponentCustomId, l as buildDiscordComponentMessageFlags, m as DISCORD_MODAL_CUSTOM_ID_KEY, n as formatDiscordComponentEventText, o as DiscordFormModal, p as DISCORD_COMPONENT_CUSTOM_ID_KEY, r as buildDiscordInteractiveComponents, s as createDiscordFormModal, u as DISCORD_COMPONENT_ATTACHMENT_PREFIX, v as parseDiscordComponentCustomIdForInteraction, y as parseDiscordModalCustomId } from "./components-
|
|
4
|
+
import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForInteraction, c as buildDiscordComponentMessage, d as readDiscordComponentSpec, f as resolveDiscordComponentAttachmentName, g as buildDiscordModalCustomId, h as buildDiscordComponentCustomId, l as buildDiscordComponentMessageFlags, m as DISCORD_MODAL_CUSTOM_ID_KEY, n as formatDiscordComponentEventText, o as DiscordFormModal, p as DISCORD_COMPONENT_CUSTOM_ID_KEY, r as buildDiscordInteractiveComponents, s as createDiscordFormModal, u as DISCORD_COMPONENT_ATTACHMENT_PREFIX, v as parseDiscordComponentCustomIdForInteraction, y as parseDiscordModalCustomId } from "./components-CUmrNvv-.js";
|
|
5
5
|
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-BmXlcjYW.js";
|
|
6
|
-
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-
|
|
7
|
-
import "./targets-
|
|
8
|
-
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-
|
|
9
|
-
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel
|
|
6
|
+
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-DpC8iueE.js";
|
|
7
|
+
import "./targets-BEIgHBHc.js";
|
|
8
|
+
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CN-HPn11.js";
|
|
9
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel--3YhTUOb.js";
|
|
10
|
+
import { i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as mergeAbortSignals, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C5TBc_9x.js";
|
|
10
11
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
11
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
12
|
-
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-
|
|
13
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
14
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
15
|
-
import { t as fetchPluralKitMessageInfo } from "./pluralkit-
|
|
12
|
+
import { t as discordSetupPlugin } from "./channel.setup-C-y6Jifd.js";
|
|
13
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-CbF_Z5F0.js";
|
|
14
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-B7SnVS0m.js";
|
|
15
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-BCt5KxcX.js";
|
|
16
|
+
import { t as fetchPluralKitMessageInfo } from "./pluralkit-BXkU9XmC.js";
|
|
16
17
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
|
|
17
18
|
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Bh_65L5C.js";
|
|
18
|
-
import { i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as mergeAbortSignals, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C5TBc_9x.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-DdOfD3fi.js")).handleDiscordMessageAction(...args);
|
|
22
22
|
//#endregion
|
|
23
23
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_COMPONENT_ATTACHMENT_PREFIX, DISCORD_COMPONENT_CUSTOM_ID_KEY, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DISCORD_MODAL_CUSTOM_ID_KEY, DiscordApiError, DiscordFormModal, buildDiscordComponentCustomId, buildDiscordComponentMessage, buildDiscordComponentMessageFlags, buildDiscordInteractiveComponents, buildDiscordModalCustomId, collectDiscordSecurityAuditFindings, collectDiscordStatusIssues, createDiscordActionGate, createDiscordFormModal, discordPlugin, discordSetupPlugin, fetchDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchPluralKitMessageInfo, formatDiscordComponentEventText, getDiscordExecApprovalApprovers, handleDiscordMessageAction, handleDiscordSubagentDeliveryTarget, handleDiscordSubagentEnded, handleDiscordSubagentSpawning, inspectDiscordAccount, isDiscordExecApprovalApprover, isDiscordExecApprovalClientEnabled, listDiscordAccountIds, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, listEnabledDiscordAccounts, looksLikeDiscordTargetId, mergeAbortSignals, mergeDiscordAccountConfig, normalizeDiscordMessagingTarget, normalizeDiscordOutboundTarget, normalizeExplicitDiscordSessionKey, parseApplicationIdFromToken, parseDiscordComponentCustomId, parseDiscordComponentCustomIdForInteraction as parseDiscordComponentCustomIdForCarbon, parseDiscordComponentCustomIdForInteraction, parseDiscordModalCustomId, parseDiscordModalCustomIdForInteraction as parseDiscordModalCustomIdForCarbon, parseDiscordModalCustomIdForInteraction, parseDiscordSendTarget, parseDiscordTarget, probeDiscord, readDiscordComponentSpec, requestDiscord, resolveDefaultDiscordAccountId, resolveDiscordAccount, resolveDiscordAccountConfig, resolveDiscordChannelId, resolveDiscordComponentAttachmentName, resolveDiscordGroupRequireMention, resolveDiscordGroupToolPolicy, resolveDiscordMaxLinesPerMessage, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordRuntimeGroupPolicy, resolveDiscordTarget, shouldSuppressLocalDiscordExecApprovalPrompt, tryHandleDiscordMessageActionGuildAdmin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as Container, J as Separator, K as Row, R as Button, Wt as __exportAll, X as TextDisplay, ft as editChannelMessage, j as serializePayload, nt as createUserDmChannel, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-
|
|
1
|
+
import { B as Container, J as Separator, K as Row, R as Button, Wt as __exportAll, X as TextDisplay, ft as editChannelMessage, j as serializePayload, nt as createUserDmChannel, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
|
-
import { F as createDiscordClient, b as stripUndefinedFields } from "./send.shared-
|
|
4
|
-
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-
|
|
3
|
+
import { F as createDiscordClient, b as stripUndefinedFields } from "./send.shared-DYdjs_Zh.js";
|
|
4
|
+
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CN-HPn11.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ButtonStyle } from "discord-api-types/v10";
|
|
7
7
|
import { logDebug, logError } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
|
-
import { O as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
4
|
-
import "./send-
|
|
3
|
+
import { O as fetchChannelPermissionsDiscord } from "./send.shared-DYdjs_Zh.js";
|
|
4
|
+
import "./send-o-Y1DiAT.js";
|
|
5
5
|
import { n as collectDiscordAuditChannelIdsForAccount, t as auditDiscordChannelPermissionsWithFetcher } from "./audit-core-xwjIczO0.js";
|
|
6
6
|
//#region extensions/discord/src/audit.ts
|
|
7
7
|
var audit_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { a as projectCredentialSnapshotFields, n as PAIRING_APPROVED_MESSAGE, o as resolveConfiguredFromCredentialStatuses, r as buildTokenChannelStatusSummary, t as DEFAULT_ACCOUNT_ID } from "./channel-api-CAJ0wMoV.js";
|
|
4
|
-
import { x as resolveDiscordOutboundSessionRoute } from "./components-
|
|
4
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-CUmrNvv-.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
|
-
import { c as shouldSuppressLocalDiscordExecApprovalPrompt, n as resolveDiscordCurrentConversationIdentity, r as getDiscordApprovalCapability } from "./conversation-identity-
|
|
6
|
+
import { c as shouldSuppressLocalDiscordExecApprovalPrompt, n as resolveDiscordCurrentConversationIdentity, r as getDiscordApprovalCapability } from "./conversation-identity-CN-HPn11.js";
|
|
7
7
|
import { r as resolveRequiredDiscordChannelPermissions } from "./audit-core-xwjIczO0.js";
|
|
8
|
-
import { t as discordMessageActions$1 } from "./channel-actions-
|
|
8
|
+
import { t as discordMessageActions$1 } from "./channel-actions-CoudAyAB.js";
|
|
9
9
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-Chs3HgGa.js";
|
|
10
|
-
import {
|
|
10
|
+
import { d as withAbortTimeout } from "./timeouts-C5TBc_9x.js";
|
|
11
|
+
import { n as discordOutbound } from "./outbound-adapter-CNievjXH.js";
|
|
11
12
|
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-D11J9bXI.js";
|
|
12
13
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
13
14
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -125,13 +126,13 @@ let discordProbeRuntimePromise;
|
|
|
125
126
|
let discordAuditModulePromise;
|
|
126
127
|
let discordSendModulePromise;
|
|
127
128
|
let discordDirectoryLiveModulePromise;
|
|
128
|
-
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
129
|
-
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
130
|
-
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
131
|
-
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-
|
|
132
|
-
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-
|
|
129
|
+
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-BCt5KxcX.js").then((n) => n.t));
|
|
130
|
+
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-t1URw0Qz.js").then((n) => n.n));
|
|
131
|
+
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-Bapkb237.js").then((n) => n.n));
|
|
132
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-BKfUaXGt.js").then((n) => n.a));
|
|
133
|
+
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-DpC8iueE.js").then((n) => n.r));
|
|
133
134
|
async function loadDiscordProviderRuntime() {
|
|
134
|
-
discordProviderRuntimePromise ??= import("./provider.runtime-
|
|
135
|
+
discordProviderRuntimePromise ??= import("./provider.runtime-EW-G8l_U.js");
|
|
135
136
|
return await discordProviderRuntimePromise;
|
|
136
137
|
}
|
|
137
138
|
async function loadDiscordProbeRuntime() {
|
|
@@ -139,15 +140,15 @@ async function loadDiscordProbeRuntime() {
|
|
|
139
140
|
return await discordProbeRuntimePromise;
|
|
140
141
|
}
|
|
141
142
|
async function loadDiscordAuditModule() {
|
|
142
|
-
discordAuditModulePromise ??= import("./audit-
|
|
143
|
+
discordAuditModulePromise ??= import("./audit-DuZUxGjM.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-o-Y1DiAT.js").then((n) => n.t);
|
|
147
148
|
return await discordSendModulePromise;
|
|
148
149
|
}
|
|
149
150
|
async function loadDiscordDirectoryLiveModule() {
|
|
150
|
-
discordDirectoryLiveModulePromise ??= import("./directory-live-
|
|
151
|
+
discordDirectoryLiveModulePromise ??= import("./directory-live-CE7IDmwo.js").then((n) => n.t);
|
|
151
152
|
return await discordDirectoryLiveModulePromise;
|
|
152
153
|
}
|
|
153
154
|
//#endregion
|
|
@@ -612,7 +613,7 @@ const discordPlugin = createChatChannelPlugin({
|
|
|
612
613
|
if (discordProbe?.application?.intents) lines.push({ text: `Intents: ${formatDiscordIntents(discordProbe.application.intents)}` });
|
|
613
614
|
return lines;
|
|
614
615
|
},
|
|
615
|
-
buildCapabilitiesDiagnostics: async ({ account, target }) => {
|
|
616
|
+
buildCapabilitiesDiagnostics: async ({ account, target, timeoutMs }) => {
|
|
616
617
|
if (!target?.trim()) return;
|
|
617
618
|
const parsedTarget = parseDiscordTarget(target.trim(), { defaultKind: "channel" });
|
|
618
619
|
const details = { target: {
|
|
@@ -641,10 +642,17 @@ const discordPlugin = createChatChannelPlugin({
|
|
|
641
642
|
token
|
|
642
643
|
} } } } };
|
|
643
644
|
try {
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
645
|
+
const sendModule = await loadDiscordSendModule();
|
|
646
|
+
const perms = await withAbortTimeout({
|
|
647
|
+
timeoutMs,
|
|
648
|
+
createTimeoutError: () => /* @__PURE__ */ new Error(`Capabilities diagnostic timed out after ${timeoutMs}ms`),
|
|
649
|
+
run: async (signal) => await sendModule.fetchChannelPermissionsDiscord(parsedTarget.id, {
|
|
650
|
+
cfg: statusCfg,
|
|
651
|
+
token,
|
|
652
|
+
accountId: account.accountId ?? void 0,
|
|
653
|
+
signal,
|
|
654
|
+
timeoutMs
|
|
655
|
+
})
|
|
648
656
|
});
|
|
649
657
|
const missingRequired = resolveRequiredDiscordChannelPermissions(perms.channelType).filter((permission) => !perms.permissions.includes(permission));
|
|
650
658
|
details.permissions = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
2
2
|
import { r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-CUmrNvv-.js";
|
|
4
4
|
import { i as withDiscordInboundEventDeliveryMetadata } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createUnionActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
7
7
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
8
|
-
//#region extensions/discord/src/
|
|
8
|
+
//#region extensions/discord/src/trusted-requester-actions.ts
|
|
9
9
|
const trustedRequesterGuildAdminActions = new Set([
|
|
10
10
|
"emoji-upload",
|
|
11
11
|
"sticker-upload",
|
|
@@ -23,6 +23,11 @@ const trustedRequesterGuildAdminActions = new Set([
|
|
|
23
23
|
"kick",
|
|
24
24
|
"ban"
|
|
25
25
|
]);
|
|
26
|
+
function isTrustedRequesterGuildAdminAction(action) {
|
|
27
|
+
return trustedRequesterGuildAdminActions.has(action);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region extensions/discord/src/channel-actions.ts
|
|
26
31
|
const localExecutionActions = new Set([
|
|
27
32
|
"send",
|
|
28
33
|
"upload-file",
|
|
@@ -37,7 +42,7 @@ function resolveDiscordActionExecutionMode({ action }) {
|
|
|
37
42
|
}
|
|
38
43
|
let discordChannelActionsRuntimePromise;
|
|
39
44
|
async function loadDiscordChannelActionsRuntime() {
|
|
40
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-
|
|
45
|
+
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-DdOfD3fi.js");
|
|
41
46
|
return await discordChannelActionsRuntimePromise;
|
|
42
47
|
}
|
|
43
48
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
@@ -144,7 +149,7 @@ function describeDiscordMessageTool({ cfg, accountId }) {
|
|
|
144
149
|
const discordMessageActions = {
|
|
145
150
|
resolveExecutionMode: resolveDiscordActionExecutionMode,
|
|
146
151
|
describeMessageTool: describeDiscordMessageTool,
|
|
147
|
-
requiresTrustedRequesterSender: ({ action, toolContext }) =>
|
|
152
|
+
requiresTrustedRequesterSender: ({ action, toolContext }) => Boolean(toolContext) && isTrustedRequesterGuildAdminAction(action),
|
|
148
153
|
extractToolSend: ({ args }) => {
|
|
149
154
|
const action = normalizeOptionalString(args.action) ?? "";
|
|
150
155
|
if (action === "sendMessage") return extractToolSend(args, "sendMessage");
|
|
@@ -183,13 +188,14 @@ const discordMessageActions = {
|
|
|
183
188
|
}
|
|
184
189
|
};
|
|
185
190
|
},
|
|
186
|
-
handleAction: async ({ action, params, cfg, accountId, requesterSenderId, toolContext, mediaAccess, mediaLocalRoots, mediaReadFile, sessionKey, inboundEventKind }) => {
|
|
191
|
+
handleAction: async ({ action, params, cfg, accountId, requesterSenderId, senderIsOwner, toolContext, mediaAccess, mediaLocalRoots, mediaReadFile, sessionKey, inboundEventKind }) => {
|
|
187
192
|
return await (await loadDiscordChannelActionsRuntime()).handleDiscordMessageAction({
|
|
188
193
|
action,
|
|
189
194
|
params,
|
|
190
195
|
cfg,
|
|
191
196
|
accountId,
|
|
192
197
|
requesterSenderId,
|
|
198
|
+
senderIsOwner,
|
|
193
199
|
toolContext,
|
|
194
200
|
mediaAccess,
|
|
195
201
|
mediaLocalRoots,
|
|
@@ -200,4 +206,4 @@ const discordMessageActions = {
|
|
|
200
206
|
}
|
|
201
207
|
};
|
|
202
208
|
//#endregion
|
|
203
|
-
export { discordMessageActions as t };
|
|
209
|
+
export { isTrustedRequesterGuildAdminAction as n, discordMessageActions as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Ut as resolveDiscordChannelId } from "./send.receipt-
|
|
2
|
-
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-
|
|
3
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
4
|
-
import "./targets-
|
|
1
|
+
import { Ut as resolveDiscordChannelId } from "./send.receipt-HXIwVvXy.js";
|
|
2
|
+
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-CUmrNvv-.js";
|
|
3
|
+
import { t as handleDiscordAction } from "./runtime-C6jV3hf4.js";
|
|
4
|
+
import "./targets-BEIgHBHc.js";
|
|
5
5
|
import "./action-runtime-api.js";
|
|
6
6
|
import { r as notifyDiscordInboundEventOutboundSuccess } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
7
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
7
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-B7SnVS0m.js";
|
|
8
8
|
import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
10
10
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./channel
|
|
1
|
+
import { t as discordPlugin } from "./channel--3YhTUOb.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as inspectDiscordConfiguredToken } from "./account-inspect-DDZtT5C8.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, m as resolveDiscordToken, o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-D11J9bXI.js";
|
|
4
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
5
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
4
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-t1URw0Qz.js";
|
|
5
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-Bapkb237.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createLegacyCompatChannelDmPolicy, createSetupTranslator, createStandardChannelSetupStatus, parseMentionOrPrefixedId, patchChannelConfigForAccount, promptLegacyChannelAllowFromForAccount, resolveEntriesWithOptionalToken, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Container, F as Modal, G as RoleSelectMenu, H as LinkButton, Ht as parseDiscordTarget, I as RadioGroup, J as Separator, K as Row, L as TextInput, N as CheckboxGroup, P as Label, Q as UserSelectMenu, R as Button, U as MediaGallery, V as File, W as MentionableSelectMenu, Wt as __exportAll, X as TextDisplay, Y as StringSelectMenu, Z as Thumbnail, et as parseCustomId, q as Section, z as ChannelSelectMenu } from "./send.receipt-
|
|
1
|
+
import { B as Container, F as Modal, G as RoleSelectMenu, H as LinkButton, Ht as parseDiscordTarget, I as RadioGroup, J as Separator, K as Row, L as TextInput, N as CheckboxGroup, P as Label, Q as UserSelectMenu, R as Button, U as MediaGallery, V as File, W as MentionableSelectMenu, Wt as __exportAll, X as TextDisplay, Y as StringSelectMenu, Z as Thumbnail, et as parseCustomId, q as Section, z as ChannelSelectMenu } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing";
|
|
4
4
|
import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
@@ -231,7 +231,7 @@ function createDiscordApprovalCapability(configOverride) {
|
|
|
231
231
|
request,
|
|
232
232
|
configOverride
|
|
233
233
|
}),
|
|
234
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
234
|
+
load: async () => (await import("./approval-handler.runtime-BprBDUQG.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
235
235
|
})
|
|
236
236
|
});
|
|
237
237
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-BCt5KxcX.js";
|
|
2
2
|
//#region extensions/discord/directory-contract-api.ts
|
|
3
3
|
const discordDirectoryContractPlugin = {
|
|
4
4
|
id: "discord",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { n as fetchDiscord } from "./api-BmXlcjYW.js";
|
|
4
4
|
import { a as normalizeDiscordSlug } from "./allow-list-C-MqM-B_.js";
|
package/dist/{handle-action.guild-admin-BS2qnhXF.js → handle-action.guild-admin-B7SnVS0m.js}
RENAMED
|
@@ -1,10 +1,13 @@
|
|
|
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-C6jV3hf4.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
|
+
import { n as isTrustedRequesterGuildAdminAction } from "./channel-actions-CoudAyAB.js";
|
|
3
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
5
|
import { readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
5
6
|
//#region extensions/discord/src/actions/handle-action.guild-admin.ts
|
|
6
7
|
function readDiscordRequesterSenderId(ctx) {
|
|
7
|
-
|
|
8
|
+
const currentProvider = normalizeOptionalString(ctx.toolContext?.currentChannelProvider);
|
|
9
|
+
if (currentProvider?.toLowerCase() === "discord") return normalizeOptionalString(ctx.requesterSenderId);
|
|
10
|
+
if (isTrustedRequesterGuildAdminAction(ctx.action) && (currentProvider || ctx.senderIsOwner !== true)) throw new Error("Discord guild admin actions require a trusted Discord sender identity.");
|
|
8
11
|
}
|
|
9
12
|
function senderParam(senderUserId) {
|
|
10
13
|
return senderUserId ? { senderUserId } : {};
|
|
@@ -241,7 +244,6 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
241
244
|
message: "deleteDays must be an integer from 0 to 7"
|
|
242
245
|
})
|
|
243
246
|
});
|
|
244
|
-
const senderUserIdLocal = normalizeOptionalString(ctx.requesterSenderId);
|
|
245
247
|
return await handleDiscordAction({
|
|
246
248
|
action: moderation.action,
|
|
247
249
|
accountId: accountId ?? void 0,
|
|
@@ -251,7 +253,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
251
253
|
until: moderation.until,
|
|
252
254
|
reason: moderation.reason,
|
|
253
255
|
deleteMessageDays: moderation.deleteMessageDays,
|
|
254
|
-
senderUserId
|
|
256
|
+
senderUserId
|
|
255
257
|
}, cfg);
|
|
256
258
|
}
|
|
257
259
|
if (action === "thread-list") {
|
|
@@ -288,15 +290,18 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
288
290
|
});
|
|
289
291
|
}
|
|
290
292
|
if (action === "search") {
|
|
291
|
-
const guildId = readStringParam(actionParams, "guildId"
|
|
292
|
-
const query = readStringParam(actionParams, "query"
|
|
293
|
+
const guildId = readStringParam(actionParams, "guildId");
|
|
294
|
+
const query = readStringParam(actionParams, "query") ?? readStringParam(actionParams, "content");
|
|
295
|
+
if (!query) throw new Error("Discord search requires query text. Provide query or content.");
|
|
296
|
+
const explicitChannelIds = readStringArrayParam(actionParams, "channelIds");
|
|
297
|
+
const channelId = readStringParam(actionParams, "channelId") ?? (!guildId && !explicitChannelIds?.length && ctx.toolContext?.currentChannelProvider?.trim().toLowerCase() === "discord" ? ctx.toolContext?.currentChannelId?.trim() || void 0 : void 0);
|
|
293
298
|
return await handleDiscordAction({
|
|
294
299
|
action: "searchMessages",
|
|
295
300
|
accountId: accountId ?? void 0,
|
|
296
|
-
guildId,
|
|
301
|
+
...guildId ? { guildId } : {},
|
|
297
302
|
content: query,
|
|
298
|
-
channelId
|
|
299
|
-
channelIds:
|
|
303
|
+
channelId,
|
|
304
|
+
channelIds: explicitChannelIds,
|
|
300
305
|
authorId: readStringParam(actionParams, "authorId"),
|
|
301
306
|
authorIds: readStringArrayParam(actionParams, "authorIds"),
|
|
302
307
|
limit: readPositiveIntegerParam(actionParams, "limit")
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { registerDiscordSubagentHooks } from "./subagent-hooks-api.js";
|
|
2
|
-
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-
|
|
2
|
+
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-W6n_8J8g.js";
|
|
3
3
|
import "./transcripts-source-api.js";
|
|
4
4
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
5
5
|
//#region extensions/discord/index.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-C-MqM-B_.js";
|
|
4
|
-
import { o as formatMention } from "./send.outbound-
|
|
4
|
+
import { o as formatMention } from "./send.outbound-DhiXV3UJ.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
|
-
import { d as resolveDiscordVoiceEnabled, p as buildDiscordGroupSystemPrompt, s as authorizeDiscordVoiceIngress } from "./provider-
|
|
6
|
+
import { d as resolveDiscordVoiceEnabled, p as buildDiscordGroupSystemPrompt, s as authorizeDiscordVoiceIngress } from "./provider-ByZ6xxgi.js";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { asBoolean, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
@@ -1182,7 +1182,15 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
1182
1182
|
session.submitToolResult(callId, { text: exactSpeechText });
|
|
1183
1183
|
return;
|
|
1184
1184
|
}
|
|
1185
|
-
|
|
1185
|
+
let consultMessage;
|
|
1186
|
+
try {
|
|
1187
|
+
consultMessage = buildRealtimeVoiceAgentConsultChatMessage(event.args);
|
|
1188
|
+
} catch (error) {
|
|
1189
|
+
const message = formatErrorMessage(error);
|
|
1190
|
+
logger$2.warn(`discord voice: realtime consult rejected malformed args call=${callId || "unknown"}: ${message}`);
|
|
1191
|
+
session.submitToolResult(callId, { error: message });
|
|
1192
|
+
return;
|
|
1193
|
+
}
|
|
1186
1194
|
logger$2.info(`discord voice: realtime consult requested call=${callId || "unknown"} voiceSession=${this.params.entry.voiceSessionKey} supervisorSession=${this.params.entry.route.sessionKey} agent=${this.params.entry.route.agentId} question=${formatRealtimeLogPreview(consultMessage)}`);
|
|
1187
1195
|
const nativeConsult = this.forcedConsults.recordNativeConsult(event.args, callId);
|
|
1188
1196
|
const pendingConsult = nativeConsult.kind === "pending" ? nativeConsult.handle : void 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as createDiscordRestClient } from "./send.shared-
|
|
2
|
-
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-304M1PMr.js";
|
|
1
|
+
import { I as createDiscordRestClient } from "./send.shared-DYdjs_Zh.js";
|
|
3
2
|
import { o as mergeAbortSignals } from "./timeouts-C5TBc_9x.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-B8NfbxEB.js";
|
|
4
|
+
import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-s_8KDqAQ.js";
|
|
5
|
+
import { t as sendTyping } from "./typing-0-pUmlY9.js";
|
|
6
6
|
import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { createChannelRunQueue, createTypingCallbacks, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
8
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
@@ -178,7 +178,7 @@ function resolveDiscordAcceptedTypingPrestart(ctx) {
|
|
|
178
178
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
179
179
|
let messageProcessRuntimePromise;
|
|
180
180
|
async function loadMessageProcessRuntime() {
|
|
181
|
-
messageProcessRuntimePromise ??= import("./message-handler.process-
|
|
181
|
+
messageProcessRuntimePromise ??= import("./message-handler.process-BX8HsMfV.js");
|
|
182
182
|
return await messageProcessRuntimePromise;
|
|
183
183
|
}
|
|
184
184
|
async function processDiscordQueuedMessage(params) {
|
|
@@ -307,7 +307,7 @@ function createDiscordReplyTypingFeedback(params) {
|
|
|
307
307
|
//#region extensions/discord/src/monitor/message-handler.ts
|
|
308
308
|
let messagePreflightRuntimePromise;
|
|
309
309
|
async function loadMessagePreflightRuntime() {
|
|
310
|
-
messagePreflightRuntimePromise ??= import("./message-handler.preflight-
|
|
310
|
+
messagePreflightRuntimePromise ??= import("./message-handler.preflight-BuF-DsE2.js");
|
|
311
311
|
return await messagePreflightRuntimePromise;
|
|
312
312
|
}
|
|
313
313
|
function isNonEmptyString(value) {
|
package/dist/{message-handler.preflight-DAnLOeDA.js → message-handler.preflight-BuF-DsE2.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-
|
|
1
|
+
import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-HXIwVvXy.js";
|
|
2
2
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { S as resolveTimestampMs, _ as resolveGroupDmAllow, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, n as isDiscordGroupAllowedByPolicy, x as resolveDiscordSystemLocation } from "./allow-list-C-MqM-B_.js";
|
|
4
|
-
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-
|
|
4
|
+
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-CN-HPn11.js";
|
|
5
5
|
import { d as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-iSWjCYjB.js";
|
|
6
|
-
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
7
|
-
import "./thread-bindings-
|
|
8
|
-
import { D as resolveDiscordDmCommandAccess, O as resolveDiscordTextCommandAccess, _ as resolveDiscordConversationRoute, b as handleDiscordDmCommandDecision, g as buildDiscordRoutePeer, v as resolveDiscordEffectiveRoute, y as shouldIgnoreStaleDiscordRouteBinding } from "./provider-
|
|
9
|
-
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-
|
|
6
|
+
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-B8NfbxEB.js";
|
|
7
|
+
import "./thread-bindings-CEVvN75T.js";
|
|
8
|
+
import { D as resolveDiscordDmCommandAccess, O as resolveDiscordTextCommandAccess, _ as resolveDiscordConversationRoute, b as handleDiscordDmCommandDecision, g as buildDiscordRoutePeer, v as resolveDiscordEffectiveRoute, y as shouldIgnoreStaleDiscordRouteBinding } from "./provider-ByZ6xxgi.js";
|
|
9
|
+
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-s_8KDqAQ.js";
|
|
10
10
|
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
|
|
11
11
|
import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
12
|
import { MessageReferenceType, MessageType } from "discord-api-types/v10";
|
|
@@ -29,7 +29,7 @@ async function loadConversationRuntime$1() {
|
|
|
29
29
|
return await conversationRuntimePromise$1;
|
|
30
30
|
}
|
|
31
31
|
async function loadDiscordSendRuntime() {
|
|
32
|
-
discordSendRuntimePromise ??= import("./send-
|
|
32
|
+
discordSendRuntimePromise ??= import("./send-o-Y1DiAT.js").then((n) => n.t);
|
|
33
33
|
return await discordSendRuntimePromise;
|
|
34
34
|
}
|
|
35
35
|
function resolveDiscordDmPairingSenderId(sender) {
|
|
@@ -435,7 +435,7 @@ let preflightAudioRuntimePromise;
|
|
|
435
435
|
let systemEventsRuntimePromise;
|
|
436
436
|
let discordThreadingRuntimePromise;
|
|
437
437
|
async function loadPluralKitRuntime() {
|
|
438
|
-
pluralkitRuntimePromise ??= import("./pluralkit-
|
|
438
|
+
pluralkitRuntimePromise ??= import("./pluralkit-BXkU9XmC.js").then((n) => n.n);
|
|
439
439
|
return await pluralkitRuntimePromise;
|
|
440
440
|
}
|
|
441
441
|
async function loadPreflightAudioRuntime() {
|
|
@@ -443,11 +443,11 @@ async function loadPreflightAudioRuntime() {
|
|
|
443
443
|
return await preflightAudioRuntimePromise;
|
|
444
444
|
}
|
|
445
445
|
async function loadSystemEventsRuntime() {
|
|
446
|
-
systemEventsRuntimePromise ??= import("./system-events-
|
|
446
|
+
systemEventsRuntimePromise ??= import("./system-events-BxTHlBbM.js");
|
|
447
447
|
return await systemEventsRuntimePromise;
|
|
448
448
|
}
|
|
449
449
|
async function loadDiscordThreadingRuntime() {
|
|
450
|
-
discordThreadingRuntimePromise ??= import("./provider-
|
|
450
|
+
discordThreadingRuntimePromise ??= import("./provider-ByZ6xxgi.js").then((n) => n.S);
|
|
451
451
|
return await discordThreadingRuntimePromise;
|
|
452
452
|
}
|
|
453
453
|
function isPreflightAborted(abortSignal) {
|