@openclaw/discord 2026.5.28 → 2026.5.31-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-inspect-C4sJZNbI.js → account-inspect-DDZtT5C8.js} +9 -7
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-dXTfmnSZ.js → accounts-P19jm1lf.js} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/api.js +16 -16
- package/dist/{approval-handler.runtime-CN_E7nkQ.js → approval-handler.runtime-DSFfzXpo.js} +4 -4
- package/dist/{audit-BFCBp74H.js → audit-kgIklCyI.js} +4 -4
- package/dist/{channel-COXb22wL.js → channel-D0gX0yj6.js} +44 -31
- package/dist/{channel-actions-C2g9OmnG.js → channel-actions-DDoc4V7x.js} +4 -4
- package/dist/{channel-actions.runtime-drnbrgpt.js → channel-actions.runtime-CqZfnMaA.js} +5 -5
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-BsrP5-hv.js → channel.setup-BNZm3eed.js} +8 -23
- package/dist/{components-CjQujWa1.js → components-DcLQ2JkV.js} +1 -1
- package/dist/{config-schema-3tZYNVTM.js → config-schema-spuxW477.js} +17 -1
- package/dist/contract-api.js +3 -3
- package/dist/{conversation-identity-CsPV1Gjx.js → conversation-identity-BURFgcfI.js} +7 -5
- package/dist/{directory-config-BqPvRoDv.js → directory-config-B9Jw1Q2R.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CCI0IMZq.js → directory-live-CDWUg-nA.js} +2 -2
- package/dist/{doctor-Dy7sI1sL.js → doctor-BUhqxLb9.js} +4 -5
- package/dist/{doctor-contract-8-Ia3d_X.js → doctor-contract-BAu3WLvd.js} +5 -5
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-BmjclQbR.js → handle-action.guild-admin-Dpa-kUzu.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/legacy-state-migrations-api.js +3 -1
- package/dist/{manager.runtime-ClhnLsZf.js → manager.runtime-BWBENHRA.js} +22 -19
- package/dist/{message-handler-BnhAHqem.js → message-handler-HO8BbZmQ.js} +182 -29
- package/dist/{message-handler.preflight-B1RTQ6ZO.js → message-handler.preflight-DxHBPQvD.js} +24 -17
- package/dist/{message-handler.process-B1ODKav3.js → message-handler.process-Cq3j7A9k.js} +41 -29
- package/dist/{message-utils-CmB03FoF.js → message-utils-D_3KTxh_.js} +19 -15
- package/dist/{outbound-adapter-DfY2Dtf3.js → outbound-adapter-BkPkILpq.js} +52 -87
- package/dist/{pluralkit-DAZN3ZMK.js → pluralkit-Ds9aZAM4.js} +1 -1
- package/dist/{probe-BiEg-_i1.js → probe-2MdGjUAf.js} +1 -1
- package/dist/{probe.runtime-Dja7CbJT.js → probe.runtime-J927koKG.js} +1 -1
- package/dist/{provider-DCcqVFp-.js → provider-BK8hjk_y.js} +224 -150
- package/dist/{provider-session.runtime-mKSG07RE.js → provider-session.runtime-CYMFlLg9.js} +3 -3
- package/dist/provider.runtime-RfQSSM_v.js +2 -0
- package/dist/{resolve-allowlist-common-DAIbZobr.js → resolve-allowlist-common-BIf3417N.js} +1 -1
- package/dist/{resolve-channels-D1zgoxnw.js → resolve-channels-DK-3f_aA.js} +2 -2
- package/dist/{resolve-users-wPAvLk_8.js → resolve-users-DUDPsfWt.js} +2 -2
- package/dist/{runtime-gaB5-Wsj.js → runtime-Blf_d9E7.js} +8 -8
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +22 -22
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-LVbgPRHA.js +6 -0
- package/dist/runtime-api.monitor.js +5 -5
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +5 -5
- package/dist/{send-CBxhnbKU.js → send-BHkA8a-k.js} +7 -7
- package/dist/{send.components-uuQuHL3t.js → send.components-CUHzDapa.js} +26 -12
- package/dist/{send.outbound-DZHJYmNF.js → send.outbound-DSKZbjML.js} +15 -5
- package/dist/{send.receipt-3y2lVFRf.js → send.receipt-CjsWpitW.js} +25 -13
- package/dist/{send.shared-Ddl21-Gt.js → send.shared-Cluujl6W.js} +3 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-D3NkInmq.js → shared-BMGLQw74.js} +5 -5
- package/dist/{subagent-hooks-BacIbIBD.js → subagent-hooks-7jAn9HT5.js} +3 -3
- package/dist/subagent-hooks-api.js +1 -5
- package/dist/{system-events-Cw6Hp8RF.js → system-events-BjuNA9Zs.js} +1 -1
- package/dist/{target-resolver-jjQzAS6T.js → target-resolver-BYuWNVQp.js} +3 -3
- package/dist/targets-BNDUOdvI.js +3 -0
- package/dist/{thread-bindings-BBq-yzq2.js → thread-bindings-CKruJE91.js} +6 -6
- package/dist/{thread-bindings.discord-api-5QgEd_dW.js → thread-bindings.discord-api-BjLUwwSP.js} +5 -5
- package/dist/{thread-bindings.manager-COkxjwR9.js → thread-bindings.manager-Dji7SZHG.js} +4 -4
- package/dist/{thread-bindings.session-updates-D5gY2ZTE.js → thread-bindings.session-updates-DoDFvU_h.js} +1 -1
- package/dist/{thread-bindings.state-BsOnj5NX.js → thread-bindings.state-DYp4FVEB.js} +8 -2
- package/dist/{timeouts-l_PsHQvX.js → timeouts-CEJ3--Uw.js} +5 -2
- package/dist/timeouts.js +1 -1
- package/dist/{transcripts-source-DDrS8HrV.js → transcripts-source-O73_YIDs.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-B7bCMPJJ.js → typing-CKW0i8du.js} +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +5 -2
- package/node_modules/typebox/build/type/script/mapping.mjs +15 -8
- package/node_modules/typebox/build/type/script/parser.d.mts +3 -1
- package/node_modules/typebox/build/type/script/parser.mjs +2 -1
- package/node_modules/typebox/package.json +29 -29
- package/npm-shrinkwrap.json +7 -38
- package/openclaw.plugin.json +77 -1
- package/package.json +5 -5
- package/dist/provider.runtime-BmpunJHX.js +0 -2
- package/dist/runtime-api.monitor-B38upMUK.js +0 -5
- package/dist/targets-BVKF5wbg.js +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-CjsWpitW.js";
|
|
2
2
|
import { n as fetchDiscord } from "./api-BmXlcjYW.js";
|
|
3
|
-
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-
|
|
3
|
+
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-BIf3417N.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/discord/src/resolve-users.ts
|
|
6
6
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Ut as resolveDiscordChannelId } from "./send.receipt-
|
|
2
|
-
import { a as mergeDiscordAccountConfig, o as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
4
|
-
import { _ as withNormalizedTimestamp, c as jsonResult, d as readNonNegativeIntegerParam, f as readPositiveIntegerParam, g as resolvePollMaxSelections, h as readStringParam, l as parseAvailableTags, m as readStringArrayParam, p as readReactionParams, r as sendDiscordComponentMessage, s as assertMediaNotDataUrl, u as readBooleanParam } from "./send.components-
|
|
1
|
+
import { Ut as resolveDiscordChannelId } from "./send.receipt-CjsWpitW.js";
|
|
2
|
+
import { a as mergeDiscordAccountConfig, o as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-DcLQ2JkV.js";
|
|
4
|
+
import { _ as withNormalizedTimestamp, c as jsonResult, d as readNonNegativeIntegerParam, f as readPositiveIntegerParam, g as resolvePollMaxSelections, h as readStringParam, l as parseAvailableTags, m as readStringArrayParam, p as readReactionParams, r as sendDiscordComponentMessage, s as assertMediaNotDataUrl, u as readBooleanParam } from "./send.components-CUHzDapa.js";
|
|
5
5
|
import { n as getGateway, o as getPresence } from "./gateway-registry-DPxmW0Db.js";
|
|
6
|
-
import { E as canManageGuildRoleDiscord, L as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-
|
|
6
|
+
import { E as canManageGuildRoleDiscord, L as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-Cluujl6W.js";
|
|
7
7
|
import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy } from "./allow-list-BnkWtVpA.js";
|
|
8
|
-
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, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-
|
|
9
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
10
|
-
import "./targets-
|
|
8
|
+
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, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-BHkA8a-k.js";
|
|
9
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DSKZbjML.js";
|
|
10
|
+
import "./targets-BNDUOdvI.js";
|
|
11
11
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
12
|
import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
|
|
13
13
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
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-
|
|
2
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
1
|
+
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-Blf_d9E7.js";
|
|
2
|
+
import { t as discordMessageActions } from "./channel-actions-DDoc4V7x.js";
|
|
3
3
|
export { discordMessageActions, handleDiscordAction, isDiscordModerationAction, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, requiredGuildPermissionForModerationAction };
|
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-
|
|
1
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-DcLQ2JkV.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-CUHzDapa.js";
|
|
3
3
|
import { a as clearPresences, c as setPresence, i as unregisterGateway, n as getGateway, o as getPresence, r as registerGateway, s as presenceCacheSize, t as clearGateways } from "./gateway-registry-DPxmW0Db.js";
|
|
4
|
-
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-
|
|
5
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
4
|
+
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-Cluujl6W.js";
|
|
5
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-CDWUg-nA.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-BnkWtVpA.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-BHkA8a-k.js";
|
|
8
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DSKZbjML.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-Blf_d9E7.js";
|
|
10
10
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
11
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
12
|
-
import { C as resolveThreadBindingMaxAgeMs, S as resolveThreadBindingMaxAgeExpiresAt, b as resolveThreadBindingIdleTimeoutMs, l as isRecentlyUnboundThreadWebhookMessage, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-
|
|
13
|
-
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
14
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
15
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
16
|
-
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-
|
|
17
|
-
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-
|
|
18
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
19
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
20
|
-
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-
|
|
11
|
+
import { t as discordMessageActions } from "./channel-actions-DDoc4V7x.js";
|
|
12
|
+
import { C as resolveThreadBindingMaxAgeMs, S as resolveThreadBindingMaxAgeExpiresAt, b as resolveThreadBindingIdleTimeoutMs, l as isRecentlyUnboundThreadWebhookMessage, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-DYp4FVEB.js";
|
|
13
|
+
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DoDFvU_h.js";
|
|
14
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-DK-3f_aA.js";
|
|
15
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-DUDPsfWt.js";
|
|
16
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-BjLUwwSP.js";
|
|
17
|
+
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-CKruJE91.js";
|
|
18
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-Dji7SZHG.js";
|
|
19
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
|
|
20
|
+
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CEJ3--Uw.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-kgIklCyI.js";
|
|
23
23
|
import "./runtime-api.lookup.js";
|
|
24
|
-
import { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } 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 { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BK8hjk_y.js";
|
|
25
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-D_3KTxh_.js";
|
|
26
|
+
import { t as createDiscordMessageHandler } from "./message-handler-HO8BbZmQ.js";
|
|
27
|
+
import "./runtime-api.monitor-LVbgPRHA.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, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, isRecentlyUnboundThreadWebhookMessage, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, mergeAbortSignals, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, 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, 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-CDWUg-nA.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-DK-3f_aA.js";
|
|
4
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-DUDPsfWt.js";
|
|
5
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
|
|
6
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-kgIklCyI.js";
|
|
7
7
|
export { auditDiscordChannelPermissions, collectDiscordAuditChannelIds, fetchDiscordApplicationId, fetchDiscordApplicationSummary, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, parseApplicationIdFromToken, probeDiscord, resolveDiscordChannelAllowlist, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordUserAllowlist, setDiscordRuntime };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as clearPresences, c as setPresence, i as unregisterGateway, n as getGateway, o as getPresence, r as registerGateway, s as presenceCacheSize, t as clearGateways } from "./gateway-registry-DPxmW0Db.js";
|
|
2
2
|
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-BnkWtVpA.js";
|
|
3
|
-
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-
|
|
4
|
-
import { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-
|
|
5
|
-
import { i as buildDiscordMediaPayload } from "./message-utils-
|
|
6
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
7
|
-
import "./runtime-api.monitor-
|
|
3
|
+
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CEJ3--Uw.js";
|
|
4
|
+
import { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BK8hjk_y.js";
|
|
5
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-D_3KTxh_.js";
|
|
6
|
+
import { t as createDiscordMessageHandler } from "./message-handler-HO8BbZmQ.js";
|
|
7
|
+
import "./runtime-api.monitor-LVbgPRHA.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, buildDiscordMediaPayload, clearGateways, clearPresences, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, getGateway, getPresence, isDiscordGroupAllowedByPolicy, mergeAbortSignals, monitorDiscordProvider, normalizeDiscordAllowList, normalizeDiscordSlug, presenceCacheSize, registerDiscordListener, registerGateway, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveGroupDmAllow, 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 hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-
|
|
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-DcLQ2JkV.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-CUHzDapa.js";
|
|
3
|
+
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-Cluujl6W.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-BHkA8a-k.js";
|
|
5
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DSKZbjML.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
|
-
import { C as resolveThreadBindingMaxAgeMs, S as resolveThreadBindingMaxAgeExpiresAt, b as resolveThreadBindingIdleTimeoutMs, l as isRecentlyUnboundThreadWebhookMessage, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-
|
|
2
|
-
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
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-
|
|
1
|
+
import { C as resolveThreadBindingMaxAgeMs, S as resolveThreadBindingMaxAgeExpiresAt, b as resolveThreadBindingIdleTimeoutMs, l as isRecentlyUnboundThreadWebhookMessage, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-DYp4FVEB.js";
|
|
2
|
+
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DoDFvU_h.js";
|
|
3
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-BjLUwwSP.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-CKruJE91.js";
|
|
5
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-Dji7SZHG.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,13 +1,13 @@
|
|
|
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-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { A as hasAllGuildPermissionsDiscord, C as DISCORD_MAX_STICKER_BYTES, D as canViewDiscordGuildChannel, E as canManageGuildRoleDiscord, F as createDiscordClient, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, P as parseAndResolveChannelRecipient, R as resolveDiscordClientAccountContext, S as DISCORD_MAX_EVENT_COVER_BYTES, T as canManageGuildMemberRoleDiscord, i as formatReactionEmoji, j as hasAnyChannelPermissionDiscord, k as fetchMemberGuildPermissionsDiscord, l as resolveChannelId, o as normalizeEmojiName, r as buildReactionIdentifier, s as normalizeReactionEmoji, t as buildDiscordSendError, w as DiscordSendError, x as DISCORD_MAX_EMOJI_BYTES, z as resolveDiscordRest } from "./send.shared-
|
|
4
|
-
import {
|
|
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-CjsWpitW.js";
|
|
2
|
+
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
+
import { A as hasAllGuildPermissionsDiscord, C as DISCORD_MAX_STICKER_BYTES, D as canViewDiscordGuildChannel, E as canManageGuildRoleDiscord, F as createDiscordClient, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, P as parseAndResolveChannelRecipient, R as resolveDiscordClientAccountContext, S as DISCORD_MAX_EVENT_COVER_BYTES, T as canManageGuildMemberRoleDiscord, i as formatReactionEmoji, j as hasAnyChannelPermissionDiscord, k as fetchMemberGuildPermissionsDiscord, l as resolveChannelId, o as normalizeEmojiName, r as buildReactionIdentifier, s as normalizeReactionEmoji, t as buildDiscordSendError, w as DiscordSendError, x as DISCORD_MAX_EMOJI_BYTES, z as resolveDiscordRest } from "./send.shared-Cluujl6W.js";
|
|
4
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, s as rewriteDiscordKnownMentions, t as sendMessageDiscord } from "./send.outbound-DSKZbjML.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
|
+
import { parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
7
8
|
import crypto from "node:crypto";
|
|
8
9
|
import path from "node:path";
|
|
9
10
|
import { writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime";
|
|
10
|
-
import { parseStrictFiniteNumber } from "openclaw/plugin-sdk/number-runtime";
|
|
11
11
|
import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, extensionForMime, maxBytesForKind, parseFfprobeCodecAndSampleRate, runFfmpeg, runFfprobe, unlinkIfExists } from "openclaw/plugin-sdk/media-runtime";
|
|
12
12
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
13
13
|
import { loadWebMediaRaw } from "openclaw/plugin-sdk/web-media";
|
|
@@ -174,8 +174,8 @@ async function timeoutMemberDiscord(payload, opts) {
|
|
|
174
174
|
const rest = resolveDiscordRest(opts);
|
|
175
175
|
let until = payload.until;
|
|
176
176
|
if (!until && payload.durationMinutes) {
|
|
177
|
-
|
|
178
|
-
until
|
|
177
|
+
until = timestampMsToIsoString(resolveExpiresAtMsFromDurationMs(payload.durationMinutes * 60 * 1e3));
|
|
178
|
+
if (!until) throw new Error("Discord timeout duration is outside the supported Date range");
|
|
179
179
|
}
|
|
180
180
|
return await timeoutGuildMember(rest, payload.guildId, payload.userId, {
|
|
181
181
|
body: { communication_disabled_until: until ?? null },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Wt as __exportAll, ft as editChannelMessage, j as serializePayload, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
1
|
+
import { Wt as __exportAll, ft as editChannelMessage, j as serializePayload, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-CjsWpitW.js";
|
|
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 createDiscordClient, P as parseAndResolveChannelRecipient, b as stripUndefinedFields, h as SUPPRESS_NOTIFICATIONS_FLAG, l as resolveChannelId, m as toDiscordFileBlob, t as buildDiscordSendError, u as resolveDiscordChannelType } from "./send.shared-
|
|
7
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
5
|
+
import { c as buildDiscordComponentMessage, f as resolveDiscordComponentAttachmentName, l as buildDiscordComponentMessageFlags } from "./components-DcLQ2JkV.js";
|
|
6
|
+
import { F as createDiscordClient, P as parseAndResolveChannelRecipient, b as stripUndefinedFields, h as SUPPRESS_NOTIFICATIONS_FLAG, l as resolveChannelId, m as toDiscordFileBlob, t as buildDiscordSendError, u as resolveDiscordChannelType } from "./send.shared-Cluujl6W.js";
|
|
7
|
+
import { t as sendMessageDiscord } from "./send.outbound-DSKZbjML.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";
|
|
@@ -18,6 +18,7 @@ import { readBooleanParam as readBooleanParam$1 } from "openclaw/plugin-sdk/bool
|
|
|
18
18
|
import "openclaw/plugin-sdk/channel-plugin-common";
|
|
19
19
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
20
20
|
import { ChannelType } from "discord-api-types/v10";
|
|
21
|
+
import { asDateTimestampMs, isFutureDateTimestampMs, resolveDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
21
22
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
22
23
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
23
24
|
import { resolveGlobalMap } from "openclaw/plugin-sdk/global-singleton";
|
|
@@ -118,17 +119,27 @@ function getPersistentModalStore() {
|
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
function isExpired(entry, now) {
|
|
121
|
-
return
|
|
122
|
+
return entry.expiresAt !== void 0 && !isFutureDateTimestampMs(entry.expiresAt, { nowMs: now });
|
|
122
123
|
}
|
|
123
124
|
function normalizeEntryTimestamps(entry, now, ttlMs) {
|
|
124
|
-
const createdAt = entry.createdAt
|
|
125
|
-
const expiresAt = entry.expiresAt ?? createdAt
|
|
125
|
+
const createdAt = resolveDateTimestampMs(entry.createdAt, now);
|
|
126
|
+
const expiresAt = asDateTimestampMs(entry.expiresAt) ?? resolveExpiresAtMsFromDurationMs(ttlMs, { nowMs: createdAt }) ?? 0;
|
|
126
127
|
return {
|
|
127
128
|
...entry,
|
|
128
129
|
createdAt,
|
|
129
130
|
expiresAt
|
|
130
131
|
};
|
|
131
132
|
}
|
|
133
|
+
function pruneUndefinedRegistryValues(value) {
|
|
134
|
+
if (Array.isArray(value)) return value.filter((entry) => entry !== void 0).map((entry) => pruneUndefinedRegistryValues(entry));
|
|
135
|
+
if (!value || typeof value !== "object") return value;
|
|
136
|
+
const result = {};
|
|
137
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
138
|
+
if (entry === void 0) continue;
|
|
139
|
+
result[key] = pruneUndefinedRegistryValues(entry);
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
132
143
|
function registerEntries(entries, store, params) {
|
|
133
144
|
const normalizedEntries = [];
|
|
134
145
|
for (const entry of entries) {
|
|
@@ -159,10 +170,13 @@ function registerPersistentRegistryEntries(params) {
|
|
|
159
170
|
if (params.entries.length === 0) return;
|
|
160
171
|
const store = params.openStore();
|
|
161
172
|
if (!store) return;
|
|
162
|
-
for (const entry of params.entries)
|
|
163
|
-
|
|
164
|
-
entry
|
|
165
|
-
|
|
173
|
+
for (const entry of params.entries) {
|
|
174
|
+
const persistedEntry = pruneUndefinedRegistryValues(entry);
|
|
175
|
+
store.register(entry.id, {
|
|
176
|
+
version: 1,
|
|
177
|
+
entry: persistedEntry
|
|
178
|
+
}, { ttlMs: params.ttlMs }).catch(disablePersistentComponentRegistry);
|
|
179
|
+
}
|
|
166
180
|
}
|
|
167
181
|
function registerPersistentEntries(params) {
|
|
168
182
|
registerPersistentRegistryEntries({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ct as createThread, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { F as createDiscordClient, P as parseAndResolveChannelRecipient, _ as resolveDiscordMessageFlags, a as normalizeDiscordPollInput, 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 resolveDiscordSendComponents, y as resolveDiscordSendEmbeds } from "./send.shared-
|
|
4
|
-
import { a as resolveDiscordDirectoryUserId } from "./directory-live-
|
|
1
|
+
import { ct as createThread, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-CjsWpitW.js";
|
|
2
|
+
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
+
import { F as createDiscordClient, P as parseAndResolveChannelRecipient, _ as resolveDiscordMessageFlags, a as normalizeDiscordPollInput, 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 resolveDiscordSendComponents, y as resolveDiscordSendEmbeds } from "./send.shared-Cluujl6W.js";
|
|
4
|
+
import { a as resolveDiscordDirectoryUserId } from "./directory-live-CDWUg-nA.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";
|
|
@@ -14,6 +14,8 @@ const MARKDOWN_CODE_SEGMENT_PATTERN = /```[\s\S]*?```|`[^`\n]*`/g;
|
|
|
14
14
|
const MENTION_CANDIDATE_PATTERN = /(^|[\s([{"'.,;:!?])@([a-z0-9_.-]{2,32}(?:#[0-9]{4})?)/gi;
|
|
15
15
|
const DISCORD_RESERVED_MENTIONS = new Set(["everyone", "here"]);
|
|
16
16
|
const DISCORD_DISCRIMINATOR_SUFFIX = /#\d{4}$/;
|
|
17
|
+
const DISCORD_TARGETED_MENTION_PATTERN = /<@!?\d+>|<@&\d+>/;
|
|
18
|
+
const DISCORD_BROADCAST_MENTION_PATTERN = /@(everyone|here)\b/;
|
|
17
19
|
function normalizeSnowflake(value) {
|
|
18
20
|
const text = normalizeOptionalStringifiedId(value) ?? "";
|
|
19
21
|
if (!/^\d+$/.test(text)) return null;
|
|
@@ -93,6 +95,14 @@ function rewriteDiscordKnownMentions(text, params) {
|
|
|
93
95
|
rewritten += rewritePlainTextMentions(text.slice(offset), params);
|
|
94
96
|
return rewritten;
|
|
95
97
|
}
|
|
98
|
+
/** Whether text carries a Discord user/role mention (`<@id>`, `<@!id>`, `<@&id>`) that pings when sent fresh. */
|
|
99
|
+
function discordTextHasTargetedMention(text) {
|
|
100
|
+
return DISCORD_TARGETED_MENTION_PATTERN.test(text);
|
|
101
|
+
}
|
|
102
|
+
/** Whether text carries an `@everyone`/`@here` broadcast mention. */
|
|
103
|
+
function discordTextHasBroadcastMention(text) {
|
|
104
|
+
return DISCORD_BROADCAST_MENTION_PATTERN.test(text);
|
|
105
|
+
}
|
|
96
106
|
//#endregion
|
|
97
107
|
//#region extensions/discord/src/send.outbound.ts
|
|
98
108
|
const DEFAULT_DISCORD_MEDIA_MAX_MB = 100;
|
|
@@ -327,4 +337,4 @@ async function resolveDiscordStructuredSendContext(to, opts) {
|
|
|
327
337
|
};
|
|
328
338
|
}
|
|
329
339
|
//#endregion
|
|
330
|
-
export {
|
|
340
|
+
export { discordTextHasTargetedMention as a, discordTextHasBroadcastMention as i, sendPollDiscord as n, formatMention as o, sendStickerDiscord as r, rewriteDiscordKnownMentions as s, sendMessageDiscord as t };
|
|
@@ -2,13 +2,13 @@ import { n as parseRetryAfterHeaderSeconds, t as parseDiscordRetryAfterBodySecon
|
|
|
2
2
|
import "node:module";
|
|
3
3
|
import { buildMessagingTarget, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
|
|
4
4
|
import { ApplicationCommandOptionType, ApplicationCommandType, ButtonStyle, ComponentType, GatewayDispatchEvents, InteractionContextType, InteractionResponseType, InteractionType, MessageFlags, Routes, TextInputStyle } from "discord-api-types/v10";
|
|
5
|
+
import { asDateTimestampMs, clampTimerTimeoutMs, parseFiniteNumber, parseStrictNonNegativeInteger, resolveExpiresAtMsFromDurationMs, resolveIntegerOption, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
5
6
|
import { createHash, randomBytes } from "node:crypto";
|
|
6
7
|
import path from "node:path";
|
|
7
8
|
import { privateFileStore } from "openclaw/plugin-sdk/security-runtime";
|
|
8
9
|
import { Type } from "typebox";
|
|
9
10
|
import { Check } from "typebox/value";
|
|
10
11
|
import { inspect } from "node:util";
|
|
11
|
-
import { parseFiniteNumber, parseStrictNonNegativeInteger, resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
12
12
|
import { chunkMarkdownTextWithMode } from "openclaw/plugin-sdk/reply-chunking";
|
|
13
13
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
14
14
|
//#region \0rolldown/runtime.js
|
|
@@ -1147,15 +1147,21 @@ var DiscordEntityCache = class {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
async fetchCached(key, fetcher) {
|
|
1149
1149
|
const ttl = this.params.ttlMs ?? DEFAULT_REST_CACHE_TTL_MS;
|
|
1150
|
+
const rawNow = Date.now();
|
|
1151
|
+
const now = asDateTimestampMs(rawNow);
|
|
1150
1152
|
if (ttl > 0) {
|
|
1151
1153
|
const cached = this.entries.get(key);
|
|
1152
|
-
if (cached && cached.expiresAt >
|
|
1154
|
+
if (cached && now !== void 0 && cached.expiresAt > now) return cached.value;
|
|
1155
|
+
if (cached) this.entries.delete(key);
|
|
1153
1156
|
}
|
|
1154
1157
|
const value = await fetcher();
|
|
1155
|
-
if (ttl > 0)
|
|
1156
|
-
expiresAt
|
|
1157
|
-
|
|
1158
|
-
|
|
1158
|
+
if (ttl > 0) {
|
|
1159
|
+
const expiresAt = resolveExpiresAtMsFromDurationMs(ttl, { nowMs: rawNow });
|
|
1160
|
+
if (expiresAt !== void 0) this.entries.set(key, {
|
|
1161
|
+
expiresAt,
|
|
1162
|
+
value
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1159
1165
|
return value;
|
|
1160
1166
|
}
|
|
1161
1167
|
get rest() {
|
|
@@ -1912,11 +1918,17 @@ function readHeaderNumber(headers, name) {
|
|
|
1912
1918
|
const parsed = Number(trimmed);
|
|
1913
1919
|
return Number.isFinite(parsed) && Math.abs(parsed) <= Number.MAX_SAFE_INTEGER ? parsed : void 0;
|
|
1914
1920
|
}
|
|
1921
|
+
function resolveRateLimitResetAt(delayMs) {
|
|
1922
|
+
const clampedDelayMs = Math.ceil(Math.max(0, delayMs));
|
|
1923
|
+
if (!Number.isSafeInteger(clampedDelayMs)) return;
|
|
1924
|
+
if (clampedDelayMs === 0) return asDateTimestampMs(Date.now());
|
|
1925
|
+
return resolveExpiresAtMsFromDurationMs(clampedDelayMs);
|
|
1926
|
+
}
|
|
1915
1927
|
function readResetAt(response) {
|
|
1916
1928
|
const resetAfter = readHeaderNumber(response.headers, "X-RateLimit-Reset-After");
|
|
1917
|
-
if (resetAfter !== void 0) return
|
|
1929
|
+
if (resetAfter !== void 0) return resolveRateLimitResetAt(resetAfter * 1e3);
|
|
1918
1930
|
const reset = readHeaderNumber(response.headers, "X-RateLimit-Reset");
|
|
1919
|
-
return reset !== void 0 ? reset * 1e3 : void 0;
|
|
1931
|
+
return reset !== void 0 ? asDateTimestampMs(reset * 1e3) : void 0;
|
|
1920
1932
|
}
|
|
1921
1933
|
function appendQuery(path, query) {
|
|
1922
1934
|
if (!query || Object.keys(query).length === 0) return path;
|
|
@@ -2125,8 +2137,8 @@ var RestScheduler = class {
|
|
|
2125
2137
|
if (resetAt !== void 0) bucket.resetAt = resetAt;
|
|
2126
2138
|
if (response.status !== 429) return;
|
|
2127
2139
|
bucket.rateLimitHits += 1;
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2140
|
+
const retryAt = resolveRateLimitResetAt(Math.max(0, readRetryAfter(parsed, response, 1) * 1e3));
|
|
2141
|
+
if (retryAt === void 0) return;
|
|
2130
2142
|
if (response.headers.get("X-RateLimit-Global") === "true" || isGlobalRateLimit(parsed)) {
|
|
2131
2143
|
this.globalRateLimitUntil = Math.max(this.globalRateLimitUntil, retryAt);
|
|
2132
2144
|
return;
|
|
@@ -2162,7 +2174,7 @@ var RestScheduler = class {
|
|
|
2162
2174
|
this.drainTimer = setTimeout(() => {
|
|
2163
2175
|
this.drainTimer = void 0;
|
|
2164
2176
|
this.drainQueues();
|
|
2165
|
-
},
|
|
2177
|
+
}, resolveTimerTimeoutMs(delayMs, 0, 0));
|
|
2166
2178
|
this.drainTimer.unref?.();
|
|
2167
2179
|
}
|
|
2168
2180
|
drainQueues() {
|
|
@@ -2475,7 +2487,7 @@ function normalizeRequestClientOptions(options) {
|
|
|
2475
2487
|
return {
|
|
2476
2488
|
...merged,
|
|
2477
2489
|
apiVersion: normalizeIntegerOption(merged.apiVersion, defaultOptions.apiVersion, { min: 1 }),
|
|
2478
|
-
timeout:
|
|
2490
|
+
timeout: clampTimerTimeoutMs(merged.timeout, 1) ?? resolveTimerTimeoutMs(defaultOptions.timeout, 1),
|
|
2479
2491
|
maxQueueSize: normalizeIntegerOption(merged.maxQueueSize, defaultOptions.maxQueueSize, { min: 1 })
|
|
2480
2492
|
};
|
|
2481
2493
|
}
|
|
@@ -2556,7 +2568,7 @@ var ComponentRegistry = class {
|
|
|
2556
2568
|
message,
|
|
2557
2569
|
reason: "timed out"
|
|
2558
2570
|
});
|
|
2559
|
-
},
|
|
2571
|
+
}, resolveTimerTimeoutMs(timeoutMs, 0, 0));
|
|
2560
2572
|
timer.unref?.();
|
|
2561
2573
|
this.oneOffComponents.set(key, {
|
|
2562
2574
|
message,
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
2
|
-
import { a as mergeDiscordAccountConfig, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { t as parseAndResolveDiscordTarget } from "./target-resolver-
|
|
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-CjsWpitW.js";
|
|
2
|
+
import { a as mergeDiscordAccountConfig, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
+
import { t as parseAndResolveDiscordTarget } from "./target-resolver-BYuWNVQp.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";
|
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-BNZm3eed.js";
|
|
2
2
|
export { discordSetupPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
2
|
+
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-P19jm1lf.js";
|
|
3
3
|
import { i as getChatChannelMeta, o as resolveConfiguredFromCredentialStatuses } from "./channel-api-CAJ0wMoV.js";
|
|
4
|
-
import { t as DiscordChannelConfigSchema } from "./config-schema-
|
|
5
|
-
import { n as normalizeCompatibilityConfig } from "./doctor-contract-
|
|
4
|
+
import { t as DiscordChannelConfigSchema } from "./config-schema-spuxW477.js";
|
|
5
|
+
import { n as normalizeCompatibilityConfig } from "./doctor-contract-BAu3WLvd.js";
|
|
6
6
|
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-BjM-1hr9.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";
|
|
@@ -71,7 +71,7 @@ const DISCORD_LEGACY_CONFIG_RULES = [];
|
|
|
71
71
|
const DISCORD_CHANNEL = "discord";
|
|
72
72
|
let discordDoctorModulePromise;
|
|
73
73
|
async function loadDiscordDoctorModule() {
|
|
74
|
-
discordDoctorModulePromise ??= import("./doctor-
|
|
74
|
+
discordDoctorModulePromise ??= import("./doctor-BUhqxLb9.js");
|
|
75
75
|
return await discordDoctorModulePromise;
|
|
76
76
|
}
|
|
77
77
|
const discordDoctor = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-CjsWpitW.js";
|
|
2
|
+
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
+
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-CKruJE91.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,14 +1,10 @@
|
|
|
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-7jAn9HT5.js").then((n) => n.i);
|
|
5
5
|
return discordSubagentHooksPromise;
|
|
6
6
|
}
|
|
7
7
|
function registerDiscordSubagentHooks(api) {
|
|
8
|
-
api.on("subagent_spawning", async (event) => {
|
|
9
|
-
const { handleDiscordSubagentSpawning } = await loadDiscordSubagentHooksModule();
|
|
10
|
-
return await handleDiscordSubagentSpawning(api, event);
|
|
11
|
-
});
|
|
12
8
|
api.on("subagent_ended", async (event) => {
|
|
13
9
|
const { handleDiscordSubagentEnded } = await loadDiscordSubagentHooksModule();
|
|
14
10
|
handleDiscordSubagentEnded(event);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as discord_exports } from "./send.receipt-
|
|
1
|
+
import { c as discord_exports } from "./send.receipt-CjsWpitW.js";
|
|
2
2
|
import { b as formatDiscordUserTag } from "./allow-list-BnkWtVpA.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-
|
|
2
|
-
import { c as resolveDiscordAccountAllowFrom, s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { i as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
1
|
+
import { Ht as parseDiscordTarget, Wt as __exportAll, r as allowFromContainsDiscordUserId } from "./send.receipt-CjsWpitW.js";
|
|
2
|
+
import { c as resolveDiscordAccountAllowFrom, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
+
import { i as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-CDWUg-nA.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 { Ht as parseDiscordTarget, Wt as __exportAll } from "./send.receipt-
|
|
2
|
-
import "./targets-
|
|
3
|
-
import { C as resolveThreadBindingMaxAgeMs$1, O as shouldPersistBindingMutations, S as resolveThreadBindingMaxAgeExpiresAt, T as saveBindingsToDisk, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingToken, f as normalizeThreadId, g as removeBindingRecord, l as isRecentlyUnboundThreadWebhookMessage, n as MANAGERS_BY_ACCOUNT_ID, p as rememberRecentUnboundWebhookEcho, t as BINDINGS_BY_THREAD_ID, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-
|
|
4
|
-
import { n as setThreadBindingMaxAgeBySessionKey, r as resolveBindingIdsForTargetSession, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
5
|
-
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, s as resolveChannelIdForBinding, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-
|
|
6
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
1
|
+
import { Ht as parseDiscordTarget, Wt as __exportAll } from "./send.receipt-CjsWpitW.js";
|
|
2
|
+
import "./targets-BNDUOdvI.js";
|
|
3
|
+
import { C as resolveThreadBindingMaxAgeMs$1, O as shouldPersistBindingMutations, S as resolveThreadBindingMaxAgeExpiresAt, T as saveBindingsToDisk, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingToken, f as normalizeThreadId, g as removeBindingRecord, l as isRecentlyUnboundThreadWebhookMessage, n as MANAGERS_BY_ACCOUNT_ID, p as rememberRecentUnboundWebhookEcho, t as BINDINGS_BY_THREAD_ID, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-DYp4FVEB.js";
|
|
4
|
+
import { n as setThreadBindingMaxAgeBySessionKey, r as resolveBindingIdsForTargetSession, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DoDFvU_h.js";
|
|
5
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, s as resolveChannelIdForBinding, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-BjLUwwSP.js";
|
|
6
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-Dji7SZHG.js";
|
|
7
7
|
import { normalizeOptionalLowercaseString, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
9
9
|
import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
|
package/dist/{thread-bindings.discord-api-5QgEd_dW.js → thread-bindings.discord-api-BjLUwwSP.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Ut as resolveDiscordChannelId, pt as getChannel, tt as createChannelWebhook } from "./send.receipt-
|
|
2
|
-
import { I as createDiscordRestClient } from "./send.shared-
|
|
3
|
-
import { c as sendWebhookMessageDiscord, u as createThreadDiscord } from "./send-
|
|
4
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
5
|
-
import { i as REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL, k as toReusableWebhookKey, m as rememberReusableWebhook, t as BINDINGS_BY_THREAD_ID } from "./thread-bindings.state-
|
|
1
|
+
import { Ut as resolveDiscordChannelId, pt as getChannel, tt as createChannelWebhook } from "./send.receipt-CjsWpitW.js";
|
|
2
|
+
import { I as createDiscordRestClient } from "./send.shared-Cluujl6W.js";
|
|
3
|
+
import { c as sendWebhookMessageDiscord, u as createThreadDiscord } from "./send-BHkA8a-k.js";
|
|
4
|
+
import { t as sendMessageDiscord } from "./send.outbound-DSKZbjML.js";
|
|
5
|
+
import { i as REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL, k as toReusableWebhookKey, m as rememberReusableWebhook, t as BINDINGS_BY_THREAD_ID } from "./thread-bindings.state-DYp4FVEB.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { ChannelType } from "discord-api-types/v10";
|
|
8
8
|
import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
|