@openclaw/discord 2026.7.2-beta.7 → 2026.8.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-inspect-SXiCBCgP.js → account-inspect-D5xmUpnj.js} +49 -43
- package/dist/account-inspect-api.js +1 -1
- package/dist/accounts-DNl-oCEw.js +371 -0
- package/dist/action-runtime-api.js +1 -1
- package/dist/{active-turn-thread-route-MlKWp8RD.js → active-turn-thread-route-fmHl1HNd.js} +9 -11
- package/dist/{activities-api-DTKsuDxf.js → activities-api-KCBAmWxD.js} +133 -175
- package/dist/activities-api.js +1 -1
- package/dist/{allow-list-DzKrtfah.js → allow-list-BDMimASD.js} +2 -3
- package/dist/{api-DnrK9gML.js → api-DNVbJyEy.js} +7 -2
- package/dist/api.js +18 -18
- package/dist/{approval-handler.runtime-HymvFTYn.js → approval-handler.runtime-B12RCYr8.js} +6 -6
- package/dist/{approval-message-safety-DEyKVsAw.js → approval-message-safety-XGFPbDoI.js} +89 -3
- package/dist/{audit-CjsrabP8.js → audit-Yc7eZDd6.js} +5 -5
- package/dist/{channel-actions-uXFTJX3o.js → channel-actions-Dr2QI8Bf.js} +11 -7
- package/dist/{channel-actions.runtime-CIYU90sl.js → channel-actions.runtime-CODTvo7c.js} +99 -97
- package/dist/{channel-vKa-76xY.js → channel-cXYzGc4L.js} +102 -104
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-CmcwZ_qd.js → channel.setup-CSiwnMgs.js} +16 -54
- package/dist/{outbound-session-route-H-HoyH5U.js → components-ezGKo_Yh.js} +69 -142
- package/dist/{config-schema-WHRQcY19.js → config-schema-DC5kDtQ5.js} +42 -11
- package/dist/conversation-binding-route-D6rCQ5S0.js +43 -0
- package/dist/{directory-config-D_LojtCe.js → directory-config-XyCfoqLg.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-Bw5Ephzv.js → directory-live-Df0NbFJB.js} +7 -4
- package/dist/{doctor-Bc4S1qyd.js → doctor-DYY31GrO.js} +34 -13
- package/dist/{doctor-contract-CCFMIDk9.js → doctor-contract-DsWvKIXF.js} +2 -3
- package/dist/doctor-contract-api.js +147 -2
- package/dist/{handle-action.guild-admin-D6VRRW-C.js → handle-action.guild-admin-6Tvvinsa.js} +4 -7
- package/dist/{inbound-event-delivery-CEPlt2uz.js → inbound-event-delivery-De2qxTrP.js} +4 -25
- package/dist/index.js +5 -4
- package/dist/{message-handler-CeiSulIw.js → message-handler-B61q5MOF.js} +118 -33
- package/dist/{message-handler.preflight-DibgQFf2.js → message-handler.preflight-Bzg_Hawz.js} +75 -61
- package/dist/{message-handler.process-Dnc_oz9y.js → message-handler.process--4_712Ec.js} +236 -296
- package/dist/{message-utils-BgTwT_q7.js → message-utils-BXLLnFl6.js} +34 -35
- package/dist/{model-picker-preference-primitives-D25pnCOu.js → model-picker-preference-primitives-BHT1LkR_.js} +3 -3
- package/dist/{outbound-adapter-DtE-i2OJ.js → outbound-adapter-DxHTOqiN.js} +157 -68
- package/dist/{outbound-components-C7GVyfPh.js → outbound-components-B2PL0ooH.js} +3 -3
- package/dist/owner-access-Bg41VzAf.js +107 -0
- package/dist/{pluralkit-CD4B11JB.js → pluralkit-dUl4v1X3.js} +1 -1
- package/dist/{preflight-audio-BjnQZ5yS.js → preflight-audio-DrnqFA8U.js} +22 -28
- package/dist/{probe-BeWKhjqX.js → probe-BTdtVRwU.js} +37 -13
- package/dist/probe.runtime-Dq5-PRKT.js +2 -0
- package/dist/{provider-DfQJX3z5.js → provider-DlK_ynqt.js} +1131 -2021
- package/dist/{provider-session.runtime-Bo88k0pV.js → provider-session.runtime-CvvphHvs.js} +3 -3
- package/dist/provider.runtime-CzKGRiAF.js +2 -0
- package/dist/realtime-session.runtime-ysbMG8v7.js +1351 -0
- package/dist/{resolve-allowlist-common-DHERApxi.js → resolve-allowlist-common-DIVXbD1P.js} +3 -3
- package/dist/{resolve-channels-BjepAj8b.js → resolve-channels-CGeUoIqb.js} +4 -4
- package/dist/{resolve-users-Bc28htgt.js → resolve-users-BtKxLUZv.js} +3 -3
- package/dist/{chunk-DX4jpFQP.js → retry-DNsVTeTo.js} +308 -131
- package/dist/{runtime-BmW_j_hl.js → runtime-CQovMsH3.js} +12 -15
- package/dist/{runtime-_aRC6V2s.js → runtime-D71_VFLr.js} +49 -58
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +23 -23
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-CzeTYF32.js +6 -0
- package/dist/runtime-api.monitor.js +6 -5
- package/dist/runtime-api.send.js +6 -6
- package/dist/runtime-api.threads.js +5 -6
- package/dist/sdk-runtime-37OU6_Yh.js +369 -0
- package/dist/{secret-config-contract-B1akrlyY.js → secret-config-contract-B3i6WxV5.js} +53 -25
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit.runtime-CPN0xFYz.js → security-audit.runtime-BVKF9VtY.js} +1 -1
- package/dist/{send-CdkZ6zeW.js → send-rQIffSYu.js} +180 -91
- package/dist/{send.components-5uqwkjgE.js → send.components-ChK1wS7w.js} +32 -46
- package/dist/{send.outbound-D-80Ej-t.js → send.outbound-HIkgji_7.js} +57 -34
- package/dist/{send.reactions-CtlmGd_o.js → send.reactions-gmJ6yFPo.js} +14 -21
- package/dist/{send.receipt-CuwRrpFz.js → send.receipt-Cnhoautb.js} +29 -1
- package/dist/{send.shared-jpvAG_u6.js → send.shared-B3fpaLWJ.js} +112 -181
- package/dist/{sender-identity-mG_zsdox.js → sender-identity-BJtfyise.js} +1 -1
- package/dist/setup-entry.js +0 -5
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-CXF1tup1.js → shared-CaAaoksy.js} +27 -23
- package/dist/subagent-hooks-CNT2ZJTJ.js +49 -0
- package/dist/subagent-hooks-api.js +2 -6
- package/dist/subagent-progress-FPLqBY1s.js +110 -0
- package/dist/{system-events-DdUqf91B.js → system-events-Nuwoq_au.js} +2 -2
- package/dist/{target-resolver-C3s_2m0t.js → target-resolver-DIXShHaZ.js} +3 -3
- package/dist/targets-B2pf49zc.js +3 -0
- package/dist/{thread-bindings-C-M-ly7P.js → thread-bindings-VlymUnbz.js} +29 -28
- package/dist/{thread-bindings.manager-DYvSlrva.js → thread-bindings.manager-CngsgErq.js} +258 -29
- package/dist/{thread-bindings.session-updates-DAIlp7Px.js → thread-bindings.session-updates-CJb-BpPL.js} +1 -1
- package/dist/{thread-bindings.state-Cgi5uRn-.js → thread-bindings.state-D8OMdk4O.js} +3 -16
- package/dist/threading-DU6pgeGm.js +456 -0
- package/dist/transcripts-source-DeIMNbRh.js +265 -0
- package/dist/transcripts-source-api.js +7 -2
- package/dist/{typing--Mzo2kM7.js → typing-oLiS5Z13.js} +1 -1
- package/dist/voice-runtime-CjNFaynA.js +2549 -0
- package/openclaw.plugin.json +215 -25
- package/package.json +15 -11
- package/skills/discord/SKILL.md +22 -115
- package/dist/accounts-DJTf1LtA.js +0 -219
- package/dist/channel-api-CAJ0wMoV.js +0 -21
- package/dist/legacy-state-migrations-api.js +0 -138
- package/dist/manager.runtime-Bjav3pfC.js +0 -3655
- package/dist/preflight-audio.runtime-CoCXMM8r.js +0 -7
- package/dist/probe.runtime-DqFGFMbZ.js +0 -2
- package/dist/provider.runtime-Cy7XZmyh.js +0 -2
- package/dist/runtime-api.monitor-CCRubd3-.js +0 -5
- package/dist/session-binding-contract-api.js +0 -2
- package/dist/subagent-hooks-Dxy7Fmnq.js +0 -120
- package/dist/subagent-progress-DI3sYLLo.js +0 -664
- package/dist/targets-Dv_RN7vT.js +0 -3
- package/dist/thread-bindings.discord-api-BoDNqamb.js +0 -246
- package/dist/transcripts-source-DIKGsTGT.js +0 -123
- package/node_modules/p-map/index.d.ts +0 -155
- package/node_modules/p-map/index.js +0 -285
- package/node_modules/p-map/license +0 -9
- package/node_modules/p-map/package.json +0 -57
- package/node_modules/p-map/readme.md +0 -190
- package/dist/{audit-core-xwjIczO0.js → audit-core-BCX8UeFH.js} +1 -1
- package/dist/{security-audit-jGnJF__m.js → security-audit-BfJhAXZp.js} +1 -1
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as resolveDiscordAccount, g as selectDiscordActivitiesRuntimeConfig, n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds } from "./accounts-DNl-oCEw.js";
|
|
2
|
+
import { B as resolveDiscordProxyFetchForAccount } from "./send.shared-B3fpaLWJ.js";
|
|
3
|
+
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
4
|
//#region extensions/discord/src/activities/config.ts
|
|
4
|
-
function readNonEmpty(value) {
|
|
5
|
-
return value?.trim() || void 0;
|
|
6
|
-
}
|
|
7
5
|
function resolveDiscordActivitiesConfig(account, env = process.env) {
|
|
8
6
|
if (!account.activities) return {
|
|
9
7
|
enabled: false,
|
|
10
8
|
reason: "not-configured"
|
|
11
9
|
};
|
|
12
|
-
const clientSecret =
|
|
10
|
+
const clientSecret = normalizeOptionalString(account.activities.clientSecret) ?? normalizeOptionalString(env.DISCORD_CLIENT_SECRET);
|
|
13
11
|
if (!clientSecret) return {
|
|
14
12
|
enabled: false,
|
|
15
13
|
reason: "missing-client-secret"
|
|
16
14
|
};
|
|
17
|
-
const applicationId =
|
|
15
|
+
const applicationId = normalizeOptionalString(account.activities.applicationId);
|
|
18
16
|
return {
|
|
19
17
|
enabled: true,
|
|
20
18
|
clientSecret,
|
|
@@ -32,7 +30,7 @@ var DiscordActivitiesRuntime = class {
|
|
|
32
30
|
this.learnedApplicationIds = /* @__PURE__ */ new Map();
|
|
33
31
|
}
|
|
34
32
|
currentConfig() {
|
|
35
|
-
return this.getCurrentConfig?.() ?? this.startupConfig;
|
|
33
|
+
return selectDiscordActivitiesRuntimeConfig(this.getCurrentConfig?.() ?? this.startupConfig);
|
|
36
34
|
}
|
|
37
35
|
registerApplicationId(accountId, applicationId) {
|
|
38
36
|
const trimmed = applicationId.trim();
|
|
@@ -43,7 +41,7 @@ var DiscordActivitiesRuntime = class {
|
|
|
43
41
|
cfg,
|
|
44
42
|
accountId
|
|
45
43
|
});
|
|
46
|
-
if (!isDiscordAccountEnabledForRuntime(account, cfg)) return null;
|
|
44
|
+
if (!listDiscordAccountIds(cfg).includes(account.accountId) || !isDiscordAccountEnabledForRuntime(account, cfg) || account.tokenStatus !== "available") return null;
|
|
47
45
|
const activities = resolveDiscordActivitiesConfig(account.config, this.env);
|
|
48
46
|
if (!activities.enabled) return null;
|
|
49
47
|
const applicationId = activities.applicationId ?? this.learnedApplicationIds.get(account.accountId) ?? account.config.applicationId?.trim();
|
|
@@ -64,12 +62,11 @@ var DiscordActivitiesRuntime = class {
|
|
|
64
62
|
if (applicationId) return accounts.find((account) => account.applicationId === applicationId) ?? null;
|
|
65
63
|
return accounts.length === 1 ? accounts[0] ?? null : null;
|
|
66
64
|
}
|
|
65
|
+
hasEnabledAccounts(cfg = this.currentConfig()) {
|
|
66
|
+
return listDiscordAccountIds(cfg).some((accountId) => this.resolveAccount(accountId, cfg) !== null);
|
|
67
|
+
}
|
|
67
68
|
isAccountEnabled(accountId, cfg = this.currentConfig()) {
|
|
68
|
-
|
|
69
|
-
cfg,
|
|
70
|
-
accountId
|
|
71
|
-
});
|
|
72
|
-
return isDiscordAccountEnabledForRuntime(account, cfg) && resolveDiscordActivitiesConfig(account.config, this.env).enabled;
|
|
69
|
+
return this.resolveAccount(accountId, cfg) !== null;
|
|
73
70
|
}
|
|
74
71
|
};
|
|
75
72
|
let activeRuntime;
|
|
@@ -80,4 +77,4 @@ function getDiscordActivitiesRuntime() {
|
|
|
80
77
|
return activeRuntime;
|
|
81
78
|
}
|
|
82
79
|
//#endregion
|
|
83
|
-
export {
|
|
80
|
+
export { getDiscordActivitiesRuntime as n, setDiscordActivitiesRuntime as r, DiscordActivitiesRuntime as t };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { c as resolveDiscordReplyReference, o as createReusableDiscordReplyReference } from "./retry-DNsVTeTo.js";
|
|
2
|
+
import { m as readDiscordComponentSpec } from "./components-ezGKo_Yh.js";
|
|
3
|
+
import { A as resolveDiscordChannelId, C as readPositiveIntegerParam, D as withNormalizedTimestamp, E as readStringParam, S as readNonNegativeIntegerParam, T as readStringArrayParam, _ as assertMediaNotDataUrl, b as parseAvailableTags, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, t as createDiscordActionGate, v as jsonResult, w as readReactionParams, x as readBooleanParam } from "./accounts-DNl-oCEw.js";
|
|
4
|
+
import { r as sendDiscordComponentMessage } from "./send.components-ChK1wS7w.js";
|
|
5
|
+
import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy, v as resolveGroupDmAllow } from "./allow-list-BDMimASD.js";
|
|
6
|
+
import { E as isThreadChannelType$1, I as createDiscordRuntimeAccountContext, T as hasAnyGuildPermissionDiscord, W as getGateway, d as resolveDiscordTargetChannelId, v as canManageGuildMemberRoleDiscord, w as hasAnyChannelPermissionDiscord, x as fetchChannelPermissionsDiscord, y as canManageGuildRoleDiscord } from "./send.shared-B3fpaLWJ.js";
|
|
7
|
+
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-HIkgji_7.js";
|
|
8
8
|
import { n as getPresence } from "./presence-cache-z1N8MbJ3.js";
|
|
9
|
-
import { A as
|
|
10
|
-
import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-
|
|
11
|
-
import "./targets-
|
|
12
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
|
+
import { A as listGuildEmojisDiscord, C as fetchVoiceStatusDiscord, D as removeRoleDiscord, E as listScheduledEventsDiscord, F as editChannelDiscord, I as moveChannelDiscord, L as removeChannelPermissionDiscord, M as uploadStickerDiscord, N as createChannelDiscord, O as resolveEventCoverImage, P as deleteChannelDiscord, R as setChannelPermissionDiscord, S as fetchRoleInfoDiscord, T as listGuildChannelsDiscord, _ as banMemberDiscord, a as DiscordThreadInitialMessageError, b as fetchGuildInfoDiscord, c as editMessageDiscord, d as listThreadsDiscord, f as pinMessageDiscord, g as addRoleDiscord, h as unpinMessageDiscord, j as uploadEmojiDiscord, k as timeoutMemberDiscord, l as fetchMessageDiscord, m as searchMessagesDiscord, o as createThreadDiscord, p as readMessagesDiscord, r as sendVoiceMessageDiscord, s as deleteMessageDiscord, u as listPinsDiscord, v as createScheduledEventDiscord, w as kickMemberDiscord, x as fetchMemberInfoDiscord, y as fetchChannelInfoDiscord } from "./send-rQIffSYu.js";
|
|
10
|
+
import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gmJ6yFPo.js";
|
|
11
|
+
import "./targets-B2pf49zc.js";
|
|
13
12
|
import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
|
|
14
13
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
15
|
-
import {
|
|
14
|
+
import { asBoolean, isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
15
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
16
|
+
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
17
17
|
//#region extensions/discord/src/actions/runtime-deps.ts
|
|
18
18
|
const discordGuildActionRuntime = {
|
|
19
19
|
addRoleDiscord,
|
|
@@ -71,7 +71,6 @@ const discordMessagingActionRuntime = {
|
|
|
71
71
|
searchMessagesDiscord,
|
|
72
72
|
sendDiscordComponentMessage,
|
|
73
73
|
sendMessageDiscord,
|
|
74
|
-
sendPollDiscord,
|
|
75
74
|
sendStickerDiscord,
|
|
76
75
|
sendVoiceMessageDiscord,
|
|
77
76
|
unpinMessageDiscord
|
|
@@ -110,9 +109,6 @@ function readDiscordAutoArchiveDurationParam(params, key) {
|
|
|
110
109
|
if (!DISCORD_AUTO_ARCHIVE_MINUTES.has(value)) throw new Error(`${key} must be one of 60, 1440, 4320, or 10080 minutes`);
|
|
111
110
|
return value;
|
|
112
111
|
}
|
|
113
|
-
function readDiscordBooleanParam(params, key) {
|
|
114
|
-
return typeof params[key] === "boolean" ? params[key] : void 0;
|
|
115
|
-
}
|
|
116
112
|
function createDiscordActionOptions(params) {
|
|
117
113
|
return {
|
|
118
114
|
cfg: params.cfg,
|
|
@@ -129,7 +125,7 @@ function readDiscordChannelCreateParams(params) {
|
|
|
129
125
|
parentId: parentId ?? void 0,
|
|
130
126
|
topic: readStringParam(params, "topic") ?? void 0,
|
|
131
127
|
position: readNonNegativeIntegerParam(params, "position") ?? void 0,
|
|
132
|
-
nsfw:
|
|
128
|
+
nsfw: asBoolean(params.nsfw)
|
|
133
129
|
};
|
|
134
130
|
}
|
|
135
131
|
function readDiscordChannelEditParams(params) {
|
|
@@ -140,10 +136,10 @@ function readDiscordChannelEditParams(params) {
|
|
|
140
136
|
topic: readStringParam(params, "topic") ?? void 0,
|
|
141
137
|
position: readNonNegativeIntegerParam(params, "position") ?? void 0,
|
|
142
138
|
parentId: parentId === void 0 ? void 0 : parentId,
|
|
143
|
-
nsfw:
|
|
139
|
+
nsfw: asBoolean(params.nsfw),
|
|
144
140
|
rateLimitPerUser: readNonNegativeIntegerParam(params, "rateLimitPerUser") ?? void 0,
|
|
145
|
-
archived:
|
|
146
|
-
locked:
|
|
141
|
+
archived: asBoolean(params.archived),
|
|
142
|
+
locked: asBoolean(params.locked),
|
|
147
143
|
autoArchiveDuration: readDiscordAutoArchiveDurationParam(params, "autoArchiveDuration"),
|
|
148
144
|
availableTags: parseAvailableTags(params.availableTags)
|
|
149
145
|
};
|
|
@@ -1117,9 +1113,8 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1117
1113
|
if (rawInferChannelId) try {
|
|
1118
1114
|
const inferChannelId = discordMessagingActionRuntime.resolveDiscordChannelId(rawInferChannelId);
|
|
1119
1115
|
const channelInfo = await discordMessagingActionRuntime.fetchChannelInfoDiscord(inferChannelId, ctx.withOpts());
|
|
1120
|
-
if (channelInfo
|
|
1121
|
-
const
|
|
1122
|
-
const resolved = record.guild_id ?? record.guildId;
|
|
1116
|
+
if (isRecord(channelInfo)) {
|
|
1117
|
+
const resolved = channelInfo.guild_id ?? channelInfo.guildId;
|
|
1123
1118
|
if (typeof resolved === "string" && resolved.trim()) guildId = resolved.trim();
|
|
1124
1119
|
}
|
|
1125
1120
|
} catch {}
|
|
@@ -1209,6 +1204,14 @@ async function handleDiscordReactionMessagingAction(ctx) {
|
|
|
1209
1204
|
function hasDiscordComponentObjectKeys(value) {
|
|
1210
1205
|
return Boolean(value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length > 0);
|
|
1211
1206
|
}
|
|
1207
|
+
function resolveActionReplyReference(ctx, replyToId) {
|
|
1208
|
+
const reply = ctx.options?.reply;
|
|
1209
|
+
return reply ? resolveDiscordReplyReference({
|
|
1210
|
+
replyToId: reply.replyToId,
|
|
1211
|
+
replyToIdSource: reply.source,
|
|
1212
|
+
replyToMode: reply.source === "implicit" ? reply.mode : void 0
|
|
1213
|
+
}) : createReusableDiscordReplyReference(replyToId);
|
|
1214
|
+
}
|
|
1212
1215
|
function readDiscordThreadArchiveTimestamp(thread) {
|
|
1213
1216
|
if (!thread || typeof thread !== "object" || Array.isArray(thread)) return;
|
|
1214
1217
|
const metadata = thread.thread_metadata;
|
|
@@ -1292,26 +1295,6 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1292
1295
|
await discordMessagingActionRuntime.sendStickerDiscord(to, stickerIds, ctx.withOpts({ content }));
|
|
1293
1296
|
return jsonResult({ ok: true });
|
|
1294
1297
|
}
|
|
1295
|
-
case "poll": {
|
|
1296
|
-
if (!ctx.isActionEnabled("polls")) throw new Error("Discord polls are disabled.");
|
|
1297
|
-
const to = readStringParam(ctx.params, "to", { required: true });
|
|
1298
|
-
const content = readStringParam(ctx.params, "content");
|
|
1299
|
-
const question = readStringParam(ctx.params, "question", { required: true });
|
|
1300
|
-
const answers = readStringArrayParam(ctx.params, "answers", {
|
|
1301
|
-
required: true,
|
|
1302
|
-
label: "answers"
|
|
1303
|
-
});
|
|
1304
|
-
const allowMultiselect = readBooleanParam(ctx.params, "allowMultiselect");
|
|
1305
|
-
const durationHours = readPositiveIntegerParam(ctx.params, "durationHours");
|
|
1306
|
-
const maxSelections = resolvePollMaxSelections(answers.length, allowMultiselect);
|
|
1307
|
-
await discordMessagingActionRuntime.sendPollDiscord(to, {
|
|
1308
|
-
question,
|
|
1309
|
-
options: answers,
|
|
1310
|
-
maxSelections,
|
|
1311
|
-
durationHours
|
|
1312
|
-
}, ctx.withOpts({ content }));
|
|
1313
|
-
return jsonResult({ ok: true });
|
|
1314
|
-
}
|
|
1315
1298
|
case "sendMessage": {
|
|
1316
1299
|
if (!ctx.isActionEnabled("messages")) throw new Error("Discord message sends are disabled.");
|
|
1317
1300
|
const to = readStringParam(ctx.params, "to", { required: true });
|
|
@@ -1322,15 +1305,15 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1322
1305
|
const componentSpec = hasDiscordComponentObjectKeys(rawComponents) ? discordMessagingActionRuntime.readDiscordComponentSpec(rawComponents) : null;
|
|
1323
1306
|
const components = Array.isArray(rawComponents) || typeof rawComponents === "function" ? rawComponents : void 0;
|
|
1324
1307
|
const mediaUrl = readStringParam(ctx.params, "mediaUrl", { trim: false }) ?? readStringParam(ctx.params, "path", { trim: false }) ?? readStringParam(ctx.params, "filePath", { trim: false });
|
|
1308
|
+
const rawEmbeds = ctx.params.embeds;
|
|
1309
|
+
const embeds = Array.isArray(rawEmbeds) ? rawEmbeds : void 0;
|
|
1325
1310
|
const content = readStringParam(ctx.params, "content", {
|
|
1326
|
-
required: !asVoice && !componentSpec && !components && !mediaUrl,
|
|
1311
|
+
required: !asVoice && !componentSpec && !components && !embeds?.length && !mediaUrl,
|
|
1327
1312
|
allowEmpty: true
|
|
1328
1313
|
});
|
|
1329
1314
|
const filename = readStringParam(ctx.params, "filename");
|
|
1330
1315
|
const replyTo = readStringParam(ctx.params, "replyTo");
|
|
1331
1316
|
const threadName = readStringParam(ctx.params, "threadName");
|
|
1332
|
-
const rawEmbeds = ctx.params.embeds;
|
|
1333
|
-
const embeds = Array.isArray(rawEmbeds) ? rawEmbeds : void 0;
|
|
1334
1317
|
const sessionKey = readStringParam(ctx.params, "__sessionKey");
|
|
1335
1318
|
const agentId = readStringParam(ctx.params, "__agentId");
|
|
1336
1319
|
if (componentSpec) {
|
|
@@ -1347,7 +1330,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1347
1330
|
result: await discordMessagingActionRuntime.sendDiscordComponentMessage(to, payload, {
|
|
1348
1331
|
...ctx.withOpts(),
|
|
1349
1332
|
silent,
|
|
1350
|
-
reply:
|
|
1333
|
+
reply: resolveActionReplyReference(ctx, replyTo),
|
|
1351
1334
|
sessionKey: sessionKey ?? void 0,
|
|
1352
1335
|
agentId: agentId ?? void 0,
|
|
1353
1336
|
mediaUrl: mediaUrl ?? void 0,
|
|
@@ -1372,8 +1355,11 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1372
1355
|
ok: true,
|
|
1373
1356
|
result: await discordMessagingActionRuntime.sendVoiceMessageDiscord(to, mediaUrl, {
|
|
1374
1357
|
...ctx.withOpts(),
|
|
1375
|
-
reply:
|
|
1376
|
-
silent
|
|
1358
|
+
reply: resolveActionReplyReference(ctx, replyTo),
|
|
1359
|
+
silent,
|
|
1360
|
+
mediaAccess: ctx.options?.mediaAccess,
|
|
1361
|
+
mediaLocalRoots: ctx.options?.mediaLocalRoots,
|
|
1362
|
+
mediaReadFile: ctx.options?.mediaReadFile
|
|
1377
1363
|
}),
|
|
1378
1364
|
voiceMessage: true
|
|
1379
1365
|
},
|
|
@@ -1391,7 +1377,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1391
1377
|
filename: filename ?? void 0,
|
|
1392
1378
|
mediaLocalRoots: ctx.options?.mediaLocalRoots,
|
|
1393
1379
|
mediaReadFile: ctx.options?.mediaReadFile,
|
|
1394
|
-
reply:
|
|
1380
|
+
reply: resolveActionReplyReference(ctx, replyTo),
|
|
1395
1381
|
components,
|
|
1396
1382
|
embeds,
|
|
1397
1383
|
silent,
|
|
@@ -1421,13 +1407,17 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1421
1407
|
thread: await discordMessagingActionRuntime.createThreadDiscord(channelId, payload, ctx.withOpts())
|
|
1422
1408
|
});
|
|
1423
1409
|
} catch (error) {
|
|
1424
|
-
if (error instanceof DiscordThreadInitialMessageError)
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1410
|
+
if (error instanceof DiscordThreadInitialMessageError) {
|
|
1411
|
+
const initialMessageDelivery = error.initialMessageDelivery;
|
|
1412
|
+
return jsonResult({
|
|
1413
|
+
ok: true,
|
|
1414
|
+
partial: true,
|
|
1415
|
+
thread: error.thread,
|
|
1416
|
+
warning: `${error.initialMessageWarning}.`,
|
|
1417
|
+
initialMessageError: error.initialMessageError,
|
|
1418
|
+
...initialMessageDelivery ? { initialMessageDelivery } : {}
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1431
1421
|
throw error;
|
|
1432
1422
|
}
|
|
1433
1423
|
}
|
|
@@ -1472,9 +1462,10 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1472
1462
|
result: await discordMessagingActionRuntime.sendMessageDiscord(`channel:${channelId}`, content, {
|
|
1473
1463
|
...ctx.withOpts(),
|
|
1474
1464
|
mediaUrl,
|
|
1465
|
+
mediaAccess: ctx.options?.mediaAccess,
|
|
1475
1466
|
mediaLocalRoots: ctx.options?.mediaLocalRoots,
|
|
1476
1467
|
mediaReadFile: ctx.options?.mediaReadFile,
|
|
1477
|
-
reply:
|
|
1468
|
+
reply: resolveActionReplyReference(ctx, replyTo)
|
|
1478
1469
|
})
|
|
1479
1470
|
});
|
|
1480
1471
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-
|
|
2
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
1
|
+
import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-D71_VFLr.js";
|
|
2
|
+
import { t as discordMessageActions } from "./channel-actions-Dr2QI8Bf.js";
|
|
3
3
|
export { discordMessageActions, handleDiscordAction, isDiscordModerationAction, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, requiredGuildPermissionForModerationAction };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-5uqwkjgE.js";
|
|
1
|
+
import { O as resolveDiscordOutboundSessionRoute } from "./accounts-DNl-oCEw.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-ChK1wS7w.js";
|
|
4
3
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
5
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
6
|
-
import { _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as resolveGroupDmAllow, y as shouldEmitDiscordReactionNotification } from "./allow-list-
|
|
7
|
-
import {
|
|
4
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-Df0NbFJB.js";
|
|
5
|
+
import { _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as resolveGroupDmAllow, y as shouldEmitDiscordReactionNotification } from "./allow-list-BDMimASD.js";
|
|
6
|
+
import { C as hasAllGuildPermissionsDiscord, G as registerGateway, K as unregisterGateway, S as fetchMemberGuildPermissionsDiscord, T as hasAnyGuildPermissionDiscord, U as clearGateways, W as getGateway, _ as DiscordSendError, x as fetchChannelPermissionsDiscord } from "./send.shared-B3fpaLWJ.js";
|
|
7
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-HIkgji_7.js";
|
|
8
8
|
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
9
|
-
import { A as
|
|
9
|
+
import { A as listGuildEmojisDiscord, C as fetchVoiceStatusDiscord, D as removeRoleDiscord, E as listScheduledEventsDiscord, F as editChannelDiscord, I as moveChannelDiscord, L as removeChannelPermissionDiscord, M as uploadStickerDiscord, N as createChannelDiscord, O as resolveEventCoverImage, P as deleteChannelDiscord, R as setChannelPermissionDiscord, S as fetchRoleInfoDiscord, T as listGuildChannelsDiscord, _ as banMemberDiscord, c as editMessageDiscord, d as listThreadsDiscord, f as pinMessageDiscord, g as addRoleDiscord, h as unpinMessageDiscord, i as sendWebhookMessageDiscord, j as uploadEmojiDiscord, k as timeoutMemberDiscord, l as fetchMessageDiscord, m as searchMessagesDiscord, n as sendTypingDiscord, o as createThreadDiscord, p as readMessagesDiscord, r as sendVoiceMessageDiscord, s as deleteMessageDiscord, u as listPinsDiscord, v as createScheduledEventDiscord, w as kickMemberDiscord, x as fetchMemberInfoDiscord, y as fetchChannelInfoDiscord } from "./send-rQIffSYu.js";
|
|
10
10
|
import { a as isAbortError, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, l as runDiscordTaskWithTimeout, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as normalizeDiscordInboundWorkerTimeoutMs, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordListenerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
|
|
11
|
-
import {
|
|
12
|
-
import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-
|
|
13
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
14
|
-
import { C as
|
|
15
|
-
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
16
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
17
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
18
|
-
import {
|
|
19
|
-
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-
|
|
20
|
-
import { i as
|
|
21
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BeWKhjqX.js";
|
|
11
|
+
import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gmJ6yFPo.js";
|
|
12
|
+
import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-D71_VFLr.js";
|
|
13
|
+
import { t as discordMessageActions } from "./channel-actions-Dr2QI8Bf.js";
|
|
14
|
+
import { C as resolveThreadBindingMaxAgeExpiresAt, S as resolveThreadBindingInactivityExpiresAt, w as resolveThreadBindingMaxAgeMs, x as resolveThreadBindingIdleTimeoutMs } from "./thread-bindings.state-D8OMdk4O.js";
|
|
15
|
+
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-CJb-BpPL.js";
|
|
16
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CGeUoIqb.js";
|
|
17
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-BtKxLUZv.js";
|
|
18
|
+
import { _ as resolveThreadBindingThreadName, g as resolveThreadBindingIntroText, h as formatThreadBindingDurationLabel, m as resolveThreadBindingPersonaFromRecord, n as createThreadBindingManager, p as resolveThreadBindingPersona, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-CngsgErq.js";
|
|
19
|
+
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-VlymUnbz.js";
|
|
20
|
+
import { i as probeDiscord, n as fetchDiscordApplicationSummary, o as resolveDiscordPrivilegedIntentsFromFlags, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BTdtVRwU.js";
|
|
22
21
|
import "./runtime-api.actions.js";
|
|
23
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
22
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-Yc7eZDd6.js";
|
|
24
23
|
import "./runtime-api.lookup.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import "./
|
|
24
|
+
import { d as waitForDiscordGatewayPluginRegistration, f as createDiscordNativeCommand, l as createDiscordGatewayPlugin, t as monitorDiscordProvider, u as resolveDiscordGatewayIntents, v as registerDiscordListener } from "./provider-DlK_ynqt.js";
|
|
25
|
+
import { o as sanitizeDiscordThreadName, r as resolveDiscordReplyTarget } from "./threading-DU6pgeGm.js";
|
|
26
|
+
import { t as createDiscordMessageHandler } from "./message-handler-B61q5MOF.js";
|
|
27
|
+
import "./runtime-api.monitor-CzeTYF32.js";
|
|
28
28
|
import "./runtime-api.send.js";
|
|
29
29
|
import "./runtime-api.threads.js";
|
|
30
|
-
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DiscordSendError,
|
|
30
|
+
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DiscordSendError, addRoleDiscord, allowListMatches, auditDiscordChannelPermissions, autoBindSpawnedDiscordSubagent, banMemberDiscord, clearGateways, clearPresences, collectDiscordAuditChannelIds, createChannelDiscord, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, createNoopThreadBindingManager, createScheduledEventDiscord, createThreadBindingManager, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, discordMessageActions, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, formatThreadBindingDurationLabel, getGateway, getPresence, getThreadBindingManager, handleDiscordAction, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, isAbortError, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, parseApplicationIdFromToken, pinMessageDiscord, presenceCacheSize, probeDiscord, reactMessageDiscord, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, readMessagesDiscord, reconcileAcpThreadBindingsOnStartup, registerBuiltDiscordComponentMessage, registerDiscordListener, registerGateway, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, requiredGuildPermissionForModerationAction, resolveDiscordChannelAllowlist, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordOutboundSessionRoute, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveDiscordUserAllowlist, resolveEventCoverImage, resolveGroupDmAllow, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, setDiscordRuntime, setPresence, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, shouldEmitDiscordReactionNotification, timeoutMemberDiscord, unbindThreadBindingsBySessionKey, unpinMessageDiscord, unregisterGateway, uploadEmojiDiscord, uploadStickerDiscord, waitForDiscordGatewayPluginRegistration };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
2
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
3
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
4
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
5
|
-
import {
|
|
6
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
2
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-Df0NbFJB.js";
|
|
3
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CGeUoIqb.js";
|
|
4
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-BtKxLUZv.js";
|
|
5
|
+
import { i as probeDiscord, n as fetchDiscordApplicationSummary, o as resolveDiscordPrivilegedIntentsFromFlags, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BTdtVRwU.js";
|
|
6
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-Yc7eZDd6.js";
|
|
7
7
|
export { auditDiscordChannelPermissions, collectDiscordAuditChannelIds, fetchDiscordApplicationId, fetchDiscordApplicationSummary, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, parseApplicationIdFromToken, probeDiscord, resolveDiscordChannelAllowlist, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordUserAllowlist, setDiscordRuntime };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as resolveGroupDmAllow, y as shouldEmitDiscordReactionNotification } from "./allow-list-BDMimASD.js";
|
|
2
|
+
import { G as registerGateway, K as unregisterGateway, U as clearGateways, W as getGateway } from "./send.shared-B3fpaLWJ.js";
|
|
3
3
|
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
4
4
|
import { a as isAbortError, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, l as runDiscordTaskWithTimeout, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as normalizeDiscordInboundWorkerTimeoutMs, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordListenerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
5
|
+
import { d as waitForDiscordGatewayPluginRegistration, f as createDiscordNativeCommand, l as createDiscordGatewayPlugin, t as monitorDiscordProvider, u as resolveDiscordGatewayIntents, v as registerDiscordListener } from "./provider-DlK_ynqt.js";
|
|
6
|
+
import { o as sanitizeDiscordThreadName, r as resolveDiscordReplyTarget } from "./threading-DU6pgeGm.js";
|
|
7
|
+
import { t as createDiscordMessageHandler } from "./message-handler-B61q5MOF.js";
|
|
8
|
+
import "./runtime-api.monitor-CzeTYF32.js";
|
|
8
9
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, allowListMatches, clearGateways, clearPresences, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, getGateway, getPresence, isAbortError, isDiscordGroupAllowedByPolicy, monitorDiscordProvider, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, presenceCacheSize, registerDiscordListener, registerGateway, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveGroupDmAllow, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, setPresence, shouldEmitDiscordReactionNotification, unregisterGateway, waitForDiscordGatewayPluginRegistration };
|
package/dist/runtime-api.send.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
5
|
-
import { A as
|
|
6
|
-
import {
|
|
1
|
+
import { O as resolveDiscordOutboundSessionRoute } from "./accounts-DNl-oCEw.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-ChK1wS7w.js";
|
|
3
|
+
import { C as hasAllGuildPermissionsDiscord, S as fetchMemberGuildPermissionsDiscord, T as hasAnyGuildPermissionDiscord, _ as DiscordSendError, x as fetchChannelPermissionsDiscord } from "./send.shared-B3fpaLWJ.js";
|
|
4
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-HIkgji_7.js";
|
|
5
|
+
import { A as listGuildEmojisDiscord, C as fetchVoiceStatusDiscord, D as removeRoleDiscord, E as listScheduledEventsDiscord, F as editChannelDiscord, I as moveChannelDiscord, L as removeChannelPermissionDiscord, M as uploadStickerDiscord, N as createChannelDiscord, O as resolveEventCoverImage, P as deleteChannelDiscord, R as setChannelPermissionDiscord, S as fetchRoleInfoDiscord, T as listGuildChannelsDiscord, _ as banMemberDiscord, c as editMessageDiscord, d as listThreadsDiscord, f as pinMessageDiscord, g as addRoleDiscord, h as unpinMessageDiscord, i as sendWebhookMessageDiscord, j as uploadEmojiDiscord, k as timeoutMemberDiscord, l as fetchMessageDiscord, m as searchMessagesDiscord, n as sendTypingDiscord, o as createThreadDiscord, p as readMessagesDiscord, r as sendVoiceMessageDiscord, s as deleteMessageDiscord, u as listPinsDiscord, v as createScheduledEventDiscord, w as kickMemberDiscord, x as fetchMemberInfoDiscord, y as fetchChannelInfoDiscord } from "./send-rQIffSYu.js";
|
|
6
|
+
import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gmJ6yFPo.js";
|
|
7
7
|
export { DiscordSendError, addRoleDiscord, banMemberDiscord, createChannelDiscord, createScheduledEventDiscord, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, kickMemberDiscord, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadsDiscord, moveChannelDiscord, pinMessageDiscord, reactMessageDiscord, readMessagesDiscord, registerBuiltDiscordComponentMessage, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, resolveDiscordOutboundSessionRoute, resolveEventCoverImage, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, timeoutMemberDiscord, unpinMessageDiscord, uploadEmojiDiscord, uploadStickerDiscord };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
3
|
-
import {
|
|
4
|
-
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-
|
|
5
|
-
|
|
6
|
-
export { autoBindSpawnedDiscordSubagent, createNoopThreadBindingManager, createThreadBindingManager, formatThreadBindingDurationLabel, getThreadBindingManager, listThreadBindingsBySessionKey, listThreadBindingsForAccount, reconcileAcpThreadBindingsOnStartup, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, testing, unbindThreadBindingsBySessionKey };
|
|
1
|
+
import { C as resolveThreadBindingMaxAgeExpiresAt, S as resolveThreadBindingInactivityExpiresAt, w as resolveThreadBindingMaxAgeMs, x as resolveThreadBindingIdleTimeoutMs } from "./thread-bindings.state-D8OMdk4O.js";
|
|
2
|
+
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-CJb-BpPL.js";
|
|
3
|
+
import { _ as resolveThreadBindingThreadName, g as resolveThreadBindingIntroText, h as formatThreadBindingDurationLabel, m as resolveThreadBindingPersonaFromRecord, n as createThreadBindingManager, p as resolveThreadBindingPersona, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-CngsgErq.js";
|
|
4
|
+
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-VlymUnbz.js";
|
|
5
|
+
export { autoBindSpawnedDiscordSubagent, createNoopThreadBindingManager, createThreadBindingManager, formatThreadBindingDurationLabel, getThreadBindingManager, listThreadBindingsBySessionKey, listThreadBindingsForAccount, reconcileAcpThreadBindingsOnStartup, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, unbindThreadBindingsBySessionKey };
|