@openclaw/slack 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-DEKpg9Ip.js → account-inspect-YJvFBbCR.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-CHAeNZOX.js → accounts-BlzxuYle.js} +7 -3
- package/dist/{accounts.runtime-BHD4Ma2R.js → accounts.runtime-CbabBL8x.js} +1 -1
- package/dist/{action-runtime-DfuYoMjG.js → action-runtime-D6jg2CQd.js} +193 -125
- package/dist/action-runtime.runtime-JtoOK9l5.js +2 -0
- package/dist/{actions-D3NuJvva.js → actions-DFk0ANVB.js} +116 -235
- package/dist/actions.runtime-CYLsYRai.js +2 -0
- package/dist/api.js +17 -17
- package/dist/{approval-handler.runtime-BA05P0QT.js → approval-handler.runtime-BNvAoKdK.js} +53 -14
- package/dist/{channel-B9fVdW3s.js → channel-CA5w7qDF.js} +209 -110
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-DXyos1d2.js → channel-type-CZWv55Wu.js} +9 -12
- package/dist/{config-adapter-CxBQH8fq.js → channel.setup-CpyYsEXH.js} +83 -25
- package/dist/{config-schema-SgZT6nXV.js → config-schema-CN3XZRX5.js} +27 -17
- package/dist/conversation-binding-route-DFVLUdYF.js +115 -0
- package/dist/{directory-config-CnCIAktf.js → directory-config-BGYyuzWh.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DKunWh3A.js → directory-live-DjUJQLbq.js} +13 -22
- package/dist/{doctor-contract-CsGH1Dfc.js → doctor-contract-BAy7-EUQ.js} +30 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-NQZti9t-.js → group-policy-DyfB_ZIE.js} +282 -183
- package/dist/index.js +4 -1
- package/dist/{message-tool-api-DkhFpMoy.js → message-tool-api-CqMr5Rmc.js} +14 -3
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-CmKz0wtI.js → monitor-Chrecrb9.js} +3 -3
- package/dist/{outbound-adapter-BkuMp2Vs.js → outbound-adapter-DuRqAQXK.js} +35 -23
- package/dist/{pipeline.runtime-DgtmuYCP.js → pipeline.runtime-Bbfd5VFW.js} +1386 -929
- package/dist/{policy-PRysPn23.js → policy-BKXSxrIS.js} +18 -14
- package/dist/{probe-CgDsSops.js → probe-BVA65leh.js} +38 -18
- package/dist/{provider-DmRizMZt.js → provider-CUUiwsg2.js} +3454 -2601
- package/dist/{relay-source-Blxj8xb4.js → relay-source-mhpMMRG-.js} +11 -21
- package/dist/{replies-4s_Vq_z9.js → replies-SnWyXcsL.js} +84 -27
- package/dist/{resolve-channels-yEqmM-3I.js → resolve-channels-BSpqC8jU.js} +39 -12
- package/dist/{resolve-users-BOrt5K-5.js → resolve-users-Dvz9pDe0.js} +28 -5
- package/dist/{runtime-api-QMb-Q5Ko.js → runtime-api-DBi7xc_g.js} +3 -3
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-BJSrkAp6.js → scopes-BSk4GZvZ.js} +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-DsLeZpST.js → send-CtnOxKCc.js} +249 -163
- package/dist/{send.runtime-gUdK6V3h.js → send.runtime-kYctMHSd.js} +1 -1
- package/dist/setup-entry.js +1 -4
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BeNzrMrJ.js → setup-surface-BPFfp6So.js} +6 -6
- package/dist/{shared-DgIN3Dcr.js → shared-DJBaslN7.js} +45 -45
- package/dist/{block-text-DkHaoGem.js → slack-client-kind-BXyOOICI.js} +17 -2
- package/dist/{slash-dispatch.runtime-zPkyl7dB.js → slash-dispatch.runtime-Cf2FTrnf.js} +2 -2
- package/dist/{streaming-compat-3_X-21wW.js → streaming-compat-B-e0mqM0.js} +3 -8
- package/dist/{target-parsing-N6lHogYZ.js → target-parsing-BnMD2ZqZ.js} +40 -2
- package/dist/{targets-KmjP2E8s.js → targets-Cx5W_n3W.js} +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
- package/node_modules/undici/lib/core/request.js +12 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
- package/node_modules/undici/lib/handler/cache-handler.js +246 -64
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
- package/node_modules/undici/lib/handler/retry-handler.js +24 -0
- package/node_modules/undici/lib/interceptor/cache.js +159 -52
- package/node_modules/undici/lib/util/cache.js +324 -62
- package/node_modules/undici/lib/util/date.js +23 -6
- package/node_modules/undici/lib/web/cookies/util.js +79 -9
- package/node_modules/undici/package.json +1 -1
- package/openclaw.plugin.json +280 -33
- package/package.json +9 -11
- package/skills/slack/SKILL.md +10 -68
- package/dist/account-reply-mode-DrUXogvO.js +0 -14
- package/dist/action-runtime.runtime-DQErZYpz.js +0 -2
- package/dist/actions.runtime-BIRU_G4M.js +0 -2
- package/dist/channel.setup-CLP5oTvh.js +0 -56
- package/dist/preflight-audio.runtime-D5Bgags0.js +0 -3
- package/dist/slash-plugin-commands.runtime-Dosfcx3X.js +0 -2
- 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/{security-audit-DR097212.js → security-audit-B_yKr7MW.js} +1 -1
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { a as resolveSlackAccount, f as resolveSlackBotToken } from "./accounts-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { a as resolveSlackAccount, f as resolveSlackBotToken } from "./accounts-BlzxuYle.js";
|
|
3
|
+
import { B as SLACK_EDIT_TEXT_MAX_BYTES, F as normalizeSlackOutboundText, I as buildSlackBlocksFallbackText, L as buildSlackCompleteBlocksFallbackText, Lt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, M as stripSlackNativeDataBlocks, O as hasSlackNativeDataBlock, T as appendSlackNativeDataPlainTextFallback, Y as truncateSlackTextByUtf8Bytes, ct as escapeSlackMrkdwn, g as assertSlackDetachedTargetAllowed, k as isSlackInvalidBlocksError, mt as validateSlackBlocksArray, q as countSlackTextUtf8Bytes, w as appendSlackNativeDataFallbackText } from "./group-policy-DyfB_ZIE.js";
|
|
4
|
+
import { d as getSlackWriteClient, i as createSlackLookupClient } from "./probe-BVA65leh.js";
|
|
5
|
+
import { c as resolveSlackMessageText, i as hasSlackMessageTableBlock, n as fetchWithRuntimeDispatcher, r as saveRemoteMedia, t as isGovSlackClient } from "./slack-client-kind-BXyOOICI.js";
|
|
6
|
+
import { m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-CtnOxKCc.js";
|
|
7
|
+
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
7
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
9
|
import { logVerbose, logVerbose as logVerbose$1 } from "openclaw/plugin-sdk/runtime-env";
|
|
9
|
-
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
12
12
|
import fs from "node:fs/promises";
|
|
13
|
+
import { runTasksWithConcurrency } from "openclaw/plugin-sdk/concurrency-runtime";
|
|
13
14
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
14
15
|
import { normalizeHostname } from "openclaw/plugin-sdk/host-runtime";
|
|
15
16
|
import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
|
|
16
|
-
import pMap, { pMapSkip } from "p-map";
|
|
17
|
-
import { fetchWithRuntimeDispatcher } from "openclaw/plugin-sdk/runtime-fetch";
|
|
18
|
-
import { saveRemoteMedia } from "openclaw/plugin-sdk/media-runtime";
|
|
19
|
-
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
20
17
|
//#region extensions/slack/src/edit-text.ts
|
|
21
18
|
function buildSlackEditTextPayload(content, blocks) {
|
|
22
19
|
const trimmedContent = content.trim();
|
|
@@ -33,182 +30,38 @@ function buildSlackEditTextPayload(content, blocks) {
|
|
|
33
30
|
//#region extensions/slack/src/file-reference.ts
|
|
34
31
|
function formatSlackFileReference(file) {
|
|
35
32
|
const name = normalizeOptionalString(file?.name) ?? "file";
|
|
33
|
+
const mimetype = normalizeOptionalString(file?.mimetype);
|
|
34
|
+
const size = file?.size;
|
|
36
35
|
const fileId = normalizeOptionalString(file?.id);
|
|
37
|
-
|
|
36
|
+
const metadata = [
|
|
37
|
+
mimetype,
|
|
38
|
+
typeof size === "number" && Number.isSafeInteger(size) && size >= 0 ? `${size} bytes` : void 0,
|
|
39
|
+
fileId ? `fileId: ${fileId}` : void 0
|
|
40
|
+
].filter((value) => value !== void 0);
|
|
41
|
+
return metadata.length > 0 ? `${name} (${metadata.join(", ")})` : name;
|
|
38
42
|
}
|
|
39
43
|
function formatSlackFileReferenceList(files) {
|
|
40
44
|
if (!files?.length) return "file";
|
|
41
45
|
return files.map((file) => formatSlackFileReference(file)).join(", ");
|
|
42
46
|
}
|
|
43
47
|
//#endregion
|
|
44
|
-
//#region extensions/slack/src/monitor/thread.ts
|
|
45
|
-
const THREAD_STARTER_CACHE = /* @__PURE__ */ new Map();
|
|
46
|
-
const THREAD_STARTER_CACHE_TTL_MS = 360 * 6e4;
|
|
47
|
-
const THREAD_STARTER_CACHE_MAX = 2e3;
|
|
48
|
-
function evictThreadStarterCache() {
|
|
49
|
-
const now = asDateTimestampMs(Date.now());
|
|
50
|
-
if (now === void 0) {
|
|
51
|
-
THREAD_STARTER_CACHE.clear();
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
for (const [cacheKey, entry] of THREAD_STARTER_CACHE.entries()) if (asDateTimestampMs(entry.expiresAt) === void 0 || entry.expiresAt <= now) THREAD_STARTER_CACHE.delete(cacheKey);
|
|
55
|
-
pruneMapToMaxSize(THREAD_STARTER_CACHE, THREAD_STARTER_CACHE_MAX);
|
|
56
|
-
}
|
|
57
|
-
function formatSlackFilePlaceholder(files) {
|
|
58
|
-
return `[attached: ${formatSlackFileReferenceList(files)}]`;
|
|
59
|
-
}
|
|
60
|
-
function pushUniqueText(parts, value, options = {}) {
|
|
61
|
-
const text = options.preserveWhitespace ? typeof value === "string" && value.trim().length > 0 ? value : void 0 : normalizeOptionalString(value);
|
|
62
|
-
if (text && !parts.includes(text)) parts.push(text);
|
|
63
|
-
}
|
|
64
|
-
function resolveSlackBlocksFallbackText(blocks) {
|
|
65
|
-
return resolveSlackBlocksText(blocks)?.text;
|
|
66
|
-
}
|
|
67
|
-
function resolveSlackAttachmentFallbackText(attachments) {
|
|
68
|
-
if (!Array.isArray(attachments) || attachments.length === 0) return;
|
|
69
|
-
const parts = [];
|
|
70
|
-
for (const attachment of attachments) {
|
|
71
|
-
const excludeTableBlocks = isSlackUnfurlAttachment(attachment);
|
|
72
|
-
const fallbackBlocks = (blocks) => excludeTableBlocks ? blocks?.filter((block) => !hasSlackTableBlock([block])) : blocks;
|
|
73
|
-
pushUniqueText(parts, attachment.pretext);
|
|
74
|
-
pushUniqueText(parts, attachment.title);
|
|
75
|
-
pushUniqueText(parts, attachment.text);
|
|
76
|
-
if (!(hasSlackTableBlock(attachment.blocks) && normalizeOptionalString(attachment.fallback) === "[no preview available]")) pushUniqueText(parts, attachment.fallback);
|
|
77
|
-
for (const field of attachment.fields ?? []) {
|
|
78
|
-
pushUniqueText(parts, field.title);
|
|
79
|
-
pushUniqueText(parts, field.value);
|
|
80
|
-
}
|
|
81
|
-
pushUniqueText(parts, resolveSlackBlocksFallbackText(fallbackBlocks(attachment.blocks)), { preserveWhitespace: true });
|
|
82
|
-
pushUniqueText(parts, resolveSlackBlocksFallbackText(fallbackBlocks(attachment.message_blocks)), { preserveWhitespace: true });
|
|
83
|
-
}
|
|
84
|
-
return parts.length > 0 ? parts.join("\n") : void 0;
|
|
85
|
-
}
|
|
86
|
-
function resolveSlackMessageText(message) {
|
|
87
|
-
const messageText = normalizeOptionalString(message.text) ?? resolveSlackAttachmentFallbackText(message.attachments);
|
|
88
|
-
return resolveSlackMessageText$1({
|
|
89
|
-
...message,
|
|
90
|
-
text: messageText
|
|
91
|
-
}, { preserveMessageTextWhitespace: true });
|
|
92
|
-
}
|
|
93
|
-
async function resolveSlackThreadStarter(params) {
|
|
94
|
-
evictThreadStarterCache();
|
|
95
|
-
const cacheKey = params.workspaceScope ? JSON.stringify([
|
|
96
|
-
params.workspaceScope.accountId,
|
|
97
|
-
params.workspaceScope.teamId,
|
|
98
|
-
params.channelId,
|
|
99
|
-
params.threadTs
|
|
100
|
-
]) : `${params.channelId}:${params.threadTs}`;
|
|
101
|
-
const cached = THREAD_STARTER_CACHE.get(cacheKey);
|
|
102
|
-
if (cached) {
|
|
103
|
-
const now = asDateTimestampMs(Date.now());
|
|
104
|
-
if (now !== void 0 && cached.expiresAt > now) return cached.value;
|
|
105
|
-
THREAD_STARTER_CACHE.delete(cacheKey);
|
|
106
|
-
}
|
|
107
|
-
try {
|
|
108
|
-
const message = (await params.client.conversations.replies({
|
|
109
|
-
channel: params.channelId,
|
|
110
|
-
ts: params.threadTs,
|
|
111
|
-
limit: 1,
|
|
112
|
-
inclusive: true
|
|
113
|
-
}))?.messages?.[0];
|
|
114
|
-
const text = message ? resolveSlackMessageText(message) : void 0;
|
|
115
|
-
const files = message?.files?.length ? message.files : void 0;
|
|
116
|
-
if (!message || !text && !files) return null;
|
|
117
|
-
const starter = {
|
|
118
|
-
text: text || formatSlackFilePlaceholder(files),
|
|
119
|
-
userId: message.user,
|
|
120
|
-
botId: message.bot_id,
|
|
121
|
-
ts: message.ts,
|
|
122
|
-
files
|
|
123
|
-
};
|
|
124
|
-
const expiresAt = resolveExpiresAtMsFromDurationMs(THREAD_STARTER_CACHE_TTL_MS);
|
|
125
|
-
if (expiresAt !== void 0) {
|
|
126
|
-
if (THREAD_STARTER_CACHE.has(cacheKey)) THREAD_STARTER_CACHE.delete(cacheKey);
|
|
127
|
-
THREAD_STARTER_CACHE.set(cacheKey, {
|
|
128
|
-
value: starter,
|
|
129
|
-
expiresAt
|
|
130
|
-
});
|
|
131
|
-
evictThreadStarterCache();
|
|
132
|
-
}
|
|
133
|
-
return starter;
|
|
134
|
-
} catch (err) {
|
|
135
|
-
logVerbose$1(`slack thread starter fetch failed channel=${params.channelId} ts=${params.threadTs}: ${formatErrorMessage(err)}`);
|
|
136
|
-
return null;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
function resetSlackThreadStarterCacheForTest() {
|
|
140
|
-
THREAD_STARTER_CACHE.clear();
|
|
141
|
-
}
|
|
142
|
-
const SLACK_THREAD_HISTORY_MAX_PAGES = 3;
|
|
143
|
-
/**
|
|
144
|
-
* Fetches the most recent messages in a Slack thread (excluding the current message).
|
|
145
|
-
* Used to populate thread context when a new thread session starts.
|
|
146
|
-
*
|
|
147
|
-
* Uses cursor pagination and keeps only the latest N retained messages when the full
|
|
148
|
-
* thread fits in the bounded fetch window.
|
|
149
|
-
*/
|
|
150
|
-
async function resolveSlackThreadHistory(params) {
|
|
151
|
-
const maxMessages = params.limit ?? 20;
|
|
152
|
-
if (!Number.isFinite(maxMessages) || maxMessages <= 0) return [];
|
|
153
|
-
const fetchLimit = 200;
|
|
154
|
-
const retained = [];
|
|
155
|
-
let cursor;
|
|
156
|
-
let pagesFetched = 0;
|
|
157
|
-
try {
|
|
158
|
-
do {
|
|
159
|
-
pagesFetched += 1;
|
|
160
|
-
const response = await params.client.conversations.replies({
|
|
161
|
-
channel: params.channelId,
|
|
162
|
-
ts: params.threadTs,
|
|
163
|
-
limit: fetchLimit,
|
|
164
|
-
inclusive: true,
|
|
165
|
-
...cursor ? { cursor } : {}
|
|
166
|
-
});
|
|
167
|
-
for (const msg of response.messages ?? []) {
|
|
168
|
-
if (!resolveSlackMessageText(msg) && !msg.files?.length) continue;
|
|
169
|
-
if (params.currentMessageTs && msg.ts === params.currentMessageTs) continue;
|
|
170
|
-
retained.push(msg);
|
|
171
|
-
}
|
|
172
|
-
if (retained.length > maxMessages) retained.splice(0, retained.length - maxMessages);
|
|
173
|
-
const next = response.response_metadata?.next_cursor;
|
|
174
|
-
cursor = typeof next === "string" && next.trim().length > 0 ? next.trim() : void 0;
|
|
175
|
-
} while (cursor && pagesFetched < SLACK_THREAD_HISTORY_MAX_PAGES);
|
|
176
|
-
if (cursor) {
|
|
177
|
-
logVerbose$1(`slack thread history capped channel=${params.channelId} ts=${params.threadTs} pages=${SLACK_THREAD_HISTORY_MAX_PAGES}`);
|
|
178
|
-
return [];
|
|
179
|
-
}
|
|
180
|
-
return retained.map((msg) => ({
|
|
181
|
-
text: resolveSlackMessageText(msg) ?? formatSlackFilePlaceholder(msg.files),
|
|
182
|
-
userId: msg.user,
|
|
183
|
-
botId: msg.bot_id,
|
|
184
|
-
ts: msg.ts,
|
|
185
|
-
files: msg.files
|
|
186
|
-
}));
|
|
187
|
-
} catch (err) {
|
|
188
|
-
logVerbose$1(`slack thread history fetch failed channel=${params.channelId} ts=${params.threadTs}: ${formatErrorMessage(err)}`);
|
|
189
|
-
return [];
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
//#endregion
|
|
193
48
|
//#region extensions/slack/src/monitor/media.ts
|
|
194
49
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
195
50
|
SLACK_MEDIA_READ_IDLE_TIMEOUT_MS: () => SLACK_MEDIA_READ_IDLE_TIMEOUT_MS,
|
|
196
|
-
resetSlackThreadStarterCacheForTest: () => resetSlackThreadStarterCacheForTest,
|
|
197
51
|
resolveSlackAttachmentContent: () => resolveSlackAttachmentContent,
|
|
198
|
-
resolveSlackMedia: () => resolveSlackMedia
|
|
199
|
-
resolveSlackThreadHistory: () => resolveSlackThreadHistory,
|
|
200
|
-
resolveSlackThreadStarter: () => resolveSlackThreadStarter
|
|
52
|
+
resolveSlackMedia: () => resolveSlackMedia
|
|
201
53
|
});
|
|
202
|
-
function isSlackHostname(hostname) {
|
|
54
|
+
function isSlackHostname(hostname, govSlack) {
|
|
203
55
|
const normalized = normalizeHostname(hostname);
|
|
204
56
|
if (!normalized) return false;
|
|
57
|
+
if (govSlack) return normalized === "files.slack-gov.com";
|
|
205
58
|
return [
|
|
206
59
|
"slack.com",
|
|
207
60
|
"slack-edge.com",
|
|
208
61
|
"slack-files.com"
|
|
209
62
|
].some((suffix) => normalized === suffix || normalized.endsWith(`.${suffix}`));
|
|
210
63
|
}
|
|
211
|
-
function assertSlackFileUrl(rawUrl) {
|
|
64
|
+
function assertSlackFileUrl(rawUrl, govSlack) {
|
|
212
65
|
let parsed;
|
|
213
66
|
try {
|
|
214
67
|
parsed = new URL(rawUrl);
|
|
@@ -216,15 +69,15 @@ function assertSlackFileUrl(rawUrl) {
|
|
|
216
69
|
throw new Error(`Invalid Slack file URL: ${rawUrl}`);
|
|
217
70
|
}
|
|
218
71
|
if (parsed.protocol !== "https:") throw new Error(`Refusing Slack file URL with non-HTTPS protocol: ${parsed.protocol}`);
|
|
219
|
-
if (!isSlackHostname(parsed.hostname)) throw new Error(`Refusing to send Slack token to non-Slack host "${parsed.hostname}" (url: ${rawUrl})`);
|
|
72
|
+
if (!isSlackHostname(parsed.hostname, govSlack)) throw new Error(`Refusing to send Slack token to non-Slack host "${parsed.hostname}" (url: ${rawUrl})`);
|
|
220
73
|
return parsed;
|
|
221
74
|
}
|
|
222
75
|
function createSlackAuthHeaders(token) {
|
|
223
76
|
return { Authorization: `Bearer ${token}` };
|
|
224
77
|
}
|
|
225
|
-
function createSlackMediaRequest(url, token) {
|
|
78
|
+
function createSlackMediaRequest(url, token, govSlack) {
|
|
226
79
|
return {
|
|
227
|
-
url: assertSlackFileUrl(url).href,
|
|
80
|
+
url: assertSlackFileUrl(url, govSlack).href,
|
|
228
81
|
requestInit: { headers: createSlackAuthHeaders(token) }
|
|
229
82
|
};
|
|
230
83
|
}
|
|
@@ -233,11 +86,11 @@ function isMockedFetch(fetchImpl) {
|
|
|
233
86
|
const candidate = fetchImpl;
|
|
234
87
|
return candidate.mock !== void 0 || candidate["_isMockFunction"] === true;
|
|
235
88
|
}
|
|
236
|
-
function createSlackMediaFetch() {
|
|
89
|
+
function createSlackMediaFetch(govSlack) {
|
|
237
90
|
return async (input, init) => {
|
|
238
91
|
const url = resolveRequestUrl(input);
|
|
239
92
|
if (!url) throw new Error("Unsupported fetch input: expected string, URL, or Request");
|
|
240
|
-
const parsed = assertSlackFileUrl(url);
|
|
93
|
+
const parsed = assertSlackFileUrl(url, govSlack);
|
|
241
94
|
return ("dispatcher" in (init ?? {}) && !isMockedFetch(globalThis.fetch) ? fetchWithRuntimeDispatcher : globalThis.fetch)(parsed.href, {
|
|
242
95
|
...init,
|
|
243
96
|
redirect: "manual"
|
|
@@ -257,6 +110,10 @@ const SLACK_MEDIA_SSRF_POLICY = {
|
|
|
257
110
|
],
|
|
258
111
|
allowRfc2544BenchmarkRange: true
|
|
259
112
|
};
|
|
113
|
+
const SLACK_GOV_MEDIA_SSRF_POLICY = {
|
|
114
|
+
hostnameAllowlist: ["files.slack-gov.com"],
|
|
115
|
+
allowRfc2544BenchmarkRange: true
|
|
116
|
+
};
|
|
260
117
|
const SLACK_MEDIA_READ_IDLE_TIMEOUT_MS = 6e4;
|
|
261
118
|
const SLACK_MEDIA_TOTAL_TIMEOUT_MS = 12e4;
|
|
262
119
|
async function saveSlackMedia(params) {
|
|
@@ -340,16 +197,16 @@ async function fetchFreshSlackFileUrl(params) {
|
|
|
340
197
|
}
|
|
341
198
|
}
|
|
342
199
|
async function downloadSlackMediaFile(params) {
|
|
343
|
-
const { url: slackUrl, requestInit } = createSlackMediaRequest(params.url, params.token);
|
|
200
|
+
const { url: slackUrl, requestInit } = createSlackMediaRequest(params.url, params.token, params.govSlack);
|
|
344
201
|
const saved = await saveSlackMedia({
|
|
345
202
|
options: {
|
|
346
203
|
url: slackUrl,
|
|
347
|
-
fetchImpl: createSlackMediaFetch(),
|
|
204
|
+
fetchImpl: createSlackMediaFetch(params.govSlack),
|
|
348
205
|
requestInit,
|
|
349
206
|
filePathHint: params.file.name,
|
|
350
207
|
fallbackContentType: resolveSlackMediaMimetype(params.file, params.file.mimetype),
|
|
351
208
|
maxBytes: params.maxBytes,
|
|
352
|
-
ssrfPolicy: SLACK_MEDIA_SSRF_POLICY
|
|
209
|
+
ssrfPolicy: params.govSlack ? SLACK_GOV_MEDIA_SSRF_POLICY : SLACK_MEDIA_SSRF_POLICY
|
|
353
210
|
},
|
|
354
211
|
readIdleTimeoutMs: params.readIdleTimeoutMs,
|
|
355
212
|
totalTimeoutMs: params.totalTimeoutMs ?? SLACK_MEDIA_TOTAL_TIMEOUT_MS,
|
|
@@ -378,12 +235,12 @@ async function downloadSlackMediaFile(params) {
|
|
|
378
235
|
function isForwardedSlackAttachment(attachment) {
|
|
379
236
|
return attachment.is_share === true;
|
|
380
237
|
}
|
|
381
|
-
function resolveForwardedAttachmentImageUrl(attachment) {
|
|
238
|
+
function resolveForwardedAttachmentImageUrl(attachment, govSlack) {
|
|
382
239
|
const rawUrl = attachment.image_url?.trim();
|
|
383
240
|
if (!rawUrl) return null;
|
|
384
241
|
try {
|
|
385
242
|
const parsed = new URL(rawUrl);
|
|
386
|
-
if (parsed.protocol !== "https:" || !isSlackHostname(parsed.hostname)) return null;
|
|
243
|
+
if (parsed.protocol !== "https:" || !isSlackHostname(parsed.hostname, govSlack)) return null;
|
|
387
244
|
return parsed.toString();
|
|
388
245
|
} catch {
|
|
389
246
|
return null;
|
|
@@ -394,44 +251,50 @@ function resolveForwardedAttachmentImageUrl(attachment) {
|
|
|
394
251
|
* Returns `null` when no files could be downloaded.
|
|
395
252
|
*/
|
|
396
253
|
async function resolveSlackMedia(params) {
|
|
254
|
+
const govSlack = isGovSlackClient(params.client);
|
|
397
255
|
const files = params.files ?? [];
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
256
|
+
const { results } = await runTasksWithConcurrency({
|
|
257
|
+
tasks: (files.length > 8 ? files.slice(0, 8) : files).map((file) => async () => {
|
|
258
|
+
const preloaded = params.preloadedMedia?.get(file);
|
|
259
|
+
if (preloaded) return preloaded;
|
|
260
|
+
const eventUrl = file.url_private_download ?? file.url_private;
|
|
261
|
+
const url = eventUrl ?? await fetchFreshSlackFileUrl({
|
|
262
|
+
file,
|
|
263
|
+
client: params.client
|
|
264
|
+
});
|
|
265
|
+
if (!url) return null;
|
|
266
|
+
const result = await downloadSlackMediaFile({
|
|
267
|
+
file,
|
|
268
|
+
url,
|
|
269
|
+
token: params.token,
|
|
270
|
+
maxBytes: params.maxBytes,
|
|
271
|
+
readIdleTimeoutMs: params.readIdleTimeoutMs,
|
|
272
|
+
totalTimeoutMs: params.totalTimeoutMs,
|
|
273
|
+
abortSignal: params.abortSignal,
|
|
274
|
+
govSlack
|
|
275
|
+
}).catch(() => null);
|
|
276
|
+
if (result || !eventUrl) return result;
|
|
277
|
+
const freshUrl = await fetchFreshSlackFileUrl({
|
|
278
|
+
file,
|
|
279
|
+
client: params.client
|
|
280
|
+
});
|
|
281
|
+
if (!freshUrl) return null;
|
|
282
|
+
return await downloadSlackMediaFile({
|
|
283
|
+
file,
|
|
284
|
+
url: freshUrl,
|
|
285
|
+
token: params.token,
|
|
286
|
+
maxBytes: params.maxBytes,
|
|
287
|
+
readIdleTimeoutMs: params.readIdleTimeoutMs,
|
|
288
|
+
totalTimeoutMs: params.totalTimeoutMs,
|
|
289
|
+
abortSignal: params.abortSignal,
|
|
290
|
+
govSlack
|
|
291
|
+
}).catch(() => null);
|
|
292
|
+
}),
|
|
293
|
+
limit: MAX_SLACK_MEDIA_CONCURRENCY,
|
|
294
|
+
errorMode: "stop",
|
|
295
|
+
throwOnError: true
|
|
434
296
|
});
|
|
297
|
+
const resolved = results.filter((result) => result !== null);
|
|
435
298
|
return resolved.length > 0 ? resolved : null;
|
|
436
299
|
}
|
|
437
300
|
/** Extracts text and media from forwarded-message attachments. Returns null when empty. */
|
|
@@ -442,6 +305,9 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
442
305
|
if (forwardedAttachments.length === 0) return null;
|
|
443
306
|
const textBlocks = [];
|
|
444
307
|
const allMedia = [];
|
|
308
|
+
const allFiles = forwardedAttachments.flatMap((attachment) => attachment.files ?? []);
|
|
309
|
+
let unavailableImageCount = 0;
|
|
310
|
+
const govSlack = isGovSlackClient(params.client);
|
|
445
311
|
for (const att of forwardedAttachments) {
|
|
446
312
|
const text = att.text?.trim() || att.fallback?.trim();
|
|
447
313
|
if (text) {
|
|
@@ -449,16 +315,16 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
449
315
|
const heading = author ? `[Forwarded message from ${author}]` : "[Forwarded message]";
|
|
450
316
|
textBlocks.push(`${heading}\n${text}`);
|
|
451
317
|
}
|
|
452
|
-
const imageUrl = resolveForwardedAttachmentImageUrl(att);
|
|
318
|
+
const imageUrl = resolveForwardedAttachmentImageUrl(att, govSlack);
|
|
453
319
|
if (imageUrl) try {
|
|
454
|
-
const { url: slackUrl, requestInit } = createSlackMediaRequest(imageUrl, params.token);
|
|
320
|
+
const { url: slackUrl, requestInit } = createSlackMediaRequest(imageUrl, params.token, govSlack);
|
|
455
321
|
const saved = await saveSlackMedia({
|
|
456
322
|
options: {
|
|
457
323
|
url: slackUrl,
|
|
458
|
-
fetchImpl: createSlackMediaFetch(),
|
|
324
|
+
fetchImpl: createSlackMediaFetch(govSlack),
|
|
459
325
|
requestInit,
|
|
460
326
|
maxBytes: params.maxBytes,
|
|
461
|
-
ssrfPolicy: SLACK_MEDIA_SSRF_POLICY
|
|
327
|
+
ssrfPolicy: govSlack ? SLACK_GOV_MEDIA_SSRF_POLICY : SLACK_MEDIA_SSRF_POLICY
|
|
462
328
|
},
|
|
463
329
|
readIdleTimeoutMs: params.readIdleTimeoutMs,
|
|
464
330
|
totalTimeoutMs: params.totalTimeoutMs ?? SLACK_MEDIA_TOTAL_TIMEOUT_MS,
|
|
@@ -470,7 +336,9 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
470
336
|
contentType: saved.contentType,
|
|
471
337
|
placeholder: `[Forwarded image: ${label}]`
|
|
472
338
|
});
|
|
473
|
-
} catch {
|
|
339
|
+
} catch {
|
|
340
|
+
unavailableImageCount += 1;
|
|
341
|
+
}
|
|
474
342
|
if (att.files && att.files.length > 0) {
|
|
475
343
|
const fileMedia = await resolveSlackMedia({
|
|
476
344
|
files: att.files,
|
|
@@ -485,17 +353,19 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
485
353
|
}
|
|
486
354
|
}
|
|
487
355
|
const combinedText = textBlocks.join("\n\n");
|
|
488
|
-
if (!combinedText && allMedia.length === 0) return null;
|
|
356
|
+
if (!combinedText && allMedia.length === 0 && allFiles.length === 0 && unavailableImageCount === 0) return null;
|
|
489
357
|
return {
|
|
490
358
|
text: combinedText,
|
|
491
|
-
media: allMedia
|
|
359
|
+
media: allMedia,
|
|
360
|
+
unavailableImageCount,
|
|
361
|
+
...allFiles.length > 0 ? { files: allFiles } : {}
|
|
492
362
|
};
|
|
493
363
|
}
|
|
494
364
|
//#endregion
|
|
495
365
|
//#region extensions/slack/src/actions.ts
|
|
496
366
|
function renderSlackReadMessageText(message) {
|
|
497
367
|
if (!hasSlackMessageTableBlock(message)) return message;
|
|
498
|
-
const text = resolveSlackMessageText
|
|
368
|
+
const text = resolveSlackMessageText(message, { preserveMessageTextWhitespace: true });
|
|
499
369
|
return text && text !== message.text ? {
|
|
500
370
|
...message,
|
|
501
371
|
text
|
|
@@ -595,8 +465,13 @@ function hasSlackPlatformError(err, code) {
|
|
|
595
465
|
}
|
|
596
466
|
async function getClient(opts = {}, mode = "read") {
|
|
597
467
|
if (opts.client) return opts.client;
|
|
468
|
+
assertSlackDetachedTargetAllowed(opts.cfg ? resolveSlackAccount({
|
|
469
|
+
cfg: requireRuntimeConfig(opts.cfg, "Slack actions"),
|
|
470
|
+
accountId: opts.accountId
|
|
471
|
+
}).accountId : normalizeAccountId(opts.accountId), opts.teamId);
|
|
598
472
|
const token = resolveToken(opts.token, opts.accountId, opts.cfg);
|
|
599
|
-
|
|
473
|
+
if (mode === "write") return getSlackWriteClient(token, { teamId: opts.teamId });
|
|
474
|
+
return createSlackLookupClient(token, { teamId: opts.teamId });
|
|
600
475
|
}
|
|
601
476
|
async function resolveBotUserId(client) {
|
|
602
477
|
const auth = await client.auth.test();
|
|
@@ -654,11 +529,13 @@ async function listSlackReactions(channelId, messageId, opts = {}) {
|
|
|
654
529
|
})).message?.reactions ?? [];
|
|
655
530
|
}
|
|
656
531
|
async function sendSlackMessage(to, content, opts) {
|
|
532
|
+
const onDeliveryResult = Object.getOwnPropertyDescriptor(opts, SLACK_PRIVATE_ACTION_DELIVERY_RESULT)?.value;
|
|
657
533
|
return await sendMessageSlack(to, content, {
|
|
658
534
|
accountId: opts.accountId,
|
|
659
535
|
cfg: opts.cfg,
|
|
660
536
|
token: opts.token,
|
|
661
537
|
mediaUrl: opts.mediaUrl,
|
|
538
|
+
...opts.forceDocument ? { forceDocument: true } : {},
|
|
662
539
|
mediaAccess: opts.mediaAccess,
|
|
663
540
|
mediaLocalRoots: opts.mediaLocalRoots,
|
|
664
541
|
mediaReadFile: opts.mediaReadFile,
|
|
@@ -671,10 +548,14 @@ async function sendSlackMessage(to, content, opts) {
|
|
|
671
548
|
...Object.hasOwn(opts, "nativeDataFallbackBaseText") ? { nativeDataFallbackBaseText: opts.nativeDataFallbackBaseText } : {},
|
|
672
549
|
...opts.uploadFileName ? { uploadFileName: opts.uploadFileName } : {},
|
|
673
550
|
...opts.uploadTitle ? { uploadTitle: opts.uploadTitle } : {},
|
|
551
|
+
...typeof onDeliveryResult === "function" ? { onDeliveryResult } : {},
|
|
674
552
|
blocks: opts.blocks
|
|
675
553
|
});
|
|
676
554
|
}
|
|
677
555
|
async function editSlackMessage(channelId, messageId, content, opts = {}) {
|
|
556
|
+
await editSlackRenderedMessage(channelId, messageId, normalizeSlackOutboundText(content), opts);
|
|
557
|
+
}
|
|
558
|
+
async function editSlackRenderedMessage(channelId, messageId, content, opts = {}) {
|
|
678
559
|
const client = await getClient(opts, "write");
|
|
679
560
|
const blocks = opts.blocks == null ? void 0 : validateSlackBlocksArray(opts.blocks);
|
|
680
561
|
const editText = buildSlackEditTextPayload(content, blocks);
|
|
@@ -726,18 +607,20 @@ async function readSlackMessages(channelId, opts = {}) {
|
|
|
726
607
|
const exactBounds = exactMessageId ? {
|
|
727
608
|
inclusive: true,
|
|
728
609
|
latest: exactMessageId,
|
|
729
|
-
oldest:
|
|
610
|
+
oldest: exactMessageId
|
|
730
611
|
} : {
|
|
731
612
|
latest: normalizeSlackReadTimestamp(opts.before, "before"),
|
|
732
613
|
oldest: normalizeSlackReadTimestamp(opts.after, "after")
|
|
733
614
|
};
|
|
734
615
|
const client = await getClient(opts);
|
|
735
616
|
if (opts.threadId) {
|
|
617
|
+
const oldest = exactMessageId ? exactMessageId : exactBounds.oldest && Number(exactBounds.oldest) > Number(opts.threadId) ? exactBounds.oldest : opts.threadId;
|
|
736
618
|
const result = await client.conversations.replies({
|
|
737
619
|
channel: channelId,
|
|
738
620
|
ts: opts.threadId,
|
|
739
621
|
limit: readLimit,
|
|
740
|
-
...exactBounds
|
|
622
|
+
...exactBounds,
|
|
623
|
+
oldest
|
|
741
624
|
});
|
|
742
625
|
return {
|
|
743
626
|
messages: (result.messages ?? []).filter((message) => {
|
|
@@ -778,10 +661,6 @@ async function unpinSlackMessage(channelId, messageId, opts = {}) {
|
|
|
778
661
|
async function listSlackPins(channelId, opts = {}) {
|
|
779
662
|
return (await (await getClient(opts)).pins.list({ channel: channelId })).items ?? [];
|
|
780
663
|
}
|
|
781
|
-
function normalizeSlackScopeValue(value) {
|
|
782
|
-
const trimmed = value?.trim();
|
|
783
|
-
return trimmed ? trimmed : void 0;
|
|
784
|
-
}
|
|
785
664
|
function collectSlackDirectShareChannelIds(file) {
|
|
786
665
|
const ids = /* @__PURE__ */ new Set();
|
|
787
666
|
for (const group of [
|
|
@@ -792,7 +671,7 @@ function collectSlackDirectShareChannelIds(file) {
|
|
|
792
671
|
if (!Array.isArray(group)) continue;
|
|
793
672
|
for (const entry of group) {
|
|
794
673
|
if (typeof entry !== "string") continue;
|
|
795
|
-
const normalized =
|
|
674
|
+
const normalized = normalizeOptionalString(entry);
|
|
796
675
|
if (normalized) ids.add(normalized);
|
|
797
676
|
}
|
|
798
677
|
}
|
|
@@ -806,7 +685,7 @@ function collectSlackShareMaps(file) {
|
|
|
806
685
|
function collectSlackSharedChannelIds(file) {
|
|
807
686
|
const ids = /* @__PURE__ */ new Set();
|
|
808
687
|
for (const shareMap of collectSlackShareMaps(file)) for (const channelId of Object.keys(shareMap)) {
|
|
809
|
-
const normalized =
|
|
688
|
+
const normalized = normalizeOptionalString(channelId);
|
|
810
689
|
if (normalized) ids.add(normalized);
|
|
811
690
|
}
|
|
812
691
|
return ids;
|
|
@@ -819,8 +698,8 @@ function collectSlackThreadShares(file, channelId) {
|
|
|
819
698
|
for (const rawEntry of rawEntries) {
|
|
820
699
|
if (!rawEntry || typeof rawEntry !== "object" || Array.isArray(rawEntry)) continue;
|
|
821
700
|
const entry = rawEntry;
|
|
822
|
-
const ts = typeof entry.ts === "string" ?
|
|
823
|
-
const threadTs = typeof entry.thread_ts === "string" ?
|
|
701
|
+
const ts = typeof entry.ts === "string" ? normalizeOptionalString(entry.ts) : void 0;
|
|
702
|
+
const threadTs = typeof entry.thread_ts === "string" ? normalizeOptionalString(entry.thread_ts) : void 0;
|
|
824
703
|
matches.push({
|
|
825
704
|
channelId,
|
|
826
705
|
ts,
|
|
@@ -831,9 +710,9 @@ function collectSlackThreadShares(file, channelId) {
|
|
|
831
710
|
return matches;
|
|
832
711
|
}
|
|
833
712
|
function hasSlackScopeMismatch(params) {
|
|
834
|
-
const channelId =
|
|
713
|
+
const channelId = normalizeOptionalString(params.channelId);
|
|
835
714
|
if (!channelId) return false;
|
|
836
|
-
const threadId =
|
|
715
|
+
const threadId = normalizeOptionalString(params.threadId);
|
|
837
716
|
const directIds = collectSlackDirectShareChannelIds(params.file);
|
|
838
717
|
const sharedIds = collectSlackSharedChannelIds(params.file);
|
|
839
718
|
const hasChannelEvidence = directIds.size > 0 || sharedIds.size > 0;
|
|
@@ -853,7 +732,8 @@ function hasSlackScopeMismatch(params) {
|
|
|
853
732
|
*/
|
|
854
733
|
async function downloadSlackFile(fileId, opts) {
|
|
855
734
|
const token = resolveToken(opts.token, opts.accountId, opts.cfg);
|
|
856
|
-
const
|
|
735
|
+
const client = await getClient(opts);
|
|
736
|
+
const file = (await client.files.info({ file: fileId })).file;
|
|
857
737
|
if (!file?.url_private_download && !file?.url_private) return null;
|
|
858
738
|
if (hasSlackScopeMismatch({
|
|
859
739
|
file,
|
|
@@ -868,9 +748,10 @@ async function downloadSlackFile(fileId, opts) {
|
|
|
868
748
|
url_private: file.url_private,
|
|
869
749
|
url_private_download: file.url_private_download
|
|
870
750
|
}],
|
|
751
|
+
client,
|
|
871
752
|
token,
|
|
872
753
|
maxBytes: opts.maxBytes
|
|
873
754
|
}))?.[0] ?? null;
|
|
874
755
|
}
|
|
875
756
|
//#endregion
|
|
876
|
-
export {
|
|
757
|
+
export { media_exports as _, getSlackMemberInfo as a, formatSlackFileReferenceList as b, listSlackReactions as c, readSlackMessages as d, removeOwnSlackReactions as f, unpinSlackMessage as g, sendSlackMessage as h, editSlackRenderedMessage as i, pinSlackMessage as l, resolveSlackConversationName as m, downloadSlackFile as n, listSlackEmojis as o, removeSlackReaction as p, editSlackMessage as r, listSlackPins as s, deleteSlackMessage as t, reactSlackMessage as u, logVerbose$1 as v, buildSlackEditTextPayload as x, formatSlackFileReference as y };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as getSlackMemberInfo, c as listSlackReactions, d as readSlackMessages, f as removeOwnSlackReactions, g as unpinSlackMessage, h as sendSlackMessage, l as pinSlackMessage, m as resolveSlackConversationName, n as downloadSlackFile, o as listSlackEmojis, p as removeSlackReaction, r as editSlackMessage, s as listSlackPins, t as deleteSlackMessage, u as reactSlackMessage } from "./actions-DFk0ANVB.js";
|
|
2
|
+
export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, resolveSlackConversationName, sendSlackMessage, unpinSlackMessage };
|
package/dist/api.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-bbjH7IHX.js";
|
|
2
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts } from "./accounts-
|
|
3
|
-
import {
|
|
4
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
5
|
-
import { a as
|
|
6
|
-
import "./targets-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-
|
|
10
|
-
import { _ as resolveSlackWriteClientOptions, c as
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
13
|
-
import { a as
|
|
14
|
-
import {
|
|
15
|
-
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-
|
|
16
|
-
import { t as collectSlackSecurityAuditFindings } from "./security-audit-
|
|
17
|
-
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-
|
|
18
|
-
export { SLACK_DEFAULT_RETRY_OPTIONS, SLACK_MAX_BLOCKS, SLACK_WRITE_RETRY_OPTIONS,
|
|
2
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts } from "./accounts-BlzxuYle.js";
|
|
3
|
+
import { r as resolveSlackReplyToMode } from "./conversation-binding-route-DFVLUdYF.js";
|
|
4
|
+
import { t as inspectSlackAccount } from "./account-inspect-YJvFBbCR.js";
|
|
5
|
+
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId } from "./target-parsing-BnMD2ZqZ.js";
|
|
6
|
+
import "./targets-Cx5W_n3W.js";
|
|
7
|
+
import { G as buildSlackPresentationBlocks, Rt as resolveSlackAutoThreadId, W as buildSlackInteractiveBlocks, c as allowListMatches, d as normalizeSlackAllowOwnerEntry, f as normalizeSlackSlug, ft as SLACK_MAX_BLOCKS, h as resolveSlackUserAllowed, i as resolveSlackGroupToolPolicy, l as normalizeAllowList, mt as validateSlackBlocksArray, p as resolveSlackAllowListMatch, pt as parseSlackBlocksInput, r as resolveSlackGroupRequireMention, u as normalizeAllowListLower } from "./group-policy-DyfB_ZIE.js";
|
|
8
|
+
import { n as buildSlackThreadingToolContext, t as slackPlugin } from "./channel-CA5w7qDF.js";
|
|
9
|
+
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-CqMr5Rmc.js";
|
|
10
|
+
import { _ as resolveSlackWriteClientOptions, c as createSlackWebClient, d as getSlackWriteClient, f as SLACK_DEFAULT_RETRY_OPTIONS, g as resolveSlackWebClientOptions, l as createSlackWriteClient, p as SLACK_WRITE_RETRY_OPTIONS, s as createSlackTokenCacheKey, t as probeSlack } from "./probe-BVA65leh.js";
|
|
11
|
+
import { n as resolveSlackChannelType } from "./channel-type-CZWv55Wu.js";
|
|
12
|
+
import { t as slackSetupPlugin } from "./channel.setup-CpyYsEXH.js";
|
|
13
|
+
import { a as getSlackMemberInfo, c as listSlackReactions, d as readSlackMessages, f as removeOwnSlackReactions, g as unpinSlackMessage, h as sendSlackMessage, l as pinSlackMessage, n as downloadSlackFile, o as listSlackEmojis, p as removeSlackReaction, r as editSlackMessage, s as listSlackPins, t as deleteSlackMessage, u as reactSlackMessage } from "./actions-DFk0ANVB.js";
|
|
14
|
+
import { f as recordSlackThreadParticipation, l as hasSlackThreadParticipation, s as clearSlackThreadParticipationCache } from "./send-CtnOxKCc.js";
|
|
15
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-BGYyuzWh.js";
|
|
16
|
+
import { t as collectSlackSecurityAuditFindings } from "./security-audit-B_yKr7MW.js";
|
|
17
|
+
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-CUUiwsg2.js";
|
|
18
|
+
export { SLACK_DEFAULT_RETRY_OPTIONS, SLACK_MAX_BLOCKS, SLACK_WRITE_RETRY_OPTIONS, allowListMatches, buildSlackInteractiveBlocks, buildSlackPresentationBlocks, buildSlackThreadingToolContext, clearSlackThreadParticipationCache, collectSlackSecurityAuditFindings, createSlackTokenCacheKey, createSlackWebClient, createSlackWriteClient, deleteSlackMessage, downloadSlackFile, editSlackMessage, extractSlackToolSend, getSlackMemberInfo, getSlackWriteClient, handleSlackHttpRequest, hasSlackThreadParticipation, inspectSlackAccount, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig, listSlackEmojis, listSlackMessageActions, listSlackPins, listSlackReactions, looksLikeSlackTargetId, mergeSlackAccountConfig, normalizeAllowList, normalizeAllowListLower, normalizeSlackAllowOwnerEntry, normalizeSlackMessagingTarget, normalizeSlackSlug, normalizeSlackWebhookPath, parseSlackBlocksInput, parseSlackTarget, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, recordSlackThreadParticipation, registerSlackHttpHandler, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAllowListMatch, resolveSlackAutoThreadId, resolveSlackChannelId, resolveSlackChannelType, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackReplyToMode, resolveSlackRuntimeGroupPolicy, resolveSlackUserAllowed, resolveSlackWebClientOptions, resolveSlackWriteClientOptions, sendSlackMessage, slackPlugin, slackSetupPlugin, unpinSlackMessage, validateSlackBlocksArray };
|