@openclaw/discord 2026.11.5-beta.1 → 2026.11.5-beta.2
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-CSz5Qodj.mjs → account-inspect-DGkdWwix.mjs} +3 -2
- package/dist/.setup/{accounts-DtjvhJUj.mjs → accounts-C_25wyxC.mjs} +8 -4
- package/dist/.setup/{active-turn-thread-route-DkPnk2x8.mjs → active-turn-thread-route-KvRTAVE3.mjs} +2 -1
- package/dist/.setup/{allow-list-DahA0Jxh.mjs → allow-list-BXrS8-R9.mjs} +8 -4
- package/dist/.setup/{api-Bp0HI4q3.mjs → api-BlBD4ism.mjs} +6 -4
- package/dist/.setup/{approval-handler.runtime-Cy53ugTf.mjs → approval-handler.runtime-BGYjX1t9.mjs} +10 -9
- package/dist/.setup/{approval-message-updates-DqOXxPss.mjs → approval-message-updates-DKsCfxSW.mjs} +4 -3
- package/dist/.setup/{audit-DoPKOfQE.mjs → audit-5b-FXj9R.mjs} +7 -6
- package/dist/.setup/{channel-Ds6iuNdy.mjs → channel-CWwTHWFo.mjs} +39 -32
- package/dist/.setup/{channel-access-DhJhVrdZ.mjs → channel-access-9cyzozUP.mjs} +2 -1
- package/dist/.setup/{channel.setup-BLt9dkIG.mjs → channel.setup-B3MtmBQG.mjs} +10 -7
- 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-WTfUxead.mjs → components-YCvQ6YLS.mjs} +16 -10
- package/dist/.setup/{components.base-C5sAPHe4.mjs → components.base-CiS0h_XP.mjs} +2 -1
- package/dist/.setup/{config-schema-GX2yDgIH.mjs → config-schema-BNKN1cu5.mjs} +5 -3
- package/dist/.setup/{conversation-binding-route-CZdm-X5A.mjs → conversation-binding-route-kCTw8cij.mjs} +3 -2
- package/dist/.setup/{directory-config-BXJuh9-J.mjs → directory-config-Ble81PWH.mjs} +4 -3
- package/dist/.setup/{directory-live-CEopeb8Q.mjs → directory-live-DH3tpS3x.mjs} +11 -8
- package/dist/.setup/{discord-r79VFjJp.mjs → discord-DGVSguhx.mjs} +52 -28
- package/dist/.setup/{doctor-contract-Dstl3cMg.mjs → doctor-contract-Bwv8EuQ_.mjs} +3 -2
- package/dist/.setup/{doctor-UfLW8nye.mjs → doctor-eujgbnpZ.mjs} +8 -7
- package/dist/.setup/{endpoint-runtime-BM3x-m6O.mjs → endpoint-runtime-lf4DeLas.mjs} +2 -1
- package/dist/.setup/{guilds-DQucP5Tn.mjs → guilds-eDq22iSM.mjs} +4 -3
- package/dist/.setup/{handle-action-BarHOi-v.mjs → handle-action-CktwmzMz.mjs} +11 -10
- package/dist/.setup/{handle-action.guild-admin-oRUb8p_O.mjs → handle-action.guild-admin-WLQ7fRqI.mjs} +4 -3
- package/dist/.setup/{listeners-CHgTENFu.mjs → listeners-Df8lx3vK.mjs} +3 -2
- package/dist/.setup/{live-policy-config-EKp4O6zx.mjs → live-policy-config-DiBVuaU6.mjs} +5 -3
- package/dist/.setup/{message-handler-DUeT8Asf.mjs → message-handler-hhNSioxo.mjs} +15 -11
- package/dist/.setup/{message-handler.preflight-C6TNtKW0.mjs → message-handler.preflight-BZcZE1o-.mjs} +26 -19
- package/dist/.setup/{message-handler.preflight-pluralkit-6E9TFmmN.mjs → message-handler.preflight-pluralkit-CYZfXXb6.mjs} +14 -10
- package/dist/.setup/{message-handler.process-D8_oQ5Cp.mjs → message-handler.process-B0n-mQ99.mjs} +34 -26
- package/dist/.setup/{outbound-payload-DUsrFICb.mjs → outbound-payload-BaZmjewa.mjs} +11 -9
- package/dist/.setup/{outbound-session-route-Cb8cv4Oi.mjs → outbound-session-route-Cgx4i9cS.mjs} +34 -22
- 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-r4BbaJxh.mjs → preflight-audio-C6QtD6HX.mjs} +2 -1
- package/dist/.setup/{presence-cache-B3xj3b0l.mjs → presence-cache-Dq-3nH7R.mjs} +2 -1
- package/dist/.setup/{probe-BUmJyH35.mjs → probe-DezB-6xz.mjs} +6 -5
- package/dist/.setup/{provider-Dm2ERSxe.mjs → provider-BN2bCIUp.mjs} +185 -109
- package/dist/.setup/{provider-session.runtime-DCIqDsIg.mjs → provider-session.runtime-Dr_5X43t.mjs} +3 -3
- package/dist/.setup/provider.runtime-BuJpl0Pv.mjs +1 -0
- package/dist/.setup/{proxy-fetch-B8cK6FLQ.mjs → proxy-fetch-BzXwBAXt.mjs} +2 -1
- package/dist/.setup/{realtime-session.runtime-WJL6NdwK.mjs → realtime-session.runtime-BTDWsV4d.mjs} +25 -15
- package/dist/.setup/{receive-recovery-DV_v5ROf.mjs → receive-recovery-C3Ks4wAQ.mjs} +6 -3
- package/dist/.setup/{resolve-allowlist-common-C37fgnYG.mjs → resolve-allowlist-common-Bk8Fj6Ik.mjs} +4 -3
- package/dist/.setup/{resolve-channels-CwpnQ7C2.mjs → resolve-channels-Bp8frXvc.mjs} +7 -6
- package/dist/.setup/{resolve-users-D6jSwe8R.mjs → resolve-users-Cvcj22sG.mjs} +6 -5
- package/dist/.setup/{rolldown-runtime-nwUcYXjP.mjs → rolldown-runtime-B4FMCO8f.mjs} +2 -1
- package/dist/.setup/{runtime-DhOMlnYS.mjs → runtime-BJaCvlmq.mjs} +26 -18
- package/dist/.setup/{runtime-B-PgPsGR.mjs → runtime-BMgTyuwg.mjs} +6 -4
- package/dist/.setup/{runtime-DcBvHOm1.mjs → runtime-DgnVQ7zW.mjs} +2 -1
- package/dist/.setup/{runtime-doctor-migrations-BpV1jKk0.mjs → runtime-doctor-migrations-BPV-R4G9.mjs} +9 -5
- package/dist/.setup/{secret-config-contract-CP6teHec.mjs → secret-config-contract-B1kE4sDv.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-DnLL6XoO.mjs → send-CVW7V-VZ.mjs} +28 -19
- package/dist/.setup/{send.components-xB43CksK.mjs → send.components-C8YXdnO_.mjs} +14 -11
- package/dist/.setup/{send.outbound-B11X6TOE.mjs → send.outbound-Uzcmh3Yd.mjs} +16 -11
- package/dist/.setup/{send.receipt-CMteCIZS.mjs → send.receipt-NZDOTZBU.mjs} +16 -9
- package/dist/.setup/{send.shared-BcLLZBul.mjs → send.shared-a_6Oeyg1.mjs} +18 -12
- package/dist/.setup/{sender-identity-CGNpdJmb.mjs → sender-identity-76HFb8eK.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-BExhGEhL.mjs +2 -0
- package/dist/.setup/{shared-interactive-DKBw4SNV.mjs → shared-interactive-DmzaoKOM.mjs} +12 -7
- package/dist/.setup/{shared-BEYw16he.mjs → shared-yDUSExm2.mjs} +17 -14
- package/dist/.setup/{subagent-hooks-DlYElpXa.mjs → subagent-hooks-CDkdHQyy.mjs} +4 -3
- package/dist/.setup/{system-events--Pk6y9aP.mjs → system-events-yfWz150v.mjs} +4 -3
- package/dist/.setup/{target-parsing-BiuhcK9Q.mjs → target-parsing-C-HyNxcE.mjs} +2 -1
- package/dist/.setup/{target-resolver-Bo9EpGp_.mjs → target-resolver-BOOzqxxM.mjs} +7 -6
- package/dist/.setup/{thread-binding-api-Drd4Zu-5.mjs → thread-binding-api-BDZJD4na.mjs} +2 -1
- package/dist/.setup/{thread-bindings-BF-hr-bg.mjs → thread-bindings-zce4cpu_.mjs} +10 -7
- package/dist/.setup/{thread-bindings.manager-CQCkha5r.mjs → thread-bindings.manager-NywKzUtc.mjs} +20 -15
- package/dist/.setup/{thread-bindings.session-updates-C2gJAj_I.mjs → thread-bindings.session-updates-D0j7oh8S.mjs} +10 -6
- package/dist/.setup/{threading-HA9C2wYR.mjs → threading-DodLYDt-.mjs} +7 -5
- package/dist/.setup/{timeouts-CT9hnmo4.mjs → timeouts-cIxzatmv.mjs} +2 -1
- package/dist/.setup/{transcripts-source-DzpzETZR.mjs → transcripts-source-ie9GBWaU.mjs} +33 -20
- package/dist/.setup/{typing-DAv4S2fI.mjs → typing-CNlSKY5S.mjs} +3 -2
- package/dist/.setup/{voice-runtime-Bo_nsVvX.mjs → voice-runtime-B7V_LTdX.mjs} +46 -28
- package/dist/.source-module-urls/d6c089460280c5a04184542d6712e04545caeb1ebb290d3504377b4cc5e22fea.json +1 -1
- package/dist/account-inspect-api.js +3 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/activities-api.js +13 -9
- package/dist/api.js +22 -21
- package/dist/assets/embedded-app-sdk.mjs +1 -1
- 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 +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 +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 +3 -2
- package/dist/setup-plugin-api.js +1 -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 +1 -1
- package/dist/transcripts-source-api.js +3 -2
- package/node_modules/@discord/embedded-app-sdk/output/lib/zod/lib/index.cjs +3 -2
- package/node_modules/@discord/embedded-app-sdk/output/lib/zod/lib/index.mjs +3 -2
- package/package.json +4 -4
- package/dist/.setup/provider.runtime-DmxPGoUg.mjs +0 -1
- package/dist/.setup/setup-plugin-api-C6AMx3hu.mjs +0 -2
package/dist/.setup/{provider-session.runtime-DCIqDsIg.mjs → provider-session.runtime-Dr_5X43t.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-NywKzUtc.mjs";
|
|
2
|
+
import { l as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-zce4cpu_.mjs";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-hhNSioxo.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-BN2bCIUp.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
|
+
//#region 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,4 +26,5 @@ 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
|
|
29
30
|
export { validateDiscordProxyUrl as n, withValidatedDiscordProxy as r, resolveDiscordProxyFetchForAccount as t };
|
package/dist/.setup/{realtime-session.runtime-WJL6NdwK.mjs → realtime-session.runtime-BTDWsV4d.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-C3Ks4wAQ.mjs";
|
|
2
|
+
import { t as resolveDiscordOutputAudioDelta } from "./output-activity-uBpMSX75.mjs";
|
|
3
|
+
import { n as discordRealtimeVoiceSecretOwnerId } from "./secret-config-contract-B1kE4sDv.mjs";
|
|
4
|
+
import { y as logVoiceVerbose } from "./provider-BN2bCIUp.mjs";
|
|
5
|
+
import { a as maybeControlDiscordVoiceAgentRun, i as logDiscordVoiceAgentControlResult, n as formatVoiceIngressPrompt, r as handleDiscordVoiceAgentControlToolCall, t as DiscordRealtimeRecording } from "./voice-runtime-B7V_LTdX.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
|
+
//#region 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,7 +77,8 @@ var DiscordRealtimePlayer = class {
|
|
|
77
77
|
this.audio.send({ type: "output-shutdown" });
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region extensions/discord/src/voice/realtime-speaker-config.ts
|
|
81
82
|
/** Prepare shared provider credentials once before any speaker starts capturing audio. */
|
|
82
83
|
async function prepareDiscordRealtimeProvider(params) {
|
|
83
84
|
const { realtimeConfig, isAgentProxy } = params;
|
|
@@ -178,7 +179,8 @@ function resolveDiscordRealtimeSpeakerConfig(params) {
|
|
|
178
179
|
resolvedVoice: normalizeOptionalString(resolved.providerConfig.voice)
|
|
179
180
|
};
|
|
180
181
|
}
|
|
181
|
-
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region extensions/discord/src/voice/log-preview.ts
|
|
182
184
|
const DISCORD_REALTIME_INTERRUPTION_MESSAGES = /* @__PURE__ */ new Map([
|
|
183
185
|
["client:response.cancel", "interrupt requested"],
|
|
184
186
|
["client:conversation.item.truncate.skipped", "interrupt ignored"],
|
|
@@ -193,7 +195,8 @@ function formatRealtimeInfoLog(event) {
|
|
|
193
195
|
const detail = event.detail ? ` ${event.detail}` : "";
|
|
194
196
|
return `discord voice: realtime lifecycle ${event.direction}:${event.type}${detail}`;
|
|
195
197
|
}
|
|
196
|
-
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region extensions/discord/src/voice/realtime-transcript.ts
|
|
197
200
|
const PARTIAL_TRANSCRIPT_MAX_CHARS = 240;
|
|
198
201
|
function mergeRealtimePartialTranscript(previous, next) {
|
|
199
202
|
const trimmed = next.trim();
|
|
@@ -201,7 +204,8 @@ function mergeRealtimePartialTranscript(previous, next) {
|
|
|
201
204
|
const merged = trimmed.startsWith(previous) ? trimmed : `${previous}${next}`;
|
|
202
205
|
return sliceUtf16Safe(merged, 0, PARTIAL_TRANSCRIPT_MAX_CHARS);
|
|
203
206
|
}
|
|
204
|
-
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region extensions/discord/src/voice/realtime-turns.ts
|
|
205
209
|
const logger$4 = createSubsystemLogger("discord/voice");
|
|
206
210
|
const DISCORD_REALTIME_WAKE_NAME_FOLLOWUP_TTL_MS = 1e4;
|
|
207
211
|
const REALTIME_PCM16_BYTES_PER_SAMPLE = 2;
|
|
@@ -388,7 +392,8 @@ var DiscordRealtimeTurns = class {
|
|
|
388
392
|
function isDiscordRealtimeSpeakerContext(value) {
|
|
389
393
|
return Boolean(value) && typeof value === "object" && typeof value.userId === "string" && typeof value.senderIsOwner === "boolean" && typeof value.speakerLabel === "string";
|
|
390
394
|
}
|
|
391
|
-
|
|
395
|
+
//#endregion
|
|
396
|
+
//#region extensions/discord/src/voice/realtime-consults.ts
|
|
392
397
|
const logger$3 = createSubsystemLogger("discord/voice");
|
|
393
398
|
const DISCORD_REALTIME_TALKBACK_DEBOUNCE_MS = 350;
|
|
394
399
|
const DISCORD_REALTIME_FALLBACK_TEXT = "I hit an error while checking that. Please try again.";
|
|
@@ -745,7 +750,8 @@ var DiscordRealtimeConsults = class {
|
|
|
745
750
|
this.params.harness.forcedConsults.clear();
|
|
746
751
|
}
|
|
747
752
|
};
|
|
748
|
-
|
|
753
|
+
//#endregion
|
|
754
|
+
//#region extensions/discord/src/voice/realtime-output.ts
|
|
749
755
|
/** Main retains provider item identity; physical output state belongs to the worker. */
|
|
750
756
|
var DiscordRealtimeOutput = class {
|
|
751
757
|
constructor(params) {
|
|
@@ -884,7 +890,8 @@ var DiscordRealtimeOutput = class {
|
|
|
884
890
|
this.params.onClose(this, reason);
|
|
885
891
|
}
|
|
886
892
|
};
|
|
887
|
-
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region extensions/discord/src/voice/realtime-playback.ts
|
|
888
895
|
const logger$2 = createSubsystemLogger("discord/voice");
|
|
889
896
|
const DISCORD_REALTIME_CONTROL_SPEECH_DEDUPE_MS = 5e3;
|
|
890
897
|
const DISCORD_REALTIME_MAX_RETAINED_RESPONSES = 32;
|
|
@@ -1288,7 +1295,8 @@ var DiscordRealtimePlayback = class {
|
|
|
1288
1295
|
this.drainQueuedExactSpeechMessages();
|
|
1289
1296
|
}
|
|
1290
1297
|
};
|
|
1291
|
-
|
|
1298
|
+
//#endregion
|
|
1299
|
+
//#region extensions/discord/src/voice/realtime-speaker-session.ts
|
|
1292
1300
|
const logger$1 = createSubsystemLogger("discord/voice");
|
|
1293
1301
|
const DISCORD_REALTIME_DUPLICATE_ERROR_SUPPRESS_MS = 6e4;
|
|
1294
1302
|
const discordRealtimeTalkPayload = () => ({});
|
|
@@ -1712,7 +1720,8 @@ var DiscordRealtimeSpeakerSession = class {
|
|
|
1712
1720
|
this.lastRealtimeError.suppressed = 0;
|
|
1713
1721
|
}
|
|
1714
1722
|
};
|
|
1715
|
-
|
|
1723
|
+
//#endregion
|
|
1724
|
+
//#region extensions/discord/src/voice/realtime-session.runtime.ts
|
|
1716
1725
|
const logger = createSubsystemLogger("discord/voice");
|
|
1717
1726
|
const MAX_REALTIME_SPEAKERS = 8;
|
|
1718
1727
|
const REALTIME_SPEAKER_IDLE_MS = 6e4;
|
|
@@ -2049,4 +2058,5 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
2049
2058
|
logger.info(`discord voice: realtime speaker retired user=${speaker.userId} reason=${reason}${reason === "input-timeout" ? "; idle speaker input expired; speak again to reconnect" : ""}`);
|
|
2050
2059
|
}
|
|
2051
2060
|
};
|
|
2061
|
+
//#endregion
|
|
2052
2062
|
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
|
+
//#region 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,7 +41,8 @@ function serializeDiscordAudioError(error) {
|
|
|
41
41
|
function restoreDiscordAudioError(error) {
|
|
42
42
|
return Object.assign(new Error(error.message), error);
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region extensions/discord/src/voice/audio.ts
|
|
45
46
|
const SAMPLE_RATE = 48e3;
|
|
46
47
|
const CHANNELS = 2;
|
|
47
48
|
const BIT_DEPTH = 16;
|
|
@@ -378,7 +379,8 @@ async function writeVoiceWavFile(chunks) {
|
|
|
378
379
|
throw error;
|
|
379
380
|
}
|
|
380
381
|
}
|
|
381
|
-
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region extensions/discord/src/voice/receive-recovery.ts
|
|
382
384
|
const DECRYPT_FAILURE_WINDOW_MS = 3e4;
|
|
383
385
|
const DECRYPT_FAILURE_RECONNECT_THRESHOLD = 3;
|
|
384
386
|
const DECRYPT_FAILURE_MARKER = "DecryptionFailed(";
|
|
@@ -460,4 +462,5 @@ function enableDaveReceivePassthrough(params) {
|
|
|
460
462
|
onWarn(`discord voice: failed to enable DAVE passthrough guild=${target.guildId} channel=${target.channelId} reason=${reason}`);
|
|
461
463
|
}
|
|
462
464
|
}
|
|
465
|
+
//#endregion
|
|
463
466
|
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-C37fgnYG.mjs → resolve-allowlist-common-Bk8Fj6Ik.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-C_25wyxC.mjs";
|
|
2
|
+
import { o as normalizeDiscordSlug } from "./allow-list-BXrS8-R9.mjs";
|
|
3
|
+
//#region extensions/discord/src/resolve-allowlist-common.ts
|
|
4
4
|
function resolveDiscordAllowlistToken(token) {
|
|
5
5
|
return normalizeDiscordToken(token, "channels.discord.token");
|
|
6
6
|
}
|
|
@@ -52,4 +52,5 @@ function parseDiscordAllowlistInput(raw, kind) {
|
|
|
52
52
|
guildOnly: true
|
|
53
53
|
} : { name: trimmed.replace(/^@/, "") };
|
|
54
54
|
}
|
|
55
|
+
//#endregion
|
|
55
56
|
export { parseDiscordAllowlistInput as n, resolveDiscordAllowlistToken as r, filterDiscordGuilds as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { 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-B4FMCO8f.mjs";
|
|
2
|
+
import { o as normalizeDiscordSlug, w as isDiscordThreadChannelType } from "./allow-list-BXrS8-R9.mjs";
|
|
3
|
+
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-BlBD4ism.mjs";
|
|
4
|
+
import { n as listGuilds, t as listDiscordGuildChannels } from "./guilds-eDq22iSM.mjs";
|
|
5
|
+
import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-Bk8Fj6Ik.mjs";
|
|
6
|
+
//#region 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) => {
|
|
@@ -170,4 +170,5 @@ async function resolveDiscordChannelAllowlist(params) {
|
|
|
170
170
|
for (const input of params.entries) results.push(await resolveEntry(input));
|
|
171
171
|
return results;
|
|
172
172
|
}
|
|
173
|
+
//#endregion
|
|
173
174
|
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-B4FMCO8f.mjs";
|
|
2
|
+
import { t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-BlBD4ism.mjs";
|
|
3
|
+
import { n as listGuilds, r as searchDiscordGuildMembers } from "./guilds-eDq22iSM.mjs";
|
|
4
|
+
import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-Bk8Fj6Ik.mjs";
|
|
5
5
|
import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
|
|
6
|
+
//#region 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,4 +82,5 @@ async function resolveDiscordUserAllowlist(params) {
|
|
|
82
82
|
}
|
|
83
83
|
return results;
|
|
84
84
|
}
|
|
85
|
+
//#endregion
|
|
85
86
|
export { resolve_users_exports as n, resolveDiscordUserAllowlist as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,4 +24,5 @@ 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
|
|
27
28
|
export { __reExport as n, __exportAll 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 { f as resolveDiscordReplyReference, u 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-C_25wyxC.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-a_6Oeyg1.mjs";
|
|
3
|
+
import { l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, w as isDiscordThreadChannelType, y as resolveGroupDmAllow } from "./allow-list-BXrS8-R9.mjs";
|
|
4
|
+
import { f as resolveDiscordReplyReference, u as createReusableDiscordReplyReference } from "./send.receipt-NZDOTZBU.mjs";
|
|
5
|
+
import { n as resolveDiscordChannelId, t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.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-CVW7V-VZ.mjs";
|
|
7
|
+
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-Uzcmh3Yd.mjs";
|
|
8
|
+
import { n as getPresence } from "./presence-cache-Dq-3nH7R.mjs";
|
|
9
|
+
import { c as coerceDiscordComponentParam, l as readDiscordComponentSpec } from "./components-YCvQ6YLS.mjs";
|
|
10
|
+
import { r as sendDiscordComponentMessage } from "./send.components-C8YXdnO_.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
|
+
//#region 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,7 +74,8 @@ function filterDiscordActiveThreadList(params) {
|
|
|
74
74
|
})
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region extensions/discord/src/actions/runtime.shared.ts
|
|
78
79
|
/** Discord REST auto_archive_duration allowlist (minutes). */
|
|
79
80
|
const DISCORD_AUTO_ARCHIVE_MINUTES = /* @__PURE__ */ new Set([
|
|
80
81
|
60,
|
|
@@ -138,7 +139,8 @@ function readDiscordChannelMoveParams(params) {
|
|
|
138
139
|
position: readNonNegativeIntegerParam(params, "position")
|
|
139
140
|
};
|
|
140
141
|
}
|
|
141
|
-
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region extensions/discord/src/actions/runtime.messaging.shared.ts
|
|
142
144
|
function allowsAllDiscordGuildChannels(channels) {
|
|
143
145
|
const wildcard = channels?.["*"];
|
|
144
146
|
if (!wildcard || wildcard.enabled === false) return false;
|
|
@@ -494,7 +496,8 @@ function createDiscordMessagingActionContext(params) {
|
|
|
494
496
|
}
|
|
495
497
|
};
|
|
496
498
|
}
|
|
497
|
-
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region extensions/discord/src/actions/runtime.guild.ts
|
|
498
501
|
const expressionPermissions = [PermissionFlagsBits.ManageGuildExpressions, PermissionFlagsBits.CreateGuildExpressions];
|
|
499
502
|
const channelGuard = {
|
|
500
503
|
gate: "channels",
|
|
@@ -871,7 +874,8 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
871
874
|
default: throw new Error(`Unknown action: ${action}`);
|
|
872
875
|
}
|
|
873
876
|
}
|
|
874
|
-
|
|
877
|
+
//#endregion
|
|
878
|
+
//#region extensions/discord/src/actions/runtime.messaging.messages.ts
|
|
875
879
|
function parseDiscordMessageLink(link) {
|
|
876
880
|
const match = link.trim().match(/^(?:https?:\/\/)?(?:ptb\.|canary\.)?discord(?:app)?\.com\/channels\/(\d+)\/(\d+)\/(\d+)(?:\/?|\?.*)$/i);
|
|
877
881
|
if (!match) throw new Error("Invalid Discord message link. Expected https://discord.com/channels/<guildId>/<channelId>/<messageId>.");
|
|
@@ -1024,7 +1028,8 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1024
1028
|
default: return;
|
|
1025
1029
|
}
|
|
1026
1030
|
}
|
|
1027
|
-
|
|
1031
|
+
//#endregion
|
|
1032
|
+
//#region extensions/discord/src/actions/runtime.messaging.send.ts
|
|
1028
1033
|
function resolveActionReplyReference(ctx, replyToId) {
|
|
1029
1034
|
const reply = ctx.options?.reply;
|
|
1030
1035
|
return reply ? resolveDiscordReplyReference({
|
|
@@ -1269,7 +1274,8 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1269
1274
|
default: return;
|
|
1270
1275
|
}
|
|
1271
1276
|
}
|
|
1272
|
-
|
|
1277
|
+
//#endregion
|
|
1278
|
+
//#region extensions/discord/src/actions/runtime.moderation-shared.ts
|
|
1273
1279
|
const moderationPermissions = {
|
|
1274
1280
|
timeout: PermissionFlagsBits.ModerateMembers,
|
|
1275
1281
|
kick: PermissionFlagsBits.KickMembers,
|
|
@@ -1296,7 +1302,8 @@ function readDiscordModerationCommand(action, params) {
|
|
|
1296
1302
|
})
|
|
1297
1303
|
};
|
|
1298
1304
|
}
|
|
1299
|
-
|
|
1305
|
+
//#endregion
|
|
1306
|
+
//#region extensions/discord/src/actions/runtime.ts
|
|
1300
1307
|
const ACTIVITY_TYPE_MAP = /* @__PURE__ */ new Map([
|
|
1301
1308
|
["playing", 0],
|
|
1302
1309
|
["streaming", 1],
|
|
@@ -1448,4 +1455,5 @@ async function handleDiscordAction(params, cfg, options) {
|
|
|
1448
1455
|
}
|
|
1449
1456
|
throw new Error(`Unknown action: ${action}`);
|
|
1450
1457
|
}
|
|
1458
|
+
//#endregion
|
|
1451
1459
|
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,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-C_25wyxC.mjs";
|
|
2
|
+
import { t as resolveDiscordProxyFetchForAccount } from "./proxy-fetch-BzXwBAXt.mjs";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
|
|
4
|
+
//#region 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,7 +19,8 @@ function resolveDiscordActivitiesConfig(account, env = process.env) {
|
|
|
19
19
|
...applicationId ? { applicationId } : {}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region extensions/discord/src/activities/runtime.ts
|
|
23
24
|
var DiscordActivitiesRuntime = class {
|
|
24
25
|
constructor(store, getCurrentConfig, env = process.env) {
|
|
25
26
|
this.store = store;
|
|
@@ -72,4 +73,5 @@ function setDiscordActivitiesRuntime(runtime) {
|
|
|
72
73
|
function getDiscordActivitiesRuntime() {
|
|
73
74
|
return activeRuntime;
|
|
74
75
|
}
|
|
76
|
+
//#endregion
|
|
75
77
|
export { getDiscordActivitiesRuntime as n, setDiscordActivitiesRuntime as r, DiscordActivitiesRuntime as t };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
//#region 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
|
|
7
8
|
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-B4FMCO8f.mjs";
|
|
2
|
+
//#region 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,7 +8,8 @@ function isRecord(value) {
|
|
|
8
8
|
function asNullableRecord(value) {
|
|
9
9
|
return isRecord(value) ? value : null;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/config/channel-config-normalization.ts
|
|
12
13
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
13
14
|
function normalizeChannelAccounts(params) {
|
|
14
15
|
const rawAccounts = asNullableRecord(params.entry.accounts);
|
|
@@ -84,7 +85,8 @@ function normalizeChannelConfigEntries(params) {
|
|
|
84
85
|
changes
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
88
90
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
89
91
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
90
92
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -154,8 +156,10 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
154
156
|
}
|
|
155
157
|
};
|
|
156
158
|
}
|
|
157
|
-
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
158
161
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
159
162
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
160
163
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
164
|
+
//#endregion
|
|
161
165
|
export { runtime_doctor_migrations_exports as t };
|
package/dist/.setup/{secret-config-contract-CP6teHec.mjs → secret-config-contract-B1kE4sDv.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
|
+
//#region 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,4 +69,5 @@ 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
|
|
72
73
|
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-B4FMCO8f.mjs";
|
|
2
|
+
import { t as isDiscordMutableAllowEntry } from "./security-doctor-nGgPm65L.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
|
+
//#region 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,4 +116,5 @@ async function collectDiscordSecurityAuditFindings(params) {
|
|
|
116
116
|
});
|
|
117
117
|
return findings;
|
|
118
118
|
}
|
|
119
|
+
//#endregion
|
|
119
120
|
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
|
+
//#region 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,4 +15,5 @@ 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
|
|
18
19
|
export { unsupportedSecretRefSurfacePatterns as n, collectUnsupportedSecretRefConfigCandidates as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildMutableAllowEntryDetector } from "openclaw/plugin-sdk/channel-policy";
|
|
2
|
-
|
|
2
|
+
//#region extensions/discord/src/security-doctor.ts
|
|
3
3
|
const isDiscordMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:\d+|<@!?\d+>|(?:discord|user|pk):.+)$/ });
|
|
4
|
+
//#endregion
|
|
4
5
|
export { isDiscordMutableAllowEntry as t };
|