@openclaw/discord 2026.7.2-beta.4 → 2026.7.2-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{account-inspect-Dztmn4J4.js → account-inspect-SXiCBCgP.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-D2LKPukU.js → accounts-DJTf1LtA.js} +13 -15
- package/dist/action-runtime-api.js +1 -1
- package/dist/{activities-api-8TMGXUH4.js → activities-api-CHnz7E7t.js} +5 -5
- package/dist/activities-api.js +1 -1
- package/dist/api.js +16 -16
- package/dist/{approval-handler.runtime-ClZpan85.js → approval-handler.runtime-86UuBchU.js} +5 -5
- package/dist/{approval-message-safety-LyND6GR3.js → approval-message-safety-yjFtfJcK.js} +2 -2
- package/dist/{audit-CFfounXC.js → audit-BF8hmDKp.js} +4 -4
- package/dist/{channel-yq-so4jJ.js → channel-DnOg9aoT.js} +19 -18
- package/dist/{channel-actions-C8n1zWZ-.js → channel-actions-BweII8kV.js} +4 -4
- package/dist/{channel-actions.runtime-CgJy35O0.js → channel-actions.runtime-Dsv063Re.js} +6 -6
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-Tn_O2B7F.js → channel.setup-Cpv7n0I8.js} +23 -50
- package/dist/{chunk-BrZocpfs.js → chunk-CMVEczdm.js} +12 -0
- package/dist/{directory-config-DF85-bUY.js → directory-config-677F_rhf.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CrMtTrb0.js → directory-live-BQk4bBOC.js} +6 -6
- package/dist/{doctor-CORGPgoY.js → doctor-DIcs6IDL.js} +4 -4
- package/dist/{doctor-contract-BPUD3Di9.js → doctor-contract-CCFMIDk9.js} +15 -58
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-DikBWer5.js → handle-action.guild-admin-D14y2JtA.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/legacy-state-migrations-api.js +1 -34
- package/dist/{manager.runtime-DVvlH8NR.js → manager.runtime-asX6a4R4.js} +3 -3
- package/dist/{message-handler-1ui-YxsF.js → message-handler-CxjL-a-8.js} +7 -47
- package/dist/message-handler.history-CJOsN9w5.js +28 -0
- package/dist/{message-handler.preflight-CAEQvP3t.js → message-handler.preflight-D-5zBjwh.js} +33 -48
- package/dist/{message-handler.process-REBztvIW.js → message-handler.process-W9QxWA1g.js} +58 -44
- package/dist/{message-utils-ajbkdTVA.js → message-utils-DSxXsDcG.js} +1 -1
- package/dist/model-picker-preference-primitives-D25pnCOu.js +37 -0
- package/dist/{outbound-adapter-XZWo4_HD.js → outbound-adapter-kse7KV--.js} +61 -96
- package/dist/{outbound-components-CTFDDcq5.js → outbound-components-DNgLQwXl.js} +3 -3
- package/dist/{outbound-session-route-D_nc_Ayk.js → outbound-session-route-DJUzy5WA.js} +1 -1
- package/dist/{pluralkit-CCovPs9s.js → pluralkit-DbN-Z7BG.js} +1 -1
- package/dist/{probe-Bci2pS8M.js → probe-BYRdyuw1.js} +43 -53
- package/dist/{probe.runtime-C88gnnXj.js → probe.runtime-uyKOQSBB.js} +1 -1
- package/dist/{provider-CfiChtjf.js → provider-Ca5Gua1B.js} +143 -123
- package/dist/{provider-session.runtime-D9GTBKPg.js → provider-session.runtime-IEheobg4.js} +3 -3
- package/dist/provider.runtime-Bn8horYu.js +2 -0
- package/dist/{resolve-allowlist-common-C1hTvZa4.js → resolve-allowlist-common-BU6_eGKg.js} +1 -1
- package/dist/{resolve-channels-CmFAdMeQ.js → resolve-channels-ByNsOMJj.js} +2 -2
- package/dist/{resolve-users-Cmu75lZy.js → resolve-users-CgWAonw-.js} +2 -2
- package/dist/{runtime-D-6AugWA.js → runtime-BZm4_qXV.js} +9 -9
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +19 -19
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/{runtime-api.monitor-DPa2ZoSK.js → runtime-api.monitor-BKYTUIuf.js} +2 -2
- package/dist/runtime-api.monitor.js +4 -4
- package/dist/runtime-api.send.js +6 -6
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{runtime-TwM8IrZU.js → runtime-h03Wce1c.js} +2 -2
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit-njzOejQp.js → security-audit-jGnJF__m.js} +38 -0
- package/dist/{security-audit.runtime-DZbDdAnw.js → security-audit.runtime-CPN0xFYz.js} +1 -1
- package/dist/{send-CfnXLUXq.js → send-C_PfNVFH.js} +5 -5
- package/dist/{send.components-V7cyCKbH.js → send.components-BrfbRJNq.js} +5 -5
- package/dist/{send.outbound-BbC2qjpH.js → send.outbound-1t1CryCK.js} +10 -35
- package/dist/{send.reactions-bLrJCZ4G.js → send.reactions-gesJG-Yp.js} +2 -2
- package/dist/{send.shared-Dfacnk-E.js → send.shared-BRGI9T9F.js} +3 -3
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-DMA7f3a8.js → shared--6-q1Zhl.js} +5 -5
- package/dist/{subagent-hooks-kFyJQ-MK.js → subagent-hooks-Dx9hr5Qy.js} +3 -3
- package/dist/subagent-hooks-api.js +2 -2
- package/dist/{subagent-progress-mjPRFz-a.js → subagent-progress-BZREb7jm.js} +2 -2
- package/dist/{system-events-BSlhBq3u.js → system-events-tVfIe6Xm.js} +1 -1
- package/dist/{target-resolver-Bo1oWLPO.js → target-resolver-_m_TsenB.js} +3 -3
- package/dist/targets-DqNz_mmW.js +3 -0
- package/dist/{thread-bindings-DAHJuT22.js → thread-bindings-u_7pNz5d.js} +4 -4
- package/dist/{thread-bindings.discord-api-C_tCQcv3.js → thread-bindings.discord-api-DOCKdVgx.js} +4 -4
- package/dist/{thread-bindings.manager-DlZEGvC1.js → thread-bindings.manager-BB-OD9-d.js} +5 -4
- package/dist/{transcripts-source-CyJ-sc3n.js → transcripts-source-BW2VfPX0.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-Ci9nhuSi.js → typing-eAhz8LT2.js} +1 -1
- package/package.json +4 -5
- package/dist/provider.runtime-DSzKjpKs.js +0 -2
- package/dist/targets-CB8ahjZk.js +0 -3
- package/npm-shrinkwrap.json +0 -1139
package/dist/runtime-api.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-
|
|
2
|
-
import { A as hasAllGuildPermissionsDiscord, B as clearGateways, H as registerGateway, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, U as unregisterGateway, V as getGateway, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-
|
|
3
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-
|
|
1
|
+
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-DJUzy5WA.js";
|
|
2
|
+
import { A as hasAllGuildPermissionsDiscord, B as clearGateways, H as registerGateway, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, U as unregisterGateway, V as getGateway, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-BRGI9T9F.js";
|
|
3
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-BrfbRJNq.js";
|
|
4
4
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
5
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
5
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-BQk4bBOC.js";
|
|
6
6
|
import { _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as resolveGroupDmAllow, y as shouldEmitDiscordReactionNotification } from "./allow-list-DzKrtfah.js";
|
|
7
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
7
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-1t1CryCK.js";
|
|
8
8
|
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
9
|
-
import { A as uploadEmojiDiscord, C as kickMemberDiscord, D as resolveEventCoverImage, E as removeRoleDiscord, F as moveChannelDiscord, I as removeChannelPermissionDiscord, L as setChannelPermissionDiscord, M as createChannelDiscord, N as deleteChannelDiscord, O as timeoutMemberDiscord, P as editChannelDiscord, S as fetchVoiceStatusDiscord, T as listScheduledEventsDiscord, _ as createScheduledEventDiscord, a as createThreadDiscord, b as fetchMemberInfoDiscord, c as fetchMessageDiscord, d as pinMessageDiscord, f as readMessagesDiscord, g as banMemberDiscord, h as addRoleDiscord, j as uploadStickerDiscord, k as listGuildEmojisDiscord, l as listPinsDiscord, m as unpinMessageDiscord, n as sendVoiceMessageDiscord, o as deleteMessageDiscord, p as searchMessagesDiscord, r as sendWebhookMessageDiscord, s as editMessageDiscord, u as listThreadsDiscord, v as fetchChannelInfoDiscord, w as listGuildChannelsDiscord, x as fetchRoleInfoDiscord } from "./send-
|
|
9
|
+
import { A as uploadEmojiDiscord, C as kickMemberDiscord, D as resolveEventCoverImage, E as removeRoleDiscord, F as moveChannelDiscord, I as removeChannelPermissionDiscord, L as setChannelPermissionDiscord, M as createChannelDiscord, N as deleteChannelDiscord, O as timeoutMemberDiscord, P as editChannelDiscord, S as fetchVoiceStatusDiscord, T as listScheduledEventsDiscord, _ as createScheduledEventDiscord, a as createThreadDiscord, b as fetchMemberInfoDiscord, c as fetchMessageDiscord, d as pinMessageDiscord, f as readMessagesDiscord, g as banMemberDiscord, h as addRoleDiscord, j as uploadStickerDiscord, k as listGuildEmojisDiscord, l as listPinsDiscord, m as unpinMessageDiscord, n as sendVoiceMessageDiscord, o as deleteMessageDiscord, p as searchMessagesDiscord, r as sendWebhookMessageDiscord, s as editMessageDiscord, u as listThreadsDiscord, v as fetchChannelInfoDiscord, w as listGuildChannelsDiscord, x as fetchRoleInfoDiscord } from "./send-C_PfNVFH.js";
|
|
10
10
|
import { a as isAbortError, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, l as runDiscordTaskWithTimeout, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as normalizeDiscordInboundWorkerTimeoutMs, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordListenerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
|
|
11
|
-
import { a as sendTypingDiscord, i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-
|
|
12
|
-
import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-
|
|
13
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
11
|
+
import { a as sendTypingDiscord, i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gesJG-Yp.js";
|
|
12
|
+
import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-BZm4_qXV.js";
|
|
13
|
+
import { t as discordMessageActions } from "./channel-actions-BweII8kV.js";
|
|
14
14
|
import { C as resolveThreadBindingInactivityExpiresAt, S as resolveThreadBindingIdleTimeoutMs, T as resolveThreadBindingMaxAgeMs, w as resolveThreadBindingMaxAgeExpiresAt } from "./thread-bindings.state-Cgi5uRn-.js";
|
|
15
15
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DAIlp7Px.js";
|
|
16
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
17
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
18
|
-
import { S as resolveThreadBindingThreadName, _ as resolveThreadBindingPersona, v as resolveThreadBindingPersonaFromRecord, x as resolveThreadBindingIntroText, y as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-
|
|
19
|
-
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-
|
|
20
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
21
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
16
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-ByNsOMJj.js";
|
|
17
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-CgWAonw-.js";
|
|
18
|
+
import { S as resolveThreadBindingThreadName, _ as resolveThreadBindingPersona, v as resolveThreadBindingPersonaFromRecord, x as resolveThreadBindingIntroText, y as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-DOCKdVgx.js";
|
|
19
|
+
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-u_7pNz5d.js";
|
|
20
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BB-OD9-d.js";
|
|
21
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BYRdyuw1.js";
|
|
22
22
|
import "./runtime-api.actions.js";
|
|
23
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
23
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-BF8hmDKp.js";
|
|
24
24
|
import "./runtime-api.lookup.js";
|
|
25
|
-
import { A as sanitizeDiscordThreadName, O as resolveDiscordReplyTarget, T as registerDiscordListener, d as createDiscordGatewayPlugin, f as resolveDiscordGatewayIntents, h as createDiscordNativeCommand, p as waitForDiscordGatewayPluginRegistration, t as monitorDiscordProvider } from "./provider-
|
|
26
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
27
|
-
import "./runtime-api.monitor-
|
|
25
|
+
import { A as sanitizeDiscordThreadName, O as resolveDiscordReplyTarget, T as registerDiscordListener, d as createDiscordGatewayPlugin, f as resolveDiscordGatewayIntents, h as createDiscordNativeCommand, p as waitForDiscordGatewayPluginRegistration, t as monitorDiscordProvider } from "./provider-Ca5Gua1B.js";
|
|
26
|
+
import { t as createDiscordMessageHandler } from "./message-handler-CxjL-a-8.js";
|
|
27
|
+
import "./runtime-api.monitor-BKYTUIuf.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, 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, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, 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
1
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
2
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
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-
|
|
2
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-BQk4bBOC.js";
|
|
3
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-ByNsOMJj.js";
|
|
4
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-CgWAonw-.js";
|
|
5
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BYRdyuw1.js";
|
|
6
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-BF8hmDKp.js";
|
|
7
7
|
export { auditDiscordChannelPermissions, collectDiscordAuditChannelIds, fetchDiscordApplicationId, fetchDiscordApplicationSummary, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, parseApplicationIdFromToken, probeDiscord, resolveDiscordChannelAllowlist, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordUserAllowlist, setDiscordRuntime };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as clearGateways, H as registerGateway, U as unregisterGateway, V as getGateway } from "./send.shared-
|
|
1
|
+
import { B as clearGateways, H as registerGateway, U as unregisterGateway, V as getGateway } from "./send.shared-BRGI9T9F.js";
|
|
2
2
|
import { _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as resolveGroupDmAllow, y as shouldEmitDiscordReactionNotification } from "./allow-list-DzKrtfah.js";
|
|
3
3
|
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
4
4
|
import { a as isAbortError, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, l as runDiscordTaskWithTimeout, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as normalizeDiscordInboundWorkerTimeoutMs, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordListenerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
|
|
5
|
-
import { A as sanitizeDiscordThreadName, O as resolveDiscordReplyTarget, T as registerDiscordListener, d as createDiscordGatewayPlugin, f as resolveDiscordGatewayIntents, h as createDiscordNativeCommand, p as waitForDiscordGatewayPluginRegistration, t as monitorDiscordProvider } from "./provider-
|
|
6
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
7
|
-
import "./runtime-api.monitor-
|
|
5
|
+
import { A as sanitizeDiscordThreadName, O as resolveDiscordReplyTarget, T as registerDiscordListener, d as createDiscordGatewayPlugin, f as resolveDiscordGatewayIntents, h as createDiscordNativeCommand, p as waitForDiscordGatewayPluginRegistration, t as monitorDiscordProvider } from "./provider-Ca5Gua1B.js";
|
|
6
|
+
import { t as createDiscordMessageHandler } from "./message-handler-CxjL-a-8.js";
|
|
7
|
+
import "./runtime-api.monitor-BKYTUIuf.js";
|
|
8
8
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, allowListMatches, clearGateways, clearPresences, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, getGateway, getPresence, isAbortError, isDiscordGroupAllowedByPolicy, 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,7 +1,7 @@
|
|
|
1
|
-
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-
|
|
2
|
-
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-
|
|
3
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-
|
|
4
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
5
|
-
import { A as uploadEmojiDiscord, C as kickMemberDiscord, D as resolveEventCoverImage, E as removeRoleDiscord, F as moveChannelDiscord, I as removeChannelPermissionDiscord, L as setChannelPermissionDiscord, M as createChannelDiscord, N as deleteChannelDiscord, O as timeoutMemberDiscord, P as editChannelDiscord, S as fetchVoiceStatusDiscord, T as listScheduledEventsDiscord, _ as createScheduledEventDiscord, a as createThreadDiscord, b as fetchMemberInfoDiscord, c as fetchMessageDiscord, d as pinMessageDiscord, f as readMessagesDiscord, g as banMemberDiscord, h as addRoleDiscord, j as uploadStickerDiscord, k as listGuildEmojisDiscord, l as listPinsDiscord, m as unpinMessageDiscord, n as sendVoiceMessageDiscord, o as deleteMessageDiscord, p as searchMessagesDiscord, r as sendWebhookMessageDiscord, s as editMessageDiscord, u as listThreadsDiscord, v as fetchChannelInfoDiscord, w as listGuildChannelsDiscord, x as fetchRoleInfoDiscord } from "./send-
|
|
6
|
-
import { a as sendTypingDiscord, i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-
|
|
1
|
+
import { t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-DJUzy5WA.js";
|
|
2
|
+
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-BRGI9T9F.js";
|
|
3
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-BrfbRJNq.js";
|
|
4
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-1t1CryCK.js";
|
|
5
|
+
import { A as uploadEmojiDiscord, C as kickMemberDiscord, D as resolveEventCoverImage, E as removeRoleDiscord, F as moveChannelDiscord, I as removeChannelPermissionDiscord, L as setChannelPermissionDiscord, M as createChannelDiscord, N as deleteChannelDiscord, O as timeoutMemberDiscord, P as editChannelDiscord, S as fetchVoiceStatusDiscord, T as listScheduledEventsDiscord, _ as createScheduledEventDiscord, a as createThreadDiscord, b as fetchMemberInfoDiscord, c as fetchMessageDiscord, d as pinMessageDiscord, f as readMessagesDiscord, g as banMemberDiscord, h as addRoleDiscord, j as uploadStickerDiscord, k as listGuildEmojisDiscord, l as listPinsDiscord, m as unpinMessageDiscord, n as sendVoiceMessageDiscord, o as deleteMessageDiscord, p as searchMessagesDiscord, r as sendWebhookMessageDiscord, s as editMessageDiscord, u as listThreadsDiscord, v as fetchChannelInfoDiscord, w as listGuildChannelsDiscord, x as fetchRoleInfoDiscord } from "./send-C_PfNVFH.js";
|
|
6
|
+
import { a as sendTypingDiscord, i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gesJG-Yp.js";
|
|
7
7
|
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 resolveThreadBindingInactivityExpiresAt, S as resolveThreadBindingIdleTimeoutMs, T as resolveThreadBindingMaxAgeMs, w as resolveThreadBindingMaxAgeExpiresAt } from "./thread-bindings.state-Cgi5uRn-.js";
|
|
2
2
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DAIlp7Px.js";
|
|
3
|
-
import { S as resolveThreadBindingThreadName, _ as resolveThreadBindingPersona, v as resolveThreadBindingPersonaFromRecord, x as resolveThreadBindingIntroText, y as formatThreadBindingDurationLabel } 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 { S as resolveThreadBindingThreadName, _ as resolveThreadBindingPersona, v as resolveThreadBindingPersonaFromRecord, x as resolveThreadBindingIntroText, y as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-DOCKdVgx.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-u_7pNz5d.js";
|
|
5
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BB-OD9-d.js";
|
|
6
6
|
export { autoBindSpawnedDiscordSubagent, createNoopThreadBindingManager, createThreadBindingManager, formatThreadBindingDurationLabel, getThreadBindingManager, listThreadBindingsBySessionKey, listThreadBindingsForAccount, reconcileAcpThreadBindingsOnStartup, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, testing, unbindThreadBindingsBySessionKey };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-
|
|
2
|
-
import { G as resolveDiscordProxyFetchForAccount } from "./send.shared-
|
|
1
|
+
import { n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
|
|
2
|
+
import { G as resolveDiscordProxyFetchForAccount } from "./send.shared-BRGI9T9F.js";
|
|
3
3
|
//#region extensions/discord/src/activities/config.ts
|
|
4
4
|
function readNonEmpty(value) {
|
|
5
5
|
return value?.trim() || void 0;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-
|
|
1
|
+
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-jGnJF__m.js";
|
|
2
2
|
export { collectDiscordSecurityAuditFindings };
|
|
@@ -5,6 +5,31 @@ import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runt
|
|
|
5
5
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
6
6
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
7
7
|
//#region extensions/discord/src/security-audit.ts
|
|
8
|
+
function isWildcardEntry(value) {
|
|
9
|
+
return String(value).trim() === "*";
|
|
10
|
+
}
|
|
11
|
+
function hasNarrowMemberRestriction(guild, channel) {
|
|
12
|
+
const users = channel?.users ?? guild.users ?? [];
|
|
13
|
+
const roles = channel?.roles ?? guild.roles ?? [];
|
|
14
|
+
if ([...users, ...roles].some((entry) => isWildcardEntry(entry))) return false;
|
|
15
|
+
return users.length > 0 || roles.length > 0;
|
|
16
|
+
}
|
|
17
|
+
function listBroadMemberTargetPaths(params) {
|
|
18
|
+
const paths = [];
|
|
19
|
+
for (const [guildKey, guild] of Object.entries(params.discordCfg.guilds ?? {})) {
|
|
20
|
+
const guildPath = `${params.pathPrefix}.guilds.${guildKey}`;
|
|
21
|
+
const channels = Object.entries(guild.channels ?? {});
|
|
22
|
+
if (channels.length === 0) {
|
|
23
|
+
if (!hasNarrowMemberRestriction(guild)) paths.push(guildPath);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
for (const [channelKey, channel] of channels) {
|
|
27
|
+
if (channel.enabled === false || hasNarrowMemberRestriction(guild, channel)) continue;
|
|
28
|
+
paths.push(`${guildPath}.channels.${channelKey}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return paths.toSorted();
|
|
32
|
+
}
|
|
8
33
|
function addDiscordNameBasedEntries(params) {
|
|
9
34
|
if (!Array.isArray(params.values)) return;
|
|
10
35
|
for (const value of params.values) {
|
|
@@ -22,6 +47,19 @@ async function collectDiscordSecurityAuditFindings(params) {
|
|
|
22
47
|
const storeAllowFrom = await readChannelAllowFromStore("discord", process.env, accountId).catch(() => []);
|
|
23
48
|
const discordNameBasedAllowEntries = /* @__PURE__ */ new Set();
|
|
24
49
|
const discordPathPrefix = params.orderedAccountIds.length > 1 || params.hasExplicitAccountPath ? `channels.discord.accounts.${accountId}` : "channels.discord";
|
|
50
|
+
if ((discordCfg.groupPolicy ?? params.cfg.channels?.defaults?.groupPolicy ?? "allowlist") === "allowlist") {
|
|
51
|
+
const broadMemberPaths = listBroadMemberTargetPaths({
|
|
52
|
+
discordCfg,
|
|
53
|
+
pathPrefix: discordPathPrefix
|
|
54
|
+
});
|
|
55
|
+
if (broadMemberPaths.length > 0) findings.push({
|
|
56
|
+
checkId: "channels.discord.allowlisted_groups.broad_members",
|
|
57
|
+
severity: "warn",
|
|
58
|
+
title: "Discord allowlisted groups have broad member access",
|
|
59
|
+
detail: `These allowlisted Discord targets have no effective users or roles restriction:\n${broadMemberPaths.map((path) => `- ${path}`).join("\n")}\ngroupPolicy="allowlist" limits guilds/channels, but all members of a listed target can still trigger the agent.`,
|
|
60
|
+
remediation: "Add users or roles restrictions at each listed guild/channel when only specific members should trigger the agent."
|
|
61
|
+
});
|
|
62
|
+
}
|
|
25
63
|
addDiscordNameBasedEntries({
|
|
26
64
|
target: discordNameBasedAllowEntries,
|
|
27
65
|
values: discordCfg.allowFrom,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-
|
|
1
|
+
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-jGnJF__m.js";
|
|
2
2
|
export { collectDiscordSecurityAuditFindings };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as readDiscordMessage, At as createGuildBan, Bt as listGuildChannels, Ct as listChannelMessages, D as RateLimitError, E as DiscordError, Et as searchGuildMessages, Ft as deleteChannelPermission, Gt as putChannelPermission, Ht as listGuildRoles, It as getGuild, Jt as timeoutGuildMember, Kt as removeGuildMember, Lt as getGuildMember, Mt as createGuildEmoji, Nt as createGuildScheduledEvent, O as isUnknownDiscordVoiceStateError, Ot as unpinChannelMessage, Pt as createGuildSticker, Rt as getGuildVoiceState, St as listChannelArchivedThreads, Tt as pinChannelMessage, Ut as listGuildScheduledEvents, Vt as listGuildEmojis, Wt as moveGuildChannels, Yt as __exportAll, _t as editChannel, bt as getChannelMessage, gt as deleteChannelMessage, ht as deleteChannel, j as readRetryAfter, jt as createGuildChannel, k as readDiscordCode, kt as addGuildMemberRole, mt as createThread, pt as createChannelMessage, qt as removeGuildMemberRole, vt as editChannelMessage, wt as listChannelPins, yt as getChannel, zt as listGuildActiveThreads } from "./chunk-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { A as hasAllGuildPermissionsDiscord, C as DISCORD_MAX_STICKER_BYTES, D as canViewDiscordGuildChannel, E as canManageGuildRoleDiscord, L as resolveDiscordClientAccountContext, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, P as createDiscordClient, R as resolveDiscordRest, S as DISCORD_MAX_EVENT_COVER_BYTES, T as canManageGuildMemberRoleDiscord, W as parseAndResolveChannelRecipient, g as createDiscordMessageNonce, j as hasAnyChannelPermissionDiscord, k as fetchMemberGuildPermissionsDiscord, l as resolveChannelId, o as normalizeEmojiName, t as buildDiscordSendError, w as DiscordSendError, x as DISCORD_MAX_EMOJI_BYTES } from "./send.shared-
|
|
4
|
-
import { n as sendPollDiscord, o as rewriteDiscordKnownMentions, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
1
|
+
import { A as readDiscordMessage, At as createGuildBan, Bt as listGuildChannels, Ct as listChannelMessages, D as RateLimitError, E as DiscordError, Et as searchGuildMessages, Ft as deleteChannelPermission, Gt as putChannelPermission, Ht as listGuildRoles, It as getGuild, Jt as timeoutGuildMember, Kt as removeGuildMember, Lt as getGuildMember, Mt as createGuildEmoji, Nt as createGuildScheduledEvent, O as isUnknownDiscordVoiceStateError, Ot as unpinChannelMessage, Pt as createGuildSticker, Rt as getGuildVoiceState, St as listChannelArchivedThreads, Tt as pinChannelMessage, Ut as listGuildScheduledEvents, Vt as listGuildEmojis, Wt as moveGuildChannels, Yt as __exportAll, _t as editChannel, bt as getChannelMessage, gt as deleteChannelMessage, ht as deleteChannel, j as readRetryAfter, jt as createGuildChannel, k as readDiscordCode, kt as addGuildMemberRole, mt as createThread, pt as createChannelMessage, qt as removeGuildMemberRole, vt as editChannelMessage, wt as listChannelPins, yt as getChannel, zt as listGuildActiveThreads } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
|
|
3
|
+
import { A as hasAllGuildPermissionsDiscord, C as DISCORD_MAX_STICKER_BYTES, D as canViewDiscordGuildChannel, E as canManageGuildRoleDiscord, L as resolveDiscordClientAccountContext, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, P as createDiscordClient, R as resolveDiscordRest, S as DISCORD_MAX_EVENT_COVER_BYTES, T as canManageGuildMemberRoleDiscord, W as parseAndResolveChannelRecipient, g as createDiscordMessageNonce, j as hasAnyChannelPermissionDiscord, k as fetchMemberGuildPermissionsDiscord, l as resolveChannelId, o as normalizeEmojiName, t as buildDiscordSendError, w as DiscordSendError, x as DISCORD_MAX_EMOJI_BYTES } from "./send.shared-BRGI9T9F.js";
|
|
4
|
+
import { n as sendPollDiscord, o as rewriteDiscordKnownMentions, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-1t1CryCK.js";
|
|
5
5
|
import { n as createDiscordSendResult } from "./send.receipt-CuwRrpFz.js";
|
|
6
6
|
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
|
|
7
|
-
import { a as sendTypingDiscord, i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-
|
|
7
|
+
import { a as sendTypingDiscord, i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gesJG-Yp.js";
|
|
8
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
10
10
|
import { ChannelType } from "discord-api-types/v10";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { L as serializePayload, Yt as __exportAll, pt as createChannelMessage, vt as editChannelMessage } from "./chunk-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { f as buildDiscordComponentMessage, g as resolveDiscordComponentAttachmentName, p as buildDiscordComponentMessageFlags } from "./outbound-session-route-
|
|
4
|
-
import { P as createDiscordClient, W as parseAndResolveChannelRecipient, b as stripUndefinedFields, g as createDiscordMessageNonce, l as resolveChannelId, m as SUPPRESS_NOTIFICATIONS_FLAG, t as buildDiscordSendError, u as resolveDiscordChannel } from "./send.shared-
|
|
1
|
+
import { L as serializePayload, Yt as __exportAll, pt as createChannelMessage, vt as editChannelMessage } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
|
|
3
|
+
import { f as buildDiscordComponentMessage, g as resolveDiscordComponentAttachmentName, p as buildDiscordComponentMessageFlags } from "./outbound-session-route-DJUzy5WA.js";
|
|
4
|
+
import { P as createDiscordClient, W as parseAndResolveChannelRecipient, b as stripUndefinedFields, g as createDiscordMessageNonce, l as resolveChannelId, m as SUPPRESS_NOTIFICATIONS_FLAG, t as buildDiscordSendError, u as resolveDiscordChannel } from "./send.shared-BRGI9T9F.js";
|
|
5
5
|
import { n as getOptionalDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
6
|
import "./config-schema-D-YrV-5E.js";
|
|
7
7
|
import "./channel-api-CAJ0wMoV.js";
|
|
8
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
8
|
+
import { t as sendMessageDiscord } from "./send.outbound-1t1CryCK.js";
|
|
9
9
|
import { n as createDiscordSendResult } from "./send.receipt-CuwRrpFz.js";
|
|
10
10
|
import "openclaw/plugin-sdk/account-helpers";
|
|
11
11
|
import "openclaw/plugin-sdk/account-id";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { mt as createThread, n as createReusableDiscordReplyReference, pt as createChannelMessage } from "./chunk-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { P as createDiscordClient, W as parseAndResolveChannelRecipient, _ as resolveDiscordMessageFlags, a as normalizeDiscordPollInput, c as normalizeStickerIds, f as sendDiscordMedia, g as createDiscordMessageNonce, h as buildDiscordMessageRequest, l as resolveChannelId, n as buildDiscordTextChunks, p as sendDiscordText, t as buildDiscordSendError, u as resolveDiscordChannel, v as resolveDiscordSendComponents, y as resolveDiscordSendEmbeds } from "./send.shared-
|
|
4
|
-
import {
|
|
1
|
+
import { mt as createThread, n as createReusableDiscordReplyReference, pt as createChannelMessage } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
|
|
3
|
+
import { P as createDiscordClient, W as parseAndResolveChannelRecipient, _ as resolveDiscordMessageFlags, a as normalizeDiscordPollInput, c as normalizeStickerIds, f as sendDiscordMedia, g as createDiscordMessageNonce, h as buildDiscordMessageRequest, l as resolveChannelId, n as buildDiscordTextChunks, p as sendDiscordText, t as buildDiscordSendError, u as resolveDiscordChannel, v as resolveDiscordSendComponents, y as resolveDiscordSendEmbeds } from "./send.shared-BRGI9T9F.js";
|
|
4
|
+
import { i as normalizeDiscordHandleKey, o as resolveDiscordDirectoryUserId } from "./directory-live-BQk4bBOC.js";
|
|
5
5
|
import { n as createDiscordSendResult } from "./send.receipt-CuwRrpFz.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { ChannelType } from "discord-api-types/v10";
|
|
@@ -12,34 +12,16 @@ import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"
|
|
|
12
12
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
13
13
|
import { resolveChunkMode } from "openclaw/plugin-sdk/reply-chunking";
|
|
14
14
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
15
|
-
import { convertMarkdownTables, renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-chunking";
|
|
15
|
+
import { FormatCapabilityProfile, convertMarkdownTables, renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-chunking";
|
|
16
16
|
//#region extensions/discord/src/markdown.ts
|
|
17
|
-
const DISCORD_FORMAT_PROFILE = {
|
|
17
|
+
const DISCORD_FORMAT_PROFILE = FormatCapabilityProfile.define({
|
|
18
18
|
mechanism: "markdown",
|
|
19
|
-
constructs: {
|
|
20
|
-
bold: "native",
|
|
21
|
-
italic: "native",
|
|
22
|
-
underline: "native",
|
|
23
|
-
strikethrough: "native",
|
|
24
|
-
spoiler: "native",
|
|
25
|
-
codeInline: "native",
|
|
26
|
-
codeBlock: "native",
|
|
27
|
-
codeLanguage: "native",
|
|
28
|
-
linkLabel: "native",
|
|
29
|
-
heading: "native",
|
|
30
|
-
bulletList: "native",
|
|
31
|
-
orderedList: "native",
|
|
32
|
-
taskList: "native",
|
|
33
|
-
table: "fallback",
|
|
34
|
-
blockquote: "native",
|
|
35
|
-
image: "native",
|
|
36
|
-
mention: "native"
|
|
37
|
-
},
|
|
19
|
+
constructs: { table: "fallback" },
|
|
38
20
|
chunk: {
|
|
39
21
|
limit: 2e3,
|
|
40
22
|
unit: "utf16"
|
|
41
23
|
}
|
|
42
|
-
};
|
|
24
|
+
});
|
|
43
25
|
const DISCORD_BOLD_PROBE_TEXT = "openclaw-discord-bold";
|
|
44
26
|
const DISCORD_BOLD_PROBE = renderMarkdownWithMarkers({
|
|
45
27
|
text: DISCORD_BOLD_PROBE_TEXT,
|
|
@@ -340,19 +322,12 @@ function formatMention(params) {
|
|
|
340
322
|
if (target.kind === "role") return `<@&${target.id}>`;
|
|
341
323
|
return `<#${target.id}>`;
|
|
342
324
|
}
|
|
343
|
-
function normalizeHandleKey(raw) {
|
|
344
|
-
let handle = normalizeOptionalString(raw) ?? "";
|
|
345
|
-
if (!handle) return null;
|
|
346
|
-
if (handle.startsWith("@")) handle = normalizeOptionalString(handle.slice(1)) ?? "";
|
|
347
|
-
if (!handle || /\s/.test(handle)) return null;
|
|
348
|
-
return normalizeLowercaseStringOrEmpty(handle);
|
|
349
|
-
}
|
|
350
325
|
function resolveConfiguredMentionAlias(handle, mentionAliases) {
|
|
351
|
-
const key =
|
|
326
|
+
const key = normalizeDiscordHandleKey(handle);
|
|
352
327
|
if (!key || !mentionAliases) return;
|
|
353
328
|
const withoutDiscriminator = key.replace(DISCORD_DISCRIMINATOR_SUFFIX, "");
|
|
354
329
|
for (const [rawAlias, rawUserId] of Object.entries(mentionAliases)) {
|
|
355
|
-
const alias =
|
|
330
|
+
const alias = normalizeDiscordHandleKey(rawAlias);
|
|
356
331
|
if (!alias) continue;
|
|
357
332
|
const aliasWithoutDiscriminator = alias.replace(DISCORD_DISCRIMINATOR_SUFFIX, "");
|
|
358
333
|
if (alias === key || withoutDiscriminator && withoutDiscriminator !== key && alias === withoutDiscriminator || aliasWithoutDiscriminator && aliasWithoutDiscriminator !== alias && aliasWithoutDiscriminator === key) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dt as sendChannelTyping, bt as getChannelMessage, dt as deleteOwnMessageReaction, ft as listMessageReactionUsers, ut as createOwnMessageReaction } from "./chunk-
|
|
2
|
-
import { P as createDiscordClient, R as resolveDiscordRest, i as formatReactionEmoji, r as buildReactionIdentifier, s as normalizeReactionEmoji } from "./send.shared-
|
|
1
|
+
import { Dt as sendChannelTyping, bt as getChannelMessage, dt as deleteOwnMessageReaction, ft as listMessageReactionUsers, ut as createOwnMessageReaction } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { P as createDiscordClient, R as resolveDiscordRest, i as formatReactionEmoji, r as buildReactionIdentifier, s as normalizeReactionEmoji } from "./send.shared-BRGI9T9F.js";
|
|
3
3
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
4
4
|
//#region extensions/discord/src/send.typing.ts
|
|
5
5
|
async function sendTypingDiscord(channelId, opts) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as RateLimitError, It as getGuild, L as serializePayload, Lt as getGuildMember, R as Embed, T as RequestClient, ct as createUserDmChannel, lt as getCurrentUser, pt as createChannelMessage, r as resolveDiscordReplyMessageId, t as chunkDiscordTextWithMode, xt as getThreadMember, yt as getChannel } from "./chunk-
|
|
2
|
-
import { a as mergeDiscordAccountConfig, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { t as parseAndResolveDiscordTarget } from "./target-resolver-
|
|
1
|
+
import { D as RateLimitError, It as getGuild, L as serializePayload, Lt as getGuildMember, R as Embed, T as RequestClient, ct as createUserDmChannel, lt as getCurrentUser, pt as createChannelMessage, r as resolveDiscordReplyMessageId, t as chunkDiscordTextWithMode, xt as getThreadMember, yt as getChannel } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { a as mergeDiscordAccountConfig, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
|
|
3
|
+
import { t as parseAndResolveDiscordTarget } from "./target-resolver-_m_TsenB.js";
|
|
4
4
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
5
5
|
import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ChannelType, MessageFlags, PermissionFlagsBits } from "discord-api-types/v10";
|
|
@@ -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-BB-OD9-d.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-Cpv7n0I8.js";
|
|
2
2
|
export { discordSetupPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, n as isDiscordAccountEnabledForRuntime, o as resolveDefaultDiscordAccountId, r as listDiscordAccountIds, s as resolveDiscordAccount, u as resolveDiscordAccountDisabledReason } from "./accounts-
|
|
1
|
+
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, n as isDiscordAccountEnabledForRuntime, o as resolveDefaultDiscordAccountId, r as listDiscordAccountIds, s as resolveDiscordAccount, u as resolveDiscordAccountDisabledReason } from "./accounts-DJTf1LtA.js";
|
|
2
2
|
import { t as DiscordChannelConfigSchema } from "./config-schema-D-YrV-5E.js";
|
|
3
3
|
import { i as getChatChannelMeta, o as resolveConfiguredFromCredentialStatuses } from "./channel-api-CAJ0wMoV.js";
|
|
4
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
5
|
-
import { n as normalizeCompatibilityConfig } from "./doctor-contract-
|
|
4
|
+
import { t as inspectDiscordAccount } from "./account-inspect-SXiCBCgP.js";
|
|
5
|
+
import { n as normalizeCompatibilityConfig } from "./doctor-contract-CCFMIDk9.js";
|
|
6
6
|
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-B1akrlyY.js";
|
|
7
7
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-DSHk7I2w.js";
|
|
8
8
|
import { t as deriveLegacySessionChatType } from "./session-contract-BO5tlIdl.js";
|
|
@@ -48,7 +48,7 @@ const collectDiscordSecurityWarnings = createOpenProviderConfiguredRouteWarningC
|
|
|
48
48
|
remediation: "Set channels.discord.groupPolicy=\"allowlist\" and configure channels.discord.guilds.<id>.channels"
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
const loadDiscordSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit.runtime-
|
|
51
|
+
const loadDiscordSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit.runtime-CPN0xFYz.js"));
|
|
52
52
|
const discordSecurityAdapter = {
|
|
53
53
|
resolveDmPolicy: resolveDiscordDmPolicy,
|
|
54
54
|
collectWarnings: collectDiscordSecurityWarnings,
|
|
@@ -87,7 +87,7 @@ const DISCORD_LEGACY_CONFIG_RULES = [];
|
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region extensions/discord/src/shared.ts
|
|
89
89
|
const DISCORD_CHANNEL = "discord";
|
|
90
|
-
const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-
|
|
90
|
+
const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-DIcs6IDL.js"));
|
|
91
91
|
const discordDoctor = {
|
|
92
92
|
dmAllowFromMode: "topOnly",
|
|
93
93
|
groupModel: "route",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Yt as __exportAll } from "./chunk-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-
|
|
1
|
+
import { Yt as __exportAll } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
|
|
3
|
+
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-u_7pNz5d.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
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
2
2
|
//#region extensions/discord/subagent-hooks-api.ts
|
|
3
|
-
const loadDiscordSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-
|
|
4
|
-
const loadDiscordSubagentProgressModule = createLazyRuntimeModule(() => import("./subagent-progress-
|
|
3
|
+
const loadDiscordSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-Dx9hr5Qy.js").then((n) => n.i));
|
|
4
|
+
const loadDiscordSubagentProgressModule = createLazyRuntimeModule(() => import("./subagent-progress-BZREb7jm.js"));
|
|
5
5
|
function registerDiscordSubagentHooks(api) {
|
|
6
6
|
api.on("gateway_start", async () => {
|
|
7
7
|
const { recoverDiscordSubagentProgress } = await loadDiscordSubagentProgressModule();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
2
|
-
import { a as sendTypingDiscord, i as removeReactionDiscord, n as reactMessageDiscord } from "./send.reactions-
|
|
1
|
+
import { s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
|
|
2
|
+
import { a as sendTypingDiscord, i as removeReactionDiscord, n as reactMessageDiscord } from "./send.reactions-gesJG-Yp.js";
|
|
3
3
|
import { normalizeOptionalLowercaseString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { DEFAULT_EMOJIS } from "openclaw/plugin-sdk/channel-feedback";
|
|
5
5
|
//#region extensions/discord/src/subagent-progress-config.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as discord_exports } from "./chunk-
|
|
1
|
+
import { d as discord_exports } from "./chunk-CMVEczdm.js";
|
|
2
2
|
import { x as formatDiscordUserTag } from "./allow-list-DzKrtfah.js";
|
|
3
3
|
//#region extensions/discord/src/monitor/system-events.ts
|
|
4
4
|
function resolveDiscordSystemEvent(message, location) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Yt as __exportAll, a as allowFromContainsDiscordUserId, l as parseDiscordTarget } from "./chunk-
|
|
2
|
-
import { c as resolveDiscordAccountAllowFrom, s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import {
|
|
1
|
+
import { Yt as __exportAll, a as allowFromContainsDiscordUserId, l as parseDiscordTarget } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { c as resolveDiscordAccountAllowFrom, s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
|
|
3
|
+
import { a as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-BQk4bBOC.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);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Yt as __exportAll, l as parseDiscordTarget } from "./chunk-
|
|
2
|
-
import "./targets-
|
|
1
|
+
import { Yt as __exportAll, l as parseDiscordTarget } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import "./targets-DqNz_mmW.js";
|
|
3
3
|
import { C as resolveThreadBindingInactivityExpiresAt, E as saveBindingsToDisk, S as resolveThreadBindingIdleTimeoutMs$1, T as resolveThreadBindingMaxAgeMs$1, h as refreshUnboundThreadWebhookIdentity, k as shouldPersistBindingMutations, m as normalizeThreadId, n as MANAGERS_BY_ACCOUNT_ID, t as BINDINGS_BY_THREAD_ID, u as getThreadBindingToken, v as removeBindingRecord, w as resolveThreadBindingMaxAgeExpiresAt } from "./thread-bindings.state-Cgi5uRn-.js";
|
|
4
4
|
import { n as setThreadBindingMaxAgeBySessionKey, r as resolveBindingIdsForTargetSession, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DAIlp7Px.js";
|
|
5
|
-
import { S as resolveThreadBindingThreadName, _ as resolveThreadBindingPersona, s as resolveChannelIdForBinding, v as resolveThreadBindingPersonaFromRecord, x as resolveThreadBindingIntroText, y as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-
|
|
6
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
5
|
+
import { S as resolveThreadBindingThreadName, _ as resolveThreadBindingPersona, s as resolveChannelIdForBinding, v as resolveThreadBindingPersonaFromRecord, x as resolveThreadBindingIntroText, y as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-DOCKdVgx.js";
|
|
6
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BB-OD9-d.js";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
8
8
|
import { normalizeOptionalLowercaseString, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
|
package/dist/{thread-bindings.discord-api-C_tCQcv3.js → thread-bindings.discord-api-DOCKdVgx.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { st as createChannelWebhook, u as resolveDiscordChannelId, yt as getChannel } from "./chunk-
|
|
2
|
-
import { F as createDiscordRestClient } from "./send.shared-
|
|
3
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
4
|
-
import { a as createThreadDiscord, r as sendWebhookMessageDiscord } from "./send-
|
|
1
|
+
import { st as createChannelWebhook, u as resolveDiscordChannelId, yt as getChannel } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { F as createDiscordRestClient } from "./send.shared-BRGI9T9F.js";
|
|
3
|
+
import { t as sendMessageDiscord } from "./send.outbound-1t1CryCK.js";
|
|
4
|
+
import { a as createThreadDiscord, r as sendWebhookMessageDiscord } from "./send-C_PfNVFH.js";
|
|
5
5
|
import { g as rememberReusableWebhook, i as REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL, j as toReusableWebhookKey, t as BINDINGS_BY_THREAD_ID } from "./thread-bindings.state-Cgi5uRn-.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { ChannelType } from "discord-api-types/v10";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Yt as __exportAll, u as resolveDiscordChannelId, yt as getChannel } from "./chunk-
|
|
2
|
-
import { F as createDiscordRestClient } from "./send.shared-
|
|
1
|
+
import { Yt as __exportAll, u as resolveDiscordChannelId, yt as getChannel } from "./chunk-CMVEczdm.js";
|
|
2
|
+
import { F as createDiscordRestClient } from "./send.shared-BRGI9T9F.js";
|
|
3
3
|
import { C as resolveThreadBindingInactivityExpiresAt, D as setBindingRecord, E as saveBindingsToDisk, O as shouldDefaultPersist, S as resolveThreadBindingIdleTimeoutMs$1, T as resolveThreadBindingMaxAgeMs$1, _ as rememberThreadBindingToken, b as resolveBindingIdsForSession, c as ensureBindingsLoaded, f as normalizeTargetKind, h as refreshUnboundThreadWebhookIdentity, l as forgetThreadBindingToken, m as normalizeThreadId, n as MANAGERS_BY_ACCOUNT_ID, p as normalizeThreadBindingDurationMs, r as PERSIST_BY_ACCOUNT_ID, s as THREAD_BINDING_TOUCH_PERSIST_MIN_INTERVAL_MS, t as BINDINGS_BY_THREAD_ID, u as getThreadBindingToken, v as removeBindingRecord, w as resolveThreadBindingMaxAgeExpiresAt, x as resolveBindingRecordKey, y as resetThreadBindingsForTests } from "./thread-bindings.state-Cgi5uRn-.js";
|
|
4
|
-
import { S as resolveThreadBindingThreadName, a as isThreadArchived, b as resolveThreadBindingFarewellText, c as summarizeDiscordError, i as isDiscordThreadGoneError, l as DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS, n as createWebhookForChannel, o as maybeSendBindingMessage, r as findReusableWebhook, s as resolveChannelIdForBinding, t as createThreadForBinding, u as THREAD_BINDINGS_SWEEP_INTERVAL_MS } from "./thread-bindings.discord-api-
|
|
4
|
+
import { S as resolveThreadBindingThreadName, a as isThreadArchived, b as resolveThreadBindingFarewellText, c as summarizeDiscordError, i as isDiscordThreadGoneError, l as DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS, n as createWebhookForChannel, o as maybeSendBindingMessage, r as findReusableWebhook, s as resolveChannelIdForBinding, t as createThreadForBinding, u as THREAD_BINDINGS_SWEEP_INTERVAL_MS } from "./thread-bindings.discord-api-DOCKdVgx.js";
|
|
5
5
|
import { normalizeAccountId, resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
8
8
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
9
9
|
import { registerSessionBindingAdapter, resolveThreadBindingConversationIdFromBindingId, unregisterSessionBindingAdapter } from "openclaw/plugin-sdk/conversation-runtime";
|
|
10
|
+
import { resolveDefaultAgentId } from "openclaw/plugin-sdk/agent-runtime";
|
|
10
11
|
//#region extensions/discord/src/monitor/thread-bindings.session-adapter.ts
|
|
11
12
|
function normalizeChildBindingParentChannelId(raw) {
|
|
12
13
|
const trimmed = normalizeOptionalString(raw) ?? "";
|
|
@@ -399,7 +400,7 @@ function createThreadBindingManager(params) {
|
|
|
399
400
|
threadId,
|
|
400
401
|
targetKind,
|
|
401
402
|
targetSessionKey,
|
|
402
|
-
agentId: normalizeOptionalString(bindParams.agentId) ?? normalizeOptionalString(existingValue?.agentId) ?? resolveAgentIdFromSessionKey(targetSessionKey),
|
|
403
|
+
agentId: normalizeOptionalString(bindParams.agentId) ?? normalizeOptionalString(existingValue?.agentId) ?? resolveAgentIdFromSessionKey(targetSessionKey, resolveDefaultAgentId(cfg)),
|
|
403
404
|
label: normalizeOptionalString(bindParams.label) ?? normalizeOptionalString(existingValue?.label),
|
|
404
405
|
webhookId: webhookId || void 0,
|
|
405
406
|
webhookToken: webhookToken || void 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Yt as __exportAll } from "./chunk-
|
|
1
|
+
import { Yt as __exportAll } from "./chunk-CMVEczdm.js";
|
|
2
2
|
//#region extensions/discord/src/voice/transcripts-source.ts
|
|
3
3
|
var transcripts_source_exports = /* @__PURE__ */ __exportAll({
|
|
4
4
|
discordVoiceTranscriptsSourceProvider: () => discordVoiceTranscriptsSourceProvider,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-
|
|
1
|
+
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-BW2VfPX0.js";
|
|
2
2
|
export { discordVoiceTranscriptsSourceProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dt as sendChannelTyping, Yt as __exportAll } from "./chunk-
|
|
1
|
+
import { Dt as sendChannelTyping, Yt as __exportAll } from "./chunk-CMVEczdm.js";
|
|
2
2
|
import { c as raceWithTimeout } from "./timeouts-B9cy6RvQ.js";
|
|
3
3
|
//#region extensions/discord/src/monitor/typing.ts
|
|
4
4
|
var typing_exports = /* @__PURE__ */ __exportAll({ sendTyping: () => sendTyping });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/discord",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.5",
|
|
4
4
|
"description": "OpenClaw Discord channel plugin for channels, DMs, commands, and app events.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"zod": "4.4.3"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"openclaw": ">=2026.7.2-beta.
|
|
23
|
+
"openclaw": ">=2026.7.2-beta.5"
|
|
24
24
|
},
|
|
25
25
|
"peerDependenciesMeta": {
|
|
26
26
|
"openclaw": {
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"allowInvalidConfigRecovery": true
|
|
90
90
|
},
|
|
91
91
|
"compat": {
|
|
92
|
-
"pluginApi": ">=2026.7.2-beta.
|
|
92
|
+
"pluginApi": ">=2026.7.2-beta.5"
|
|
93
93
|
},
|
|
94
94
|
"build": {
|
|
95
|
-
"openclawVersion": "2026.7.2-beta.
|
|
95
|
+
"openclawVersion": "2026.7.2-beta.5",
|
|
96
96
|
"staticAssets": [
|
|
97
97
|
{
|
|
98
98
|
"source": "./assets/embedded-app-sdk.mjs",
|
|
@@ -115,7 +115,6 @@
|
|
|
115
115
|
"files": [
|
|
116
116
|
"dist/**",
|
|
117
117
|
"openclaw.plugin.json",
|
|
118
|
-
"npm-shrinkwrap.json",
|
|
119
118
|
"README.md",
|
|
120
119
|
"skills/**"
|
|
121
120
|
],
|
package/dist/targets-CB8ahjZk.js
DELETED