@openclaw/discord 2026.11.8 → 2026.11.9
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-DGkdWwix.mjs → account-inspect-CSz5Qodj.mjs} +2 -3
- package/dist/.setup/{accounts-C_25wyxC.mjs → accounts-DtjvhJUj.mjs} +4 -8
- package/dist/.setup/{active-turn-thread-route-KvRTAVE3.mjs → active-turn-thread-route-DkPnk2x8.mjs} +1 -2
- package/dist/.setup/{allow-list-C3j0qLDp.mjs → allow-list-CkqpzPvP.mjs} +4 -8
- package/dist/.setup/{api-DYRggUgK.mjs → api-C4j_kC-2.mjs} +4 -6
- package/dist/.setup/{approval-handler.runtime-eKrSqVPF.mjs → approval-handler.runtime-bB4eKcGl.mjs} +9 -10
- package/dist/.setup/{approval-message-updates-DKsCfxSW.mjs → approval-message-updates-DqOXxPss.mjs} +3 -4
- package/dist/.setup/{audit-DZLJ0my1.mjs → audit-D1UISAXW.mjs} +6 -7
- package/dist/.setup/{channel-access-9cyzozUP.mjs → channel-access-DhJhVrdZ.mjs} +1 -2
- package/dist/.setup/{channel-COE1KIJz.mjs → channel-i4V5w1Nh.mjs} +32 -39
- package/dist/.setup/{channel.setup-B4SQu9Qg.mjs → channel.setup-BrGEJ0Ia.mjs} +7 -10
- package/dist/.setup/{command-deploy-store-DFkBTViB.mjs → command-deploy-store-DPWiBMks.mjs} +1 -2
- package/dist/.setup/{command-owners-C7rUdqUX.mjs → command-owners-BzlhNBxA.mjs} +1 -2
- package/dist/.setup/{components-Cy4hDa6J.mjs → components-DeCLO9w0.mjs} +10 -16
- package/dist/.setup/{components.base-CiS0h_XP.mjs → components.base-C5sAPHe4.mjs} +1 -2
- package/dist/.setup/{config-schema-BNKN1cu5.mjs → config-schema-GX2yDgIH.mjs} +3 -5
- package/dist/.setup/{conversation-binding-route-Cy_QeEBm.mjs → conversation-binding-route-CHCfhsCl.mjs} +2 -3
- package/dist/.setup/{directory-config-Ble81PWH.mjs → directory-config-BXJuh9-J.mjs} +3 -4
- package/dist/.setup/{directory-live-DOVK9G9P.mjs → directory-live-dzJ14-DT.mjs} +7 -8
- package/dist/.setup/{discord-KsHAulAQ.mjs → discord-BGkLzt2b.mjs} +28 -52
- package/dist/.setup/{doctor-CQescbAS.mjs → doctor-DBBXoP9w.mjs} +7 -8
- package/dist/.setup/{doctor-contract-Bwv8EuQ_.mjs → doctor-contract-Dstl3cMg.mjs} +2 -3
- package/dist/.setup/{endpoint-runtime-lf4DeLas.mjs → endpoint-runtime-BM3x-m6O.mjs} +1 -2
- package/dist/.setup/{guilds-BSnrns-F.mjs → guilds-DYBhgnfq.mjs} +3 -4
- package/dist/.setup/{handle-action-BfSo0qkY.mjs → handle-action-Dx2N-4A6.mjs} +10 -11
- package/dist/.setup/{handle-action.guild-admin-BOzk0kPz.mjs → handle-action.guild-admin-CGzsE3bM.mjs} +3 -4
- package/dist/.setup/{listeners-C0-BvUVA.mjs → listeners-DHjDOlXW.mjs} +2 -3
- package/dist/.setup/{live-policy-config-y0Qy36X3.mjs → live-policy-config-DjIHWFla.mjs} +3 -5
- package/dist/.setup/{message-handler-h8xpc_1a.mjs → message-handler-OqhwO2Il.mjs} +11 -15
- package/dist/.setup/{message-handler.preflight-CO1JNXKw.mjs → message-handler.preflight-DaqozzfW.mjs} +20 -43
- package/dist/.setup/{message-handler.preflight-pluralkit-C4FSmp6X.mjs → message-handler.preflight-pluralkit-CPWdqrEU.mjs} +10 -14
- package/dist/.setup/{message-handler.process-IPQv14En.mjs → message-handler.process-C6ETXKq2.mjs} +26 -34
- package/dist/.setup/{outbound-payload-Pz-zEQnX.mjs → outbound-payload-DOFjmMNE.mjs} +9 -11
- package/dist/.setup/{outbound-session-route-CpweCkxm.mjs → outbound-session-route-CzL157kC.mjs} +22 -34
- package/dist/.setup/{output-activity-uBpMSX75.mjs → output-activity-CDgs2s3O.mjs} +1 -2
- package/dist/.setup/{pluralkit-B64dfq_j.mjs → pluralkit-DcXbHTpQ.mjs} +2 -3
- package/dist/.setup/{preflight-audio-C6QtD6HX.mjs → preflight-audio-r4BbaJxh.mjs} +1 -2
- package/dist/.setup/{presence-cache-Dq-3nH7R.mjs → presence-cache-B3xj3b0l.mjs} +1 -2
- package/dist/.setup/{probe-CbDJojNV.mjs → probe-CfGMZwFD.mjs} +5 -6
- package/dist/.setup/{provider-D9dwCcy8.mjs → provider-BcSZ6vqo.mjs} +109 -185
- package/dist/.setup/{provider-session.runtime-pCvFOgHs.mjs → provider-session.runtime-CxGNqH7Q.mjs} +3 -3
- package/dist/.setup/provider.runtime-DPhNybGw.mjs +1 -0
- package/dist/.setup/{proxy-fetch-BzXwBAXt.mjs → proxy-fetch-B8cK6FLQ.mjs} +1 -2
- package/dist/.setup/{realtime-session.runtime-CP8Opnfr.mjs → realtime-session.runtime-Carw2Z1J.mjs} +15 -25
- package/dist/.setup/{receive-recovery-C3Ks4wAQ.mjs → receive-recovery-DV_v5ROf.mjs} +3 -6
- package/dist/.setup/{resolve-allowlist-common-B-S0wRIw.mjs → resolve-allowlist-common-CYdqBUgV.mjs} +3 -4
- package/dist/.setup/{resolve-channels-g16NM6Ho.mjs → resolve-channels-BNnyfCR8.mjs} +6 -7
- package/dist/.setup/{resolve-users-DAfOOXdy.mjs → resolve-users-CDMAGrzv.mjs} +5 -6
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
- package/dist/.setup/{runtime-BMgTyuwg.mjs → runtime-B-PgPsGR.mjs} +4 -6
- package/dist/.setup/{runtime-BRcmFvOV.mjs → runtime-BJxDx_zr.mjs} +18 -26
- package/dist/.setup/{runtime-DgnVQ7zW.mjs → runtime-DcBvHOm1.mjs} +1 -2
- package/dist/.setup/{runtime-doctor-migrations-BPV-R4G9.mjs → runtime-doctor-migrations-BpV1jKk0.mjs} +5 -9
- package/dist/.setup/{secret-config-contract-B1kE4sDv.mjs → secret-config-contract-CP6teHec.mjs} +1 -2
- package/dist/.setup/{security-audit-BFT84Uny.mjs → security-audit-CTwisG7c.mjs} +3 -4
- package/dist/.setup/{security-contract-DNyyjTZZ.mjs → security-contract-D-o0iWDk.mjs} +1 -2
- package/dist/.setup/{security-doctor-nGgPm65L.mjs → security-doctor-4s7omTZd.mjs} +1 -2
- package/dist/.setup/{send-DXPqEgjA.mjs → send-BQtMCED2.mjs} +19 -28
- package/dist/.setup/{send.components-MUCtA6qV.mjs → send.components-BTjOU5BX.mjs} +11 -14
- package/dist/.setup/{send.outbound-70KlFdzN.mjs → send.outbound-izfb48w-.mjs} +10 -15
- package/dist/.setup/{send.receipt-DkCkAjRL.mjs → send.receipt-D0vpuJMr.mjs} +11 -20
- package/dist/.setup/{send.shared-BXWCIkfx.mjs → send.shared-BVJkIe93.mjs} +12 -18
- package/dist/.setup/{sender-identity-BbA7FNbr.mjs → sender-identity-Dt5ELjRN.mjs} +2 -3
- package/dist/.setup/{session-contract-BO5tlIdl.mjs → session-contract-Bq71MS78.mjs} +1 -2
- package/dist/.setup/{session-key-normalization-CCHGNSQw.mjs → session-key-normalization-Cfvze5hd.mjs} +1 -2
- package/dist/.setup/setup-plugin-api-DCiNtEra.mjs +2 -0
- package/dist/.setup/{shared-G2-0EUo3.mjs → shared-djlPz0hY.mjs} +14 -17
- package/dist/.setup/{shared-interactive-DmzaoKOM.mjs → shared-interactive-DKBw4SNV.mjs} +7 -12
- package/dist/.setup/{subagent-hooks-BUvQ4Oj4.mjs → subagent-hooks-BTmMGFYh.mjs} +3 -4
- package/dist/.setup/{system-events-CYFu0Vp4.mjs → system-events-LN3PXCia.mjs} +3 -4
- package/dist/.setup/{target-parsing-C-HyNxcE.mjs → target-parsing-BiuhcK9Q.mjs} +1 -2
- package/dist/.setup/{target-resolver-54k9fO6u.mjs → target-resolver-C98DQ-sp.mjs} +6 -7
- package/dist/.setup/{thread-binding-api-BDZJD4na.mjs → thread-binding-api-Drd4Zu-5.mjs} +1 -2
- package/dist/.setup/{thread-bindings-BiO6_GA2.mjs → thread-bindings-ESkVljSW.mjs} +7 -10
- package/dist/.setup/{thread-bindings.manager-CadGpkjc.mjs → thread-bindings.manager-BG7MMT7H.mjs} +15 -20
- package/dist/.setup/{thread-bindings.session-updates-B4iJqhAn.mjs → thread-bindings.session-updates-Ddn14oJa.mjs} +6 -10
- package/dist/.setup/{threading-Bem-g91c.mjs → threading-BzxVQcv8.mjs} +5 -7
- package/dist/.setup/{timeouts-cIxzatmv.mjs → timeouts-CT9hnmo4.mjs} +1 -2
- package/dist/.setup/{transcripts-source-DUL7GRxU.mjs → transcripts-source-a1btN-pC.mjs} +20 -33
- package/dist/.setup/{typing-CNlSKY5S.mjs → typing-DAv4S2fI.mjs} +2 -3
- package/dist/.setup/{voice-runtime-D0TWfWJO.mjs → voice-runtime-BI76hQQH.mjs} +28 -46
- package/dist/.source-module-urls/d6c089460280c5a04184542d6712e04545caeb1ebb290d3504377b4cc5e22fea.json +1 -1
- package/dist/account-inspect-api.js +2 -3
- package/dist/action-runtime-api.js +1 -1
- package/dist/activities-api.js +9 -13
- package/dist/api.js +21 -22
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/directory-contract-api.js +2 -3
- package/dist/doctor-contract-api.js +5 -7
- package/dist/index.js +1 -2
- package/dist/runtime-api.js +22 -22
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-entry.js +2 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/src/voice/audio-worker.runtime.js +8 -14
- package/dist/subagent-hooks-api.js +2 -3
- package/dist/thread-binding-api.js +1 -1
- package/dist/transcripts-source-api.js +2 -3
- package/package.json +4 -4
- package/dist/.setup/provider.runtime-DTEY_Gvi.mjs +0 -1
- package/dist/.setup/setup-plugin-api-Dj04bzEC.mjs +0 -2
package/dist/.setup/{provider-session.runtime-pCvFOgHs.mjs → provider-session.runtime-CxGNqH7Q.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as createNoopThreadBindingManager, t as createThreadBindingManager } from "./thread-bindings.manager-
|
|
2
|
-
import { l as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-
|
|
3
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
1
|
+
import { i as createNoopThreadBindingManager, t as createThreadBindingManager } from "./thread-bindings.manager-BG7MMT7H.mjs";
|
|
2
|
+
import { l as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-ESkVljSW.mjs";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-OqhwO2Il.mjs";
|
|
4
4
|
import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
|
|
5
5
|
import { getAcpSessionManager, isAcpRuntimeError, rethrowIncognitoSessionError } from "openclaw/plugin-sdk/acp-runtime";
|
|
6
6
|
export { createDiscordMessageHandler, createNoopThreadBindingManager, createThreadBindingManager, getAcpSessionManager, isAcpRuntimeError, reconcileAcpThreadBindingsOnStartup, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled, rethrowIncognitoSessionError };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as monitorDiscordProvider } from "./provider-BcSZ6vqo.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { danger } from "openclaw/plugin-sdk/runtime-env";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/discord/src/proxy-fetch.ts
|
|
5
5
|
function resolveDiscordProxyFetchForAccount(account, cfg) {
|
|
6
6
|
return withValidatedDiscordProxy(normalizeOptionalString(account.config.proxy) ?? normalizeOptionalString(cfg?.channels?.discord?.proxy), void 0, makeProxyFetch);
|
|
7
7
|
}
|
|
@@ -26,5 +26,4 @@ function validateDiscordProxyUrl(proxyUrl) {
|
|
|
26
26
|
if (!["http:", "https:"].includes(parsed.protocol)) throw new Error("Proxy URL must use http or https");
|
|
27
27
|
return proxyUrl;
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { validateDiscordProxyUrl as n, withValidatedDiscordProxy as r, resolveDiscordProxyFetchForAccount as t };
|
package/dist/.setup/{realtime-session.runtime-CP8Opnfr.mjs → realtime-session.runtime-Carw2Z1J.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as setDiscordAudioOutputStatus, h as restoreDiscordAudioError, l as createDiscordPcmToRealtimeConverter, m as getDiscordAudioOutputStatus, p as DiscordAudioOutputStatus } from "./receive-recovery-
|
|
2
|
-
import { t as resolveDiscordOutputAudioDelta } from "./output-activity-
|
|
3
|
-
import { n as discordRealtimeVoiceSecretOwnerId } from "./secret-config-contract-
|
|
4
|
-
import { y as logVoiceVerbose } from "./provider-
|
|
5
|
-
import { a as maybeControlDiscordVoiceAgentRun, i as logDiscordVoiceAgentControlResult, n as formatVoiceIngressPrompt, r as handleDiscordVoiceAgentControlToolCall, t as DiscordRealtimeRecording } from "./voice-runtime-
|
|
1
|
+
import { _ as setDiscordAudioOutputStatus, h as restoreDiscordAudioError, l as createDiscordPcmToRealtimeConverter, m as getDiscordAudioOutputStatus, p as DiscordAudioOutputStatus } from "./receive-recovery-DV_v5ROf.mjs";
|
|
2
|
+
import { t as resolveDiscordOutputAudioDelta } from "./output-activity-CDgs2s3O.mjs";
|
|
3
|
+
import { n as discordRealtimeVoiceSecretOwnerId } from "./secret-config-contract-CP6teHec.mjs";
|
|
4
|
+
import { y as logVoiceVerbose } from "./provider-BcSZ6vqo.mjs";
|
|
5
|
+
import { a as maybeControlDiscordVoiceAgentRun, i as logDiscordVoiceAgentControlResult, n as formatVoiceIngressPrompt, r as handleDiscordVoiceAgentControlToolCall, t as DiscordRealtimeRecording } from "./voice-runtime-BI76hQQH.mjs";
|
|
6
6
|
import { MessageChannel } from "node:worker_threads";
|
|
7
7
|
import { formatErrorMessage, readErrorName, toErrorObject, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
8
8
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -13,7 +13,7 @@ import { sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
|
13
13
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
14
14
|
import { REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME, REALTIME_VOICE_AGENT_CONTROL_TOOL, REALTIME_VOICE_AGENT_CONTROL_TOOL_NAME, REALTIME_VOICE_AUDIO_FORMAT_PCM16_24KHZ, buildRealtimeVoiceAgentErrorProviderResult, buildRealtimeVoiceSessionInstructions, buildRealtimeVoiceSpeakExactMessage, canonicalizeRealtimeVoiceProviderId, classifyRealtimeVoiceConsultToolCall, classifySkippableRealtimeVoiceConsultTranscript, createRealtimeVoiceAgentTalkbackQueue, createRealtimeVoiceOutputActivityTracker, createRealtimeVoiceSessionHarness, isRealtimeVoiceAudioAudible, isRealtimeVoiceWakeNameRequired, matchRealtimeVoiceActivationName, matchRealtimeVoiceConsultQuestions, projectInternalRealtimeVoicePublicConfig, realtimeVoiceAudioDurationMs, registerRealtimeVoiceSelection, resolveConfiguredRealtimeVoiceProviderAsync, resolveRealtimeVoiceAgentConsultTools, resolveRealtimeVoiceBargeIn, resolveRealtimeVoiceInterruptResponseOnInputAudio, resolveRealtimeVoiceMinBargeInAudioEndMs, resolveRealtimeVoiceSessionPolicy } from "openclaw/plugin-sdk/realtime-voice";
|
|
15
15
|
import { assertSecretOwnerAvailable, isSecretOwnerAvailable } from "openclaw/plugin-sdk/channel-secret-owner-runtime";
|
|
16
|
-
|
|
16
|
+
// extensions/discord/src/voice/realtime-player.ts
|
|
17
17
|
/** Room-level policy stays on main; the worker owns the physical player and FIFO. */
|
|
18
18
|
var DiscordRealtimePlayer = class {
|
|
19
19
|
constructor(audio) {
|
|
@@ -77,8 +77,7 @@ var DiscordRealtimePlayer = class {
|
|
|
77
77
|
this.audio.send({ type: "output-shutdown" });
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
|
|
81
|
-
//#region extensions/discord/src/voice/realtime-speaker-config.ts
|
|
80
|
+
// extensions/discord/src/voice/realtime-speaker-config.ts
|
|
82
81
|
/** Prepare shared provider credentials once before any speaker starts capturing audio. */
|
|
83
82
|
async function prepareDiscordRealtimeProvider(params) {
|
|
84
83
|
const { realtimeConfig, isAgentProxy } = params;
|
|
@@ -179,8 +178,7 @@ function resolveDiscordRealtimeSpeakerConfig(params) {
|
|
|
179
178
|
resolvedVoice: normalizeOptionalString(resolved.providerConfig.voice)
|
|
180
179
|
};
|
|
181
180
|
}
|
|
182
|
-
|
|
183
|
-
//#region extensions/discord/src/voice/log-preview.ts
|
|
181
|
+
// extensions/discord/src/voice/log-preview.ts
|
|
184
182
|
const DISCORD_REALTIME_INTERRUPTION_MESSAGES = /* @__PURE__ */ new Map([
|
|
185
183
|
["client:response.cancel", "interrupt requested"],
|
|
186
184
|
["client:conversation.item.truncate.skipped", "interrupt ignored"],
|
|
@@ -195,8 +193,7 @@ function formatRealtimeInfoLog(event) {
|
|
|
195
193
|
const detail = event.detail ? ` ${event.detail}` : "";
|
|
196
194
|
return `discord voice: realtime lifecycle ${event.direction}:${event.type}${detail}`;
|
|
197
195
|
}
|
|
198
|
-
|
|
199
|
-
//#region extensions/discord/src/voice/realtime-transcript.ts
|
|
196
|
+
// extensions/discord/src/voice/realtime-transcript.ts
|
|
200
197
|
const PARTIAL_TRANSCRIPT_MAX_CHARS = 240;
|
|
201
198
|
function mergeRealtimePartialTranscript(previous, next) {
|
|
202
199
|
const trimmed = next.trim();
|
|
@@ -204,8 +201,7 @@ function mergeRealtimePartialTranscript(previous, next) {
|
|
|
204
201
|
const merged = trimmed.startsWith(previous) ? trimmed : `${previous}${next}`;
|
|
205
202
|
return sliceUtf16Safe(merged, 0, PARTIAL_TRANSCRIPT_MAX_CHARS);
|
|
206
203
|
}
|
|
207
|
-
|
|
208
|
-
//#region extensions/discord/src/voice/realtime-turns.ts
|
|
204
|
+
// extensions/discord/src/voice/realtime-turns.ts
|
|
209
205
|
const logger$4 = createSubsystemLogger("discord/voice");
|
|
210
206
|
const DISCORD_REALTIME_WAKE_NAME_FOLLOWUP_TTL_MS = 1e4;
|
|
211
207
|
const REALTIME_PCM16_BYTES_PER_SAMPLE = 2;
|
|
@@ -392,8 +388,7 @@ var DiscordRealtimeTurns = class {
|
|
|
392
388
|
function isDiscordRealtimeSpeakerContext(value) {
|
|
393
389
|
return Boolean(value) && typeof value === "object" && typeof value.userId === "string" && typeof value.senderIsOwner === "boolean" && typeof value.speakerLabel === "string";
|
|
394
390
|
}
|
|
395
|
-
|
|
396
|
-
//#region extensions/discord/src/voice/realtime-consults.ts
|
|
391
|
+
// extensions/discord/src/voice/realtime-consults.ts
|
|
397
392
|
const logger$3 = createSubsystemLogger("discord/voice");
|
|
398
393
|
const DISCORD_REALTIME_TALKBACK_DEBOUNCE_MS = 350;
|
|
399
394
|
const DISCORD_REALTIME_FALLBACK_TEXT = "I hit an error while checking that. Please try again.";
|
|
@@ -750,8 +745,7 @@ var DiscordRealtimeConsults = class {
|
|
|
750
745
|
this.params.harness.forcedConsults.clear();
|
|
751
746
|
}
|
|
752
747
|
};
|
|
753
|
-
|
|
754
|
-
//#region extensions/discord/src/voice/realtime-output.ts
|
|
748
|
+
// extensions/discord/src/voice/realtime-output.ts
|
|
755
749
|
/** Main retains provider item identity; physical output state belongs to the worker. */
|
|
756
750
|
var DiscordRealtimeOutput = class {
|
|
757
751
|
constructor(params) {
|
|
@@ -890,8 +884,7 @@ var DiscordRealtimeOutput = class {
|
|
|
890
884
|
this.params.onClose(this, reason);
|
|
891
885
|
}
|
|
892
886
|
};
|
|
893
|
-
|
|
894
|
-
//#region extensions/discord/src/voice/realtime-playback.ts
|
|
887
|
+
// extensions/discord/src/voice/realtime-playback.ts
|
|
895
888
|
const logger$2 = createSubsystemLogger("discord/voice");
|
|
896
889
|
const DISCORD_REALTIME_CONTROL_SPEECH_DEDUPE_MS = 5e3;
|
|
897
890
|
const DISCORD_REALTIME_MAX_RETAINED_RESPONSES = 32;
|
|
@@ -1295,8 +1288,7 @@ var DiscordRealtimePlayback = class {
|
|
|
1295
1288
|
this.drainQueuedExactSpeechMessages();
|
|
1296
1289
|
}
|
|
1297
1290
|
};
|
|
1298
|
-
|
|
1299
|
-
//#region extensions/discord/src/voice/realtime-speaker-session.ts
|
|
1291
|
+
// extensions/discord/src/voice/realtime-speaker-session.ts
|
|
1300
1292
|
const logger$1 = createSubsystemLogger("discord/voice");
|
|
1301
1293
|
const DISCORD_REALTIME_DUPLICATE_ERROR_SUPPRESS_MS = 6e4;
|
|
1302
1294
|
const discordRealtimeTalkPayload = () => ({});
|
|
@@ -1722,8 +1714,7 @@ var DiscordRealtimeSpeakerSession = class {
|
|
|
1722
1714
|
this.lastRealtimeError.suppressed = 0;
|
|
1723
1715
|
}
|
|
1724
1716
|
};
|
|
1725
|
-
|
|
1726
|
-
//#region extensions/discord/src/voice/realtime-session.runtime.ts
|
|
1717
|
+
// extensions/discord/src/voice/realtime-session.runtime.ts
|
|
1727
1718
|
const logger = createSubsystemLogger("discord/voice");
|
|
1728
1719
|
const MAX_REALTIME_SPEAKERS = 8;
|
|
1729
1720
|
const REALTIME_SPEAKER_IDLE_MS = 6e4;
|
|
@@ -2060,5 +2051,4 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
2060
2051
|
logger.info(`discord voice: realtime speaker retired user=${speaker.userId} reason=${reason}${reason === "input-timeout" ? "; idle speaker input expired; speak again to reconnect" : ""}`);
|
|
2061
2052
|
}
|
|
2062
2053
|
};
|
|
2063
|
-
//#endregion
|
|
2064
2054
|
export { DiscordRealtimeVoiceSession };
|
|
@@ -7,7 +7,7 @@ import { resolveFfmpegBin } from "openclaw/plugin-sdk/media-runtime";
|
|
|
7
7
|
import { createStreamingPcmResampler } from "openclaw/plugin-sdk/realtime-voice-provider";
|
|
8
8
|
import { logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
9
9
|
import { resolvePreferredOpenClawTmpDir, tempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
10
|
-
|
|
10
|
+
// extensions/discord/src/voice/audio-worker-protocol.ts
|
|
11
11
|
const DISCORD_AUDIO_OUTPUT_STATUS = 1;
|
|
12
12
|
const DiscordAudioOutputStatus = {
|
|
13
13
|
Buffering: 0n,
|
|
@@ -41,8 +41,7 @@ function serializeDiscordAudioError(error) {
|
|
|
41
41
|
function restoreDiscordAudioError(error) {
|
|
42
42
|
return Object.assign(new Error(error.message), error);
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
//#region extensions/discord/src/voice/audio.ts
|
|
44
|
+
// extensions/discord/src/voice/audio.ts
|
|
46
45
|
const SAMPLE_RATE = 48e3;
|
|
47
46
|
const CHANNELS = 2;
|
|
48
47
|
const BIT_DEPTH = 16;
|
|
@@ -379,8 +378,7 @@ async function writeVoiceWavFile(chunks) {
|
|
|
379
378
|
throw error;
|
|
380
379
|
}
|
|
381
380
|
}
|
|
382
|
-
|
|
383
|
-
//#region extensions/discord/src/voice/receive-recovery.ts
|
|
381
|
+
// extensions/discord/src/voice/receive-recovery.ts
|
|
384
382
|
const DECRYPT_FAILURE_WINDOW_MS = 3e4;
|
|
385
383
|
const DECRYPT_FAILURE_RECONNECT_THRESHOLD = 3;
|
|
386
384
|
const DECRYPT_FAILURE_MARKER = "DecryptionFailed(";
|
|
@@ -462,5 +460,4 @@ function enableDaveReceivePassthrough(params) {
|
|
|
462
460
|
onWarn(`discord voice: failed to enable DAVE passthrough guild=${target.guildId} channel=${target.channelId} reason=${reason}`);
|
|
463
461
|
}
|
|
464
462
|
}
|
|
465
|
-
//#endregion
|
|
466
463
|
export { setDiscordAudioOutputStatus as _, recoverDaveZeroTransition as a, createDiscordOpusPlaybackStream as c, decodeOpusStreamChunks as d, writeVoiceWavFile as f, serializeDiscordAudioError as g, restoreDiscordAudioError as h, noteVoiceDecryptFailure as i, createDiscordPcmToRealtimeConverter as l, getDiscordAudioOutputStatus as m, analyzeVoiceReceiveError as n, resetVoiceReceiveRecoveryState as o, DiscordAudioOutputStatus as p, enableDaveReceivePassthrough as r, DiscordOpusEncodeStream as s, DECRYPT_FAILURE_WINDOW_MS as t, createRealtimePcmToDiscordConverter as u };
|
package/dist/.setup/{resolve-allowlist-common-B-S0wRIw.mjs → resolve-allowlist-common-CYdqBUgV.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as normalizeDiscordToken } from "./accounts-
|
|
2
|
-
import { o as normalizeDiscordSlug } from "./allow-list-
|
|
3
|
-
|
|
1
|
+
import { h as normalizeDiscordToken } from "./accounts-DtjvhJUj.mjs";
|
|
2
|
+
import { o as normalizeDiscordSlug } from "./allow-list-CkqpzPvP.mjs";
|
|
3
|
+
// extensions/discord/src/resolve-allowlist-common.ts
|
|
4
4
|
function resolveDiscordAllowlistToken(token) {
|
|
5
5
|
return normalizeDiscordToken(token, "channels.discord.token");
|
|
6
6
|
}
|
|
@@ -52,5 +52,4 @@ function parseDiscordAllowlistInput(raw, kind) {
|
|
|
52
52
|
guildOnly: true
|
|
53
53
|
} : { name: trimmed.replace(/^@/, "") };
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { parseDiscordAllowlistInput as n, resolveDiscordAllowlistToken as r, filterDiscordGuilds as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { a as normalizeDiscordDisplaySlug, o as normalizeDiscordSlug, w as isDiscordThreadChannelType } from "./allow-list-
|
|
3
|
-
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-
|
|
4
|
-
import { n as listGuilds, t as listDiscordGuildChannels } from "./guilds-
|
|
5
|
-
import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-
|
|
6
|
-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { a as normalizeDiscordDisplaySlug, o as normalizeDiscordSlug, w as isDiscordThreadChannelType } from "./allow-list-CkqpzPvP.mjs";
|
|
3
|
+
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-C4j_kC-2.mjs";
|
|
4
|
+
import { n as listGuilds, t as listDiscordGuildChannels } from "./guilds-DYBhgnfq.mjs";
|
|
5
|
+
import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-CYdqBUgV.mjs";
|
|
6
|
+
// extensions/discord/src/resolve-channels.ts
|
|
7
7
|
var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveDiscordChannelAllowlist: () => resolveDiscordChannelAllowlist });
|
|
8
8
|
async function listGuildChannels(token, fetcher, guildId) {
|
|
9
9
|
return (await listDiscordGuildChannels(token, fetcher, guildId)).map((channel) => {
|
|
@@ -172,5 +172,4 @@ async function resolveDiscordChannelAllowlist(params) {
|
|
|
172
172
|
for (const input of params.entries) results.push(await resolveEntry(input));
|
|
173
173
|
return results;
|
|
174
174
|
}
|
|
175
|
-
//#endregion
|
|
176
175
|
export { resolve_channels_exports as n, resolveDiscordChannelAllowlist as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-
|
|
3
|
-
import { n as listGuilds, r as searchDiscordGuildMembers } from "./guilds-
|
|
4
|
-
import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-C4j_kC-2.mjs";
|
|
3
|
+
import { n as listGuilds, r as searchDiscordGuildMembers } from "./guilds-DYBhgnfq.mjs";
|
|
4
|
+
import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-CYdqBUgV.mjs";
|
|
5
5
|
import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
|
|
6
|
+
// extensions/discord/src/resolve-users.ts
|
|
7
7
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });
|
|
8
8
|
function scoreDiscordMember(member, query) {
|
|
9
9
|
const q = query.toLowerCase();
|
|
@@ -82,5 +82,4 @@ async function resolveDiscordUserAllowlist(params) {
|
|
|
82
82
|
}
|
|
83
83
|
return results;
|
|
84
84
|
}
|
|
85
|
-
//#endregion
|
|
86
85
|
export { resolve_users_exports as n, resolveDiscordUserAllowlist as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,5 +24,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
-
//#endregion
|
|
28
27
|
export { __reExport as n, __exportAll as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as selectDiscordActivitiesRuntimeConfig, i as listDiscordAccountIds, l as resolveDiscordAccount, r as isDiscordAccountEnabledForRuntime } from "./accounts-
|
|
2
|
-
import { t as resolveDiscordProxyFetchForAccount } from "./proxy-fetch-
|
|
1
|
+
import { _ as selectDiscordActivitiesRuntimeConfig, i as listDiscordAccountIds, l as resolveDiscordAccount, r as isDiscordAccountEnabledForRuntime } from "./accounts-DtjvhJUj.mjs";
|
|
2
|
+
import { t as resolveDiscordProxyFetchForAccount } from "./proxy-fetch-B8cK6FLQ.mjs";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/discord/src/activities/config.ts
|
|
5
5
|
function resolveDiscordActivitiesConfig(account, env = process.env) {
|
|
6
6
|
if (!account.activities) return {
|
|
7
7
|
enabled: false,
|
|
@@ -19,8 +19,7 @@ function resolveDiscordActivitiesConfig(account, env = process.env) {
|
|
|
19
19
|
...applicationId ? { applicationId } : {}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
//#region extensions/discord/src/activities/runtime.ts
|
|
22
|
+
// extensions/discord/src/activities/runtime.ts
|
|
24
23
|
var DiscordActivitiesRuntime = class {
|
|
25
24
|
constructor(store, getCurrentConfig, env = process.env) {
|
|
26
25
|
this.store = store;
|
|
@@ -73,5 +72,4 @@ function setDiscordActivitiesRuntime(runtime) {
|
|
|
73
72
|
function getDiscordActivitiesRuntime() {
|
|
74
73
|
return activeRuntime;
|
|
75
74
|
}
|
|
76
|
-
//#endregion
|
|
77
75
|
export { getDiscordActivitiesRuntime as n, setDiscordActivitiesRuntime as r, DiscordActivitiesRuntime as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as resolveDefaultDiscordAccountId, s as mergeDiscordAccountConfig, t as createDiscordActionGate } from "./accounts-
|
|
2
|
-
import { C as hasAnyChannelPermissionDiscord, P as createDiscordRuntimeAccountContext, R as getGateway, _ as canManageGuildMemberRoleDiscord, b as fetchChannelPermissionsDiscord, n as buildDiscordTextChunks, u as resolveDiscordTargetChannelId, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, y as canViewDiscordGuildChannel } from "./send.shared-
|
|
3
|
-
import { l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, w as isDiscordThreadChannelType, y as resolveGroupDmAllow } from "./allow-list-
|
|
4
|
-
import { g as resolveDiscordReplyReference, m as createReusableDiscordReplyReference } from "./send.receipt-
|
|
5
|
-
import { n as resolveDiscordChannelId, t as parseDiscordTarget } from "./target-parsing-
|
|
6
|
-
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-
|
|
7
|
-
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
8
|
-
import { n as getPresence } from "./presence-cache-
|
|
9
|
-
import { c as coerceDiscordComponentParam, l as readDiscordComponentSpec } from "./components-
|
|
10
|
-
import { r as sendDiscordComponentMessage } from "./send.components-
|
|
1
|
+
import { c as resolveDefaultDiscordAccountId, s as mergeDiscordAccountConfig, t as createDiscordActionGate } from "./accounts-DtjvhJUj.mjs";
|
|
2
|
+
import { C as hasAnyChannelPermissionDiscord, P as createDiscordRuntimeAccountContext, R as getGateway, _ as canManageGuildMemberRoleDiscord, b as fetchChannelPermissionsDiscord, n as buildDiscordTextChunks, u as resolveDiscordTargetChannelId, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, y as canViewDiscordGuildChannel } from "./send.shared-BVJkIe93.mjs";
|
|
3
|
+
import { l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, w as isDiscordThreadChannelType, y as resolveGroupDmAllow } from "./allow-list-CkqpzPvP.mjs";
|
|
4
|
+
import { g as resolveDiscordReplyReference, m as createReusableDiscordReplyReference } from "./send.receipt-D0vpuJMr.mjs";
|
|
5
|
+
import { n as resolveDiscordChannelId, t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
|
|
6
|
+
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-BQtMCED2.mjs";
|
|
7
|
+
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-izfb48w-.mjs";
|
|
8
|
+
import { n as getPresence } from "./presence-cache-B3xj3b0l.mjs";
|
|
9
|
+
import { c as coerceDiscordComponentParam, l as readDiscordComponentSpec } from "./components-DeCLO9w0.mjs";
|
|
10
|
+
import { r as sendDiscordComponentMessage } from "./send.components-BTjOU5BX.mjs";
|
|
11
11
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
12
12
|
import { asBoolean, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
13
|
import { assertMediaNotDataUrl, jsonResult, parseAvailableTags, readNonNegativeIntegerParam, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -16,7 +16,7 @@ import { createChannelProgressDraftCompositor } from "openclaw/plugin-sdk/channe
|
|
|
16
16
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
17
17
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
18
18
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
19
|
-
|
|
19
|
+
// extensions/discord/src/actions/runtime.messaging.thread-list.ts
|
|
20
20
|
function readDiscordChannelStringField(value, ...keys) {
|
|
21
21
|
if (!value || typeof value !== "object") return;
|
|
22
22
|
const record = value;
|
|
@@ -74,8 +74,7 @@ function filterDiscordActiveThreadList(params) {
|
|
|
74
74
|
})
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
//#region extensions/discord/src/actions/runtime.shared.ts
|
|
77
|
+
// extensions/discord/src/actions/runtime.shared.ts
|
|
79
78
|
/** Discord REST auto_archive_duration allowlist (minutes). */
|
|
80
79
|
const DISCORD_AUTO_ARCHIVE_MINUTES = /* @__PURE__ */ new Set([
|
|
81
80
|
60,
|
|
@@ -141,8 +140,7 @@ function readDiscordChannelMoveParams(params) {
|
|
|
141
140
|
position: readNonNegativeIntegerParam(params, "position")
|
|
142
141
|
};
|
|
143
142
|
}
|
|
144
|
-
|
|
145
|
-
//#region extensions/discord/src/actions/runtime.messaging.shared.ts
|
|
143
|
+
// extensions/discord/src/actions/runtime.messaging.shared.ts
|
|
146
144
|
function allowsAllDiscordGuildChannels(channels) {
|
|
147
145
|
const wildcard = channels?.["*"];
|
|
148
146
|
if (!wildcard || wildcard.enabled === false) return false;
|
|
@@ -503,8 +501,7 @@ function createDiscordMessagingActionContext(params) {
|
|
|
503
501
|
}
|
|
504
502
|
};
|
|
505
503
|
}
|
|
506
|
-
|
|
507
|
-
//#region extensions/discord/src/actions/runtime.guild.ts
|
|
504
|
+
// extensions/discord/src/actions/runtime.guild.ts
|
|
508
505
|
/** Options for permission and metadata lookups that run before an action's own send options. */
|
|
509
506
|
function guildActionOptions(params) {
|
|
510
507
|
return createDiscordActionOptions({
|
|
@@ -885,8 +882,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
885
882
|
default: throw new Error(`Unknown action: ${action}`);
|
|
886
883
|
}
|
|
887
884
|
}
|
|
888
|
-
|
|
889
|
-
//#region extensions/discord/src/actions/runtime.messaging.messages.ts
|
|
885
|
+
// extensions/discord/src/actions/runtime.messaging.messages.ts
|
|
890
886
|
function parseDiscordMessageLink(link) {
|
|
891
887
|
const match = link.trim().match(/^(?:https?:\/\/)?(?:ptb\.|canary\.)?discord(?:app)?\.com\/channels\/(\d+)\/(\d+)\/(\d+)(?:\/?|\?.*)$/i);
|
|
892
888
|
if (!match) throw new Error("Invalid Discord message link. Expected https://discord.com/channels/<guildId>/<channelId>/<messageId>.");
|
|
@@ -1039,8 +1035,7 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1039
1035
|
default: return;
|
|
1040
1036
|
}
|
|
1041
1037
|
}
|
|
1042
|
-
|
|
1043
|
-
//#region extensions/discord/src/actions/runtime.messaging.send.ts
|
|
1038
|
+
// extensions/discord/src/actions/runtime.messaging.send.ts
|
|
1044
1039
|
function resolveActionReplyReference(ctx, replyToId) {
|
|
1045
1040
|
const reply = ctx.options?.reply;
|
|
1046
1041
|
return reply ? resolveDiscordReplyReference({
|
|
@@ -1285,8 +1280,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1285
1280
|
default: return;
|
|
1286
1281
|
}
|
|
1287
1282
|
}
|
|
1288
|
-
|
|
1289
|
-
//#region extensions/discord/src/actions/runtime.moderation-shared.ts
|
|
1283
|
+
// extensions/discord/src/actions/runtime.moderation-shared.ts
|
|
1290
1284
|
const moderationPermissions = {
|
|
1291
1285
|
timeout: PermissionFlagsBits.ModerateMembers,
|
|
1292
1286
|
kick: PermissionFlagsBits.KickMembers,
|
|
@@ -1313,8 +1307,7 @@ function readDiscordModerationCommand(action, params) {
|
|
|
1313
1307
|
})
|
|
1314
1308
|
};
|
|
1315
1309
|
}
|
|
1316
|
-
|
|
1317
|
-
//#region extensions/discord/src/actions/runtime.ts
|
|
1310
|
+
// extensions/discord/src/actions/runtime.ts
|
|
1318
1311
|
const ACTIVITY_TYPE_MAP = /* @__PURE__ */ new Map([
|
|
1319
1312
|
["playing", 0],
|
|
1320
1313
|
["streaming", 1],
|
|
@@ -1467,5 +1460,4 @@ async function handleDiscordAction(params, cfg, options) {
|
|
|
1467
1460
|
}
|
|
1468
1461
|
throw new Error(`Unknown action: ${action}`);
|
|
1469
1462
|
}
|
|
1470
|
-
//#endregion
|
|
1471
1463
|
export { readDiscordAutoArchiveDurationParam as a, readDiscordChannelMoveParams as c, requiredGuildPermissionForModerationAction as i, readDiscordParentIdParam as l, isDiscordModerationAction as n, readDiscordChannelCreateParams as o, readDiscordModerationCommand as r, readDiscordChannelEditParams as s, handleDiscordAction as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
// extensions/discord/src/runtime.ts
|
|
3
3
|
const { setRuntime: setDiscordRuntime, tryGetRuntime: getOptionalDiscordRuntime, getRuntime: getDiscordRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "discord",
|
|
5
5
|
errorMessage: "Discord runtime not initialized"
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { getOptionalDiscordRuntime as n, setDiscordRuntime as r, getDiscordRuntime as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
// packages/normalization-core/src/record-coerce.ts
|
|
3
3
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
4
4
|
function isRecord(value) {
|
|
5
5
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -8,8 +8,7 @@ function isRecord(value) {
|
|
|
8
8
|
function asNullableRecord(value) {
|
|
9
9
|
return isRecord(value) ? value : null;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
//#region src/config/channel-config-normalization.ts
|
|
11
|
+
// src/config/channel-config-normalization.ts
|
|
13
12
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
14
13
|
function normalizeChannelAccounts(params) {
|
|
15
14
|
const rawAccounts = asNullableRecord(params.entry.accounts);
|
|
@@ -85,8 +84,7 @@ function normalizeChannelConfigEntries(params) {
|
|
|
85
84
|
changes
|
|
86
85
|
};
|
|
87
86
|
}
|
|
88
|
-
|
|
89
|
-
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
87
|
+
// src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
90
88
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
91
89
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
92
90
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -156,10 +154,8 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
156
154
|
}
|
|
157
155
|
};
|
|
158
156
|
}
|
|
159
|
-
|
|
160
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
157
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
161
158
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
162
159
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
163
160
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
164
|
-
//#endregion
|
|
165
161
|
export { runtime_doctor_migrations_exports as t };
|
package/dist/.setup/{secret-config-contract-B1kE4sDv.mjs → secret-config-contract-CP6teHec.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
2
|
import { collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, createChannelSecretTargetRegistryEntries, getChannelRecord, hasConfiguredSecretInputValue, isBaseFieldActiveForChannelSurface, isEnabledFlag, isRecord, resolveChannelAccountSurface } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
3
3
|
import { collectNestedChannelTtsAssignments } from "openclaw/plugin-sdk/channel-secret-tts-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/discord/src/secret-config-contract.ts
|
|
5
5
|
function discordRealtimeVoiceSecretOwnerId(accountId, providerId) {
|
|
6
6
|
return `discord:voice:realtime:${normalizeAccountId(accountId)}:${providerId}`;
|
|
7
7
|
}
|
|
@@ -69,5 +69,4 @@ function collectRuntimeConfigAssignments(params) {
|
|
|
69
69
|
accountInactiveReason: "Discord account is disabled, voice is disabled, or voice mode is stt-tts for this account."
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
//#endregion
|
|
73
72
|
export { discordRealtimeVoiceSecretOwnerId as n, secretTargetRegistryEntries as r, collectRuntimeConfigAssignments as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { t as isDiscordMutableAllowEntry } from "./security-doctor-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { t as isDiscordMutableAllowEntry } from "./security-doctor-4s7omTZd.mjs";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runtime";
|
|
5
5
|
import { coerceNativeSetting, normalizeAllowFromList } from "openclaw/plugin-sdk/channel-policy";
|
|
6
6
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
7
7
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
8
|
-
|
|
8
|
+
// extensions/discord/src/security-audit.ts
|
|
9
9
|
var security_audit_exports = /* @__PURE__ */ __exportAll({ collectDiscordSecurityAuditFindings: () => collectDiscordSecurityAuditFindings });
|
|
10
10
|
function isWildcardEntry(value) {
|
|
11
11
|
return String(value).trim() === "*";
|
|
@@ -116,5 +116,4 @@ async function collectDiscordSecurityAuditFindings(params) {
|
|
|
116
116
|
});
|
|
117
117
|
return findings;
|
|
118
118
|
}
|
|
119
|
-
//#endregion
|
|
120
119
|
export { security_audit_exports as n, collectDiscordSecurityAuditFindings as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/discord/src/security-contract.ts
|
|
3
3
|
const unsupportedSecretRefSurfacePatterns = ["channels.discord.threadBindings.webhookToken", "channels.discord.accounts.*.threadBindings.webhookToken"];
|
|
4
4
|
function collectUnsupportedSecretRefConfigCandidates(raw) {
|
|
5
5
|
if (!isRecord(raw) || !isRecord(raw.channels) || !isRecord(raw.channels.discord)) return [];
|
|
@@ -15,5 +15,4 @@ function collectUnsupportedSecretRefConfigCandidates(raw) {
|
|
|
15
15
|
for (const [accountId, account] of Object.entries(isRecord(discord.accounts) ? discord.accounts : {})) addCandidate(account, `channels.discord.accounts.${accountId}`);
|
|
16
16
|
return candidates;
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { unsupportedSecretRefSurfacePatterns as n, collectUnsupportedSecretRefConfigCandidates as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { buildMutableAllowEntryDetector } from "openclaw/plugin-sdk/channel-policy";
|
|
2
|
-
|
|
2
|
+
// extensions/discord/src/security-doctor.ts
|
|
3
3
|
const isDiscordMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:\d+|<@!?\d+>|(?:discord|user|pk):.+)$/ });
|
|
4
|
-
//#endregion
|
|
5
4
|
export { isDiscordMutableAllowEntry as t };
|