@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.
Files changed (70) hide show
  1. package/dist/{action-runtime-DND4Pyp2.js → action-runtime-DftQWpI4.js} +4 -4
  2. package/dist/action-runtime.runtime-rHI3UAh4.js +2 -0
  3. package/dist/{actions-fh66A6lc.js → actions-CFkvEv1d.js} +3 -3
  4. package/dist/api.js +9 -9
  5. package/dist/{approval-handler.runtime-D7d8sKM0.js → approval-handler.runtime-BeILKdw4.js} +31 -15
  6. package/dist/{channel-4m8IAdMD.js → channel-CmOuxbOD.js} +24 -23
  7. package/dist/channel-config-api.js +1 -1
  8. package/dist/channel-plugin-api.js +1 -1
  9. package/dist/{channel-type-3-SqEMVc.js → channel-type-BWt2CRaI.js} +2 -2
  10. package/dist/{channel.setup-t_ghLGb_.js → channel.setup-D5z1ReaT.js} +8 -3
  11. package/dist/{config-schema-bP3eV2ra.js → config-schema-JDx_f9Zb.js} +2 -2
  12. package/dist/{directory-live-q32AW7N1.js → directory-live-BuBPHmju.js} +1 -1
  13. package/dist/{monitor-Chwu_SiZ.js → monitor-DI07pfJl.js} +3 -3
  14. package/dist/{outbound-adapter-BB8wAjm5.js → outbound-adapter-B5QyTRpJ.js} +3 -2
  15. package/dist/{pipeline.runtime-BklS_NEj.js → pipeline.runtime-BdIwZgm4.js} +567 -733
  16. package/dist/{policy-D7PKkiet.js → policy-Bh5TOqII.js} +2 -2
  17. package/dist/{probe-gj5yQgN2.js → probe-Biy--yhL.js} +42 -10
  18. package/dist/{provider-Do50wMWn.js → provider-DoaUvAM4.js} +5583 -4921
  19. package/dist/{relay-source-DWuduiJ2.js → relay-source-D4uecp68.js} +1 -1
  20. package/dist/{replies-Dc6WVh_Q.js → replies-DENuTcPO.js} +4 -3
  21. package/dist/reply-blocks-PRkhyAN7.js +790 -0
  22. package/dist/{resolve-channels-CU7Bg5Ka.js → resolve-channels-DQGV2VrE.js} +1 -1
  23. package/dist/{resolve-users-DrhttvRQ.js → resolve-users-DRGt_Q4I.js} +1 -1
  24. package/dist/runtime-api.js +10 -10
  25. package/dist/{scopes-B9HRguDe.js → scopes-CZzeGdWV.js} +1 -1
  26. package/dist/{send-Djswy6lf.js → send-DElUcgIs.js} +10 -10
  27. package/dist/{send.runtime-__WVTWLQ.js → send.runtime-C8D6cKGm.js} +1 -1
  28. package/dist/{group-policy-BKjMqT-8.js → session-status-BynwcZSO.js} +169 -799
  29. package/dist/setup-plugin-api.js +1 -1
  30. package/dist/{setup-surface-DO0e-MMS.js → setup-surface-B1_gpGBl.js} +4 -4
  31. package/dist/{shared-DEQBEKBL.js → shared-CNQsWJT7.js} +2 -2
  32. package/dist/{slash-dispatch.runtime-C3B4h5ZM.js → slash-dispatch.runtime-DhsXavSY.js} +1 -1
  33. package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
  34. package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
  35. package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
  36. package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
  37. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
  38. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  39. package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
  40. package/node_modules/typebox/build/system/memory/create.mjs +3 -4
  41. package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
  42. package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
  43. package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
  44. package/node_modules/typebox/build/system/memory/update.mjs +3 -2
  45. package/node_modules/typebox/package.json +1 -1
  46. package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
  47. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  48. package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
  49. package/node_modules/undici/lib/dispatcher/client.js +6 -2
  50. package/node_modules/undici/lib/handler/cache-handler.js +21 -5
  51. package/node_modules/undici/lib/handler/retry-handler.js +42 -7
  52. package/node_modules/undici/lib/interceptor/cache.js +20 -1
  53. package/node_modules/undici/lib/interceptor/decompress.js +146 -14
  54. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  55. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
  56. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  57. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  58. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  59. package/node_modules/undici/package.json +1 -1
  60. package/node_modules/undici/types/interceptors.d.ts +2 -0
  61. package/openclaw.plugin.json +3 -3
  62. package/package.json +6 -6
  63. package/skills/_vendor/slack-skills-plugin.LICENSE +21 -0
  64. package/skills/_vendor/slack-skills-plugin.json +31 -0
  65. package/skills/block-kit/SKILL.md +37 -0
  66. package/skills/block-kit/references/official-block-kit.md +257 -0
  67. package/skills/block-kit/references/official-common-patterns.md +385 -0
  68. package/skills/slack/SKILL.md +1 -1
  69. package/dist/action-runtime.runtime-CEhbmS-Z.js +0 -2
  70. package/dist/conversation-binding-route-Vee8Dgbf.js +0 -115
@@ -1,5 +1,5 @@
1
- import { n as buildSlackChannelPolicyScope, t as buildSlackChannelIdCandidates } from "./group-policy-BKjMqT-8.js";
2
- import { D as resolveSlackUserAllowListForTeam, T as normalizeSlackSlug } from "./probe-gj5yQgN2.js";
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()) return resolveFetch();
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 slackListenerUploadCompletionClientCache = /* @__PURE__ */ new WeakMap();
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 getSlackListenerUploadCompletionClient(params) {
300
+ function getSlackListenerWriteClient(params) {
269
301
  const token = params.listenerClient.token?.trim();
270
- const teamId = params.teamId.trim().toUpperCase();
271
- if (!token || !teamId) return;
272
- const cached = slackListenerUploadCompletionClientCache.get(params.listenerClient);
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
- slackListenerUploadCompletionClientCache.set(params.listenerClient, {
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, getSlackListenerUploadCompletionClient 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 };
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 };