@openclaw/discord 2026.11.1 → 2026.11.3
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/.setup/{account-inspect-X_Xlr42B.mjs → account-inspect-8cCu6uPG.mjs} +3 -2
- package/dist/.setup/{accounts-C18HNgge.mjs → accounts-ljrzXBJi.mjs} +8 -4
- package/dist/.setup/{active-turn-thread-route-BAc_Xik-.mjs → active-turn-thread-route-C4tp9noA.mjs} +2 -1
- package/dist/.setup/{allow-list-D1ZGfhXh.mjs → allow-list-BKqOldGy.mjs} +11 -6
- package/dist/.setup/{api-Bth1wKF9.mjs → api-DqmMUZau.mjs} +5 -3
- package/dist/.setup/{approval-handler.runtime-krznjTz9.mjs → approval-handler.runtime-D0qu1um7.mjs} +9 -8
- package/dist/.setup/{approval-message-updates-Cks-MSCJ.mjs → approval-message-updates-CdurC9Ej.mjs} +4 -3
- package/dist/.setup/{audit-Dw_rAZIz.mjs → audit-ChorIwio.mjs} +7 -6
- package/dist/.setup/{channel-DwvRHJL0.mjs → channel-ZilgdF5e.mjs} +41 -33
- package/dist/.setup/{channel-access-BPrWoEXM.mjs → channel-access-DasWY_OV.mjs} +2 -1
- package/dist/.setup/{channel.setup-BHjvtK1U.mjs → channel.setup-DaDQdctj.mjs} +12 -8
- package/dist/.setup/{command-deploy-store-DPWiBMks.mjs → command-deploy-store-DFkBTViB.mjs} +2 -1
- package/dist/.setup/{command-owners-BzlhNBxA.mjs → command-owners-C7rUdqUX.mjs} +2 -1
- package/dist/.setup/{components-BvOWSPxr.mjs → components-Du9NhD8h.mjs} +20 -11
- package/dist/.setup/{config-schema-Coyq5wOr.mjs → config-schema-_uBILpQf.mjs} +5 -3
- package/dist/.setup/{conversation-binding-route-DOPUZNYo.mjs → conversation-binding-route-8Ul1KpGF.mjs} +3 -2
- package/dist/.setup/{directory-config-CIqVnQtn.mjs → directory-config-3iVub-3m.mjs} +4 -3
- package/dist/.setup/{directory-live-DUuPEWub.mjs → directory-live-BDVl2DoC.mjs} +15 -14
- package/dist/.setup/{discord-eFlHX1Gn.mjs → discord-BMD-JiVS.mjs} +68 -35
- package/dist/.setup/{doctor-contract-Dstl3cMg.mjs → doctor-contract-Bwv8EuQ_.mjs} +3 -2
- package/dist/.setup/{doctor-Cg_N6ZOI.mjs → doctor-hQKbkNKq.mjs} +9 -8
- package/dist/.setup/{handle-action-DXY91jF-.mjs → handle-action-B1lmt4ms.mjs} +11 -10
- package/dist/.setup/{handle-action.guild-admin-BvBCfhXF.mjs → handle-action.guild-admin-B6g31cwt.mjs} +4 -3
- package/dist/.setup/{live-policy-config-DO1Fk2hp.mjs → live-policy-config-C_Q966Wh.mjs} +5 -3
- package/dist/.setup/{message-handler-TR7l1P3P.mjs → message-handler-CkI3yMjL.mjs} +16 -11
- package/dist/.setup/{message-handler.preflight-DxGb4zsm.mjs → message-handler.preflight-CEfkFV9U.mjs} +28 -20
- package/dist/.setup/{message-handler.preflight-pluralkit-BTE5JebL.mjs → message-handler.preflight-pluralkit-D5si80_L.mjs} +14 -10
- package/dist/.setup/{message-handler.process-DVHZKc2e.mjs → message-handler.process-DsMtetRf.mjs} +47 -33
- package/dist/.setup/{outbound-adapter-DWyAWBFh.mjs → outbound-adapter-DfAanoCO.mjs} +19 -13
- package/dist/.setup/{outbound-session-route-TFBPPkoz.mjs → outbound-session-route-BtUpGBTb.mjs} +32 -21
- package/dist/.setup/{output-activity-CDgs2s3O.mjs → output-activity-uBpMSX75.mjs} +2 -1
- package/dist/.setup/{pluralkit-DcXbHTpQ.mjs → pluralkit-B64dfq_j.mjs} +3 -2
- package/dist/.setup/{preflight-audio-CwtPIsvk.mjs → preflight-audio-wWgsZG5F.mjs} +2 -1
- package/dist/.setup/{presence-cache-CgutE4NN.mjs → presence-cache-DCeTsL73.mjs} +2 -1
- package/dist/.setup/{probe-DNge7OEP.mjs → probe-CBaoCs-c.mjs} +6 -5
- package/dist/.setup/{provider-C61K7HHq.mjs → provider-CI_OLfvz.mjs} +209 -119
- package/dist/.setup/{provider-session.runtime-D87e36ut.mjs → provider-session.runtime-TWOo_JZx.mjs} +3 -3
- package/dist/.setup/provider.runtime-DnionCyo.mjs +2 -0
- package/dist/.setup/{realtime-session.runtime-D1YHKwbc.mjs → realtime-session.runtime-DvfS4vJj.mjs} +23 -14
- package/dist/.setup/{receive-recovery-C77CVdGM.mjs → receive-recovery-CKvaG2Hf.mjs} +6 -3
- package/dist/.setup/{resolve-allowlist-common-CI77288n.mjs → resolve-allowlist-common-cIjtqh2F.mjs} +7 -5
- package/dist/.setup/{resolve-channels-DYc6-xgV.mjs → resolve-channels-Cj5i7hzj.mjs} +10 -7
- package/dist/.setup/{resolve-users-BQT7XWF2.mjs → resolve-users-BQLbysRB.mjs} +5 -4
- package/dist/.setup/{rolldown-runtime-nwUcYXjP.mjs → rolldown-runtime-B4FMCO8f.mjs} +2 -1
- package/dist/.setup/{runtime-DcBvHOm1.mjs → runtime-DgnVQ7zW.mjs} +2 -1
- package/dist/.setup/{runtime-CI0UJqeS.mjs → runtime-RWnuJgWB.mjs} +35 -23
- package/dist/.setup/{runtime-doctor-migrations-BpV1jKk0.mjs → runtime-doctor-migrations-BPV-R4G9.mjs} +9 -5
- package/dist/.setup/{runtime-CcijhTJT.mjs → runtime-plifsKg9.mjs} +6 -4
- package/dist/.setup/{secret-config-contract-B7UlqVYr.mjs → secret-config-contract-z6FhbT8E.mjs} +2 -1
- package/dist/.setup/{security-audit-CTwisG7c.mjs → security-audit-BFT84Uny.mjs} +4 -3
- package/dist/.setup/{security-contract-D-o0iWDk.mjs → security-contract-DNyyjTZZ.mjs} +2 -1
- package/dist/.setup/{security-doctor-4s7omTZd.mjs → security-doctor-nGgPm65L.mjs} +2 -1
- package/dist/.setup/{send-Cbq-IVsS.mjs → send-da6ENJ9f.mjs} +28 -18
- package/dist/.setup/{send.components-BV6ucNpJ.mjs → send.components-CWZUuGvA.mjs} +15 -10
- package/dist/.setup/{send.outbound-CGhBhzjQ.mjs → send.outbound-qZ3iK3Vq.mjs} +13 -9
- package/dist/.setup/{send.receipt-Dw-_r5Bx.mjs → send.receipt-C18khRYH.mjs} +16 -9
- package/dist/.setup/{send.shared-D4MioxW_.mjs → send.shared-CnlMgoqQ.mjs} +23 -14
- package/dist/.setup/{sender-identity-DrN5c4ec.mjs → sender-identity-DgbJykq0.mjs} +3 -2
- package/dist/.setup/{session-contract-Bq71MS78.mjs → session-contract-BO5tlIdl.mjs} +2 -1
- package/dist/.setup/{session-key-normalization-Cfvze5hd.mjs → session-key-normalization-CCHGNSQw.mjs} +2 -1
- package/dist/.setup/setup-plugin-api-D1QuM187.mjs +3 -0
- package/dist/.setup/{shared-_o59Fvrr.mjs → shared-CY5vJM48.mjs} +19 -15
- package/dist/.setup/{subagent-hooks-mQbDkvuD.mjs → subagent-hooks-CIu2TFz3.mjs} +4 -3
- package/dist/.setup/{system-events-2zc2eGfF.mjs → system-events-DCOLXkwS.mjs} +4 -3
- package/dist/.setup/{target-parsing-BiuhcK9Q.mjs → target-parsing-C-HyNxcE.mjs} +2 -1
- package/dist/.setup/{target-resolver-CAHeVfmZ.mjs → target-resolver-CApivu3G.mjs} +7 -6
- package/dist/.setup/targets-UWWZ6gF7.mjs +3 -0
- package/dist/.setup/{thread-binding-api-Drd4Zu-5.mjs → thread-binding-api-BDZJD4na.mjs} +2 -1
- package/dist/.setup/{thread-bindings-Dg7X_ZXP.mjs → thread-bindings-DcvT_JgI.mjs} +11 -8
- package/dist/.setup/{thread-bindings.manager-DCDYksah.mjs → thread-bindings.manager-5Sh7yedN.mjs} +20 -15
- package/dist/.setup/{thread-bindings.session-updates-C76plLS3.mjs → thread-bindings.session-updates-BMdJeJMc.mjs} +9 -5
- package/dist/.setup/{threading-BKn_OF3K.mjs → threading-CzjFeUSe.mjs} +9 -6
- package/dist/.setup/{timeouts-DTrUsJ_W.mjs → timeouts-CuNARfyw.mjs} +2 -1
- package/dist/.setup/{transcripts-source-BSorJ4AS.mjs → transcripts-source-8RDQrSVb.mjs} +32 -19
- package/dist/.setup/{typing-DAv4S2fI.mjs → typing-CNlSKY5S.mjs} +3 -2
- package/dist/.setup/{voice-runtime-B5m2Ryg8.mjs → voice-runtime-BsDILmAv.mjs} +55 -33
- package/dist/account-inspect-api.js +3 -2
- package/dist/action-runtime-api.js +2 -1
- package/dist/activities-api.js +20 -13
- package/dist/api.js +22 -21
- package/dist/channel-config-api.js +2 -1
- package/dist/channel-plugin-api.js +2 -1
- package/dist/contract-api.js +2 -1
- package/dist/directory-contract-api.js +3 -2
- package/dist/doctor-contract-api.js +7 -5
- package/dist/index.js +2 -1
- package/dist/runtime-api.js +22 -22
- package/dist/runtime-setter-api.js +2 -1
- package/dist/secret-contract-api.js +2 -1
- package/dist/security-audit-contract-api.js +2 -1
- package/dist/security-contract-api.js +2 -1
- package/dist/session-key-api.js +2 -1
- package/dist/setup-entry.js +3 -2
- package/dist/setup-plugin-api.js +2 -1
- package/dist/src/voice/audio-worker.runtime.js +14 -8
- package/dist/subagent-hooks-api.js +3 -2
- package/dist/thread-binding-api.js +2 -1
- package/dist/transcripts-source-api.js +3 -2
- package/package.json +4 -4
- package/dist/.setup/provider.runtime-xk5CVdoI.mjs +0 -1
- package/dist/.setup/setup-plugin-api-DGfQO4Ec.mjs +0 -2
- package/dist/.setup/targets-BaklhOqq.mjs +0 -3
- package/dist/.source-module-urls/d6c089460280c5a04184542d6712e04545caeb1ebb290d3504377b4cc5e22fea.json +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { t as parseDiscordTarget } from "./target-parsing-
|
|
3
|
-
import "./targets-
|
|
4
|
-
import { D as refreshUnboundThreadWebhookIdentity, F as resolveThreadBindingMaxAgeExpiresAt, I as resolveThreadBindingMaxAgeMs$1, N as resolveThreadBindingIdleTimeoutMs$1, P as resolveThreadBindingInactivityExpiresAt, S as ensureBindingsLoadedAsync, _ as MANAGERS_BY_ACCOUNT_ID, a as mutateBindingsForTargetSession, g as BINDINGS_BY_THREAD_ID, i as setThreadBindingMaxAgeBySessionKeyAsync, n as setThreadBindingIdleTimeoutBySessionKeyAsync, o as resolveBindingIdsForTargetSession, r as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey, u as removeBindingRecordSync, w as getThreadBindingToken, x as ensureBindingsLoaded } from "./thread-bindings.session-updates-
|
|
5
|
-
import { c as resolveThreadBindingPersonaFromRecord, i as createNoopThreadBindingManager, n as getThreadBindingManager, o as resolveChannelIdForBinding, s as resolveThreadBindingPersona, t as createThreadBindingManager } from "./thread-bindings.manager-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
|
|
3
|
+
import "./targets-UWWZ6gF7.mjs";
|
|
4
|
+
import { D as refreshUnboundThreadWebhookIdentity, F as resolveThreadBindingMaxAgeExpiresAt, I as resolveThreadBindingMaxAgeMs$1, N as resolveThreadBindingIdleTimeoutMs$1, P as resolveThreadBindingInactivityExpiresAt, S as ensureBindingsLoadedAsync, _ as MANAGERS_BY_ACCOUNT_ID, a as mutateBindingsForTargetSession, g as BINDINGS_BY_THREAD_ID, i as setThreadBindingMaxAgeBySessionKeyAsync, n as setThreadBindingIdleTimeoutBySessionKeyAsync, o as resolveBindingIdsForTargetSession, r as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey, u as removeBindingRecordSync, w as getThreadBindingToken, x as ensureBindingsLoaded } from "./thread-bindings.session-updates-BMdJeJMc.mjs";
|
|
5
|
+
import { c as resolveThreadBindingPersonaFromRecord, i as createNoopThreadBindingManager, n as getThreadBindingManager, o as resolveChannelIdForBinding, s as resolveThreadBindingPersona, t as createThreadBindingManager } from "./thread-bindings.manager-5Sh7yedN.mjs";
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
7
7
|
import { normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { formatThreadBindingDurationLabel as formatThreadBindingDurationLabel$1, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingIntroText, resolveThreadBindingIntroText as resolveThreadBindingIntroText$1, resolveThreadBindingMaxAgeMs, resolveThreadBindingThreadName, resolveThreadBindingThreadName as resolveThreadBindingThreadName$1, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
|
|
9
9
|
import { warnPluginSdkDeprecation } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
|
|
10
10
|
import { prepareAcpSessionEntryRead, readAcpSessionEntryAsync, rethrowIncognitoSessionError } from "openclaw/plugin-sdk/acp-runtime";
|
|
11
11
|
import { runTasksWithConcurrency } from "openclaw/plugin-sdk/concurrency-runtime";
|
|
12
|
-
|
|
12
|
+
//#region extensions/discord/src/monitor/thread-bindings.config.ts
|
|
13
13
|
function resolveDiscordThreadBindingIdleTimeoutMs(params) {
|
|
14
14
|
const accountId = normalizeAccountId(params.accountId);
|
|
15
15
|
const root = params.cfg.channels?.discord?.threadBindings;
|
|
@@ -28,7 +28,8 @@ function resolveDiscordThreadBindingMaxAgeMs(params) {
|
|
|
28
28
|
sessionMaxAgeHoursRaw: params.cfg.session?.threadBindings?.maxAgeHours
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region extensions/discord/src/monitor/thread-bindings.lifecycle.ts
|
|
32
33
|
const ACP_STARTUP_HEALTH_PROBE_CONCURRENCY_LIMIT = 8;
|
|
33
34
|
function listThreadBindingsForAccount(accountId) {
|
|
34
35
|
return getThreadBindingManager(accountId)?.listBindings() ?? [];
|
|
@@ -232,7 +233,8 @@ async function reconcileAcpThreadBindings(params, preparations) {
|
|
|
232
233
|
staleSessionKeys: uniqueStrings(staleSessionKeys)
|
|
233
234
|
};
|
|
234
235
|
}
|
|
235
|
-
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region extensions/discord/src/monitor/thread-bindings.ts
|
|
236
238
|
var thread_bindings_exports = /* @__PURE__ */ __exportAll({
|
|
237
239
|
autoBindSpawnedDiscordSubagent: () => autoBindSpawnedDiscordSubagent,
|
|
238
240
|
createNoopThreadBindingManager: () => createNoopThreadBindingManager,
|
|
@@ -261,4 +263,5 @@ var thread_bindings_exports = /* @__PURE__ */ __exportAll({
|
|
|
261
263
|
unbindThreadBindingsBySessionKey: () => unbindThreadBindingsBySessionKey,
|
|
262
264
|
unbindThreadBindingsBySessionKeyAsync: () => unbindThreadBindingsBySessionKeyAsync
|
|
263
265
|
});
|
|
266
|
+
//#endregion
|
|
264
267
|
export { autoBindSpawnedDiscordSubagent as a, listThreadBindingsForAccount as c, unbindThreadBindingsBySessionKeyAsync as d, resolveDiscordThreadBindingIdleTimeoutMs as f, thread_bindings_exports as i, reconcileAcpThreadBindingsOnStartup as l, resolveThreadBindingsEnabled as m, resolveThreadBindingIntroText$1 as n, listThreadBindingsBySessionKey as o, resolveDiscordThreadBindingMaxAgeMs as p, resolveThreadBindingThreadName$1 as r, listThreadBindingsBySessionKeyAsync as s, formatThreadBindingDurationLabel$1 as t, unbindThreadBindingsBySessionKey as u };
|
package/dist/.setup/{thread-bindings.manager-DCDYksah.mjs → thread-bindings.manager-5Sh7yedN.mjs}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { A as isDiscordThreadChannelType } from "./allow-list-
|
|
3
|
-
import { P as createDiscordRestClient } from "./send.shared-
|
|
4
|
-
import { G as withDiscordRequestAuthority, ft as getChannel, nt as createChannelWebhook } from "./discord-
|
|
5
|
-
import { p as canFallbackDiscordWebhookSend } from "./send.receipt-
|
|
6
|
-
import { n as resolveDiscordChannelId } from "./target-parsing-
|
|
7
|
-
import { c as sendWebhookMessageDiscord, u as createThreadDiscord } from "./send-
|
|
8
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
9
|
-
import { A as resolveBindingIdsForSession, C as forgetThreadBindingToken, D as refreshUnboundThreadWebhookIdentity, E as normalizeThreadBindingDurationMs, I as resolveThreadBindingMaxAgeMs$1, L as shouldDefaultPersist, M as resolvePreparedThreadBindingLifecycle, N as resolveThreadBindingIdleTimeoutMs$1, O as rememberReusableWebhook, R as toBindingRecordKey, S as ensureBindingsLoadedAsync, T as normalizeTargetKind, _ as MANAGERS_BY_ACCOUNT_ID, b as THREAD_BINDING_TOUCH_PERSIST_MIN_INTERVAL_MS, c as drainThreadBindingAccountOperations, d as runThreadBindingAccountOperation, f as runThreadBindingMutation, g as BINDINGS_BY_THREAD_ID, h as updateBindingRecordSync, j as resolveBindingRecordKey, k as rememberThreadBindingToken, l as drainThreadBindingMutations, m as snapshotThreadBindingMetadata, p as shouldPersistAnyBindingState, s as commitBindingRecord, v as PERSIST_BY_ACCOUNT_ID, w as getThreadBindingToken, y as REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL, z as toReusableWebhookKey } from "./thread-bindings.session-updates-
|
|
10
|
-
import { n as resolveDiscordChannelInfoSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { A as isDiscordThreadChannelType } from "./allow-list-BKqOldGy.mjs";
|
|
3
|
+
import { P as createDiscordRestClient } from "./send.shared-CnlMgoqQ.mjs";
|
|
4
|
+
import { G as withDiscordRequestAuthority, ft as getChannel, nt as createChannelWebhook } from "./discord-BMD-JiVS.mjs";
|
|
5
|
+
import { p as canFallbackDiscordWebhookSend } from "./send.receipt-C18khRYH.mjs";
|
|
6
|
+
import { n as resolveDiscordChannelId } from "./target-parsing-C-HyNxcE.mjs";
|
|
7
|
+
import { c as sendWebhookMessageDiscord, u as createThreadDiscord } from "./send-da6ENJ9f.mjs";
|
|
8
|
+
import { t as sendMessageDiscord } from "./send.outbound-qZ3iK3Vq.mjs";
|
|
9
|
+
import { A as resolveBindingIdsForSession, C as forgetThreadBindingToken, D as refreshUnboundThreadWebhookIdentity, E as normalizeThreadBindingDurationMs, I as resolveThreadBindingMaxAgeMs$1, L as shouldDefaultPersist, M as resolvePreparedThreadBindingLifecycle, N as resolveThreadBindingIdleTimeoutMs$1, O as rememberReusableWebhook, R as toBindingRecordKey, S as ensureBindingsLoadedAsync, T as normalizeTargetKind, _ as MANAGERS_BY_ACCOUNT_ID, b as THREAD_BINDING_TOUCH_PERSIST_MIN_INTERVAL_MS, c as drainThreadBindingAccountOperations, d as runThreadBindingAccountOperation, f as runThreadBindingMutation, g as BINDINGS_BY_THREAD_ID, h as updateBindingRecordSync, j as resolveBindingRecordKey, k as rememberThreadBindingToken, l as drainThreadBindingMutations, m as snapshotThreadBindingMetadata, p as shouldPersistAnyBindingState, s as commitBindingRecord, v as PERSIST_BY_ACCOUNT_ID, w as getThreadBindingToken, y as REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL, z as toReusableWebhookKey } from "./thread-bindings.session-updates-BMdJeJMc.mjs";
|
|
10
|
+
import { n as resolveDiscordChannelInfoSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-DasWY_OV.mjs";
|
|
11
11
|
import { createSubsystemLogger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
12
12
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
13
13
|
import { normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -19,7 +19,7 @@ import { resolveThreadBindingFarewellText, resolveThreadBindingThreadName, unreg
|
|
|
19
19
|
import { createAccountScopedBindingAdapterV2, projectThreadBindingRecord, registerSessionBindingAdapterV2, unregisterSessionBindingAdapter as unregisterSessionBindingAdapter$1, warnPluginSdkDeprecation } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
|
|
20
20
|
import { resolveSessionAgentIdStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
21
21
|
import { registerSessionBindingAdapterV2 as registerSessionBindingAdapterV2$1 } from "openclaw/plugin-sdk/thread-bindings-runtime";
|
|
22
|
-
|
|
22
|
+
//#region extensions/discord/src/monitor/thread-bindings.persona.ts
|
|
23
23
|
const THREAD_BINDING_PERSONA_MAX_CHARS = 80;
|
|
24
24
|
function normalizePersonaLabel(value) {
|
|
25
25
|
return value ? value.replace(/\s+/g, " ").trim() || void 0 : void 0;
|
|
@@ -29,10 +29,12 @@ function resolveThreadBindingPersona(params) {
|
|
|
29
29
|
return truncateUtf16Safe(`${SYSTEM_MARK} ${base}`, THREAD_BINDING_PERSONA_MAX_CHARS);
|
|
30
30
|
}
|
|
31
31
|
const resolveThreadBindingPersonaFromRecord = resolveThreadBindingPersona;
|
|
32
|
-
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region extensions/discord/src/monitor/thread-bindings.types.ts
|
|
33
34
|
const THREAD_BINDINGS_SWEEP_INTERVAL_MS = 12e4;
|
|
34
35
|
const DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS = 864e5;
|
|
35
|
-
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region extensions/discord/src/monitor/thread-bindings.discord-api.ts
|
|
36
38
|
const log = createSubsystemLogger("discord/thread-bindings");
|
|
37
39
|
function isThreadArchived(raw) {
|
|
38
40
|
if (!raw || typeof raw !== "object") return false;
|
|
@@ -180,7 +182,8 @@ async function createThreadForBinding(params) {
|
|
|
180
182
|
return null;
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
|
-
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region extensions/discord/src/monitor/thread-bindings.session-adapter.ts
|
|
184
187
|
function createThreadBindingSessionAdapter(params) {
|
|
185
188
|
const serializeBinding = (record) => {
|
|
186
189
|
const defaults = params.defaults;
|
|
@@ -343,7 +346,8 @@ function createNoopThreadBindingManager(accountIdRaw) {
|
|
|
343
346
|
}
|
|
344
347
|
};
|
|
345
348
|
}
|
|
346
|
-
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region extensions/discord/src/monitor/thread-bindings.manager.ts
|
|
347
351
|
var thread_bindings_manager_exports = /* @__PURE__ */ __exportAll({
|
|
348
352
|
createThreadBindingManager: () => createThreadBindingManager,
|
|
349
353
|
getThreadBindingManager: () => getThreadBindingManager
|
|
@@ -776,4 +780,5 @@ function createLoadedThreadBindingManager(params) {
|
|
|
776
780
|
function getThreadBindingManager(accountId) {
|
|
777
781
|
return MANAGERS_BY_ACCOUNT_ID.get(normalizeAccountId(accountId)) ?? null;
|
|
778
782
|
}
|
|
783
|
+
//#endregion
|
|
779
784
|
export { isThreadArchived as a, resolveThreadBindingPersonaFromRecord as c, createNoopThreadBindingManager as i, getThreadBindingManager as n, resolveChannelIdForBinding as o, thread_bindings_manager_exports as r, resolveThreadBindingPersona as s, createThreadBindingManager as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getDiscordRuntime } from "./runtime-
|
|
1
|
+
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.mjs";
|
|
2
2
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
3
3
|
import { normalizeAccountId, resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
|
|
4
4
|
import { asOptionalObjectRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -7,7 +7,7 @@ import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
|
7
7
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
8
8
|
import { resolveThreadBindingExpiry, warnPluginSdkDeprecation } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
|
|
9
9
|
import { recordOutboundMessageIdentity } from "openclaw/plugin-sdk/outbound-echo-runtime";
|
|
10
|
-
|
|
10
|
+
//#region extensions/discord/src/monitor/thread-bindings.state.ts
|
|
11
11
|
const THREAD_BINDINGS_STATE_KEY = Symbol.for("openclaw.discordThreadBindingsState");
|
|
12
12
|
function createThreadBindingsGlobalState() {
|
|
13
13
|
return {
|
|
@@ -271,7 +271,8 @@ function resolveBindingIdsForSession(params) {
|
|
|
271
271
|
}
|
|
272
272
|
return out;
|
|
273
273
|
}
|
|
274
|
-
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region extensions/discord/src/monitor/thread-bindings.persistence.ts
|
|
275
276
|
function shouldPersistAnyBindingState() {
|
|
276
277
|
return [...PERSIST_BY_ACCOUNT_ID.values()].some(Boolean);
|
|
277
278
|
}
|
|
@@ -424,7 +425,8 @@ function removeBindingRecordSync(bindingKey) {
|
|
|
424
425
|
return removed ?? removeBindingRecord(bindingKey);
|
|
425
426
|
}
|
|
426
427
|
}
|
|
427
|
-
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region extensions/discord/src/monitor/thread-bindings.session-shared.ts
|
|
428
430
|
function resolveBindingIdsForTargetSession(params) {
|
|
429
431
|
return resolveBindingIdsForSession({
|
|
430
432
|
...params,
|
|
@@ -484,7 +486,8 @@ function updateBindingsForTargetSessionSync(ids, update) {
|
|
|
484
486
|
}
|
|
485
487
|
return updated;
|
|
486
488
|
}
|
|
487
|
-
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region extensions/discord/src/monitor/thread-bindings.session-updates.ts
|
|
488
491
|
function createDurationUpdate(field, raw) {
|
|
489
492
|
const duration = resolveNonNegativeIntegerOption(raw, 0);
|
|
490
493
|
return (existing, now) => ({
|
|
@@ -520,4 +523,5 @@ const setThreadBindingMaxAgeBySessionKeyAsync = maxAgeSetters.setAsync;
|
|
|
520
523
|
const setThreadBindingIdleTimeoutBySessionKey = idleSetters.set;
|
|
521
524
|
/** @deprecated Use setThreadBindingMaxAgeBySessionKeyAsync; compatible through 2026-12-31, removed in the first January 2027 stable. */
|
|
522
525
|
const setThreadBindingMaxAgeBySessionKey = maxAgeSetters.set;
|
|
526
|
+
//#endregion
|
|
523
527
|
export { resolveBindingIdsForSession as A, forgetThreadBindingToken as C, refreshUnboundThreadWebhookIdentity as D, normalizeThreadBindingDurationMs as E, resolveThreadBindingMaxAgeExpiresAt as F, resolveThreadBindingMaxAgeMs as I, shouldDefaultPersist as L, resolvePreparedThreadBindingLifecycle as M, resolveThreadBindingIdleTimeoutMs as N, rememberReusableWebhook as O, resolveThreadBindingInactivityExpiresAt as P, toBindingRecordKey as R, ensureBindingsLoadedAsync as S, normalizeTargetKind as T, MANAGERS_BY_ACCOUNT_ID as _, mutateBindingsForTargetSession as a, THREAD_BINDING_TOUCH_PERSIST_MIN_INTERVAL_MS as b, drainThreadBindingAccountOperations as c, runThreadBindingAccountOperation as d, runThreadBindingMutation as f, BINDINGS_BY_THREAD_ID as g, updateBindingRecordSync as h, setThreadBindingMaxAgeBySessionKeyAsync as i, resolveBindingRecordKey as j, rememberThreadBindingToken as k, drainThreadBindingMutations as l, snapshotThreadBindingMetadata as m, setThreadBindingIdleTimeoutBySessionKeyAsync as n, resolveBindingIdsForTargetSession as o, shouldPersistAnyBindingState as p, setThreadBindingMaxAgeBySessionKey as r, commitBindingRecord as s, setThreadBindingIdleTimeoutBySessionKey as t, removeBindingRecordSync as u, PERSIST_BY_ACCOUNT_ID as v, getThreadBindingToken as w, ensureBindingsLoaded as x, REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL as y, toReusableWebhookKey as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { lt as createThread, pt as getChannelMessage, t as discord_exports } from "./discord-
|
|
3
|
-
import { d as resolveDiscordReplyDeliveryPlan, f as resolveDiscordReplyTarget, g as sanitizeDiscordThreadName, h as resolveDiscordThreadStarter, j as resolveDiscordMessageChannelId, m as resolveDiscordThreadParentInfo, p as resolveDiscordThreadChannel } from "./transcripts-source-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { lt as createThread, pt as getChannelMessage, t as discord_exports } from "./discord-BMD-JiVS.mjs";
|
|
3
|
+
import { d as resolveDiscordReplyDeliveryPlan, f as resolveDiscordReplyTarget, g as sanitizeDiscordThreadName, h as resolveDiscordThreadStarter, j as resolveDiscordMessageChannelId, m as resolveDiscordThreadParentInfo, p as resolveDiscordThreadChannel } from "./transcripts-source-8RDQrSVb.mjs";
|
|
4
4
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { buildAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
6
6
|
import { normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -8,7 +8,7 @@ import { Routes } from "discord-api-types/v10";
|
|
|
8
8
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
9
9
|
import { resolveChannelModelOverride } from "openclaw/plugin-sdk/model-session-runtime";
|
|
10
10
|
import { generateConversationLabel } from "openclaw/plugin-sdk/reply-dispatch-runtime";
|
|
11
|
-
|
|
11
|
+
//#region extensions/discord/src/monitor/thread-title.ts
|
|
12
12
|
const DEFAULT_THREAD_TITLE_TIMEOUT_MS = 6e4;
|
|
13
13
|
const MAX_THREAD_TITLE_SOURCE_CHARS = 600;
|
|
14
14
|
const MAX_THREAD_TITLE_CHANNEL_NAME_CHARS = 120;
|
|
@@ -81,7 +81,8 @@ function normalizeTitleContextField(raw, maxChars) {
|
|
|
81
81
|
if (!value) return;
|
|
82
82
|
return truncateThreadTitleText(value.replace(/\s+/g, " "), maxChars);
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region extensions/discord/src/monitor/threading.auto-thread.ts
|
|
85
86
|
function resolveTrimmedDiscordMessageChannelId(params) {
|
|
86
87
|
return (params.messageChannelId || resolveDiscordMessageChannelId({ message: params.message })).trim();
|
|
87
88
|
}
|
|
@@ -228,7 +229,8 @@ async function maybeRenameDiscordAutoThread(params) {
|
|
|
228
229
|
logVerbose(`discord: autoThread rename failed for ${params.threadId}: ${String(err)}`);
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
|
-
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region extensions/discord/src/monitor/threading.ts
|
|
232
234
|
var threading_exports = /* @__PURE__ */ __exportAll({
|
|
233
235
|
maybeCreateDiscordAutoThread: () => maybeCreateDiscordAutoThread,
|
|
234
236
|
resolveDiscordAutoThreadContext: () => resolveDiscordAutoThreadContext,
|
|
@@ -240,4 +242,5 @@ var threading_exports = /* @__PURE__ */ __exportAll({
|
|
|
240
242
|
resolveDiscordThreadStarter: () => resolveDiscordThreadStarter,
|
|
241
243
|
sanitizeDiscordThreadName: () => sanitizeDiscordThreadName
|
|
242
244
|
});
|
|
245
|
+
//#endregion
|
|
243
246
|
export { resolveDiscordAutoThreadReplyPlan as n, threading_exports as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
2
2
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/discord/src/monitor/timeouts.ts
|
|
4
4
|
const DISCORD_DEFAULT_LISTENER_TIMEOUT_MS = 12e4;
|
|
5
5
|
const DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS = 18e5;
|
|
6
6
|
const DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS = 6e4;
|
|
@@ -65,4 +65,5 @@ async function withAbortTimeout(params) {
|
|
|
65
65
|
if (timeoutTimer) clearTimeout(timeoutTimer);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
//#endregion
|
|
68
69
|
export { isAbortError as a, runDiscordTaskWithTimeout as c, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS as i, withAbortTimeout as l, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS as n, normalizeDiscordInboundWorkerTimeoutMs as o, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS as r, normalizeDiscordListenerTimeoutMs as s, DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { l as resolveDiscordAccount, o as listEnabledDiscordAccounts, u as resolveDiscordAccountAllowFrom } from "./accounts-
|
|
2
|
-
import { A as isDiscordThreadChannelType, D as getDiscordEndpointRuntime, f as resolveDiscordGuildEntry, i as normalizeDiscordAllowList, k as resolveDiscordEndpointMediaGuard, l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, r as isDiscordGroupAllowedByPolicy, t as allowListMatches } from "./allow-list-
|
|
3
|
-
import { L as DiscordError, pt as getChannelMessage, t as discord_exports } from "./discord-
|
|
4
|
-
import { l as withAbortTimeout } from "./timeouts-
|
|
5
|
-
import { t as resolveDiscordCommandOwnerAllowFrom } from "./command-owners-
|
|
6
|
-
import { a as resolveDiscordChannelParentSafe, i as resolveDiscordChannelParentIdSafe, n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-
|
|
1
|
+
import { l as resolveDiscordAccount, o as listEnabledDiscordAccounts, u as resolveDiscordAccountAllowFrom } from "./accounts-ljrzXBJi.mjs";
|
|
2
|
+
import { A as isDiscordThreadChannelType, D as getDiscordEndpointRuntime, f as resolveDiscordGuildEntry, i as normalizeDiscordAllowList, k as resolveDiscordEndpointMediaGuard, l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, r as isDiscordGroupAllowedByPolicy, t as allowListMatches } from "./allow-list-BKqOldGy.mjs";
|
|
3
|
+
import { L as DiscordError, pt as getChannelMessage, t as discord_exports } from "./discord-BMD-JiVS.mjs";
|
|
4
|
+
import { l as withAbortTimeout } from "./timeouts-CuNARfyw.mjs";
|
|
5
|
+
import { t as resolveDiscordCommandOwnerAllowFrom } from "./command-owners-C7rUdqUX.mjs";
|
|
6
|
+
import { a as resolveDiscordChannelParentSafe, i as resolveDiscordChannelParentIdSafe, n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-DasWY_OV.mjs";
|
|
7
7
|
import { createSubsystemLogger, getChildLogger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
8
8
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
9
9
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId, summarizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -18,9 +18,10 @@ import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runti
|
|
|
18
18
|
import { getFileExtension, normalizeMimeType } from "openclaw/plugin-sdk/media-mime";
|
|
19
19
|
import { formatMediaPlaceholderText } from "openclaw/plugin-sdk/channel-inbound";
|
|
20
20
|
import { resolveCommandAuthorizedFromAuthorizers } from "openclaw/plugin-sdk/command-auth-native";
|
|
21
|
-
|
|
21
|
+
//#region extensions/discord/src/monitor/message-channel-info-state.ts
|
|
22
22
|
const discordChannelInfoCacheState = { entries: /* @__PURE__ */ new Map() };
|
|
23
|
-
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region extensions/discord/src/monitor/message-channel-info.ts
|
|
24
25
|
const DISCORD_CHANNEL_INFO_CACHE_TTL_MS = 3e5;
|
|
25
26
|
const DISCORD_CHANNEL_INFO_NEGATIVE_CACHE_TTL_MS = 3e4;
|
|
26
27
|
const DISCORD_CHANNEL_INFO_CACHE_MAX_ENTRIES = 1e3;
|
|
@@ -72,7 +73,8 @@ async function resolveDiscordChannelInfo(client, channelId) {
|
|
|
72
73
|
return null;
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region extensions/discord/src/monitor/message-forwarded.ts
|
|
76
78
|
const FORWARD_MESSAGE_REFERENCE_TYPE = 1;
|
|
77
79
|
function normalizeDiscordStickerItems(value) {
|
|
78
80
|
if (!Array.isArray(value)) return [];
|
|
@@ -123,7 +125,8 @@ function formatDiscordSnapshotAuthor(author) {
|
|
|
123
125
|
if (username && discriminator && discriminator !== "0") return `@${username}#${discriminator}`;
|
|
124
126
|
return base ? `@${base}` : void 0;
|
|
125
127
|
}
|
|
126
|
-
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region extensions/discord/src/monitor/media-ssrf-policy.ts
|
|
127
130
|
const DISCORD_MEDIA_SSRF_POLICY = {
|
|
128
131
|
hostnameAllowlist: [
|
|
129
132
|
"cdn.discordapp.com",
|
|
@@ -149,7 +152,8 @@ function resolveDiscordCdnPolicy(policy) {
|
|
|
149
152
|
allowIpv6UniqueLocalRange: policy.allowIpv6UniqueLocalRange
|
|
150
153
|
};
|
|
151
154
|
}
|
|
152
|
-
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region extensions/discord/src/monitor/message-media.ts
|
|
153
157
|
const AUDIO_ATTACHMENT_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
154
158
|
".aac",
|
|
155
159
|
".caf",
|
|
@@ -348,7 +352,8 @@ function isImageAttachment(attachment) {
|
|
|
348
352
|
function formatDiscordMediaText(params) {
|
|
349
353
|
return formatMediaPlaceholderText([...(params.attachments ?? []).map((attachment) => resolveDiscordMediaClassification({ attachment })), ...(params.stickers ?? []).map(() => ({ kind: "sticker" }))]);
|
|
350
354
|
}
|
|
351
|
-
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region extensions/discord/src/monitor/message-text.ts
|
|
352
357
|
function resolveDiscordEmbedText(embeds) {
|
|
353
358
|
return (embeds ?? []).flatMap(({ title, description }) => [normalizeOptionalString(title), normalizeOptionalString(description)]).filter(Boolean).join("\n");
|
|
354
359
|
}
|
|
@@ -465,7 +470,8 @@ function resolveDiscordRawMessageText(message) {
|
|
|
465
470
|
});
|
|
466
471
|
return [content || resolveDiscordEmbedText(message.embeds) || extractDiscordComponentsV2Text(message.components) || resolveDiscordForwardedMessagesTextFromSnapshots(normalizeDiscordMessageSnapshots(message.message_snapshots)), mediaText].filter(Boolean).join("\n");
|
|
467
472
|
}
|
|
468
|
-
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region extensions/discord/src/monitor/threading.cache.ts
|
|
469
475
|
const DISCORD_THREAD_STARTER_CACHE_TTL_MS = 3e5;
|
|
470
476
|
const DISCORD_THREAD_STARTER_NEGATIVE_CACHE_TTL_MS = 3e4;
|
|
471
477
|
const DISCORD_THREAD_STARTER_CACHE_MAX = 500;
|
|
@@ -490,7 +496,8 @@ function setCachedThreadStarter(key, value, now) {
|
|
|
490
496
|
});
|
|
491
497
|
pruneMapToMaxSize(DISCORD_THREAD_STARTER_CACHE, DISCORD_THREAD_STARTER_CACHE_MAX);
|
|
492
498
|
}
|
|
493
|
-
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region extensions/discord/src/monitor/threading.starter.ts
|
|
494
501
|
const IN_FLIGHT_DISCORD_THREAD_STARTERS = /* @__PURE__ */ new Map();
|
|
495
502
|
function resolveDiscordThreadChannel(params) {
|
|
496
503
|
if (!params.isGuildMessage) return null;
|
|
@@ -609,7 +616,8 @@ function resolveDiscordReplyDeliveryPlan(params) {
|
|
|
609
616
|
})
|
|
610
617
|
};
|
|
611
618
|
}
|
|
612
|
-
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region extensions/discord/src/monitor/thread-channel-context.ts
|
|
613
621
|
async function resolveDiscordThreadLikeChannelContext(params) {
|
|
614
622
|
const safeChannelInfo = resolveDiscordChannelInfoSafe(params.channel);
|
|
615
623
|
const channelId = resolveDiscordChannelIdSafe(params.channel) ?? params.channelIdFallback ?? "";
|
|
@@ -656,12 +664,14 @@ async function resolveFetchedDiscordThreadLikeChannelContext(params) {
|
|
|
656
664
|
channelInfo: buildDiscordChannelInfo(params.channel)
|
|
657
665
|
});
|
|
658
666
|
}
|
|
659
|
-
|
|
667
|
+
//#endregion
|
|
668
|
+
//#region extensions/discord/src/voice/config.ts
|
|
660
669
|
function resolveDiscordVoiceEnabled(voice) {
|
|
661
670
|
if (voice?.enabled !== void 0) return voice.enabled;
|
|
662
671
|
return voice !== void 0;
|
|
663
672
|
}
|
|
664
|
-
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region extensions/discord/src/voice/owner-access.ts
|
|
665
675
|
async function resolveDiscordVoiceAccessTarget(params) {
|
|
666
676
|
const [guild, channel] = await Promise.all([params.client.fetchGuild(params.guildId).catch(() => null), params.client.fetchChannel(params.channelId).catch(() => null)]);
|
|
667
677
|
if (!guild || !channel) return;
|
|
@@ -690,7 +700,8 @@ function resolveDiscordVoiceAccess(params) {
|
|
|
690
700
|
ownerAllowFrom: commandOwnerAllowFrom ?? []
|
|
691
701
|
};
|
|
692
702
|
}
|
|
693
|
-
|
|
703
|
+
//#endregion
|
|
704
|
+
//#region extensions/discord/src/voice/access.ts
|
|
694
705
|
async function authorizeDiscordVoiceIngress(initialParams) {
|
|
695
706
|
const policy = await initialParams.readPolicy?.();
|
|
696
707
|
if (policy?.isCurrent() === false) return {
|
|
@@ -767,7 +778,8 @@ async function authorizeDiscordVoiceIngress(initialParams) {
|
|
|
767
778
|
message: "You are not authorized to use this command."
|
|
768
779
|
};
|
|
769
780
|
}
|
|
770
|
-
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region extensions/discord/src/voice/transcripts-source.ts
|
|
771
783
|
const TRANSCRIPTS_STATE = resolveGlobalSingleton(Symbol.for("openclaw.discordTranscriptsState"), () => ({
|
|
772
784
|
managersByAccountId: /* @__PURE__ */ new Map(),
|
|
773
785
|
captures: /* @__PURE__ */ new Map(),
|
|
@@ -1233,4 +1245,5 @@ const discordVoiceTranscriptsSourceProvider = {
|
|
|
1233
1245
|
}));
|
|
1234
1246
|
}
|
|
1235
1247
|
};
|
|
1248
|
+
//#endregion
|
|
1236
1249
|
export { resolveDiscordChannelInfo as A, resolveMediaList as C, resolveDiscordMessageStickers as D, hasDiscordMessageStickers as E, resolveDiscordReferencedReplyMessage as O, resolveForwardedMediaList as S, resolveDiscordCdnPolicy as T, resolveDiscordMessageBatch as _, authorizeDiscordVoiceIngress as a, resolveDiscordMessageText as b, resolveDiscordVoiceEnabled as c, resolveDiscordReplyDeliveryPlan as d, resolveDiscordReplyTarget as f, sanitizeDiscordThreadName as g, resolveDiscordThreadStarter as h, setDiscordTranscriptsVoiceManager as i, resolveDiscordMessageChannelId as j, resolveDiscordReferencedReplyMessageId as k, resolveDiscordThreadLikeChannelContext as l, resolveDiscordThreadParentInfo as m, discordVoiceTranscriptsSourceProvider as n, resolveDiscordVoiceAccess as o, resolveDiscordThreadChannel as p, resolveDiscordTranscriptsCapture as r, resolveDiscordVoiceAccessTarget as s, bindDiscordCaptureReceipts as t, resolveFetchedDiscordThreadLikeChannelContext as u, resolveDiscordMessageHistoryText as v, resolveReferencedReplyMediaList as w, formatDiscordMediaText as x, resolveDiscordMessageMentionDocuments as y };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
2
|
import { Routes } from "discord-api-types/v10";
|
|
3
3
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
4
|
-
|
|
4
|
+
//#region extensions/discord/src/monitor/typing.ts
|
|
5
5
|
var typing_exports = /* @__PURE__ */ __exportAll({ sendTyping: () => sendTyping });
|
|
6
6
|
const DISCORD_TYPING_START_TIMEOUT_MS = 5e3;
|
|
7
7
|
async function sendTyping(params) {
|
|
8
8
|
if ((await raceWithTimeout(params.rest.post(Routes.channelTyping(params.channelId)).then(() => ({ kind: "sent" })), DISCORD_TYPING_START_TIMEOUT_MS, () => ({ kind: "timeout" }), { ref: false })).kind === "timeout") throw new Error(`discord typing start timed out after ${DISCORD_TYPING_START_TIMEOUT_MS}ms`);
|
|
9
9
|
}
|
|
10
|
+
//#endregion
|
|
10
11
|
export { typing_exports as n, sendTyping as t };
|