@openclaw/slack 2026.7.2-beta.7 → 2026.8.1-beta.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/{account-inspect-DEKpg9Ip.js → account-inspect-Drw2gAiN.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-CHAeNZOX.js → accounts-CK4AVI2_.js} +2 -2
- package/dist/{accounts.runtime-BHD4Ma2R.js → accounts.runtime-Cb7QwWBz.js} +1 -1
- package/dist/{action-runtime-DfuYoMjG.js → action-runtime-BkGe7ny_.js} +148 -76
- package/dist/action-runtime.runtime-D9I6uc0Q.js +2 -0
- package/dist/{actions-D3NuJvva.js → actions-BTDXwwE3.js} +85 -44
- package/dist/actions.runtime-DLFyUkvg.js +2 -0
- package/dist/api.js +15 -15
- package/dist/{approval-handler.runtime-BA05P0QT.js → approval-handler.runtime-CJaNzAq2.js} +51 -14
- package/dist/{block-text-DkHaoGem.js → block-text-YtiNkqmx.js} +1 -1
- package/dist/{channel-B9fVdW3s.js → channel-D_tovcUL.js} +151 -91
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-DXyos1d2.js → channel-type-B9MSdoGN.js} +9 -8
- package/dist/{config-adapter-CxBQH8fq.js → channel.setup-Bch9dYmA.js} +83 -25
- package/dist/{config-schema-SgZT6nXV.js → config-schema-xto5jFIx.js} +5 -11
- package/dist/{directory-config-CnCIAktf.js → directory-config-CNBz8lJa.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DKunWh3A.js → directory-live-CFKUtW9E.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-c4RP9bjc.js} +248 -163
- package/dist/index.js +4 -1
- package/dist/{message-tool-api-DkhFpMoy.js → message-tool-api-BykQB4AU.js} +14 -3
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-CmKz0wtI.js → monitor-1nF1NtqT.js} +3 -3
- package/dist/{outbound-adapter-BkuMp2Vs.js → outbound-adapter-S81tsswN.js} +19 -17
- package/dist/{pipeline.runtime-DgtmuYCP.js → pipeline.runtime-BvYsM5JO.js} +1087 -682
- package/dist/{policy-PRysPn23.js → policy-TapwbeaT.js} +18 -14
- package/dist/{probe-CgDsSops.js → probe-HoEg_WxB.js} +38 -18
- package/dist/{provider-DmRizMZt.js → provider-CDNvBXUi.js} +3422 -2590
- package/dist/{relay-source-Blxj8xb4.js → relay-source-C9leF11u.js} +11 -21
- package/dist/{replies-4s_Vq_z9.js → replies-CeOfv82I.js} +52 -6
- package/dist/{resolve-channels-yEqmM-3I.js → resolve-channels-CNPrxaXY.js} +39 -12
- package/dist/{resolve-users-BOrt5K-5.js → resolve-users-Dzomuwnr.js} +28 -5
- package/dist/{runtime-api-QMb-Q5Ko.js → runtime-api-Cj9nxBNv.js} +3 -3
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-BJSrkAp6.js → scopes-cYXKkrRD.js} +1 -1
- package/dist/{send-DsLeZpST.js → send-Nor0iBwY.js} +211 -105
- package/dist/{send.runtime-gUdK6V3h.js → send.runtime-BmgNe6S9.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-CbX1-Knh.js} +6 -6
- package/dist/{shared-DgIN3Dcr.js → shared-zdT5AMp-.js} +36 -42
- package/dist/{slash-dispatch.runtime-zPkyl7dB.js → slash-dispatch.runtime-Bnr9GR1S.js} +1 -1
- 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 +239 -34
- package/package.json +9 -9
- package/skills/slack/SKILL.md +10 -68
- 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
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { l as normalizeSlackSlug,
|
|
2
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
1
|
+
import { d as resolveSlackUserAllowListForTeam, l as normalizeSlackSlug, n as buildSlackChannelPolicyScope, t as buildSlackChannelIdCandidates } from "./group-policy-c4RP9bjc.js";
|
|
3
2
|
import { applyChannelMatchMeta, buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
|
|
4
3
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
5
4
|
//#region extensions/slack/src/monitor/channel-config.ts
|
|
@@ -18,14 +17,9 @@ function resolveSlackChannelConfig(params) {
|
|
|
18
17
|
const keys = channelKeys ?? Object.keys(entries);
|
|
19
18
|
const normalizedName = channelName ? normalizeSlackSlug(channelName) : "";
|
|
20
19
|
const directName = channelName ? channelName.trim() : "";
|
|
21
|
-
const channelIdLower = normalizeLowercaseStringOrEmpty(channelId);
|
|
22
|
-
const channelIdUpper = channelId.toUpperCase();
|
|
23
|
-
const channelTarget = `channel:${channelId}`;
|
|
24
|
-
const channelTargetLower = `channel:${channelIdLower}`;
|
|
25
|
-
const channelTargetUpper = `channel:${channelIdUpper}`;
|
|
26
20
|
const match = buildSlackChannelPolicyScope({
|
|
27
21
|
channels: entries,
|
|
28
|
-
candidates: buildChannelKeyCandidates(channelId,
|
|
22
|
+
candidates: buildChannelKeyCandidates(...buildSlackChannelIdCandidates(channelId, params.teamId, { allowUnscoped: params.allowUnscoped }), allowNameMatching ? channelName ? `#${directName}` : void 0 : void 0, allowNameMatching ? directName : void 0, allowNameMatching ? normalizedName : void 0)
|
|
29
23
|
});
|
|
30
24
|
const { entry: matched, wildcardEntry: fallback } = match;
|
|
31
25
|
const requireMentionDefault = defaultRequireMention ?? true;
|
|
@@ -42,17 +36,27 @@ function resolveSlackChannelConfig(params) {
|
|
|
42
36
|
const requireMention = firstDefined(resolved.requireMention, fallback?.requireMention, requireMentionDefault) ?? requireMentionDefault;
|
|
43
37
|
const ignoreOtherMentions = firstDefined(resolved.ignoreOtherMentions, fallback?.ignoreOtherMentions);
|
|
44
38
|
const allowBots = firstDefined(resolved.allowBots, fallback?.allowBots);
|
|
39
|
+
const replyToMode = firstDefined(resolved.replyToMode, fallback?.replyToMode);
|
|
40
|
+
const botLoopProtection = mergePairLoopGuardConfig(fallback?.botLoopProtection, matched?.botLoopProtection);
|
|
41
|
+
const users = resolveSlackUserAllowListForTeam({
|
|
42
|
+
allowList: firstDefined(resolved.users, fallback?.users),
|
|
43
|
+
teamId: params.teamId,
|
|
44
|
+
preserveUnmatchedScopedEntries: true
|
|
45
|
+
});
|
|
46
|
+
const skills = firstDefined(resolved.skills, fallback?.skills);
|
|
47
|
+
const systemPrompt = firstDefined(resolved.systemPrompt, fallback?.systemPrompt);
|
|
48
|
+
const presenceEvents = firstDefined(resolved.presenceEvents, fallback?.presenceEvents);
|
|
45
49
|
return applyChannelMatchMeta({
|
|
46
50
|
allowed,
|
|
47
51
|
requireMention,
|
|
48
52
|
ignoreOtherMentions,
|
|
49
|
-
replyToMode
|
|
53
|
+
replyToMode,
|
|
50
54
|
allowBots,
|
|
51
|
-
botLoopProtection
|
|
52
|
-
users:
|
|
53
|
-
skills
|
|
54
|
-
systemPrompt
|
|
55
|
-
presenceEvents
|
|
55
|
+
botLoopProtection,
|
|
56
|
+
users: users.length > 0 ? users : void 0,
|
|
57
|
+
skills,
|
|
58
|
+
systemPrompt,
|
|
59
|
+
presenceEvents
|
|
56
60
|
}, match);
|
|
57
61
|
}
|
|
58
62
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { u as formatSlackBotTokenIdentityWarning } from "./accounts-
|
|
3
|
-
import "./target-parsing-
|
|
2
|
+
import { u as formatSlackBotTokenIdentityWarning } from "./accounts-CK4AVI2_.js";
|
|
3
|
+
import "./target-parsing-BnMD2ZqZ.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -8,7 +8,8 @@ import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
|
8
8
|
import { PAIRING_APPROVED_MESSAGE, projectCredentialSnapshotFields, resolveConfiguredFromRequiredCredentialStatuses } from "openclaw/plugin-sdk/channel-status";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
import { WebClient } from "@slack/web-api";
|
|
11
|
-
import { addActiveManagedProxyTlsOptions, resolveEnvHttpProxyAgentOptions } from "openclaw/plugin-sdk/fetch-runtime";
|
|
11
|
+
import { addActiveManagedProxyTlsOptions, resolveEnvHttpProxyAgentOptions, resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
12
|
+
import { isDebugProxyGlobalFetchPatchInstalled } from "openclaw/plugin-sdk/proxy-capture";
|
|
12
13
|
import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
|
|
13
14
|
//#region extensions/slack/src/channel-api.ts
|
|
14
15
|
const SLACK_CHANNEL_META = {
|
|
@@ -54,7 +55,8 @@ function resolveSlackProxyDispatcher() {
|
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
+
function buildSlackFetch(dispatcher) {
|
|
59
|
+
if (!dispatcher || isDebugProxyGlobalFetchPatchInstalled()) return resolveFetch();
|
|
58
60
|
const { fetch: slackFetch } = loadSlackUndiciRuntime();
|
|
59
61
|
return ((input, init) => {
|
|
60
62
|
const slackInput = input;
|
|
@@ -70,13 +72,14 @@ function resolveSlackApiUrlFromEnv() {
|
|
|
70
72
|
}
|
|
71
73
|
function applySlackApiUrlAndProxyOptions(options, dispatcher) {
|
|
72
74
|
const slackApiUrl = options.slackApiUrl ?? resolveSlackApiUrlFromEnv();
|
|
73
|
-
if (dispatcher && !options.fetch) options.fetch =
|
|
75
|
+
if (dispatcher && !options.fetch) options.fetch = buildSlackFetch(dispatcher);
|
|
74
76
|
if (slackApiUrl !== void 0) options.slackApiUrl = slackApiUrl;
|
|
75
77
|
else delete options.slackApiUrl;
|
|
76
78
|
}
|
|
77
79
|
function resolveSlackWebClientOptions(options = {}, dispatcher = resolveSlackProxyDispatcher()) {
|
|
78
80
|
const resolved = Object.assign({}, options);
|
|
79
81
|
applySlackApiUrlAndProxyOptions(resolved, dispatcher);
|
|
82
|
+
resolved.fetch ??= buildSlackFetch(dispatcher);
|
|
80
83
|
resolved.retryConfig ??= SLACK_DEFAULT_RETRY_OPTIONS;
|
|
81
84
|
return resolved;
|
|
82
85
|
}
|
|
@@ -102,20 +105,42 @@ function resolveSlackLookupClientOptions(options = {}, dispatcher = resolveSlack
|
|
|
102
105
|
//#endregion
|
|
103
106
|
//#region extensions/slack/src/client.ts
|
|
104
107
|
const SLACK_WRITE_CLIENT_CACHE_MAX = 32;
|
|
108
|
+
const SLACK_STARTUP_AUTH_TIMEOUT_MS = 1e4;
|
|
109
|
+
const SLACK_STARTUP_AUTH_RETRY_BUDGET_MS = 35e3;
|
|
105
110
|
const slackWriteClientCache = /* @__PURE__ */ new Map();
|
|
106
|
-
|
|
111
|
+
const slackListenerUploadCompletionClientCache = /* @__PURE__ */ new WeakMap();
|
|
107
112
|
function createSlackWebClient(token, options = {}) {
|
|
108
113
|
return new WebClient(token, resolveSlackWebClientOptions(options));
|
|
109
114
|
}
|
|
110
115
|
function createSlackReadClient(token, options = {}) {
|
|
111
116
|
return new WebClient(token, resolveSlackReadClientOptions(options));
|
|
112
117
|
}
|
|
118
|
+
function createSlackStartupAuthFetch(baseFetch) {
|
|
119
|
+
const deadline = Date.now() + SLACK_STARTUP_AUTH_RETRY_BUDGET_MS;
|
|
120
|
+
return async (input, init) => {
|
|
121
|
+
const response = await baseFetch(input, init);
|
|
122
|
+
if (response.status !== 429) return response;
|
|
123
|
+
const retryAfter = Number.parseInt(response.headers.get("retry-after") ?? "", 10);
|
|
124
|
+
const remainingMs = Math.max(0, deadline - Date.now());
|
|
125
|
+
if (!Number.isFinite(retryAfter) || retryAfter * 1e3 <= remainingMs) return response;
|
|
126
|
+
await new Promise((resolve) => {
|
|
127
|
+
setTimeout(resolve, remainingMs);
|
|
128
|
+
});
|
|
129
|
+
throw new Error("Slack startup auth retry budget exhausted after rate limit");
|
|
130
|
+
};
|
|
131
|
+
}
|
|
113
132
|
function createSlackStartupAuthClient(token, options = {}) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
133
|
+
const resolvedOptions = resolveSlackWebClientOptions(options);
|
|
134
|
+
const baseFetch = resolvedOptions.fetch;
|
|
135
|
+
if (!baseFetch) throw new Error("Slack startup auth fetch is unavailable");
|
|
136
|
+
return new WebClient(token, {
|
|
137
|
+
...resolvedOptions,
|
|
138
|
+
fetch: createSlackStartupAuthFetch(baseFetch),
|
|
139
|
+
retryConfig: {
|
|
140
|
+
...SLACK_DEFAULT_RETRY_OPTIONS,
|
|
141
|
+
maxRetryTime: SLACK_STARTUP_AUTH_RETRY_BUDGET_MS
|
|
142
|
+
},
|
|
143
|
+
timeout: SLACK_STARTUP_AUTH_TIMEOUT_MS
|
|
119
144
|
});
|
|
120
145
|
}
|
|
121
146
|
function createSlackLookupClient(token, options = {}) {
|
|
@@ -128,8 +153,7 @@ function createSlackTokenCacheKey(token) {
|
|
|
128
153
|
return `sha256:${createHash("sha256").update(token).digest("base64url")}`;
|
|
129
154
|
}
|
|
130
155
|
function slackWriteClientCacheKey(token, options) {
|
|
131
|
-
|
|
132
|
-
return options.slackApiUrl ? `${tokenKey}:api:${options.slackApiUrl}` : tokenKey;
|
|
156
|
+
return `${createSlackTokenCacheKey(token)}${options.slackApiUrl ? `:api:${options.slackApiUrl}` : ""}${options.teamId ? `:team:${options.teamId.trim().toLowerCase()}` : ""}`;
|
|
133
157
|
}
|
|
134
158
|
function getSlackWriteClient(token, options = {}) {
|
|
135
159
|
const resolvedOptions = resolveSlackWriteClientOptions(options);
|
|
@@ -169,10 +193,6 @@ function getSlackListenerUploadCompletionClient(params) {
|
|
|
169
193
|
});
|
|
170
194
|
return client;
|
|
171
195
|
}
|
|
172
|
-
function clearSlackWriteClientCacheForTest() {
|
|
173
|
-
slackWriteClientCache.clear();
|
|
174
|
-
slackListenerUploadCompletionClientCache = /* @__PURE__ */ new WeakMap();
|
|
175
|
-
}
|
|
176
196
|
//#endregion
|
|
177
197
|
//#region extensions/slack/src/errors.ts
|
|
178
198
|
const NO_ERROR_DETAIL = "no error detail";
|
|
@@ -342,4 +362,4 @@ async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
|
342
362
|
}));
|
|
343
363
|
}
|
|
344
364
|
//#endregion
|
|
345
|
-
export { resolveConfiguredFromRequiredCredentialStatuses as S, resolveSlackWriteClientOptions as _,
|
|
365
|
+
export { resolveConfiguredFromRequiredCredentialStatuses as S, resolveSlackWriteClientOptions as _, createSlackReadClient as a, getChatChannelMeta as b, createSlackWebClient as c, getSlackWriteClient as d, SLACK_DEFAULT_RETRY_OPTIONS as f, resolveSlackWebClientOptions as g, resolveSlackProxyDispatcher as h, createSlackLookupClient as i, createSlackWriteClient as l, resolveSlackLookupClientOptions as m, probe_exports as n, createSlackStartupAuthClient as o, SLACK_WRITE_RETRY_OPTIONS as p, formatSlackError as r, createSlackTokenCacheKey as s, probeSlack as t, getSlackListenerUploadCompletionClient as u, DEFAULT_ACCOUNT_ID$1 as v, projectCredentialSnapshotFields as x, PAIRING_APPROVED_MESSAGE as y };
|