@openclaw/slack 2026.9.1 → 2026.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{action-runtime-DND4Pyp2.js → action-runtime-DftQWpI4.js} +4 -4
- package/dist/action-runtime.runtime-rHI3UAh4.js +2 -0
- package/dist/{actions-fh66A6lc.js → actions-CFkvEv1d.js} +3 -3
- package/dist/api.js +9 -9
- package/dist/{approval-handler.runtime-D7d8sKM0.js → approval-handler.runtime-BeILKdw4.js} +31 -15
- package/dist/{channel-4m8IAdMD.js → channel-CmOuxbOD.js} +24 -23
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-3-SqEMVc.js → channel-type-BWt2CRaI.js} +2 -2
- package/dist/{channel.setup-t_ghLGb_.js → channel.setup-D5z1ReaT.js} +8 -3
- package/dist/{config-schema-bP3eV2ra.js → config-schema-JDx_f9Zb.js} +2 -2
- package/dist/{directory-live-q32AW7N1.js → directory-live-BuBPHmju.js} +1 -1
- package/dist/{monitor-Chwu_SiZ.js → monitor-DI07pfJl.js} +3 -3
- package/dist/{outbound-adapter-BB8wAjm5.js → outbound-adapter-B5QyTRpJ.js} +3 -2
- package/dist/{pipeline.runtime-BklS_NEj.js → pipeline.runtime-BdIwZgm4.js} +567 -733
- package/dist/{policy-D7PKkiet.js → policy-Bh5TOqII.js} +2 -2
- package/dist/{probe-gj5yQgN2.js → probe-Biy--yhL.js} +42 -10
- package/dist/{provider-Do50wMWn.js → provider-DoaUvAM4.js} +5583 -4921
- package/dist/{relay-source-DWuduiJ2.js → relay-source-D4uecp68.js} +1 -1
- package/dist/{replies-Dc6WVh_Q.js → replies-DENuTcPO.js} +4 -3
- package/dist/reply-blocks-PRkhyAN7.js +790 -0
- package/dist/{resolve-channels-CU7Bg5Ka.js → resolve-channels-DQGV2VrE.js} +1 -1
- package/dist/{resolve-users-DrhttvRQ.js → resolve-users-DRGt_Q4I.js} +1 -1
- package/dist/runtime-api.js +10 -10
- package/dist/{scopes-B9HRguDe.js → scopes-CZzeGdWV.js} +1 -1
- package/dist/{send-Djswy6lf.js → send-DElUcgIs.js} +10 -10
- package/dist/{send.runtime-__WVTWLQ.js → send.runtime-C8D6cKGm.js} +1 -1
- package/dist/{group-policy-BKjMqT-8.js → session-status-BynwcZSO.js} +169 -799
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-DO0e-MMS.js → setup-surface-B1_gpGBl.js} +4 -4
- package/dist/{shared-DEQBEKBL.js → shared-CNQsWJT7.js} +2 -2
- package/dist/{slash-dispatch.runtime-C3B4h5ZM.js → slash-dispatch.runtime-DhsXavSY.js} +1 -1
- package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
- package/node_modules/typebox/build/system/memory/create.mjs +3 -4
- package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
- package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
- package/node_modules/typebox/build/system/memory/update.mjs +3 -2
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
- package/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/undici/lib/handler/retry-handler.js +42 -7
- package/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/undici/lib/interceptor/decompress.js +146 -14
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/openclaw.plugin.json +3 -3
- package/package.json +6 -6
- package/skills/_vendor/slack-skills-plugin.LICENSE +21 -0
- package/skills/_vendor/slack-skills-plugin.json +31 -0
- package/skills/block-kit/SKILL.md +37 -0
- package/skills/block-kit/references/official-block-kit.md +257 -0
- package/skills/block-kit/references/official-common-patterns.md +385 -0
- package/skills/slack/SKILL.md +1 -1
- package/dist/action-runtime.runtime-CEhbmS-Z.js +0 -2
- package/dist/conversation-binding-route-Vee8Dgbf.js +0 -115
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as resolveSlackUserAllowListForTeam, T as normalizeSlackSlug } from "./probe-
|
|
1
|
+
import { i as buildSlackChannelPolicyScope, r as buildSlackChannelIdCandidates } from "./session-status-BynwcZSO.js";
|
|
2
|
+
import { D as resolveSlackUserAllowListForTeam, T as normalizeSlackSlug } from "./probe-Biy--yhL.js";
|
|
3
3
|
import { applyChannelMatchMeta, buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
|
|
4
4
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
5
5
|
//#region extensions/slack/src/monitor/channel-config.ts
|
|
@@ -3,13 +3,15 @@ import { u as formatSlackBotTokenIdentityWarning } from "./accounts-Dm_H77gH.js"
|
|
|
3
3
|
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { isRecord, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
6
7
|
import { compileAllowlist, resolveCompiledAllowlistMatch } from "openclaw/plugin-sdk/allow-from";
|
|
7
8
|
import { normalizeHyphenSlug, normalizeStringEntries as normalizeStringEntries$1, normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
8
9
|
import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
9
10
|
import { createHash } from "node:crypto";
|
|
10
|
-
import { WebClient } from "@slack/web-api";
|
|
11
|
+
import { WebAPIRateLimitedError, WebClient } from "@slack/web-api";
|
|
11
12
|
import { addActiveManagedProxyTlsOptions, resolveEnvHttpProxyAgentOptions, resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
12
13
|
import { isDebugProxyGlobalFetchPatchInstalled } from "openclaw/plugin-sdk/proxy-capture";
|
|
14
|
+
import { parseRetryAfterHeaderSeconds, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
13
15
|
import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
|
|
14
16
|
import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
15
17
|
//#region extensions/slack/src/monitor/allow-list.ts
|
|
@@ -137,6 +139,11 @@ const SLACK_DEFAULT_RETRY_OPTIONS = {
|
|
|
137
139
|
const SLACK_WRITE_RETRY_OPTIONS = { retries: 0 };
|
|
138
140
|
const SLACK_READ_TIMEOUT_MS = 3e4;
|
|
139
141
|
const SLACK_LOOKUP_RETRY_OPTIONS = { retries: 0 };
|
|
142
|
+
function normalizeSlackFetchInit(init) {
|
|
143
|
+
if (init?.body !== "") return init;
|
|
144
|
+
const { body: _body, ...rest } = init;
|
|
145
|
+
return rest;
|
|
146
|
+
}
|
|
140
147
|
/** Build the dispatcher shared by Slack Web API fetches and Socket Mode. */
|
|
141
148
|
function resolveSlackProxyDispatcher() {
|
|
142
149
|
const options = resolveEnvHttpProxyAgentOptions();
|
|
@@ -149,12 +156,16 @@ function resolveSlackProxyDispatcher() {
|
|
|
149
156
|
}
|
|
150
157
|
}
|
|
151
158
|
function buildSlackFetch(dispatcher) {
|
|
152
|
-
if (!dispatcher || isDebugProxyGlobalFetchPatchInstalled())
|
|
159
|
+
if (!dispatcher || isDebugProxyGlobalFetchPatchInstalled()) {
|
|
160
|
+
const slackFetch = resolveFetch();
|
|
161
|
+
if (!slackFetch) return;
|
|
162
|
+
return ((input, init) => slackFetch(input, normalizeSlackFetchInit(init)));
|
|
163
|
+
}
|
|
153
164
|
const { fetch: slackFetch } = loadSlackUndiciRuntime();
|
|
154
165
|
return ((input, init) => {
|
|
155
166
|
const slackInput = input;
|
|
156
167
|
const slackInit = {
|
|
157
|
-
...init,
|
|
168
|
+
...normalizeSlackFetchInit(init),
|
|
158
169
|
dispatcher
|
|
159
170
|
};
|
|
160
171
|
return slackFetch(slackInput, slackInit);
|
|
@@ -185,6 +196,27 @@ function resolveSlackWriteClientOptions(options = {}, dispatcher = resolveSlackP
|
|
|
185
196
|
const resolved = Object.assign({}, options);
|
|
186
197
|
applySlackApiUrlAndProxyOptions(resolved, dispatcher);
|
|
187
198
|
resolved.retryConfig ??= SLACK_WRITE_RETRY_OPTIONS;
|
|
199
|
+
if (resolved.rejectRateLimitedCalls !== true && resolved.retryConfig.retries === 0) {
|
|
200
|
+
const slackFetch = resolved.fetch ?? buildSlackFetch(dispatcher);
|
|
201
|
+
if (slackFetch) resolved.fetch = (input, init) => retryAsync(async () => {
|
|
202
|
+
init?.signal?.throwIfAborted();
|
|
203
|
+
const response = await slackFetch(input, init);
|
|
204
|
+
if (response.status !== 429) return response;
|
|
205
|
+
const retryAfter = parseRetryAfterHeaderSeconds(response.headers.get("retry-after"));
|
|
206
|
+
response.body?.cancel().catch(() => void 0);
|
|
207
|
+
init?.signal?.throwIfAborted();
|
|
208
|
+
if (retryAfter === void 0 || retryAfter * 1e3 > 2147e6) return response;
|
|
209
|
+
throw new WebAPIRateLimitedError(retryAfter);
|
|
210
|
+
}, {
|
|
211
|
+
attempts: 3,
|
|
212
|
+
minDelayMs: 0,
|
|
213
|
+
maxDelayMs: 0,
|
|
214
|
+
shouldRetry: (error) => error instanceof WebAPIRateLimitedError,
|
|
215
|
+
retryAfterMs: (error) => error instanceof WebAPIRateLimitedError ? error.retryAfter * 1e3 : void 0,
|
|
216
|
+
sleep: (delayMs) => sleepWithAbort(delayMs, init?.signal)
|
|
217
|
+
});
|
|
218
|
+
resolved.rejectRateLimitedCalls = true;
|
|
219
|
+
}
|
|
188
220
|
return resolved;
|
|
189
221
|
}
|
|
190
222
|
function resolveSlackLookupClientOptions(options = {}, dispatcher = resolveSlackProxyDispatcher()) {
|
|
@@ -201,7 +233,7 @@ const SLACK_WRITE_CLIENT_CACHE_MAX = 32;
|
|
|
201
233
|
const SLACK_STARTUP_AUTH_TIMEOUT_MS = 1e4;
|
|
202
234
|
const SLACK_STARTUP_AUTH_RETRY_BUDGET_MS = 35e3;
|
|
203
235
|
const slackWriteClientCache = /* @__PURE__ */ new Map();
|
|
204
|
-
const
|
|
236
|
+
const slackListenerWriteClientCache = /* @__PURE__ */ new WeakMap();
|
|
205
237
|
function createSlackWebClient(token, options = {}) {
|
|
206
238
|
return new WebClient(token, resolveSlackWebClientOptions(options));
|
|
207
239
|
}
|
|
@@ -265,11 +297,11 @@ function getSlackWriteClient(token, options = {}) {
|
|
|
265
297
|
slackWriteClientCache.set(tokenKey, client);
|
|
266
298
|
return client;
|
|
267
299
|
}
|
|
268
|
-
function
|
|
300
|
+
function getSlackListenerWriteClient(params) {
|
|
269
301
|
const token = params.listenerClient.token?.trim();
|
|
270
|
-
const teamId = params.teamId
|
|
271
|
-
if (!token
|
|
272
|
-
const cached =
|
|
302
|
+
const teamId = params.teamId?.trim().toUpperCase();
|
|
303
|
+
if (!token) return;
|
|
304
|
+
const cached = slackListenerWriteClientCache.get(params.listenerClient);
|
|
273
305
|
if (cached) return cached.teamId === teamId ? cached.client : void 0;
|
|
274
306
|
const headers = Object.fromEntries(Object.entries(params.clientOptions?.headers ?? {}).filter(([name]) => name.toLowerCase() !== "authorization"));
|
|
275
307
|
const client = new WebClient(token, resolveSlackWriteClientOptions({
|
|
@@ -280,7 +312,7 @@ function getSlackListenerUploadCompletionClient(params) {
|
|
|
280
312
|
retryConfig: SLACK_WRITE_RETRY_OPTIONS,
|
|
281
313
|
timeout: 0
|
|
282
314
|
}));
|
|
283
|
-
|
|
315
|
+
slackListenerWriteClientCache.set(params.listenerClient, {
|
|
284
316
|
teamId,
|
|
285
317
|
client
|
|
286
318
|
});
|
|
@@ -550,4 +582,4 @@ async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
|
550
582
|
}));
|
|
551
583
|
}
|
|
552
584
|
//#endregion
|
|
553
|
-
export { normalizeAllowListLower as C, resolveSlackUserAllowListForTeam as D, resolveSlackAllowListMatch as E, resolveSlackUserAllowed as O, normalizeAllowList as S, normalizeSlackSlug as T, resolveSlackLookupClientOptions as _, slackIngressIdentity as a, resolveSlackWriteClientOptions as b, createSlackReadClient as c, createSlackWebClient as d, createSlackWriteClient as f, SLACK_WRITE_RETRY_OPTIONS as g, SLACK_DEFAULT_RETRY_OPTIONS as h, createSlackIngressSubject as i, createSlackStartupAuthClient as l, getSlackWriteClient as m, probe_exports as n, formatSlackError as o,
|
|
585
|
+
export { normalizeAllowListLower as C, resolveSlackUserAllowListForTeam as D, resolveSlackAllowListMatch as E, resolveSlackUserAllowed as O, normalizeAllowList as S, normalizeSlackSlug as T, resolveSlackLookupClientOptions as _, slackIngressIdentity as a, resolveSlackWriteClientOptions as b, createSlackReadClient as c, createSlackWebClient as d, createSlackWriteClient as f, SLACK_WRITE_RETRY_OPTIONS as g, SLACK_DEFAULT_RETRY_OPTIONS as h, createSlackIngressSubject as i, createSlackStartupAuthClient as l, getSlackWriteClient as m, probe_exports as n, formatSlackError as o, getSlackListenerWriteClient as p, SLACK_USER_NAME_KIND as r, createSlackLookupClient as s, probeSlack as t, createSlackTokenCacheKey as u, resolveSlackProxyDispatcher as v, normalizeSlackAllowOwnerEntry as w, allowListMatches as x, resolveSlackWebClientOptions as y };
|