@openclaw/discord 2026.10.10-beta.4 → 2026.10.10
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-8cCu6uPG.mjs → account-inspect-X_Xlr42B.mjs} +2 -3
- package/dist/.setup/{accounts-ljrzXBJi.mjs → accounts-C18HNgge.mjs} +4 -8
- package/dist/.setup/{active-turn-thread-route-C4tp9noA.mjs → active-turn-thread-route-BAc_Xik-.mjs} +1 -2
- package/dist/.setup/{allow-list-B_ToXtew.mjs → allow-list-D1ZGfhXh.mjs} +5 -10
- package/dist/.setup/{api-CtmE1OUN.mjs → api-Bth1wKF9.mjs} +3 -5
- package/dist/.setup/{approval-handler.runtime-BvF8oUpa.mjs → approval-handler.runtime-BAoEELJJ.mjs} +8 -9
- package/dist/.setup/{approval-message-updates-wbUqLtLI.mjs → approval-message-updates-Cks-MSCJ.mjs} +3 -4
- package/dist/.setup/{audit-UwzCdDJk.mjs → audit-Dw_rAZIz.mjs} +6 -7
- package/dist/.setup/{channel-BlvyeRAu.mjs → channel-BMpMAeQL.mjs} +33 -41
- package/dist/.setup/{channel-access-DasWY_OV.mjs → channel-access-BPrWoEXM.mjs} +1 -2
- package/dist/.setup/{channel.setup-By7wNopw.mjs → channel.setup-DVe7Y3Jf.mjs} +8 -12
- package/dist/.setup/{command-deploy-store-DFkBTViB.mjs → command-deploy-store-DPWiBMks.mjs} +1 -2
- package/dist/.setup/{command-owners-D78sAoOz.mjs → command-owners-BzlhNBxA.mjs} +2 -3
- package/dist/.setup/{components-C_cuoW1q.mjs → components-BvOWSPxr.mjs} +11 -20
- package/dist/.setup/{config-schema-_uBILpQf.mjs → config-schema-Coyq5wOr.mjs} +3 -5
- package/dist/.setup/{conversation-binding-route-fdYsXexV.mjs → conversation-binding-route-DOPUZNYo.mjs} +2 -3
- package/dist/.setup/{directory-config-3iVub-3m.mjs → directory-config-CIqVnQtn.mjs} +3 -4
- package/dist/.setup/{directory-live-DLygQVtW.mjs → directory-live-DUuPEWub.mjs} +7 -10
- package/dist/.setup/{discord-Cl2OPTZ6.mjs → discord-eFlHX1Gn.mjs} +35 -68
- package/dist/.setup/{doctor-94GSI6lY.mjs → doctor-Dty_Ossy.mjs} +8 -9
- package/dist/.setup/{doctor-contract-Bwv8EuQ_.mjs → doctor-contract-Dstl3cMg.mjs} +2 -3
- package/dist/.setup/{handle-action-0-FZD3Am.mjs → handle-action-DXY91jF-.mjs} +10 -11
- package/dist/.setup/{handle-action.guild-admin-DfAWANBE.mjs → handle-action.guild-admin-BvBCfhXF.mjs} +3 -4
- package/dist/.setup/{live-policy-config-BPoB3eQi.mjs → live-policy-config-DO1Fk2hp.mjs} +3 -5
- package/dist/.setup/{message-handler-CtR2w7W_.mjs → message-handler-fL1j1NiR.mjs} +11 -16
- package/dist/.setup/{message-handler.preflight-BqUw7LWb.mjs → message-handler.preflight-DkjwNZAd.mjs} +20 -28
- package/dist/.setup/{message-handler.preflight-pluralkit-BU9I_X-b.mjs → message-handler.preflight-pluralkit-DR4BnvMU.mjs} +10 -14
- package/dist/.setup/{message-handler.process-BZeWmSNC.mjs → message-handler.process-ClOwIPDK.mjs} +33 -47
- package/dist/.setup/{outbound-adapter-DBwgKemw.mjs → outbound-adapter-DWyAWBFh.mjs} +13 -19
- package/dist/.setup/{outbound-session-route-CsHHPxsQ.mjs → outbound-session-route-TFBPPkoz.mjs} +21 -32
- 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-wWgsZG5F.mjs → preflight-audio-CwtPIsvk.mjs} +1 -2
- package/dist/.setup/{presence-cache-DCeTsL73.mjs → presence-cache-CgutE4NN.mjs} +1 -2
- package/dist/.setup/{probe-D3P1x4aN.mjs → probe-DNge7OEP.mjs} +5 -6
- package/dist/.setup/{provider-DUTsZJHz.mjs → provider-BBDuE14w.mjs} +165 -227
- package/dist/.setup/{provider-session.runtime-Ucr3XodI.mjs → provider-session.runtime-D8hMXXqJ.mjs} +3 -3
- package/dist/.setup/provider.runtime-BQ1z4Aq1.mjs +1 -0
- package/dist/.setup/{realtime-session.runtime-bNnPOKP_.mjs → realtime-session.runtime-cetognkp.mjs} +14 -23
- package/dist/.setup/{receive-recovery-CKvaG2Hf.mjs → receive-recovery-C77CVdGM.mjs} +3 -6
- package/dist/.setup/{resolve-allowlist-common-DNSsUQRF.mjs → resolve-allowlist-common-CI77288n.mjs} +5 -7
- package/dist/.setup/{resolve-channels-UdT38DzU.mjs → resolve-channels-DYc6-xgV.mjs} +5 -6
- package/dist/.setup/{resolve-users-DnCsrXZ_.mjs → resolve-users-BQT7XWF2.mjs} +4 -5
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
- package/dist/.setup/{runtime-DE6W14G3.mjs → runtime-CI0UJqeS.mjs} +23 -35
- package/dist/.setup/{runtime-Cg5pIBm_.mjs → runtime-CcijhTJT.mjs} +4 -6
- 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-CIsH7R3B.mjs → secret-config-contract-BdbCvqnM.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-yR1hfybW.mjs → send-Cbq-IVsS.mjs} +18 -28
- package/dist/.setup/{send.components--dxMjc2O.mjs → send.components-BV6ucNpJ.mjs} +10 -13
- package/dist/.setup/{send.outbound-B5vQwgUK.mjs → send.outbound-CGhBhzjQ.mjs} +9 -13
- package/dist/.setup/{send.receipt-eE3zLTDH.mjs → send.receipt-Dw-_r5Bx.mjs} +17 -19
- package/dist/.setup/{send.shared-iGf1rqAm.mjs → send.shared-D4MioxW_.mjs} +14 -23
- package/dist/.setup/{sender-identity-BNBvGt1l.mjs → sender-identity-DrN5c4ec.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-B4J6wmL1.mjs +2 -0
- package/dist/.setup/{shared-DgzLizSt.mjs → shared-Bp0sxD5R.mjs} +15 -19
- package/dist/.setup/{subagent-hooks-tBtaqWkD.mjs → subagent-hooks-mQbDkvuD.mjs} +3 -4
- package/dist/.setup/{system-events-DGsxf-l9.mjs → system-events-2zc2eGfF.mjs} +3 -4
- package/dist/.setup/{target-parsing-C-HyNxcE.mjs → target-parsing-BiuhcK9Q.mjs} +1 -2
- package/dist/.setup/{target-resolver-BFOKmBni.mjs → target-resolver-CAHeVfmZ.mjs} +6 -7
- package/dist/.setup/targets-BaklhOqq.mjs +3 -0
- package/dist/.setup/{thread-binding-api-BDZJD4na.mjs → thread-binding-api-Drd4Zu-5.mjs} +1 -2
- package/dist/.setup/{thread-bindings-Dsc3zsrI.mjs → thread-bindings-Dg7X_ZXP.mjs} +8 -11
- package/dist/.setup/{thread-bindings.manager-BMpmKLQh.mjs → thread-bindings.manager-DCDYksah.mjs} +15 -20
- package/dist/.setup/{thread-bindings.session-updates-BMdJeJMc.mjs → thread-bindings.session-updates-C76plLS3.mjs} +5 -9
- package/dist/.setup/{threading-Cg_QRc8s.mjs → threading-l0UfrE6x.mjs} +6 -9
- package/dist/.setup/{timeouts-CuNARfyw.mjs → timeouts-DTrUsJ_W.mjs} +1 -2
- package/dist/.setup/{transcripts-source-fRvFsZng.mjs → transcripts-source-CGgOaWcu.mjs} +19 -32
- package/dist/.setup/{typing-CNlSKY5S.mjs → typing-DAv4S2fI.mjs} +2 -3
- package/dist/.setup/{voice-runtime-DHDNu0fz.mjs → voice-runtime-DY1EwDfi.mjs} +33 -55
- 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 +13 -20
- package/dist/api.js +21 -22
- 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 +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/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/node_modules/undici/README.md +25 -3
- package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/undici/docs/docs/api/Interceptors.md +13 -6
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/undici/lib/dispatcher/client-h2.js +46 -14
- package/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +65 -28
- package/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/undici/package.json +7 -5
- package/node_modules/undici/types/cache-interceptor.d.ts +10 -0
- package/node_modules/undici/types/client.d.ts +10 -4
- package/node_modules/undici/types/errors.d.ts +16 -1
- package/node_modules/undici/types/h2c-client.d.ts +1 -1
- package/node_modules/undici/types/interceptors.d.ts +6 -1
- package/package.json +5 -5
- package/dist/.setup/provider.runtime-J8NuMCNs.mjs +0 -1
- package/dist/.setup/setup-plugin-api-DVpA_yqS.mjs +0 -2
- package/dist/.setup/targets-UbCpek5o.mjs +0 -3
package/dist/.setup/{provider-session.runtime-Ucr3XodI.mjs → provider-session.runtime-D8hMXXqJ.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-DCDYksah.mjs";
|
|
2
|
+
import { l as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-Dg7X_ZXP.mjs";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-fL1j1NiR.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-BBDuE14w.mjs";
|
package/dist/.setup/{realtime-session.runtime-bNnPOKP_.mjs → realtime-session.runtime-cetognkp.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 logDiscordVoiceAgentControlResult, c as formatVoiceLogPreview, i as handleDiscordVoiceAgentControlToolCall, l as shouldLogRealtimeVerboseEvent, n as DiscordRealtimeRecording, o as maybeControlDiscordVoiceAgentRun, r as formatVoiceIngressPrompt, s as formatRealtimeInfoLog } from "./voice-runtime-
|
|
1
|
+
import { _ as setDiscordAudioOutputStatus, h as restoreDiscordAudioError, l as createDiscordPcmToRealtimeConverter, m as getDiscordAudioOutputStatus, p as DiscordAudioOutputStatus } from "./receive-recovery-C77CVdGM.mjs";
|
|
2
|
+
import { t as resolveDiscordOutputAudioDelta } from "./output-activity-CDgs2s3O.mjs";
|
|
3
|
+
import { n as discordRealtimeVoiceSecretOwnerId } from "./secret-config-contract-BdbCvqnM.mjs";
|
|
4
|
+
import { y as logVoiceVerbose } from "./provider-BBDuE14w.mjs";
|
|
5
|
+
import { a as logDiscordVoiceAgentControlResult, c as formatVoiceLogPreview, i as handleDiscordVoiceAgentControlToolCall, l as shouldLogRealtimeVerboseEvent, n as DiscordRealtimeRecording, o as maybeControlDiscordVoiceAgentRun, r as formatVoiceIngressPrompt, s as formatRealtimeInfoLog } from "./voice-runtime-DY1EwDfi.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/realtime-transcript.ts
|
|
181
|
+
// extensions/discord/src/voice/realtime-transcript.ts
|
|
184
182
|
const PARTIAL_TRANSCRIPT_MAX_CHARS = 240;
|
|
185
183
|
function mergeRealtimePartialTranscript(previous, next) {
|
|
186
184
|
const trimmed = next.trim();
|
|
@@ -188,8 +186,7 @@ function mergeRealtimePartialTranscript(previous, next) {
|
|
|
188
186
|
const merged = trimmed.startsWith(previous) ? trimmed : `${previous}${next}`;
|
|
189
187
|
return sliceUtf16Safe(merged, 0, PARTIAL_TRANSCRIPT_MAX_CHARS);
|
|
190
188
|
}
|
|
191
|
-
|
|
192
|
-
//#region extensions/discord/src/voice/realtime-turns.ts
|
|
189
|
+
// extensions/discord/src/voice/realtime-turns.ts
|
|
193
190
|
const logger$4 = createSubsystemLogger("discord/voice");
|
|
194
191
|
const DISCORD_REALTIME_WAKE_NAME_FOLLOWUP_TTL_MS = 1e4;
|
|
195
192
|
const REALTIME_PCM16_BYTES_PER_SAMPLE = 2;
|
|
@@ -406,8 +403,7 @@ var DiscordRealtimeTurns = class {
|
|
|
406
403
|
function isDiscordRealtimeSpeakerContext(value) {
|
|
407
404
|
return Boolean(value) && typeof value === "object" && typeof value.userId === "string" && typeof value.senderIsOwner === "boolean" && typeof value.speakerLabel === "string";
|
|
408
405
|
}
|
|
409
|
-
|
|
410
|
-
//#region extensions/discord/src/voice/realtime-consults.ts
|
|
406
|
+
// extensions/discord/src/voice/realtime-consults.ts
|
|
411
407
|
const logger$3 = createSubsystemLogger("discord/voice");
|
|
412
408
|
const DISCORD_REALTIME_TALKBACK_DEBOUNCE_MS = 350;
|
|
413
409
|
const DISCORD_REALTIME_FALLBACK_TEXT = "I hit an error while checking that. Please try again.";
|
|
@@ -773,8 +769,7 @@ var DiscordRealtimeConsults = class {
|
|
|
773
769
|
this.params.harness.forcedConsults.clear();
|
|
774
770
|
}
|
|
775
771
|
};
|
|
776
|
-
|
|
777
|
-
//#region extensions/discord/src/voice/realtime-output.ts
|
|
772
|
+
// extensions/discord/src/voice/realtime-output.ts
|
|
778
773
|
/** Main retains provider item identity; physical output state belongs to the worker. */
|
|
779
774
|
var DiscordRealtimeOutput = class {
|
|
780
775
|
constructor(params) {
|
|
@@ -913,8 +908,7 @@ var DiscordRealtimeOutput = class {
|
|
|
913
908
|
this.params.onClose(this, reason);
|
|
914
909
|
}
|
|
915
910
|
};
|
|
916
|
-
|
|
917
|
-
//#region extensions/discord/src/voice/realtime-playback.ts
|
|
911
|
+
// extensions/discord/src/voice/realtime-playback.ts
|
|
918
912
|
const logger$2 = createSubsystemLogger("discord/voice");
|
|
919
913
|
const DISCORD_REALTIME_CONTROL_SPEECH_DEDUPE_MS = 5e3;
|
|
920
914
|
const DISCORD_REALTIME_MAX_RETAINED_RESPONSES = 32;
|
|
@@ -1326,8 +1320,7 @@ var DiscordRealtimePlayback = class {
|
|
|
1326
1320
|
this.drainQueuedExactSpeechMessages(reason);
|
|
1327
1321
|
}
|
|
1328
1322
|
};
|
|
1329
|
-
|
|
1330
|
-
//#region extensions/discord/src/voice/realtime-speaker-session.ts
|
|
1323
|
+
// extensions/discord/src/voice/realtime-speaker-session.ts
|
|
1331
1324
|
const logger$1 = createSubsystemLogger("discord/voice");
|
|
1332
1325
|
const DISCORD_REALTIME_DUPLICATE_ERROR_SUPPRESS_MS = 6e4;
|
|
1333
1326
|
const discordRealtimeTalkPayload = () => ({});
|
|
@@ -1757,8 +1750,7 @@ var DiscordRealtimeSpeakerSession = class {
|
|
|
1757
1750
|
this.lastRealtimeError.suppressed = 0;
|
|
1758
1751
|
}
|
|
1759
1752
|
};
|
|
1760
|
-
|
|
1761
|
-
//#region extensions/discord/src/voice/realtime-session.runtime.ts
|
|
1753
|
+
// extensions/discord/src/voice/realtime-session.runtime.ts
|
|
1762
1754
|
const logger = createSubsystemLogger("discord/voice");
|
|
1763
1755
|
const MAX_REALTIME_SPEAKERS = 8;
|
|
1764
1756
|
const REALTIME_SPEAKER_IDLE_MS = 6e4;
|
|
@@ -2095,5 +2087,4 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
2095
2087
|
logger.info(`discord voice: realtime speaker retired user=${speaker.userId} reason=${reason}${reason === "input-timeout" ? "; idle speaker input expired; speak again to reconnect" : ""}`);
|
|
2096
2088
|
}
|
|
2097
2089
|
};
|
|
2098
|
-
//#endregion
|
|
2099
2090
|
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;
|
|
@@ -391,8 +390,7 @@ async function writeVoiceWavFile(chunks) {
|
|
|
391
390
|
throw error;
|
|
392
391
|
}
|
|
393
392
|
}
|
|
394
|
-
|
|
395
|
-
//#region extensions/discord/src/voice/receive-recovery.ts
|
|
393
|
+
// extensions/discord/src/voice/receive-recovery.ts
|
|
396
394
|
const DECRYPT_FAILURE_WINDOW_MS = 3e4;
|
|
397
395
|
const DECRYPT_FAILURE_RECONNECT_THRESHOLD = 3;
|
|
398
396
|
const DECRYPT_FAILURE_MARKER = "DecryptionFailed(";
|
|
@@ -476,5 +474,4 @@ function enableDaveReceivePassthrough(params) {
|
|
|
476
474
|
return false;
|
|
477
475
|
}
|
|
478
476
|
}
|
|
479
|
-
//#endregion
|
|
480
477
|
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-DNSsUQRF.mjs → resolve-allowlist-common-CI77288n.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as normalizeDiscordToken } from "./accounts-
|
|
2
|
-
import { o as normalizeDiscordSlug } from "./allow-list-
|
|
3
|
-
import { r as fetchDiscord } from "./api-
|
|
4
|
-
|
|
1
|
+
import { h as normalizeDiscordToken } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { o as normalizeDiscordSlug } from "./allow-list-D1ZGfhXh.mjs";
|
|
3
|
+
import { r as fetchDiscord } from "./api-Bth1wKF9.mjs";
|
|
4
|
+
// extensions/discord/src/guilds.ts
|
|
5
5
|
async function listGuilds(token, fetcher, options) {
|
|
6
6
|
return (await fetchDiscord("/users/@me/guilds", token, fetcher, options)).flatMap((guild) => typeof guild.id === "string" && typeof guild.name === "string" ? [{
|
|
7
7
|
id: guild.id,
|
|
@@ -9,8 +9,7 @@ async function listGuilds(token, fetcher, options) {
|
|
|
9
9
|
slug: normalizeDiscordSlug(guild.name)
|
|
10
10
|
}] : []);
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
//#region extensions/discord/src/resolve-allowlist-common.ts
|
|
12
|
+
// extensions/discord/src/resolve-allowlist-common.ts
|
|
14
13
|
function resolveDiscordAllowlistToken(token) {
|
|
15
14
|
return normalizeDiscordToken(token, "channels.discord.token");
|
|
16
15
|
}
|
|
@@ -62,5 +61,4 @@ function parseDiscordAllowlistInput(raw, kind) {
|
|
|
62
61
|
guildOnly: true
|
|
63
62
|
} : { name: trimmed.replace(/^@/, "") };
|
|
64
63
|
}
|
|
65
|
-
//#endregion
|
|
66
64
|
export { listGuilds as i, parseDiscordAllowlistInput as n, resolveDiscordAllowlistToken as r, filterDiscordGuilds as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { A as isDiscordThreadChannelType, o as normalizeDiscordSlug } from "./allow-list-
|
|
3
|
-
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-
|
|
4
|
-
import { i as listGuilds, n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-
|
|
5
|
-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { A as isDiscordThreadChannelType, o as normalizeDiscordSlug } from "./allow-list-D1ZGfhXh.mjs";
|
|
3
|
+
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-Bth1wKF9.mjs";
|
|
4
|
+
import { i as listGuilds, n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-CI77288n.mjs";
|
|
5
|
+
// extensions/discord/src/resolve-channels.ts
|
|
6
6
|
var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveDiscordChannelAllowlist: () => resolveDiscordChannelAllowlist });
|
|
7
7
|
async function listGuildChannels(token, fetcher, guildId) {
|
|
8
8
|
return (await fetchDiscord(`/guilds/${guildId}/channels`, token, fetcher, { timeoutMs: DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS })).map((channel) => {
|
|
@@ -169,5 +169,4 @@ async function resolveDiscordChannelAllowlist(params) {
|
|
|
169
169
|
for (const input of params.entries) results.push(await resolveEntry(input));
|
|
170
170
|
return results;
|
|
171
171
|
}
|
|
172
|
-
//#endregion
|
|
173
172
|
export { resolve_channels_exports as n, resolveDiscordChannelAllowlist as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-
|
|
3
|
-
import { i as listGuilds, 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 { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-Bth1wKF9.mjs";
|
|
3
|
+
import { i as listGuilds, n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-CI77288n.mjs";
|
|
4
4
|
import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/discord/src/resolve-users.ts
|
|
6
6
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });
|
|
7
7
|
function scoreDiscordMember(member, query) {
|
|
8
8
|
const q = query.toLowerCase();
|
|
@@ -85,5 +85,4 @@ async function resolveDiscordUserAllowlist(params) {
|
|
|
85
85
|
}
|
|
86
86
|
return results;
|
|
87
87
|
}
|
|
88
|
-
//#endregion
|
|
89
88
|
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,14 +1,14 @@
|
|
|
1
|
-
import { c as resolveDefaultDiscordAccountId, s as mergeDiscordAccountConfig, t as createDiscordActionGate } from "./accounts-
|
|
2
|
-
import { A as isDiscordThreadChannelType, l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, y as resolveGroupDmAllow } from "./allow-list-
|
|
3
|
-
import { C as hasAnyChannelPermissionDiscord, F as createDiscordRuntimeAccountContext, U 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-
|
|
4
|
-
import { n as getPresence } from "./presence-cache-
|
|
5
|
-
import { a as createReusableDiscordReplyReference, s as resolveDiscordReplyReference } from "./send.receipt-
|
|
6
|
-
import { n as resolveDiscordChannelId, t as parseDiscordTarget } from "./target-parsing-
|
|
7
|
-
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, 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-
|
|
8
|
-
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
9
|
-
import "./targets-
|
|
10
|
-
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-
|
|
11
|
-
import { r as sendDiscordComponentMessage } from "./send.components
|
|
1
|
+
import { c as resolveDefaultDiscordAccountId, s as mergeDiscordAccountConfig, t as createDiscordActionGate } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { A as isDiscordThreadChannelType, l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, y as resolveGroupDmAllow } from "./allow-list-D1ZGfhXh.mjs";
|
|
3
|
+
import { C as hasAnyChannelPermissionDiscord, F as createDiscordRuntimeAccountContext, U 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-D4MioxW_.mjs";
|
|
4
|
+
import { n as getPresence } from "./presence-cache-CgutE4NN.mjs";
|
|
5
|
+
import { a as createReusableDiscordReplyReference, s as resolveDiscordReplyReference } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
6
|
+
import { n as resolveDiscordChannelId, t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
|
|
7
|
+
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, 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-Cbq-IVsS.mjs";
|
|
8
|
+
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-CGhBhzjQ.mjs";
|
|
9
|
+
import "./targets-BaklhOqq.mjs";
|
|
10
|
+
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-BvOWSPxr.mjs";
|
|
11
|
+
import { r as sendDiscordComponentMessage } from "./send.components-BV6ucNpJ.mjs";
|
|
12
12
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
13
13
|
import { asBoolean, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
14
|
import { assertMediaNotDataUrl, jsonResult, parseAvailableTags, readNonNegativeIntegerParam, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -17,7 +17,7 @@ import { createChannelProgressDraftCompositor } from "openclaw/plugin-sdk/channe
|
|
|
17
17
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
18
18
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
19
19
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
20
|
-
|
|
20
|
+
// extensions/discord/src/actions/runtime.messaging.thread-list.ts
|
|
21
21
|
function readDiscordChannelStringField(value, ...keys) {
|
|
22
22
|
if (!value || typeof value !== "object") return;
|
|
23
23
|
const record = value;
|
|
@@ -75,8 +75,7 @@ function filterDiscordActiveThreadList(params) {
|
|
|
75
75
|
})
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
//#region extensions/discord/src/actions/runtime.shared.ts
|
|
78
|
+
// extensions/discord/src/actions/runtime.shared.ts
|
|
80
79
|
/** Discord REST auto_archive_duration allowlist (minutes). */
|
|
81
80
|
const DISCORD_AUTO_ARCHIVE_MINUTES = /* @__PURE__ */ new Set([
|
|
82
81
|
60,
|
|
@@ -140,8 +139,7 @@ function readDiscordChannelMoveParams(params) {
|
|
|
140
139
|
position: readNonNegativeIntegerParam(params, "position")
|
|
141
140
|
};
|
|
142
141
|
}
|
|
143
|
-
|
|
144
|
-
//#region extensions/discord/src/actions/runtime.messaging.shared.ts
|
|
142
|
+
// extensions/discord/src/actions/runtime.messaging.shared.ts
|
|
145
143
|
function allowsAllDiscordGuildChannels(channels) {
|
|
146
144
|
const wildcard = channels?.["*"];
|
|
147
145
|
if (!wildcard || wildcard.enabled === false) return false;
|
|
@@ -496,8 +494,7 @@ function createDiscordMessagingActionContext(params) {
|
|
|
496
494
|
}
|
|
497
495
|
};
|
|
498
496
|
}
|
|
499
|
-
|
|
500
|
-
//#region extensions/discord/src/actions/runtime.guild.ts
|
|
497
|
+
// extensions/discord/src/actions/runtime.guild.ts
|
|
501
498
|
const expressionPermissions = [PermissionFlagsBits.ManageGuildExpressions, PermissionFlagsBits.CreateGuildExpressions];
|
|
502
499
|
const channelGuard = {
|
|
503
500
|
gate: "channels",
|
|
@@ -875,8 +872,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
875
872
|
default: throw new Error(`Unknown action: ${action}`);
|
|
876
873
|
}
|
|
877
874
|
}
|
|
878
|
-
|
|
879
|
-
//#region extensions/discord/src/actions/runtime.messaging.messages.ts
|
|
875
|
+
// extensions/discord/src/actions/runtime.messaging.messages.ts
|
|
880
876
|
function parseDiscordMessageLink(link) {
|
|
881
877
|
const match = link.trim().match(/^(?:https?:\/\/)?(?:ptb\.|canary\.)?discord(?:app)?\.com\/channels\/(\d+)\/(\d+)\/(\d+)(?:\/?|\?.*)$/i);
|
|
882
878
|
if (!match) throw new Error("Invalid Discord message link. Expected https://discord.com/channels/<guildId>/<channelId>/<messageId>.");
|
|
@@ -1030,8 +1026,7 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1030
1026
|
default: return;
|
|
1031
1027
|
}
|
|
1032
1028
|
}
|
|
1033
|
-
|
|
1034
|
-
//#region extensions/discord/src/actions/runtime.messaging.reactions.ts
|
|
1029
|
+
// extensions/discord/src/actions/runtime.messaging.reactions.ts
|
|
1035
1030
|
async function handleDiscordReactionMessagingAction(ctx) {
|
|
1036
1031
|
const action = ctx.action;
|
|
1037
1032
|
if (action !== "react" && action !== "reactions") return;
|
|
@@ -1062,8 +1057,7 @@ async function handleDiscordReactionMessagingAction(ctx) {
|
|
|
1062
1057
|
[remove ? "removed" : "added"]: emoji
|
|
1063
1058
|
});
|
|
1064
1059
|
}
|
|
1065
|
-
|
|
1066
|
-
//#region extensions/discord/src/actions/runtime.messaging.send.ts
|
|
1060
|
+
// extensions/discord/src/actions/runtime.messaging.send.ts
|
|
1067
1061
|
function resolveActionReplyReference(ctx, replyToId) {
|
|
1068
1062
|
const reply = ctx.options?.reply;
|
|
1069
1063
|
return reply ? resolveDiscordReplyReference({
|
|
@@ -1321,8 +1315,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1321
1315
|
default: return;
|
|
1322
1316
|
}
|
|
1323
1317
|
}
|
|
1324
|
-
|
|
1325
|
-
//#region extensions/discord/src/actions/runtime.messaging.ts
|
|
1318
|
+
// extensions/discord/src/actions/runtime.messaging.ts
|
|
1326
1319
|
async function handleDiscordMessagingAction(action, params, isActionEnabled, cfg, options) {
|
|
1327
1320
|
if (!cfg) throw new Error("Discord messaging actions require a resolved runtime config.");
|
|
1328
1321
|
const ctx = createDiscordMessagingActionContext({
|
|
@@ -1336,8 +1329,7 @@ async function handleDiscordMessagingAction(action, params, isActionEnabled, cfg
|
|
|
1336
1329
|
if (result == null) throw new Error(`Unknown action: ${action}`);
|
|
1337
1330
|
return result;
|
|
1338
1331
|
}
|
|
1339
|
-
|
|
1340
|
-
//#region extensions/discord/src/actions/runtime.moderation-shared.ts
|
|
1332
|
+
// extensions/discord/src/actions/runtime.moderation-shared.ts
|
|
1341
1333
|
const moderationPermissions = {
|
|
1342
1334
|
timeout: PermissionFlagsBits.ModerateMembers,
|
|
1343
1335
|
kick: PermissionFlagsBits.KickMembers,
|
|
@@ -1364,8 +1356,7 @@ function readDiscordModerationCommand(action, params) {
|
|
|
1364
1356
|
})
|
|
1365
1357
|
};
|
|
1366
1358
|
}
|
|
1367
|
-
|
|
1368
|
-
//#region extensions/discord/src/actions/runtime.moderation.ts
|
|
1359
|
+
// extensions/discord/src/actions/runtime.moderation.ts
|
|
1369
1360
|
async function handleDiscordModerationAction(action, params, isActionEnabled, cfg) {
|
|
1370
1361
|
if (!isDiscordModerationAction(action)) throw new Error(`Unknown action: ${action}`);
|
|
1371
1362
|
if (!isActionEnabled("moderation", false)) throw new Error("Discord moderation is disabled.");
|
|
@@ -1404,8 +1395,7 @@ async function handleDiscordModerationAction(action, params, isActionEnabled, cf
|
|
|
1404
1395
|
}, withOpts());
|
|
1405
1396
|
return jsonResult({ ok: true });
|
|
1406
1397
|
}
|
|
1407
|
-
|
|
1408
|
-
//#region extensions/discord/src/actions/runtime.presence.ts
|
|
1398
|
+
// extensions/discord/src/actions/runtime.presence.ts
|
|
1409
1399
|
const ACTIVITY_TYPE_MAP = /* @__PURE__ */ new Map([
|
|
1410
1400
|
["playing", 0],
|
|
1411
1401
|
["streaming", 1],
|
|
@@ -1464,8 +1454,7 @@ async function handleDiscordPresenceAction(action, params, isActionEnabled, cfg)
|
|
|
1464
1454
|
}, a.url ? { url: a.url } : {}, a.state ? { state: a.state } : {}))
|
|
1465
1455
|
});
|
|
1466
1456
|
}
|
|
1467
|
-
|
|
1468
|
-
//#region extensions/discord/src/actions/runtime.ts
|
|
1457
|
+
// extensions/discord/src/actions/runtime.ts
|
|
1469
1458
|
const messagingActions = /* @__PURE__ */ new Set([
|
|
1470
1459
|
"react",
|
|
1471
1460
|
"reactions",
|
|
@@ -1498,5 +1487,4 @@ async function handleDiscordAction(params, cfg, options) {
|
|
|
1498
1487
|
if (action === "setPresence") return await handleDiscordPresenceAction(action, params, isActionEnabled, cfg);
|
|
1499
1488
|
throw new Error(`Unknown action: ${action}`);
|
|
1500
1489
|
}
|
|
1501
|
-
//#endregion
|
|
1502
1490
|
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 { z as resolveDiscordProxyFetchForAccount } from "./send.shared-
|
|
1
|
+
import { _ as selectDiscordActivitiesRuntimeConfig, i as listDiscordAccountIds, l as resolveDiscordAccount, r as isDiscordAccountEnabledForRuntime } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { z as resolveDiscordProxyFetchForAccount } from "./send.shared-D4MioxW_.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, startupConfig, 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,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-CIsH7R3B.mjs → secret-config-contract-BdbCvqnM.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
2
|
import { collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, createChannelSecretTargetRegistryEntries, getChannelSurface, hasConfiguredSecretInputValue, isBaseFieldActiveForChannelSurface, isEnabledFlag, isRecord } 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
|
}
|
|
@@ -74,5 +74,4 @@ function collectRuntimeConfigAssignments(params) {
|
|
|
74
74
|
accountInactiveReason: "Discord account is disabled, voice is disabled, or voice mode is stt-tts for this account."
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
//#endregion
|
|
78
77
|
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 };
|