@openclaw/discord 2026.6.11-beta.2 → 2026.6.33
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-4GFMoWu0.js → api-CjnGBhM3.js} +4 -1
- package/dist/api.js +14 -14
- package/dist/{approval-handler.runtime-SsFtZQA6.js → approval-handler.runtime-BWPQrzpP.js} +9 -4
- package/dist/{audit-CAnmyf2A.js → audit-BwJ_2OjL.js} +3 -3
- package/dist/{channel-YA7AbYP3.js → channel-Ddnonoy4.js} +15 -15
- package/dist/{channel-actions-BJ3n5Z1l.js → channel-actions-CwmIqnYN.js} +2 -2
- package/dist/{channel-actions.runtime-D2QTRgZ9.js → channel-actions.runtime-DvpTfaJ4.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-B1zDEAR7.js → channel.setup-glZ5Y98a.js} +2 -2
- package/dist/{components-Dm4c_ce6.js → components-j6lTZBsT.js} +1 -1
- package/dist/{conversation-identity-DZ0BD7xO.js → conversation-identity-36FFBwm5.js} +2 -2
- package/dist/{directory-config-BK1OhHa3.js → directory-config-BYMFzL29.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DP3CmwGf.js → directory-live-9JtJCiu8.js} +2 -2
- package/dist/{handle-action.guild-admin-B2cOoU2D.js → handle-action.guild-admin-xxGYrp-I.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{manager.runtime-CPHxr9B3.js → manager.runtime-BK6cf2Zu.js} +3 -3
- package/dist/{message-handler-CKaTgBIV.js → message-handler-BqpJIavO.js} +6 -6
- package/dist/{message-handler.preflight--eAiaewz.js → message-handler.preflight-C90MxCcv.js} +10 -10
- package/dist/{message-handler.process-PhKAmrEd.js → message-handler.process-CeQ7Bd_3.js} +10 -10
- package/dist/{message-utils-O1vK3kPu.js → message-utils-CJeAoISH.js} +1 -1
- package/dist/{outbound-adapter-fO_7hbTh.js → outbound-adapter-Dxs6iKEq.js} +62 -131
- package/dist/{pluralkit-B3MzPaPU.js → pluralkit-DI6RYaVj.js} +1 -1
- package/dist/presence-cache-z1N8MbJ3.js +45 -0
- package/dist/{probe-CxnDikWm.js → probe-esE_Oqdm.js} +1 -1
- package/dist/{probe.runtime-DLFkSDVB.js → probe.runtime-C3Atgpvr.js} +1 -1
- package/dist/{provider-BJaJ20MY.js → provider-C7376XFH.js} +47 -22
- package/dist/{provider-session.runtime-D6xc-60s.js → provider-session.runtime-CCdqogGf.js} +3 -3
- package/dist/provider.runtime-D1m66kDS.js +2 -0
- package/dist/{resolve-allowlist-common-BDpBb8dF.js → resolve-allowlist-common-3gB2Gpmm.js} +1 -1
- package/dist/{resolve-channels-iJIjYfRw.js → resolve-channels-B3gQf8QL.js} +3 -3
- package/dist/{resolve-users-_fv1mm1f.js → resolve-users-BO10y5fJ.js} +3 -3
- package/dist/{runtime-ywXByivr.js → runtime-CFlR3L9X.js} +8 -8
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +20 -20
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-4oc58TSk.js +6 -0
- package/dist/runtime-api.monitor.js +6 -5
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-Dc5uQX5H.js → send-JHxfT4Pk.js} +6 -4
- package/dist/{send.components-D4bl20xr.js → send.components-CN35E2Ck.js} +11 -6
- package/dist/{send.outbound-5axvwLkl.js → send.outbound-B-cA1Esv.js} +15 -8
- package/dist/{send.receipt-B21MspvT.js → send.receipt-CGecJDin.js} +10 -1
- package/dist/{send.shared-9082A2sO.js → send.shared-vcbfThdy.js} +107 -16
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{subagent-hooks-NTv6B4up.js → subagent-hooks-20wXhVzZ.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-BzaI1WpN.js → system-events-DR27TE7p.js} +1 -1
- package/dist/{target-resolver-agnOrtOU.js → target-resolver-CDi1gI90.js} +2 -2
- package/dist/targets-C6yd3y8R.js +3 -0
- package/dist/{thread-bindings-DNitaHVh.js → thread-bindings-DU4T6nDo.js} +4 -4
- package/dist/{thread-bindings.discord-api-CjYNuvZa.js → thread-bindings.discord-api-CYkr-3Gj.js} +4 -4
- package/dist/{thread-bindings.manager-PZvJ4TJx.js → thread-bindings.manager-BqWs1UE2.js} +3 -3
- package/dist/{transcripts-source-Bi8N6h5X.js → transcripts-source-D-lBI5ZD.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-BdRqXUN3.js → typing-xr05bL-r.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/dist/gateway-registry-DPxmW0Db.js +0 -74
- package/dist/provider.runtime-jNlHxUSW.js +0 -2
- package/dist/runtime-api.monitor-Bb5AaRzg.js +0 -6
- package/dist/targets-ClUPljCU.js +0 -3
package/dist/runtime-api.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { x as resolveDiscordOutboundSessionRoute } from "./components-
|
|
2
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-
|
|
3
|
-
import {
|
|
4
|
-
import { A as
|
|
5
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
1
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-j6lTZBsT.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-CN35E2Ck.js";
|
|
3
|
+
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
4
|
+
import { A as fetchMemberGuildPermissionsDiscord, G as getGateway, K as registerGateway, N as hasAnyGuildPermissionDiscord, T as DiscordSendError, W as clearGateways, j as hasAllGuildPermissionsDiscord, k as fetchChannelPermissionsDiscord, q as unregisterGateway } from "./send.shared-vcbfThdy.js";
|
|
5
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-9JtJCiu8.js";
|
|
6
6
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, g as resolveDiscordShouldRequireMention, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as shouldEmitDiscordReactionNotification } from "./allow-list-C-MqM-B_.js";
|
|
7
|
-
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-
|
|
8
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
9
|
-
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-
|
|
7
|
+
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-JHxfT4Pk.js";
|
|
8
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-B-cA1Esv.js";
|
|
9
|
+
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-CFlR3L9X.js";
|
|
10
10
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
11
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
11
|
+
import { t as discordMessageActions } from "./channel-actions-CwmIqnYN.js";
|
|
12
12
|
import { C as resolveThreadBindingIdleTimeoutMs, E as resolveThreadBindingMaxAgeMs, T as resolveThreadBindingMaxAgeExpiresAt, d as isRecentlyUnboundThreadWebhookMessage, w as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-iSWjCYjB.js";
|
|
13
13
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-Chs3HgGa.js";
|
|
14
14
|
import { a as isAbortError, c as normalizeDiscordListenerTimeoutMs, 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, s as normalizeDiscordInboundWorkerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, u as runDiscordTaskWithTimeout } from "./timeouts-C5TBc_9x.js";
|
|
15
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
16
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
17
|
-
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-
|
|
18
|
-
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-
|
|
19
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
20
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
15
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-B3gQf8QL.js";
|
|
16
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-BO10y5fJ.js";
|
|
17
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-CYkr-3Gj.js";
|
|
18
|
+
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-DU4T6nDo.js";
|
|
19
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BqWs1UE2.js";
|
|
20
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-esE_Oqdm.js";
|
|
21
21
|
import "./runtime-api.actions.js";
|
|
22
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
22
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-BwJ_2OjL.js";
|
|
23
23
|
import "./runtime-api.lookup.js";
|
|
24
|
-
import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-
|
|
25
|
-
import { i as buildDiscordMediaPayload } from "./message-utils-
|
|
26
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
27
|
-
import "./runtime-api.monitor-
|
|
24
|
+
import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-C7376XFH.js";
|
|
25
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-CJeAoISH.js";
|
|
26
|
+
import { t as createDiscordMessageHandler } from "./message-handler-BqpJIavO.js";
|
|
27
|
+
import "./runtime-api.monitor-4oc58TSk.js";
|
|
28
28
|
import "./runtime-api.send.js";
|
|
29
29
|
import "./runtime-api.threads.js";
|
|
30
30
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DiscordSendError, testing as __testing, testing, addRoleDiscord, allowListMatches, auditDiscordChannelPermissions, autoBindSpawnedDiscordSubagent, banMemberDiscord, buildDiscordMediaPayload, clearGateways, clearPresences, collectDiscordAuditChannelIds, createChannelDiscord, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, createNoopThreadBindingManager, createScheduledEventDiscord, createThreadBindingManager, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, discordMessageActions, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, formatThreadBindingDurationLabel, getGateway, getPresence, getThreadBindingManager, handleDiscordAction, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, isAbortError, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, isRecentlyUnboundThreadWebhookMessage, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, mergeAbortSignals, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, parseApplicationIdFromToken, pinMessageDiscord, presenceCacheSize, probeDiscord, reactMessageDiscord, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, readMessagesDiscord, reconcileAcpThreadBindingsOnStartup, registerBuiltDiscordComponentMessage, registerDiscordListener, registerGateway, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, requiredGuildPermissionForModerationAction, resolveDiscordChannelAllowlist, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordOutboundSessionRoute, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveDiscordUserAllowlist, resolveEventCoverImage, resolveGroupDmAllow, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, setDiscordRuntime, setPresence, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, shouldEmitDiscordReactionNotification, timeoutMemberDiscord, unbindThreadBindingsBySessionKey, unpinMessageDiscord, unregisterGateway, uploadEmojiDiscord, uploadStickerDiscord, waitForDiscordGatewayPluginRegistration };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-9JtJCiu8.js";
|
|
2
2
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
3
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
4
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
5
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
6
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
3
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-B3gQf8QL.js";
|
|
4
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-BO10y5fJ.js";
|
|
5
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-esE_Oqdm.js";
|
|
6
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-BwJ_2OjL.js";
|
|
7
7
|
export { auditDiscordChannelPermissions, collectDiscordAuditChannelIds, fetchDiscordApplicationId, fetchDiscordApplicationSummary, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, parseApplicationIdFromToken, probeDiscord, resolveDiscordChannelAllowlist, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordUserAllowlist, setDiscordRuntime };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
2
|
+
import { G as getGateway, K as registerGateway, W as clearGateways, q as unregisterGateway } from "./send.shared-vcbfThdy.js";
|
|
2
3
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, g as resolveDiscordShouldRequireMention, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as shouldEmitDiscordReactionNotification } from "./allow-list-C-MqM-B_.js";
|
|
3
4
|
import { a as isAbortError, c as normalizeDiscordListenerTimeoutMs, 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, s as normalizeDiscordInboundWorkerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, u as runDiscordTaskWithTimeout } from "./timeouts-C5TBc_9x.js";
|
|
4
|
-
import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-
|
|
5
|
-
import { i as buildDiscordMediaPayload } from "./message-utils-
|
|
6
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
7
|
-
import "./runtime-api.monitor-
|
|
5
|
+
import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-C7376XFH.js";
|
|
6
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-CJeAoISH.js";
|
|
7
|
+
import { t as createDiscordMessageHandler } from "./message-handler-BqpJIavO.js";
|
|
8
|
+
import "./runtime-api.monitor-4oc58TSk.js";
|
|
8
9
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, allowListMatches, buildDiscordMediaPayload, clearGateways, clearPresences, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, getGateway, getPresence, isAbortError, isDiscordGroupAllowedByPolicy, mergeAbortSignals, monitorDiscordProvider, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, presenceCacheSize, registerDiscordListener, registerGateway, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveGroupDmAllow, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, setPresence, shouldEmitDiscordReactionNotification, unregisterGateway, waitForDiscordGatewayPluginRegistration };
|
package/dist/runtime-api.send.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { x as resolveDiscordOutboundSessionRoute } from "./components-
|
|
2
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-
|
|
3
|
-
import { A as
|
|
4
|
-
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-
|
|
5
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
1
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-j6lTZBsT.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-CN35E2Ck.js";
|
|
3
|
+
import { A as fetchMemberGuildPermissionsDiscord, N as hasAnyGuildPermissionDiscord, T as DiscordSendError, j as hasAllGuildPermissionsDiscord, k as fetchChannelPermissionsDiscord } from "./send.shared-vcbfThdy.js";
|
|
4
|
+
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-JHxfT4Pk.js";
|
|
5
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-B-cA1Esv.js";
|
|
6
6
|
export { DiscordSendError, addRoleDiscord, banMemberDiscord, createChannelDiscord, createScheduledEventDiscord, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, kickMemberDiscord, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadsDiscord, moveChannelDiscord, pinMessageDiscord, reactMessageDiscord, readMessagesDiscord, registerBuiltDiscordComponentMessage, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, resolveDiscordOutboundSessionRoute, resolveEventCoverImage, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, timeoutMemberDiscord, unpinMessageDiscord, uploadEmojiDiscord, uploadStickerDiscord };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as resolveThreadBindingIdleTimeoutMs, E as resolveThreadBindingMaxAgeMs, T as resolveThreadBindingMaxAgeExpiresAt, d as isRecentlyUnboundThreadWebhookMessage, w as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-iSWjCYjB.js";
|
|
2
2
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-Chs3HgGa.js";
|
|
3
|
-
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-
|
|
4
|
-
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-
|
|
5
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
3
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-CYkr-3Gj.js";
|
|
4
|
+
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-DU4T6nDo.js";
|
|
5
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BqWs1UE2.js";
|
|
6
6
|
export { testing as __testing, testing, autoBindSpawnedDiscordSubagent, createNoopThreadBindingManager, createThreadBindingManager, formatThreadBindingDurationLabel, getThreadBindingManager, isRecentlyUnboundThreadWebhookMessage, listThreadBindingsBySessionKey, listThreadBindingsForAccount, reconcileAcpThreadBindingsOnStartup, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, unbindThreadBindingsBySessionKey };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { At as getGuildMember, Bt as removeGuildMemberRole, C as readDiscordCode, Ct as createGuildBan, Dt as createGuildSticker, Et as createGuildScheduledEvent, Ft as listGuildRoles, It as listGuildScheduledEvents, Lt as moveGuildChannels, Mt as listGuildActiveThreads, Nt as listGuildChannels, Ot as deleteChannelPermission, Pt as listGuildEmojis, Rt as putChannelPermission, S as RateLimitError, St as addGuildMemberRole, T as readRetryAfter, Tt as createGuildEmoji, Vt as timeoutGuildMember, Wt as __exportAll, _t as listChannelPins, at as deleteOwnMessageReaction, bt as sendChannelTyping, ct as createThread, dt as editChannel, ft as editChannelMessage, gt as listChannelMessages, ht as listChannelArchivedThreads, it as createOwnMessageReaction, jt as getGuildVoiceState, kt as getGuild, lt as deleteChannel, mt as getChannelMessage, n as createDiscordSendResult, ot as listMessageReactionUsers, pt as getChannel, st as createChannelMessage, ut as deleteChannelMessage, vt as pinChannelMessage, w as readDiscordMessage, wt as createGuildChannel, x as DiscordError, xt as unpinChannelMessage, yt as searchGuildMessages, zt as removeGuildMember } from "./send.receipt-
|
|
1
|
+
import { At as getGuildMember, Bt as removeGuildMemberRole, C as readDiscordCode, Ct as createGuildBan, Dt as createGuildSticker, Et as createGuildScheduledEvent, Ft as listGuildRoles, It as listGuildScheduledEvents, Lt as moveGuildChannels, Mt as listGuildActiveThreads, Nt as listGuildChannels, Ot as deleteChannelPermission, Pt as listGuildEmojis, Rt as putChannelPermission, S as RateLimitError, St as addGuildMemberRole, T as readRetryAfter, Tt as createGuildEmoji, Vt as timeoutGuildMember, Wt as __exportAll, _t as listChannelPins, at as deleteOwnMessageReaction, bt as sendChannelTyping, ct as createThread, dt as editChannel, ft as editChannelMessage, gt as listChannelMessages, ht as listChannelArchivedThreads, it as createOwnMessageReaction, jt as getGuildVoiceState, kt as getGuild, lt as deleteChannel, mt as getChannelMessage, n as createDiscordSendResult, ot as listMessageReactionUsers, pt as getChannel, st as createChannelMessage, ut as deleteChannelMessage, vt as pinChannelMessage, w as readDiscordMessage, wt as createGuildChannel, x as DiscordError, xt as unpinChannelMessage, yt as searchGuildMessages, zt as removeGuildMember } from "./send.receipt-CGecJDin.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { A as
|
|
4
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, s as rewriteDiscordKnownMentions, t as sendMessageDiscord } from "./send.outbound-
|
|
3
|
+
import { A as fetchMemberGuildPermissionsDiscord, B as resolveDiscordRest, C as DISCORD_MAX_EVENT_COVER_BYTES, D as canManageGuildRoleDiscord, E as canManageGuildMemberRoleDiscord, F as parseAndResolveChannelRecipient, I as createDiscordClient, M as hasAnyChannelPermissionDiscord, N as hasAnyGuildPermissionDiscord, O as canViewDiscordGuildChannel, S as DISCORD_MAX_EMOJI_BYTES, T as DiscordSendError, _ as createDiscordMessageNonce, i as formatReactionEmoji, j as hasAllGuildPermissionsDiscord, k as fetchChannelPermissionsDiscord, l as resolveChannelId, o as normalizeEmojiName, r as buildReactionIdentifier, s as normalizeReactionEmoji, t as buildDiscordSendError, w as DISCORD_MAX_STICKER_BYTES, z as resolveDiscordClientAccountContext } from "./send.shared-vcbfThdy.js";
|
|
4
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, s as rewriteDiscordKnownMentions, t as sendMessageDiscord } from "./send.outbound-B-cA1Esv.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ChannelType } from "discord-api-types/v10";
|
|
7
7
|
import { parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -650,6 +650,8 @@ async function sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, r
|
|
|
650
650
|
}, "voice-upload");
|
|
651
651
|
const messagePayload = {
|
|
652
652
|
flags: silent ? 12288 : DISCORD_VOICE_MESSAGE_FLAG,
|
|
653
|
+
nonce: createDiscordMessageNonce(),
|
|
654
|
+
enforce_nonce: true,
|
|
653
655
|
attachments: [{
|
|
654
656
|
id: "0",
|
|
655
657
|
filename,
|
|
@@ -662,7 +664,7 @@ async function sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, r
|
|
|
662
664
|
message_id: replyTo,
|
|
663
665
|
fail_if_not_exists: false
|
|
664
666
|
};
|
|
665
|
-
return await request(() => rest.post(`/channels/${channelId}/messages`, { body: messagePayload }), "voice-message");
|
|
667
|
+
return await request(() => rest.post(`/channels/${channelId}/messages`, { body: messagePayload }), "voice-message", { safety: "nonce-protected-create" });
|
|
666
668
|
}
|
|
667
669
|
//#endregion
|
|
668
670
|
//#region extensions/discord/src/send.voice.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Wt as __exportAll, ft as editChannelMessage, j as serializePayload, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll, ft as editChannelMessage, j as serializePayload, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-CGecJDin.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import "./config-api-JiPdJeb0.js";
|
|
4
4
|
import "./channel-api-CAJ0wMoV.js";
|
|
5
|
-
import { c as buildDiscordComponentMessage, f as resolveDiscordComponentAttachmentName, l as buildDiscordComponentMessageFlags } from "./components-
|
|
6
|
-
import { F as
|
|
7
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
5
|
+
import { c as buildDiscordComponentMessage, f as resolveDiscordComponentAttachmentName, l as buildDiscordComponentMessageFlags } from "./components-j6lTZBsT.js";
|
|
6
|
+
import { F as parseAndResolveChannelRecipient, I as createDiscordClient, _ as createDiscordMessageNonce, h as SUPPRESS_NOTIFICATIONS_FLAG, l as resolveChannelId, m as toDiscordFileBlob, t as buildDiscordSendError, u as resolveDiscordChannelType, x as stripUndefinedFields } from "./send.shared-vcbfThdy.js";
|
|
7
|
+
import { t as sendMessageDiscord } from "./send.outbound-B-cA1Esv.js";
|
|
8
8
|
import { n as getOptionalDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
9
9
|
import "openclaw/plugin-sdk/account-id";
|
|
10
10
|
import "openclaw/plugin-sdk/secret-input";
|
|
@@ -436,14 +436,19 @@ async function sendDiscordComponentMessage(to, spec, opts) {
|
|
|
436
436
|
const { channelId } = await resolveChannelId(rest, await parseAndResolveChannelRecipient(to, cfg, opts.accountId), request);
|
|
437
437
|
const channelType = await resolveDiscordChannelType(rest, channelId);
|
|
438
438
|
if (channelType && DISCORD_FORUM_LIKE_TYPES.has(channelType)) throw new Error("Discord components are not supported in forum-style channels");
|
|
439
|
-
const { body, buildResult } = await buildDiscordComponentPayload({
|
|
439
|
+
const { body: componentBody, buildResult } = await buildDiscordComponentPayload({
|
|
440
440
|
spec,
|
|
441
441
|
opts,
|
|
442
442
|
accountId: accountInfo.accountId
|
|
443
443
|
});
|
|
444
|
+
const body = {
|
|
445
|
+
...componentBody,
|
|
446
|
+
nonce: createDiscordMessageNonce(),
|
|
447
|
+
enforce_nonce: true
|
|
448
|
+
};
|
|
444
449
|
let result;
|
|
445
450
|
try {
|
|
446
|
-
result = await request(() => createChannelMessage(rest, channelId, { body }), "components");
|
|
451
|
+
result = await request(() => createChannelMessage(rest, channelId, { body }), "components", { safety: "nonce-protected-create" });
|
|
447
452
|
} catch (err) {
|
|
448
453
|
throw await buildDiscordSendError(err, {
|
|
449
454
|
channelId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ct as createThread, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-
|
|
1
|
+
import { ct as createThread, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-CGecJDin.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { F as
|
|
4
|
-
import { a as resolveDiscordDirectoryUserId } from "./directory-live-
|
|
3
|
+
import { F as parseAndResolveChannelRecipient, I as createDiscordClient, _ as createDiscordMessageNonce, a as normalizeDiscordPollInput, b as resolveDiscordSendEmbeds, c as normalizeStickerIds, f as sendDiscordMedia, g as buildDiscordMessageRequest, l as resolveChannelId, n as buildDiscordTextChunks, p as sendDiscordText, t as buildDiscordSendError, u as resolveDiscordChannelType, v as resolveDiscordMessageFlags, y as resolveDiscordSendComponents } from "./send.shared-vcbfThdy.js";
|
|
4
|
+
import { a as resolveDiscordDirectoryUserId } from "./directory-live-9JtJCiu8.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ChannelType } from "discord-api-types/v10";
|
|
7
7
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
@@ -236,6 +236,7 @@ async function sendMessageDiscord(to, text, opts) {
|
|
|
236
236
|
isFirst: true
|
|
237
237
|
});
|
|
238
238
|
const starterBody = buildDiscordMessageRequest({
|
|
239
|
+
endpoint: "forum-thread",
|
|
239
240
|
text: starterContent,
|
|
240
241
|
components: starterComponents,
|
|
241
242
|
embeds: starterEmbeds,
|
|
@@ -249,7 +250,7 @@ async function sendMessageDiscord(to, text, opts) {
|
|
|
249
250
|
threadRes = await request(() => createThread(rest, channelId, { body: {
|
|
250
251
|
name: threadName,
|
|
251
252
|
message: starterBody
|
|
252
|
-
} }), "forum-thread");
|
|
253
|
+
} }), "forum-thread", { safety: "non-idempotent-create" });
|
|
253
254
|
} catch (err) {
|
|
254
255
|
throw await buildDiscordSendError(err, {
|
|
255
256
|
channelId,
|
|
@@ -338,11 +339,14 @@ async function sendStickerDiscord(to, stickerIds, opts) {
|
|
|
338
339
|
const { rest, request, channelId, rewrittenContent, suppressEmbeds } = await resolveDiscordStructuredSendContext(to, opts);
|
|
339
340
|
const stickers = normalizeStickerIds(stickerIds);
|
|
340
341
|
const flags = resolveDiscordMessageFlags({ suppressEmbeds });
|
|
341
|
-
|
|
342
|
+
const body = {
|
|
342
343
|
content: rewrittenContent || void 0,
|
|
343
344
|
sticker_ids: stickers,
|
|
345
|
+
nonce: createDiscordMessageNonce(),
|
|
346
|
+
enforce_nonce: true,
|
|
344
347
|
...flags ? { flags } : {}
|
|
345
|
-
}
|
|
348
|
+
};
|
|
349
|
+
return toDiscordSendResult(await request(() => createChannelMessage(rest, channelId, { body }), "sticker", { safety: "nonce-protected-create" }), channelId, { kind: "card" });
|
|
346
350
|
}
|
|
347
351
|
async function sendPollDiscord(to, poll, opts) {
|
|
348
352
|
const { rest, request, channelId, rewrittenContent, suppressEmbeds } = await resolveDiscordStructuredSendContext(to, opts);
|
|
@@ -352,11 +356,14 @@ async function sendPollDiscord(to, poll, opts) {
|
|
|
352
356
|
silent: opts.silent,
|
|
353
357
|
suppressEmbeds
|
|
354
358
|
});
|
|
355
|
-
|
|
359
|
+
const body = {
|
|
356
360
|
content: rewrittenContent || void 0,
|
|
357
361
|
poll: payload,
|
|
362
|
+
nonce: createDiscordMessageNonce(),
|
|
363
|
+
enforce_nonce: true,
|
|
358
364
|
...flags ? { flags } : {}
|
|
359
|
-
}
|
|
365
|
+
};
|
|
366
|
+
return toDiscordSendResult(await request(() => createChannelMessage(rest, channelId, { body }), "poll", { safety: "nonce-protected-create" }), channelId, { kind: "card" });
|
|
360
367
|
}
|
|
361
368
|
async function resolveDiscordStructuredSendContext(to, opts) {
|
|
362
369
|
const accountInfo = resolveDiscordAccount({
|
|
@@ -9,6 +9,7 @@ import { privateFileStore } from "openclaw/plugin-sdk/security-runtime";
|
|
|
9
9
|
import { Type } from "typebox";
|
|
10
10
|
import { Check } from "typebox/value";
|
|
11
11
|
import { inspect } from "node:util";
|
|
12
|
+
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
12
13
|
import { chunkMarkdownTextWithMode } from "openclaw/plugin-sdk/reply-chunking";
|
|
13
14
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
14
15
|
//#region \0rolldown/runtime.js
|
|
@@ -2396,6 +2397,14 @@ const defaultLaneOptions = {
|
|
|
2396
2397
|
weight: 1
|
|
2397
2398
|
}
|
|
2398
2399
|
};
|
|
2400
|
+
const DISCORD_REST_RESPONSE_BODY_MAX_BYTES = 8 * 1024 * 1024;
|
|
2401
|
+
async function readResponseBodyText(response, idleTimeoutMs) {
|
|
2402
|
+
return (await readResponseWithLimit(response, DISCORD_REST_RESPONSE_BODY_MAX_BYTES, {
|
|
2403
|
+
chunkTimeoutMs: idleTimeoutMs,
|
|
2404
|
+
onOverflow: ({ size }) => /* @__PURE__ */ new Error(`Discord REST response body exceeds ${DISCORD_REST_RESPONSE_BODY_MAX_BYTES} bytes (received ${size})`),
|
|
2405
|
+
onIdleTimeout: ({ chunkTimeoutMs }) => /* @__PURE__ */ new Error(`Discord REST response stalled: no data received for ${chunkTimeoutMs}ms`)
|
|
2406
|
+
})).toString("utf8");
|
|
2407
|
+
}
|
|
2399
2408
|
function coerceResponseBody(raw) {
|
|
2400
2409
|
if (!raw) return;
|
|
2401
2410
|
try {
|
|
@@ -2507,7 +2516,7 @@ var RequestClient = class {
|
|
|
2507
2516
|
body: await normalizeFetchBody(body, headers),
|
|
2508
2517
|
signal
|
|
2509
2518
|
});
|
|
2510
|
-
const parsed = coerceResponseBody(await response.
|
|
2519
|
+
const parsed = coerceResponseBody(await readResponseBodyText(response, this.options.timeout ?? 15e3));
|
|
2511
2520
|
this.scheduler.recordResponse(routeKey, path, response, parsed);
|
|
2512
2521
|
if (response.status === 204) return;
|
|
2513
2522
|
if (response.status === 429) {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { At as getGuildMember, M as Embed, S as RateLimitError, b as RequestClient, j as serializePayload, kt as getGuild, nt as createUserDmChannel, pt as getChannel, rt as getCurrentUser, s as chunkDiscordTextWithMode, st as createChannelMessage } from "./send.receipt-
|
|
1
|
+
import { At as getGuildMember, M as Embed, S as RateLimitError, b as RequestClient, j as serializePayload, kt as getGuild, nt as createUserDmChannel, pt as getChannel, rt as getCurrentUser, s as chunkDiscordTextWithMode, st as createChannelMessage } from "./send.receipt-CGecJDin.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { t as parseAndResolveDiscordTarget } from "./target-resolver-
|
|
3
|
+
import { t as parseAndResolveDiscordTarget } from "./target-resolver-CDi1gI90.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
6
6
|
import { ChannelType, MessageFlags, PermissionFlagsBits } from "discord-api-types/v10";
|
|
7
7
|
import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
8
|
+
import { randomBytes } from "node:crypto";
|
|
8
9
|
import { PollLayoutType } from "discord-api-types/payloads/v10";
|
|
9
10
|
import { buildOutboundMediaLoadOptions, extensionForMime, normalizePollDurationHours, normalizePollInput } from "openclaw/plugin-sdk/media-runtime";
|
|
10
11
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
@@ -12,9 +13,38 @@ import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload
|
|
|
12
13
|
import { loadWebMedia } from "openclaw/plugin-sdk/web-media";
|
|
13
14
|
import { isIP } from "node:net";
|
|
14
15
|
import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
15
|
-
import { danger } from "openclaw/plugin-sdk/runtime-env";
|
|
16
|
+
import { createSubsystemLogger, danger } from "openclaw/plugin-sdk/runtime-env";
|
|
16
17
|
import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
|
|
17
|
-
import {
|
|
18
|
+
import { resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
19
|
+
//#region extensions/discord/src/monitor/gateway-registry.ts
|
|
20
|
+
/**
|
|
21
|
+
* Module-level registry of active Discord GatewayPlugin instances.
|
|
22
|
+
* Bridges the gap between agent tool handlers (which only have REST access)
|
|
23
|
+
* and the gateway WebSocket (needed for operations like updatePresence).
|
|
24
|
+
* Follows the same pattern as presence-cache.ts.
|
|
25
|
+
*/
|
|
26
|
+
const gatewayRegistry = /* @__PURE__ */ new Map();
|
|
27
|
+
const DEFAULT_ACCOUNT_KEY = "\0__default__";
|
|
28
|
+
function resolveAccountKey(accountId) {
|
|
29
|
+
return accountId ?? DEFAULT_ACCOUNT_KEY;
|
|
30
|
+
}
|
|
31
|
+
/** Register a GatewayPlugin instance for an account. */
|
|
32
|
+
function registerGateway(accountId, gateway) {
|
|
33
|
+
gatewayRegistry.set(resolveAccountKey(accountId), gateway);
|
|
34
|
+
}
|
|
35
|
+
/** Unregister a GatewayPlugin instance for an account. */
|
|
36
|
+
function unregisterGateway(accountId) {
|
|
37
|
+
gatewayRegistry.delete(resolveAccountKey(accountId));
|
|
38
|
+
}
|
|
39
|
+
/** Get the GatewayPlugin for an account. Returns undefined if not registered. */
|
|
40
|
+
function getGateway(accountId) {
|
|
41
|
+
return gatewayRegistry.get(resolveAccountKey(accountId));
|
|
42
|
+
}
|
|
43
|
+
/** Clear all registered gateways (for testing). */
|
|
44
|
+
function clearGateways() {
|
|
45
|
+
gatewayRegistry.clear();
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
18
48
|
//#region extensions/discord/src/proxy-fetch.ts
|
|
19
49
|
function resolveDiscordProxyUrl(account, cfg) {
|
|
20
50
|
const accountProxy = account.config.proxy?.trim();
|
|
@@ -82,6 +112,7 @@ const DISCORD_RETRY_DEFAULTS = {
|
|
|
82
112
|
maxDelayMs: 3e4,
|
|
83
113
|
jitter: .1
|
|
84
114
|
};
|
|
115
|
+
const DISCORD_GATEWAY_RECONNECT_EXTRA_ATTEMPTS = 2;
|
|
85
116
|
const DISCORD_RETRYABLE_STATUS_CODES = new Set([408, 429]);
|
|
86
117
|
const DISCORD_RETRYABLE_ERROR_CODES = new Set([
|
|
87
118
|
"EAI_AGAIN",
|
|
@@ -97,6 +128,14 @@ const DISCORD_RETRYABLE_ERROR_CODES = new Set([
|
|
|
97
128
|
"UND_ERR_SOCKET"
|
|
98
129
|
]);
|
|
99
130
|
const DISCORD_TRANSIENT_MESSAGE_RE = /\b(?:bad gateway|fetch failed|network error|networkerror|service unavailable|socket hang up|temporarily unavailable|timed out|timeout)\b|connection (?:closed|reset|refused)/i;
|
|
131
|
+
const DISCORD_PRECONNECT_ERROR_CODES = new Set([
|
|
132
|
+
"EAI_AGAIN",
|
|
133
|
+
"ECONNREFUSED",
|
|
134
|
+
"ENETUNREACH",
|
|
135
|
+
"ENOTFOUND",
|
|
136
|
+
"UND_ERR_CONNECT_TIMEOUT"
|
|
137
|
+
]);
|
|
138
|
+
const log = createSubsystemLogger("discord/retry");
|
|
100
139
|
function readDiscordErrorStatus(err) {
|
|
101
140
|
if (!err || typeof err !== "object") return;
|
|
102
141
|
return parseStrictNonNegativeInteger("status" in err && err.status !== void 0 ? err.status : "statusCode" in err && err.statusCode !== void 0 ? err.statusCode : void 0);
|
|
@@ -113,14 +152,53 @@ function isRetryableDiscordTransientError(err) {
|
|
|
113
152
|
}
|
|
114
153
|
return false;
|
|
115
154
|
}
|
|
155
|
+
function isRetryableDiscordPreConnectError(err) {
|
|
156
|
+
if (err instanceof RateLimitError) return true;
|
|
157
|
+
for (const candidate of collectErrorGraphCandidates(err, (current) => [current.cause, current.error])) {
|
|
158
|
+
if (readDiscordErrorStatus(candidate) === 429) return true;
|
|
159
|
+
const code = extractErrorCode(candidate);
|
|
160
|
+
if (code && DISCORD_PRECONNECT_ERROR_CODES.has(code.toUpperCase())) return true;
|
|
161
|
+
}
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
function resolveDiscordRetryPredicate(safety) {
|
|
165
|
+
return safety === "non-idempotent-create" ? isRetryableDiscordPreConnectError : isRetryableDiscordTransientError;
|
|
166
|
+
}
|
|
167
|
+
function isRetryableDiscordGatewayTransportError(err) {
|
|
168
|
+
if (!isRetryableDiscordTransientError(err) || err instanceof RateLimitError) return false;
|
|
169
|
+
return !collectErrorGraphCandidates(err, (current) => [current.cause, current.error]).some((candidate) => readDiscordErrorStatus(candidate) !== void 0);
|
|
170
|
+
}
|
|
116
171
|
function createDiscordRetryRunner(params) {
|
|
117
|
-
|
|
118
|
-
...params,
|
|
119
|
-
|
|
120
|
-
logLabel: "discord",
|
|
121
|
-
shouldRetry: isRetryableDiscordTransientError,
|
|
122
|
-
retryAfterMs: (err) => err instanceof RateLimitError ? err.retryAfter * 1e3 : void 0
|
|
172
|
+
const retryConfig = resolveRetryConfig(DISCORD_RETRY_DEFAULTS, {
|
|
173
|
+
...params.configRetry,
|
|
174
|
+
...params.retry
|
|
123
175
|
});
|
|
176
|
+
const attempts = retryConfig.attempts > 1 ? retryConfig.attempts + DISCORD_GATEWAY_RECONNECT_EXTRA_ATTEMPTS : retryConfig.attempts;
|
|
177
|
+
return (fn, label, options) => {
|
|
178
|
+
const isRetryable = resolveDiscordRetryPredicate(options?.safety ?? "idempotent");
|
|
179
|
+
let observedGatewayDisconnect = false;
|
|
180
|
+
const runRequest = async () => {
|
|
181
|
+
observedGatewayDisconnect ||= params.isGatewayDisconnected?.() === true;
|
|
182
|
+
try {
|
|
183
|
+
return await fn();
|
|
184
|
+
} catch (err) {
|
|
185
|
+
observedGatewayDisconnect ||= params.isGatewayDisconnected?.() === true;
|
|
186
|
+
throw err;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
return retryAsync(runRequest, {
|
|
190
|
+
...retryConfig,
|
|
191
|
+
attempts,
|
|
192
|
+
label,
|
|
193
|
+
shouldRetry: (err, attempt) => isRetryable(err) && (attempt < retryConfig.attempts || observedGatewayDisconnect && isRetryableDiscordGatewayTransportError(err)),
|
|
194
|
+
retryAfterMs: (err) => err instanceof RateLimitError ? err.retryAfter * 1e3 : void 0,
|
|
195
|
+
onRetry: params.verbose ? (info) => {
|
|
196
|
+
const maxAttempts = observedGatewayDisconnect ? attempts : retryConfig.attempts;
|
|
197
|
+
const maxRetries = Math.max(1, maxAttempts - 1);
|
|
198
|
+
log.warn(`discord ${info.label ?? "request"} retry ${info.attempt}/${maxRetries} in ${info.delayMs}ms: ${formatErrorMessage(info.err)}`);
|
|
199
|
+
} : void 0
|
|
200
|
+
});
|
|
201
|
+
};
|
|
124
202
|
}
|
|
125
203
|
//#endregion
|
|
126
204
|
//#region extensions/discord/src/client.ts
|
|
@@ -201,7 +279,11 @@ function createDiscordClient(opts) {
|
|
|
201
279
|
request: createDiscordRetryRunner({
|
|
202
280
|
retry: opts.retry,
|
|
203
281
|
configRetry: account.config.retry,
|
|
204
|
-
verbose: opts.verbose
|
|
282
|
+
verbose: opts.verbose,
|
|
283
|
+
isGatewayDisconnected: () => {
|
|
284
|
+
const gateway = getGateway(account.accountId);
|
|
285
|
+
return gateway !== void 0 && !gateway.isConnected;
|
|
286
|
+
}
|
|
205
287
|
})
|
|
206
288
|
};
|
|
207
289
|
}
|
|
@@ -479,6 +561,9 @@ const DISCORD_MAX_EVENT_COVER_BYTES = 8 * 1024 * 1024;
|
|
|
479
561
|
//#region extensions/discord/src/send.message-request.ts
|
|
480
562
|
const SUPPRESS_EMBEDS_FLAG = MessageFlags.SuppressEmbeds;
|
|
481
563
|
const SUPPRESS_NOTIFICATIONS_FLAG = MessageFlags.SuppressNotifications;
|
|
564
|
+
function createDiscordMessageNonce() {
|
|
565
|
+
return randomBytes(12).toString("hex");
|
|
566
|
+
}
|
|
482
567
|
function resolveDiscordSendComponents(params) {
|
|
483
568
|
if (!params.components || !params.isFirst) return;
|
|
484
569
|
return typeof params.components === "function" ? params.components(params.text) : params.components;
|
|
@@ -509,12 +594,16 @@ function resolveDiscordMessageFlags(params) {
|
|
|
509
594
|
return flags || void 0;
|
|
510
595
|
}
|
|
511
596
|
function buildDiscordMessageRequest(params) {
|
|
597
|
+
const payload = buildDiscordMessagePayload(params);
|
|
598
|
+
const nonce = params.endpoint === "create-message" ? params.nonce ?? createDiscordMessageNonce() : void 0;
|
|
512
599
|
return stripUndefinedFields({
|
|
513
|
-
...serializePayload(
|
|
600
|
+
...serializePayload(payload),
|
|
514
601
|
...params.replyTo ? { message_reference: {
|
|
515
602
|
message_id: params.replyTo,
|
|
516
603
|
fail_if_not_exists: false
|
|
517
|
-
} } : {}
|
|
604
|
+
} } : {},
|
|
605
|
+
nonce,
|
|
606
|
+
enforce_nonce: nonce ? true : void 0
|
|
518
607
|
});
|
|
519
608
|
}
|
|
520
609
|
function stripUndefinedFields(value) {
|
|
@@ -666,6 +755,7 @@ async function sendDiscordText(rest, channelId, text, replyTo, request, maxLines
|
|
|
666
755
|
isFirst
|
|
667
756
|
});
|
|
668
757
|
const body = buildDiscordMessageRequest({
|
|
758
|
+
endpoint: "create-message",
|
|
669
759
|
text: chunk,
|
|
670
760
|
components: chunkComponents,
|
|
671
761
|
embeds: chunkEmbeds,
|
|
@@ -675,7 +765,7 @@ async function sendDiscordText(rest, channelId, text, replyTo, request, maxLines
|
|
|
675
765
|
}),
|
|
676
766
|
replyTo
|
|
677
767
|
});
|
|
678
|
-
return await request(() => createChannelMessage(rest, channelId, { body }), "text");
|
|
768
|
+
return await request(() => createChannelMessage(rest, channelId, { body }), "text", { safety: "nonce-protected-create" });
|
|
679
769
|
};
|
|
680
770
|
if (chunks.length === 1) {
|
|
681
771
|
const result = await sendChunk(chunks[0], true);
|
|
@@ -721,6 +811,7 @@ async function sendDiscordMedia(rest, channelId, text, mediaUrl, filename, media
|
|
|
721
811
|
isFirst: true
|
|
722
812
|
});
|
|
723
813
|
const body = buildDiscordMessageRequest({
|
|
814
|
+
endpoint: "create-message",
|
|
724
815
|
text: caption,
|
|
725
816
|
components: captionComponents,
|
|
726
817
|
embeds: captionEmbeds,
|
|
@@ -734,7 +825,7 @@ async function sendDiscordMedia(rest, channelId, text, mediaUrl, filename, media
|
|
|
734
825
|
name: resolvedFileName
|
|
735
826
|
}]
|
|
736
827
|
});
|
|
737
|
-
const res = await request(() => createChannelMessage(rest, channelId, { body }), "media");
|
|
828
|
+
const res = await request(() => createChannelMessage(rest, channelId, { body }), "media", { safety: "nonce-protected-create" });
|
|
738
829
|
const platformMessageIds = res.id ? [res.id] : [];
|
|
739
830
|
for (const chunk of chunks.slice(1)) {
|
|
740
831
|
if (!chunk.trim()) continue;
|
|
@@ -754,4 +845,4 @@ function formatReactionEmoji(emoji) {
|
|
|
754
845
|
return buildReactionIdentifier(emoji);
|
|
755
846
|
}
|
|
756
847
|
//#endregion
|
|
757
|
-
export {
|
|
848
|
+
export { fetchMemberGuildPermissionsDiscord as A, resolveDiscordRest as B, DISCORD_MAX_EVENT_COVER_BYTES as C, canManageGuildRoleDiscord as D, canManageGuildMemberRoleDiscord as E, parseAndResolveChannelRecipient as F, getGateway as G, validateDiscordProxyUrl as H, createDiscordClient as I, registerGateway as K, createDiscordRestClient as L, hasAnyChannelPermissionDiscord as M, hasAnyGuildPermissionDiscord as N, canViewDiscordGuildChannel as O, isThreadChannelType as P, createDiscordRuntimeAccountContext as R, DISCORD_MAX_EMOJI_BYTES as S, DiscordSendError as T, withValidatedDiscordProxy as U, DISCORD_REST_TIMEOUT_MS as V, clearGateways as W, createDiscordMessageNonce as _, normalizeDiscordPollInput as a, resolveDiscordSendEmbeds as b, normalizeStickerIds as c, resolveDiscordTargetChannelId as d, sendDiscordMedia as f, buildDiscordMessageRequest as g, SUPPRESS_NOTIFICATIONS_FLAG as h, formatReactionEmoji as i, hasAllGuildPermissionsDiscord as j, fetchChannelPermissionsDiscord as k, resolveChannelId as l, toDiscordFileBlob as m, buildDiscordTextChunks as n, normalizeEmojiName as o, sendDiscordText as p, unregisterGateway as q, buildReactionIdentifier as r, normalizeReactionEmoji as s, buildDiscordSendError as t, resolveDiscordChannelType as u, resolveDiscordMessageFlags as v, DISCORD_MAX_STICKER_BYTES as w, stripUndefinedFields as x, resolveDiscordSendComponents as y, resolveDiscordClientAccountContext as z };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as testing, n as createThreadBindingManager } from "./thread-bindings.manager-
|
|
1
|
+
import { i as testing, n as createThreadBindingManager } from "./thread-bindings.manager-BqWs1UE2.js";
|
|
2
2
|
export { createThreadBindingManager, testing as discordThreadBindingTesting };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as discordSetupPlugin } from "./channel.setup-glZ5Y98a.js";
|
|
2
2
|
export { discordSetupPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-CGecJDin.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-
|
|
3
|
+
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-DU4T6nDo.js";
|
|
4
4
|
import { normalizeOptionalLowercaseString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { formatThreadBindingDisabledError, formatThreadBindingSpawnDisabledError, resolveThreadBindingSpawnPolicy } from "openclaw/plugin-sdk/conversation-runtime";
|
|
6
6
|
//#region extensions/discord/src/subagent-hooks.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region extensions/discord/subagent-hooks-api.ts
|
|
2
2
|
let discordSubagentHooksPromise = null;
|
|
3
3
|
function loadDiscordSubagentHooksModule() {
|
|
4
|
-
discordSubagentHooksPromise ??= import("./subagent-hooks-
|
|
4
|
+
discordSubagentHooksPromise ??= import("./subagent-hooks-20wXhVzZ.js").then((n) => n.i);
|
|
5
5
|
return discordSubagentHooksPromise;
|
|
6
6
|
}
|
|
7
7
|
function registerDiscordSubagentHooks(api) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as discord_exports } from "./send.receipt-
|
|
1
|
+
import { c as discord_exports } from "./send.receipt-CGecJDin.js";
|
|
2
2
|
import { b as formatDiscordUserTag } from "./allow-list-C-MqM-B_.js";
|
|
3
3
|
//#region extensions/discord/src/monitor/system-events.ts
|
|
4
4
|
function resolveDiscordSystemEvent(message, location) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, Wt as __exportAll, r as allowFromContainsDiscordUserId } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, Wt as __exportAll, r as allowFromContainsDiscordUserId } from "./send.receipt-CGecJDin.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { i as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
3
|
+
import { i as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-9JtJCiu8.js";
|
|
4
4
|
import { buildMessagingTarget } from "openclaw/plugin-sdk/channel-targets";
|
|
5
5
|
//#region extensions/discord/src/send-target-parsing.ts
|
|
6
6
|
const parseDiscordSendTarget = (raw, options = {}) => parseDiscordTarget(raw, options);
|