@openclaw/discord 2026.9.8 → 2026.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-inspect-De8hOUxG.mjs → account-inspect-Bp8nbBSx.mjs} +2 -2
- package/dist/.setup/{channel-type-DRCrEMss.mjs → allow-list-Kty_8Xca.mjs} +7 -7
- package/dist/.setup/{api-DVbJwZVt.mjs → api-CotnTQLx.mjs} +3 -3
- package/dist/.setup/{approval-handler.runtime-DxCK2Rux.mjs → approval-handler.runtime-DqU_yO2L.mjs} +9 -9
- package/dist/.setup/{approval-message-updates-BKFqavHZ.mjs → approval-message-updates-CdnQ98c8.mjs} +2 -2
- package/dist/.setup/{audit-CLg9I71N.mjs → audit-CqUeNcJH.mjs} +4 -4
- package/dist/.setup/{channel-DxlUVU9t.mjs → channel-Bu1qLdnm.mjs} +28 -23
- package/dist/.setup/{channel.setup-CRo1GjV7.mjs → channel.setup-DRCLt54O.mjs} +4 -4
- package/dist/.setup/{components-Cq1PvIpN.mjs → components-CwpgbGDR.mjs} +3 -3
- package/dist/.setup/{conversation-binding-route-Caz_XuFH.mjs → conversation-binding-route-DC0Y2v1B.mjs} +1 -1
- package/dist/.setup/{directory-config-esqNn0Eo.mjs → directory-config-DLT0PP2j.mjs} +1 -1
- package/dist/.setup/{directory-live-DtKRHuGV.mjs → directory-live-DPVUIJ8-.mjs} +4 -4
- package/dist/.setup/{discord-0xJYfdDD.mjs → discord-DTLP81g6.mjs} +3 -3
- package/dist/.setup/{doctor-BCl1H5tl.mjs → doctor-E3AF74Ms.mjs} +5 -5
- package/dist/.setup/{handle-action-CUvQWnE7.mjs → handle-action-cmTFQysA.mjs} +8 -8
- package/dist/.setup/{handle-action.guild-admin-Df-8gVle.mjs → handle-action.guild-admin-CH8nj2w0.mjs} +2 -2
- package/dist/.setup/{live-policy-config-8Pv20CHc.mjs → live-policy-config-D--q9Zta.mjs} +1 -1
- package/dist/.setup/{message-handler-B-Jk4oDk.mjs → message-handler-BVZO6wCg.mjs} +12 -11
- package/dist/.setup/{message-handler.preflight-v-__NSDq.mjs → message-handler.preflight-Be_b_NFp.mjs} +17 -17
- package/dist/.setup/{message-handler.preflight-pluralkit-CWLUBVcx.mjs → message-handler.preflight-pluralkit-TPGXsd8P.mjs} +7 -7
- package/dist/.setup/{message-handler.process-BNFFuChn.mjs → message-handler.process-BUBGcAoh.mjs} +21 -21
- package/dist/.setup/{outbound-adapter-BobT-kse.mjs → outbound-adapter-CSiCDzCN.mjs} +9 -9
- package/dist/.setup/{outbound-session-route-zVGxxceg.mjs → outbound-session-route-D0ryINch.mjs} +13 -13
- package/dist/.setup/{probe-LYrIHlBF.mjs → probe-DTSDdlpy.mjs} +4 -4
- package/dist/.setup/{provider-B_G5hASF.mjs → provider-BTm60b3t.mjs} +81 -81
- package/dist/.setup/{provider-session.runtime-BYlTBFD2.mjs → provider-session.runtime-DKJ-qSt9.mjs} +3 -3
- package/dist/.setup/provider.runtime-BvoZBuZY.mjs +2 -0
- package/dist/.setup/{realtime-session.runtime-oUd9DOcz.mjs → realtime-session.runtime-JZd7A5bS.mjs} +19 -19
- package/dist/.setup/{resolve-allowlist-common-DPdRggu5.mjs → resolve-allowlist-common-Ck4M_Ot2.mjs} +3 -3
- package/dist/.setup/{resolve-channels-BFPNRmVv.mjs → resolve-channels-CEaKGzuh.mjs} +3 -3
- package/dist/.setup/{resolve-users-0-aBuCy3.mjs → resolve-users-CMz4PVnV.mjs} +2 -2
- package/dist/.setup/{runtime-FN000lxA.mjs → runtime-DwW5C0WK.mjs} +12 -12
- package/dist/.setup/{runtime-sUksZ--Q.mjs → runtime-Lsy4dEx7.mjs} +2 -2
- package/dist/.setup/{send-CrfEI6Bs.mjs → send-DY5EeBPr.mjs} +15 -15
- package/dist/.setup/{send.components-DxQAMfES.mjs → send.components-DGwzyA_4.mjs} +7 -7
- package/dist/.setup/{send.outbound-BISKnb-a.mjs → send.outbound-DR8O-Pvo.mjs} +8 -8
- package/dist/.setup/{retry-pz_cSha2.mjs → send.receipt-D0JBijZQ.mjs} +217 -217
- package/dist/.setup/{send.shared-DGFkbkQR.mjs → send.shared-r0Fj2v_h.mjs} +40 -40
- package/dist/.setup/{sender-identity-B9X5Vb9R.mjs → sender-identity-DQCoikZl.mjs} +1 -1
- package/dist/.setup/setup-plugin-api-BEoo_L8p.mjs +3 -0
- package/dist/.setup/{shared-B3wZ4hN-.mjs → shared-CDq4vJm3.mjs} +7 -7
- package/dist/.setup/{subagent-hooks-nlUE9ow7.mjs → subagent-hooks-Bk0mMyHh.mjs} +2 -2
- package/dist/.setup/{system-events-CdeZnvPV.mjs → system-events-I1rH-U6o.mjs} +2 -2
- package/dist/.setup/{target-resolver-BuLapkhy.mjs → target-resolver-Dcg0WjsF.mjs} +3 -3
- package/dist/.setup/targets-CJkVZIkE.mjs +3 -0
- package/dist/.setup/{thread-bindings-D7TfgjR_.mjs → thread-bindings-E0TiUQUX.mjs} +6 -6
- package/dist/.setup/{thread-bindings.manager-DN-NissX.mjs → thread-bindings.manager-CEoFDOs9.mjs} +14 -14
- package/dist/.setup/{thread-bindings.session-updates-CshfKghV.mjs → thread-bindings.session-updates-DvtjzKO-.mjs} +2 -2
- package/dist/.setup/{transcripts-source-p8EV179h.mjs → transcripts-source-CHhpvL97.mjs} +17 -17
- package/dist/.setup/{typing-BiHCzBRu.mjs → typing-Cr0b2zBq.mjs} +1 -1
- package/dist/.setup/{voice-runtime-B46rcwrG.mjs → voice-runtime-BngIfPc3.mjs} +46 -46
- package/dist/account-inspect-api.js +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/activities-api.js +791 -1
- package/dist/api.js +15 -15
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +9 -5
- package/dist/runtime-api.js +20 -20
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/src/voice/audio-worker.runtime.js +3 -3
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/activities-api-tvbsU2e3.mjs +0 -792
- package/dist/.setup/provider.runtime-CUE3UxER.mjs +0 -2
- package/dist/.setup/setup-plugin-api-BQUBxbhe.mjs +0 -3
- package/dist/.setup/targets-0KUcEIYx.mjs +0 -3
- package/dist/.setup/{accounts-ChaMcixG.mjs → accounts-DS-A-gCx.mjs} +3 -3
- package/dist/.setup/{config-schema-oxELUSDx.mjs → config-schema-DKUSr985.mjs} +2 -2
- package/dist/.setup/{receive-recovery-CHPOsnLc.mjs → receive-recovery-D6eikHf5.mjs} +2 -2
- package/dist/.setup/{thread-bindings.state-g6v9zAym.mjs → thread-bindings.state-755lJHln.mjs} +3 -3
package/dist/.setup/{realtime-session.runtime-oUd9DOcz.mjs → realtime-session.runtime-JZd7A5bS.mjs}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { _ as releaseDiscordAudioInput, g as getDiscordAudioOutputStatus, h as admitDiscordAudioInput, m as DiscordAudioOutputStatus, u as createDiscordPcmToRealtimeConverter, v as restoreDiscordAudioError, x as setDiscordAudioOutputStatus } from "./receive-recovery-
|
|
1
|
+
import { _ as releaseDiscordAudioInput, g as getDiscordAudioOutputStatus, h as admitDiscordAudioInput, m as DiscordAudioOutputStatus, u as createDiscordPcmToRealtimeConverter, v as restoreDiscordAudioError, x as setDiscordAudioOutputStatus } from "./receive-recovery-D6eikHf5.mjs";
|
|
2
2
|
import { n as discordRealtimeVoiceSecretOwnerId } from "./secret-config-contract-uOE2J7yM.mjs";
|
|
3
|
-
import { g as logVoiceVerbose } from "./provider-
|
|
4
|
-
import { a as logDiscordVoiceAgentControlResult, c as formatRealtimeLifecycleLog, i as handleDiscordVoiceAgentControlToolCall, l as formatVoiceLogPreview, n as DiscordRealtimeRecording, o as maybeControlDiscordVoiceAgentRun, r as formatVoiceIngressPrompt, s as formatRealtimeInterruptionLog, u as shouldLogRealtimeVerboseEvent } from "./voice-runtime-
|
|
3
|
+
import { g as logVoiceVerbose } from "./provider-BTm60b3t.mjs";
|
|
4
|
+
import { a as logDiscordVoiceAgentControlResult, c as formatRealtimeLifecycleLog, i as handleDiscordVoiceAgentControlToolCall, l as formatVoiceLogPreview, n as DiscordRealtimeRecording, o as maybeControlDiscordVoiceAgentRun, r as formatVoiceIngressPrompt, s as formatRealtimeInterruptionLog, u as shouldLogRealtimeVerboseEvent } from "./voice-runtime-BngIfPc3.mjs";
|
|
5
|
+
import { MessageChannel } from "node:worker_threads";
|
|
6
|
+
import { formatErrorMessage, readErrorName, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
7
|
+
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
8
|
+
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
9
|
import { randomUUID } from "node:crypto";
|
|
6
10
|
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
7
|
-
import { formatErrorMessage } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
8
|
-
import { formatErrorMessage as formatErrorMessage$1, readErrorName, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
9
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
|
-
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
11
|
+
import { formatErrorMessage as formatErrorMessage$1 } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
11
12
|
import { sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
12
|
-
import { MessageChannel } from "node:worker_threads";
|
|
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, resolveConfiguredRealtimeVoiceProvider, resolveRealtimeVoiceAgentConsultTools, resolveRealtimeVoiceBargeIn, resolveRealtimeVoiceInterruptResponseOnInputAudio, resolveRealtimeVoiceMinBargeInAudioEndMs, resolveRealtimeVoiceSessionPolicy } from "openclaw/plugin-sdk/realtime-voice";
|
|
15
15
|
import { assertSecretOwnerAvailable, isSecretOwnerAvailable } from "openclaw/plugin-sdk/channel-secret-owner-runtime";
|
|
@@ -469,10 +469,10 @@ var DiscordRealtimeConsults = class {
|
|
|
469
469
|
if (this.params.stopped() || providerEpoch !== this.params.providerEpoch()) return;
|
|
470
470
|
if (readErrorName(error) === "AbortError") {
|
|
471
471
|
if (pendingForcedConsult) this.params.harness.forcedConsults.remove(pendingForcedConsult);
|
|
472
|
-
logger$3.warn(`discord voice: realtime transcript cancelled: ${formatErrorMessage
|
|
472
|
+
logger$3.warn(`discord voice: realtime transcript cancelled: ${formatErrorMessage(error)}`);
|
|
473
473
|
return;
|
|
474
474
|
}
|
|
475
|
-
logger$3.warn(`discord voice: realtime active-run control failed; falling back to normal transcript handling: ${formatErrorMessage
|
|
475
|
+
logger$3.warn(`discord voice: realtime active-run control failed; falling back to normal transcript handling: ${formatErrorMessage(error)}`);
|
|
476
476
|
control = void 0;
|
|
477
477
|
}
|
|
478
478
|
if (this.params.stopped() || providerEpoch !== this.params.providerEpoch()) return;
|
|
@@ -1226,7 +1226,7 @@ var DiscordRealtimePlayback = class {
|
|
|
1226
1226
|
this.completeExactSpeechResponse(reason);
|
|
1227
1227
|
},
|
|
1228
1228
|
onBargeIn: (reason) => this.handleBargeIn(reason),
|
|
1229
|
-
onError: (error) => this.stopAfterPlaybackFailure("output-playback-error", error instanceof Error ? error : new Error(formatErrorMessage(error)))
|
|
1229
|
+
onError: (error) => this.stopAfterPlaybackFailure("output-playback-error", error instanceof Error ? error : new Error(formatErrorMessage$1(error)))
|
|
1230
1230
|
});
|
|
1231
1231
|
if (this.outputs.size === 0) this.params.harness.outputActivity.markStreamOpened();
|
|
1232
1232
|
this.outputs.add(output);
|
|
@@ -1543,7 +1543,7 @@ var DiscordRealtimeSpeakerSession = class {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
if (text.trim()) this.recording.transcript(text.trim());
|
|
1545
1545
|
if (this.handlesAgentConsult) return;
|
|
1546
|
-
this.trackOperation(() => this.turns.handleFinalUserTranscript(text)).catch((error) => this.logRealtimeError(formatErrorMessage(error)));
|
|
1546
|
+
this.trackOperation(() => this.turns.handleFinalUserTranscript(text)).catch((error) => this.logRealtimeError(formatErrorMessage$1(error)));
|
|
1547
1547
|
},
|
|
1548
1548
|
onToolCall: (event, session) => {
|
|
1549
1549
|
if (this.isStopped()) return;
|
|
@@ -1563,7 +1563,7 @@ var DiscordRealtimeSpeakerSession = class {
|
|
|
1563
1563
|
if (outcome.status === "cancelled") logger$1.info(`discord voice: realtime model interrupt confirmed server:response.done status=cancelled${outcome.reason ? ` reason=${outcome.reason}` : ""}`);
|
|
1564
1564
|
else if (outcome.status === "failed" || outcome.status === "incomplete") this.logRealtimeError(outcome.message);
|
|
1565
1565
|
},
|
|
1566
|
-
onError: (error) => this.logRealtimeError(formatErrorMessage(error)),
|
|
1566
|
+
onError: (error) => this.logRealtimeError(formatErrorMessage$1(error)),
|
|
1567
1567
|
onClose: (reason) => {
|
|
1568
1568
|
if (!this.isStopped()) {
|
|
1569
1569
|
this.lifecycle.status = "stopped";
|
|
@@ -1614,7 +1614,7 @@ var DiscordRealtimeSpeakerSession = class {
|
|
|
1614
1614
|
completion = Promise.reject(toErrorObject(error, "Discord realtime provider cleanup failed"));
|
|
1615
1615
|
}
|
|
1616
1616
|
if (completion) this.closeCompletion = completion.then(finish, async (error) => {
|
|
1617
|
-
this.logRealtimeError(formatErrorMessage(error));
|
|
1617
|
+
this.logRealtimeError(formatErrorMessage$1(error));
|
|
1618
1618
|
await finish();
|
|
1619
1619
|
if (disposition === "detach") throw error;
|
|
1620
1620
|
});
|
|
@@ -1930,7 +1930,7 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
1930
1930
|
}
|
|
1931
1931
|
for (const speaker of this.sessions) {
|
|
1932
1932
|
if (speaker.session !== session) continue;
|
|
1933
|
-
logger.warn(`discord voice: realtime speaker failed user=${speaker.userId}: ${formatErrorMessage(error)}`);
|
|
1933
|
+
logger.warn(`discord voice: realtime speaker failed user=${speaker.userId}: ${formatErrorMessage$1(error)}`);
|
|
1934
1934
|
this.retireSpeaker(speaker, "provider-failed");
|
|
1935
1935
|
this.notify("I lost a speaker's voice connection. Please try speaking again.");
|
|
1936
1936
|
return;
|
|
@@ -2048,12 +2048,12 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
2048
2048
|
} catch (recoveryError) {
|
|
2049
2049
|
await discardCandidates();
|
|
2050
2050
|
this.callAbort.signal.throwIfAborted();
|
|
2051
|
-
const failure = /* @__PURE__ */ new Error(`Discord voice change failed and the previous voice could not reconnect: ${formatErrorMessage(recoveryError)}. Join voice again to retry.`);
|
|
2051
|
+
const failure = /* @__PURE__ */ new Error(`Discord voice change failed and the previous voice could not reconnect: ${formatErrorMessage$1(recoveryError)}. Join voice again to retry.`);
|
|
2052
2052
|
this.close("detach");
|
|
2053
2053
|
this.params.onTerminalError(failure);
|
|
2054
2054
|
throw failure;
|
|
2055
2055
|
}
|
|
2056
|
-
throw new Error(`Discord voice change failed; the previous voice was restored: ${formatErrorMessage(error)}`, { cause: error });
|
|
2056
|
+
throw new Error(`Discord voice change failed; the previous voice was restored: ${formatErrorMessage$1(error)}`, { cause: error });
|
|
2057
2057
|
}
|
|
2058
2058
|
throw error;
|
|
2059
2059
|
} finally {
|
|
@@ -2090,7 +2090,7 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
2090
2090
|
completion = session.close(disposition);
|
|
2091
2091
|
} catch (error) {
|
|
2092
2092
|
if (disposition !== "detach") {
|
|
2093
|
-
logger.warn(`discord voice: realtime speaker close failed: ${formatErrorMessage(error)}`);
|
|
2093
|
+
logger.warn(`discord voice: realtime speaker close failed: ${formatErrorMessage$1(error)}`);
|
|
2094
2094
|
return;
|
|
2095
2095
|
}
|
|
2096
2096
|
completion = Promise.reject(toErrorObject(error, "Discord realtime speaker cleanup failed"));
|
|
@@ -2103,7 +2103,7 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
2103
2103
|
};
|
|
2104
2104
|
pending.then(forget, (error) => {
|
|
2105
2105
|
forget();
|
|
2106
|
-
logger.warn(`discord voice: realtime speaker close failed: ${formatErrorMessage(error)}`);
|
|
2106
|
+
logger.warn(`discord voice: realtime speaker close failed: ${formatErrorMessage$1(error)}`);
|
|
2107
2107
|
});
|
|
2108
2108
|
}
|
|
2109
2109
|
return completion;
|
package/dist/.setup/{resolve-allowlist-common-DPdRggu5.mjs → resolve-allowlist-common-Ck4M_Ot2.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as fetchDiscord } from "./api-
|
|
1
|
+
import { m as normalizeDiscordToken } from "./accounts-DS-A-gCx.mjs";
|
|
2
|
+
import { a as normalizeDiscordSlug } from "./allow-list-Kty_8Xca.mjs";
|
|
3
|
+
import { r as fetchDiscord } from "./api-CotnTQLx.mjs";
|
|
4
4
|
//#region extensions/discord/src/guilds.ts
|
|
5
5
|
async function listGuilds(token, fetcher, options) {
|
|
6
6
|
return (await fetchDiscord("/users/@me/guilds", token, fetcher, options)).filter((guild) => typeof guild.id === "string" && typeof guild.name === "string").map((guild) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-
|
|
4
|
-
import { n as resolveDiscordAllowlistToken, r as listGuilds, t as filterDiscordGuilds } from "./resolve-allowlist-common-
|
|
2
|
+
import { a as normalizeDiscordSlug, k as isDiscordThreadChannelType } from "./allow-list-Kty_8Xca.mjs";
|
|
3
|
+
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-CotnTQLx.mjs";
|
|
4
|
+
import { n as resolveDiscordAllowlistToken, r as listGuilds, t as filterDiscordGuilds } from "./resolve-allowlist-common-Ck4M_Ot2.mjs";
|
|
5
5
|
//#region extensions/discord/src/resolve-channels.ts
|
|
6
6
|
var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveDiscordChannelAllowlist: () => resolveDiscordChannelAllowlist });
|
|
7
7
|
function parseDiscordChannelInput(raw) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
-
import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-
|
|
3
|
-
import { n as resolveDiscordAllowlistToken, r as listGuilds, t as filterDiscordGuilds } from "./resolve-allowlist-common-
|
|
2
|
+
import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-CotnTQLx.mjs";
|
|
3
|
+
import { n as resolveDiscordAllowlistToken, r as listGuilds, t as filterDiscordGuilds } from "./resolve-allowlist-common-Ck4M_Ot2.mjs";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/discord/src/resolve-users.ts
|
|
6
6
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { r as sendDiscordComponentMessage } from "./send.components-DxQAMfES.mjs";
|
|
5
|
-
import { b as parseDiscordTarget, f as createReusableDiscordReplyReference, m as resolveDiscordReplyReference, x as resolveDiscordChannelId } from "./retry-pz_cSha2.mjs";
|
|
6
|
-
import { C as hasAnyChannelPermissionDiscord, H as getGateway, P as createDiscordRuntimeAccountContext, _ as canManageGuildMemberRoleDiscord, b as fetchChannelPermissionsDiscord, n as buildDiscordTextChunks, u as resolveDiscordTargetChannelId, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, y as canViewDiscordGuildChannel } from "./send.shared-DGFkbkQR.mjs";
|
|
7
|
-
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-BISKnb-a.mjs";
|
|
1
|
+
import { o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-DS-A-gCx.mjs";
|
|
2
|
+
import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, k as isDiscordThreadChannelType, n as isDiscordGroupAllowedByPolicy, v as resolveGroupDmAllow } from "./allow-list-Kty_8Xca.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-r0Fj2v_h.mjs";
|
|
8
4
|
import { n as getPresence } from "./presence-cache-Di3H3DIU.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import "./
|
|
11
|
-
import {
|
|
5
|
+
import { a as createReusableDiscordReplyReference, m as resolveDiscordChannelId, p as parseDiscordTarget, s as resolveDiscordReplyReference } from "./send.receipt-D0JBijZQ.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-DY5EeBPr.mjs";
|
|
7
|
+
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DR8O-Pvo.mjs";
|
|
8
|
+
import "./targets-CJkVZIkE.mjs";
|
|
9
|
+
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-CwpgbGDR.mjs";
|
|
10
|
+
import { r as sendDiscordComponentMessage } from "./send.components-DGwzyA_4.mjs";
|
|
12
11
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
13
12
|
import { asBoolean, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
|
-
import { createChannelProgressDraftCompositor } from "openclaw/plugin-sdk/channel-outbound";
|
|
15
|
-
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
16
13
|
import { assertMediaNotDataUrl, jsonResult, parseAvailableTags, readNonNegativeIntegerParam, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
14
|
+
import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
|
|
15
|
+
import { createChannelProgressDraftCompositor } from "openclaw/plugin-sdk/channel-outbound";
|
|
17
16
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
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.shared.ts
|
|
20
20
|
/** Discord REST auto_archive_duration allowlist (minutes). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as resolveDiscordAccount, g as selectDiscordActivitiesRuntimeConfig, n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds } from "./accounts-
|
|
2
|
-
import {
|
|
1
|
+
import { c as resolveDiscordAccount, g as selectDiscordActivitiesRuntimeConfig, n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds } from "./accounts-DS-A-gCx.mjs";
|
|
2
|
+
import { z as resolveDiscordProxyFetchForAccount } from "./send.shared-r0Fj2v_h.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) {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { D as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { i as prepareDiscordOutboundText, n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
2
|
+
import { D as resolveDiscordEndpointAttachmentGuard, E as getDiscordEndpointRuntime, w as parseDiscordRetryAfterBodySeconds } from "./allow-list-Kty_8Xca.mjs";
|
|
3
|
+
import { C as hasAnyChannelPermissionDiscord, D as createDiscordMessageNonce, I as resolveDiscordClientAccountContext, L as resolveDiscordRest, M as parseAndResolveChannelRecipient, N as createDiscordClient, O as resolveDiscordMessageFlags, R as DISCORD_REST_TIMEOUT_MS, S as hasAllGuildPermissionsDiscord, _ as canManageGuildMemberRoleDiscord, a as normalizeEmojiName, b as fetchChannelPermissionsDiscord, c as resolveChannelId, f as sendDiscordText, g as DiscordSendError, h as DISCORD_MAX_STICKER_BYTES, j as resolveDiscordSuppressEmbeds, m as DISCORD_MAX_EVENT_COVER_BYTES, n as buildDiscordTextChunks, o as normalizeReactionEmoji, p as DISCORD_MAX_EMOJI_BYTES, r as buildReactionIdentifier, t as buildDiscordSendError, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord, y as canViewDiscordGuildChannel } from "./send.shared-r0Fj2v_h.mjs";
|
|
4
|
+
import { At as deleteChannelPermission, Bt as putChannelPermission, C as withDiscordRequestAuthority, Ct as unpinChannelMessage, Dt as createGuildEmoji, Et as createGuildChannel, Ft as listGuildChannels, Ht as removeGuildMemberRole, It as listGuildEmojis, Lt as listGuildRoles, Mt as getGuildMember, Nt as getGuildVoiceState, Ot as createGuildScheduledEvent, Pt as listGuildActiveThreads, Rt as listGuildScheduledEvents, S as readRetryAfter, St as sendChannelTyping, Tt as createGuildBan, Ut as timeoutGuildMember, Vt as removeGuildMember, _ as DiscordError, _t as listChannelArchivedThreads, at as createOwnMessageReaction, b as readDiscordCode, bt as pinChannelMessage, dt as deleteChannelMessage, ft as editChannel, ht as getChannelMessage, jt as getGuild, kt as createGuildSticker, lt as createThread, mt as getChannel, ot as deleteOwnMessageReaction, pt as editChannelMessage, st as listMessageReactionUsers, tt as stripUndefinedFields, ut as deleteChannel, v as RateLimitError, vt as listChannelMessages, wt as addGuildMemberRole, x as readDiscordMessage, xt as searchGuildMessages, y as isUnknownDiscordVoiceStateError, yt as listChannelPins, zt as moveGuildChannels } from "./discord-DTLP81g6.mjs";
|
|
5
|
+
import { _ as createDiscordRetryRunner, a as createReusableDiscordReplyReference, b as chunkDiscordTextWithMode, g as classifyDiscordDeliveryFailure, n as createDiscordSendReceiptFromResults, o as resolveDiscordReplyMessageId, r as createDiscordSendResult, y as recordDiscordMessageCreateAmbiguity } from "./send.receipt-D0JBijZQ.mjs";
|
|
6
|
+
import { o as parseDiscordHttpErrorBody } from "./api-CotnTQLx.mjs";
|
|
7
|
+
import { i as prepareDiscordOutboundText, n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DR8O-Pvo.mjs";
|
|
8
8
|
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-D86uWLt_.mjs";
|
|
9
|
-
import
|
|
9
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
10
|
+
import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
11
|
+
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
12
|
import { ChannelType } from "discord-api-types/v10";
|
|
11
13
|
import crypto from "node:crypto";
|
|
12
14
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
13
15
|
import { parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
14
16
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
15
|
-
import {
|
|
17
|
+
import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, buildOutboundMediaLoadOptions, extensionForMime, maxBytesForKind, parseFfprobeCodecAndSampleRate, runFfmpeg, runFfprobe, unlinkIfExists } from "openclaw/plugin-sdk/media-runtime";
|
|
18
|
+
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
19
|
+
import { loadWebMediaRaw } from "openclaw/plugin-sdk/web-media";
|
|
16
20
|
import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
17
|
-
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
18
21
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
19
|
-
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
20
22
|
import { recordOutboundMessageIdentity } from "openclaw/plugin-sdk/channel-outbound";
|
|
21
|
-
import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, buildOutboundMediaLoadOptions, extensionForMime, maxBytesForKind, parseFfprobeCodecAndSampleRate, runFfmpeg, runFfprobe, unlinkIfExists } from "openclaw/plugin-sdk/media-runtime";
|
|
22
|
-
import { loadWebMediaRaw } from "openclaw/plugin-sdk/web-media";
|
|
23
|
-
import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
24
23
|
import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
|
|
24
|
+
import fs from "node:fs/promises";
|
|
25
25
|
import path from "node:path";
|
|
26
26
|
import { writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime";
|
|
27
27
|
//#region extensions/discord/src/send.channels.ts
|
|
@@ -276,7 +276,7 @@ function describeDiscordThreadInitialMessageFailure(delivery) {
|
|
|
276
276
|
}
|
|
277
277
|
var DiscordThreadInitialMessageError = class extends Error {
|
|
278
278
|
constructor(thread, error, initialMessageDelivery) {
|
|
279
|
-
const initialMessageError = formatErrorMessage
|
|
279
|
+
const initialMessageError = formatErrorMessage(error);
|
|
280
280
|
const initialMessageWarning = describeDiscordThreadInitialMessageFailure(initialMessageDelivery);
|
|
281
281
|
super(`${initialMessageWarning}: ${initialMessageError}`, { cause: error });
|
|
282
282
|
this.name = "DiscordThreadInitialMessageError";
|
|
@@ -598,7 +598,7 @@ async function getAudioDuration(filePath) {
|
|
|
598
598
|
if (duration === void 0) throw new Error("Could not parse duration");
|
|
599
599
|
return Math.round(duration * 100) / 100;
|
|
600
600
|
} catch (err) {
|
|
601
|
-
const errMessage = formatErrorMessage
|
|
601
|
+
const errMessage = formatErrorMessage(err);
|
|
602
602
|
throw new Error(`Failed to get audio duration: ${errMessage}`, { cause: err });
|
|
603
603
|
}
|
|
604
604
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { A as serializePayload, C as withDiscordRequestAuthority, ct as createChannelMessage, pt as editChannelMessage } from "./discord-
|
|
2
|
+
import { D as createDiscordMessageNonce, M as parseAndResolveChannelRecipient, N as createDiscordClient, T as SUPPRESS_NOTIFICATIONS_FLAG, c as resolveChannelId, l as resolveDiscordChannel, t as buildDiscordSendError } from "./send.shared-r0Fj2v_h.mjs";
|
|
3
|
+
import { A as serializePayload, C as withDiscordRequestAuthority, ct as createChannelMessage, pt as editChannelMessage } from "./discord-DTLP81g6.mjs";
|
|
4
|
+
import { r as createDiscordSendResult } from "./send.receipt-D0JBijZQ.mjs";
|
|
5
|
+
import { t as sendMessageDiscord } from "./send.outbound-DR8O-Pvo.mjs";
|
|
6
|
+
import { d as buildDiscordComponentMessage, f as buildDiscordComponentMessageFlags, g as resolveDiscordComponentAttachmentName } from "./components-CwpgbGDR.mjs";
|
|
4
7
|
import { n as getOptionalDiscordRuntime } from "./runtime-DgnVQ7zW.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { D as createDiscordMessageNonce, G as parseAndResolveChannelRecipient, M as createDiscordClient, T as SUPPRESS_NOTIFICATIONS_FLAG, c as resolveChannelId, l as resolveDiscordChannel, t as buildDiscordSendError } from "./send.shared-DGFkbkQR.mjs";
|
|
7
|
-
import { t as sendMessageDiscord } from "./send.outbound-BISKnb-a.mjs";
|
|
8
|
+
import { hasNonEmptyString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
9
|
import { ChannelType } from "discord-api-types/v10";
|
|
9
10
|
import { asDateTimestampMs, isFutureDateTimestampMs, resolveDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
10
11
|
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
11
|
-
import {
|
|
12
|
+
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
12
13
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
13
14
|
import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
14
15
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
15
|
-
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
16
16
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
17
17
|
import { createAsyncLock } from "openclaw/plugin-sdk/async-lock-runtime";
|
|
18
18
|
//#region extensions/discord/src/components-registry-state.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { A as resolveDiscordSendEmbeds, D as createDiscordMessageNonce, E as buildDiscordMessageRequest, M as parseAndResolveChannelRecipient, N as createDiscordClient, O as resolveDiscordMessageFlags, c as resolveChannelId, d as sendDiscordMedia, f as sendDiscordText, i as normalizeDiscordPollInput, j as resolveDiscordSuppressEmbeds, k as resolveDiscordSendComponents, l as resolveDiscordChannel, n as buildDiscordTextChunks, s as normalizeStickerIds, t as buildDiscordSendError } from "./send.shared-r0Fj2v_h.mjs";
|
|
2
|
+
import { C as withDiscordRequestAuthority, ct as createChannelMessage, lt as createThread } from "./discord-DTLP81g6.mjs";
|
|
3
|
+
import { a as createReusableDiscordReplyReference, n as createDiscordSendReceiptFromResults, r as createDiscordSendResult } from "./send.receipt-D0JBijZQ.mjs";
|
|
4
|
+
import { i as normalizeDiscordHandleKey, o as resolveDiscordDirectoryUserId } from "./directory-live-DPVUIJ8-.mjs";
|
|
5
|
+
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
6
|
import { ChannelType } from "discord-api-types/v10";
|
|
6
7
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
7
|
-
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
|
-
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
9
8
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
10
|
-
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
11
9
|
import { resolveChunkMode } from "openclaw/plugin-sdk/reply-chunking";
|
|
10
|
+
import { convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
|
|
11
|
+
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
12
|
+
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
12
13
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
13
14
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
14
|
-
import { convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
|
|
15
15
|
//#region extensions/discord/src/mentions.ts
|
|
16
16
|
const MENTION_CANDIDATE_PATTERN = /(^|[\s([{"'.,;:!?])@([a-z0-9_.-]{2,32}(?:#[0-9]{4})?)/gi;
|
|
17
17
|
const DISCORD_RESERVED_MENTIONS = /* @__PURE__ */ new Set(["everyone", "here"]);
|