@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,16 +1,16 @@
|
|
|
1
|
-
import { n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, s as resolveSlackAccountDmPolicy } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, s as resolveSlackAccountDmPolicy } from "./accounts-CK4AVI2_.js";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-Drw2gAiN.js";
|
|
3
|
+
import { a as parseSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
|
|
3
4
|
import { t as isSlackPluginAccountConfigured } from "./account-configured-BwfXBo_F.js";
|
|
4
|
-
import { b as getChatChannelMeta, t as probeSlack } from "./probe-
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CsGH1Dfc.js";
|
|
5
|
+
import { b as getChatChannelMeta, t as probeSlack } from "./probe-HoEg_WxB.js";
|
|
6
|
+
import { n as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-Bch9dYmA.js";
|
|
7
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BAy7-EUQ.js";
|
|
8
8
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DxmvbxBF.js";
|
|
9
9
|
import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
10
10
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
11
|
import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, createDangerousNameMatchingMutableAllowlistWarningCollector, createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
12
12
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
13
|
-
import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor";
|
|
13
|
+
import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
14
14
|
//#region extensions/slack/src/security.ts
|
|
15
15
|
const resolveSlackDmPolicy = createScopedDmSecurityResolver({
|
|
16
16
|
channelKey: "slack",
|
|
@@ -55,10 +55,20 @@ const slackSecurityAdapter = {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
//#endregion
|
|
58
|
+
//#region extensions/slack/src/security-doctor.ts
|
|
59
|
+
const isSlackMutableUnqualifiedAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:(?:[sS][lL][aA][cC][kK]|[uU][sS][eE][rR]):)?(?:[UWBCGDT][A-Z0-9]{2,}|[A-Za-z0-9]{8,})|<@[A-Za-z0-9]{8,}>)$/ });
|
|
60
|
+
function isSlackMutableAllowEntry(entry) {
|
|
61
|
+
if (/^team:/i.test(entry)) try {
|
|
62
|
+
const target = parseSlackTarget(entry);
|
|
63
|
+
if (target?.kind === "user" && target.teamId) return false;
|
|
64
|
+
} catch {}
|
|
65
|
+
return isSlackMutableUnqualifiedAllowEntry(entry);
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
58
68
|
//#region extensions/slack/src/doctor.ts
|
|
59
69
|
const collectSlackMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
60
70
|
channel: "slack",
|
|
61
|
-
detector:
|
|
71
|
+
detector: isSlackMutableAllowEntry,
|
|
62
72
|
collectLists: (scope) => collectStandardAllowlistLists(scope, {
|
|
63
73
|
includeGroupAllowFrom: false,
|
|
64
74
|
includeDm: true,
|
|
@@ -78,10 +88,21 @@ const SLACK_AMBIGUOUS_LOWERCASE_CHANNEL_ID_RE = /^(?:channel:)?[cgd][a-z][a-z0-9
|
|
|
78
88
|
const SLACK_CHANNEL_NAME_RE = /^[\p{L}\p{M}\p{N}_-]{1,80}$/u;
|
|
79
89
|
const SLACK_CHANNEL_NAME_ALPHANUMERIC_RE = /[\p{L}\p{N}]/u;
|
|
80
90
|
function looksLikeSlackChannelId(channelKey) {
|
|
81
|
-
|
|
91
|
+
const workspaceChannelId = parseWorkspaceQualifiedChannelId(channelKey);
|
|
92
|
+
return workspaceChannelId !== void 0 && /^[CG]/i.test(workspaceChannelId) || SLACK_CANONICAL_CHANNEL_ID_RE.test(channelKey) || SLACK_LOWERCASE_CHANNEL_ID_RE.test(channelKey) || SLACK_PREFIXED_CANONICAL_CHANNEL_ID_RE.test(channelKey) || SLACK_PREFIXED_LOWERCASE_CHANNEL_ID_RE.test(channelKey);
|
|
82
93
|
}
|
|
83
94
|
function looksLikeSlackDmId(channelKey) {
|
|
84
|
-
|
|
95
|
+
const workspaceChannelId = parseWorkspaceQualifiedChannelId(channelKey);
|
|
96
|
+
return workspaceChannelId !== void 0 && /^D/i.test(workspaceChannelId) || SLACK_CANONICAL_DM_ID_RE.test(channelKey) || SLACK_PREFIXED_LOWERCASE_DM_ID_RE.test(channelKey);
|
|
97
|
+
}
|
|
98
|
+
function parseWorkspaceQualifiedChannelId(channelKey) {
|
|
99
|
+
if (!/^team:/i.test(channelKey)) return;
|
|
100
|
+
try {
|
|
101
|
+
const target = parseSlackTarget(channelKey);
|
|
102
|
+
return target?.kind === "channel" && target.teamId ? target.id : void 0;
|
|
103
|
+
} catch {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
85
106
|
}
|
|
86
107
|
function looksLikeSlackChannelNameKey(channelKey) {
|
|
87
108
|
const name = channelKey.startsWith("#") ? channelKey.slice(1) : channelKey;
|
|
@@ -189,29 +210,13 @@ const slackConfigAdapter = {
|
|
|
189
210
|
};
|
|
190
211
|
function createSlackPluginBase(params) {
|
|
191
212
|
return {
|
|
192
|
-
|
|
213
|
+
...slackSetupPlugin,
|
|
193
214
|
meta: {
|
|
194
|
-
...getChatChannelMeta(
|
|
215
|
+
...getChatChannelMeta(slackSetupPlugin.id),
|
|
195
216
|
preferSessionLookupForAnnounceTarget: true
|
|
196
217
|
},
|
|
197
218
|
setupWizard: params.setupWizard,
|
|
198
|
-
|
|
199
|
-
capabilities: {
|
|
200
|
-
chatTypes: [
|
|
201
|
-
"direct",
|
|
202
|
-
"channel",
|
|
203
|
-
"thread"
|
|
204
|
-
],
|
|
205
|
-
reactions: true,
|
|
206
|
-
threads: true,
|
|
207
|
-
media: true,
|
|
208
|
-
nativeCommands: true
|
|
209
|
-
},
|
|
210
|
-
commands: {
|
|
211
|
-
nativeCommandsAutoEnabled: false,
|
|
212
|
-
nativeSkillsAutoEnabled: false,
|
|
213
|
-
resolveNativeCommandName: ({ commandKey, defaultName }) => commandKey === "status" ? "agentstatus" : defaultName
|
|
214
|
-
},
|
|
219
|
+
setupContract: params.setupContract,
|
|
215
220
|
doctor: slackDoctor,
|
|
216
221
|
agentPrompt: {
|
|
217
222
|
inboundFormattingHints: () => ({
|
|
@@ -233,20 +238,10 @@ function createSlackPluginBase(params) {
|
|
|
233
238
|
"- Slack Block Kit or presentation text fields are sent as Slack mrkdwn directly; use `*bold*`, `_italic_`, `~strike~`, `<url|label>` links, and avoid Markdown headings or pipe tables there."
|
|
234
239
|
]
|
|
235
240
|
},
|
|
236
|
-
streaming: { blockStreamingCoalesceDefaults: {
|
|
237
|
-
minChars: 1500,
|
|
238
|
-
idleMs: 1e3
|
|
239
|
-
} },
|
|
240
|
-
reload: { configPrefixes: ["channels.slack"] },
|
|
241
241
|
security: slackSecurityAdapter,
|
|
242
|
-
configSchema: SlackChannelConfigSchema,
|
|
243
242
|
config: {
|
|
243
|
+
...slackSetupPlugin.config,
|
|
244
244
|
...slackConfigAdapter,
|
|
245
|
-
hasConfiguredState: ({ env }) => [
|
|
246
|
-
"SLACK_APP_TOKEN",
|
|
247
|
-
"SLACK_BOT_TOKEN",
|
|
248
|
-
"SLACK_USER_TOKEN"
|
|
249
|
-
].some((key) => typeof env?.[key] === "string" && env[key]?.trim().length > 0),
|
|
250
245
|
isConfigured: (account) => isSlackPluginAccountConfigured(account),
|
|
251
246
|
describeAccount: (account) => describeAccountSnapshot({
|
|
252
247
|
account,
|
|
@@ -260,8 +255,7 @@ function createSlackPluginBase(params) {
|
|
|
260
255
|
secrets: {
|
|
261
256
|
secretTargetRegistryEntries,
|
|
262
257
|
collectRuntimeConfigAssignments
|
|
263
|
-
}
|
|
264
|
-
setup: params.setup
|
|
258
|
+
}
|
|
265
259
|
};
|
|
266
260
|
}
|
|
267
261
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as deliverSlackSlashReplies$1 } from "./replies-
|
|
1
|
+
import { r as deliverSlackSlashReplies$1 } from "./replies-CeOfv82I.js";
|
|
2
2
|
import { resolveAgentRoute as resolveAgentRoute$1 } from "openclaw/plugin-sdk/routing";
|
|
3
3
|
import { resolveMarkdownTableMode as resolveMarkdownTableMode$1 } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
4
4
|
import { resolveConversationLabel as resolveConversationLabel$1 } from "openclaw/plugin-sdk/conversation-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
import { getChannelStreamingConfigObject, resolveChannelStreamingNativeTransport } from "openclaw/plugin-sdk/channel-
|
|
2
|
+
import { getChannelStreamingConfigObject, resolveChannelStreamingNativeTransport } from "openclaw/plugin-sdk/channel-streaming-config";
|
|
3
3
|
//#region extensions/slack/src/streaming-compat.ts
|
|
4
4
|
function normalizeStreamingMode(value) {
|
|
5
5
|
if (typeof value !== "string") return null;
|
|
@@ -20,18 +20,13 @@ function mapSlackLegacyDraftStreamModeToStreaming(mode) {
|
|
|
20
20
|
if (mode === "status_final") return "progress";
|
|
21
21
|
return "partial";
|
|
22
22
|
}
|
|
23
|
-
function mapStreamingModeToSlackLegacyDraftStreamMode(mode) {
|
|
24
|
-
if (mode === "block") return "append";
|
|
25
|
-
if (mode === "progress") return "status_final";
|
|
26
|
-
return "replace";
|
|
27
|
-
}
|
|
28
23
|
function resolveSlackStreamingMode(params = {}) {
|
|
29
24
|
const parsedStreaming = parseStreamingMode(getChannelStreamingConfigObject(params)?.mode ?? params.streaming);
|
|
30
25
|
if (parsedStreaming) return parsedStreaming;
|
|
31
26
|
const legacyStreamMode = parseSlackLegacyDraftStreamMode(params.streamMode);
|
|
32
27
|
if (legacyStreamMode) return mapSlackLegacyDraftStreamModeToStreaming(legacyStreamMode);
|
|
33
28
|
if (typeof params.streaming === "boolean") return params.streaming ? "partial" : "off";
|
|
34
|
-
return "
|
|
29
|
+
return "progress";
|
|
35
30
|
}
|
|
36
31
|
function resolveSlackNativeStreaming(params = {}) {
|
|
37
32
|
const canonical = resolveChannelStreamingNativeTransport(params);
|
|
@@ -41,4 +36,4 @@ function resolveSlackNativeStreaming(params = {}) {
|
|
|
41
36
|
return true;
|
|
42
37
|
}
|
|
43
38
|
//#endregion
|
|
44
|
-
export {
|
|
39
|
+
export { resolveSlackStreamingMode as n, resolveSlackNativeStreaming as t };
|
|
@@ -1,7 +1,42 @@
|
|
|
1
1
|
import { buildMessagingTarget, ensureTargetId, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
|
|
2
2
|
//#region extensions/slack/src/target-parsing.ts
|
|
3
3
|
const SLACK_CHANNEL_API_ID_RE = /^[CDG][0-9][A-Z0-9]{7,}$/i;
|
|
4
|
-
const SLACK_USER_API_ID_RE = /^[
|
|
4
|
+
const SLACK_USER_API_ID_RE = /^[BUW][A-Z0-9]{8,}$/i;
|
|
5
|
+
const SLACK_QUALIFIED_TARGET_RE = /^team:([^:]+):(user|channel):([^:]+)$/i;
|
|
6
|
+
function decodeSlackTargetPart(raw) {
|
|
7
|
+
try {
|
|
8
|
+
return decodeURIComponent(raw).trim() || void 0;
|
|
9
|
+
} catch {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function parseQualifiedSlackTarget(raw) {
|
|
14
|
+
const match = SLACK_QUALIFIED_TARGET_RE.exec(raw);
|
|
15
|
+
if (!match) {
|
|
16
|
+
if (/^team:/i.test(raw)) throw new Error("Slack workspace targets require team:<team-id>:channel:<channel-id> or team:<team-id>:user:<user-id>");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const teamId = decodeSlackTargetPart(match[1] ?? "");
|
|
20
|
+
const kind = match[2]?.toLowerCase();
|
|
21
|
+
const id = decodeSlackTargetPart(match[3] ?? "");
|
|
22
|
+
const idPattern = kind === "user" ? /^[BUW][A-Z0-9]+$/i : /^[CDG][A-Z0-9]+$/i;
|
|
23
|
+
if (!teamId || !/^T[A-Z0-9]+$/i.test(teamId) || !kind || !id || !idPattern.test(id)) throw new Error("Invalid Slack workspace-qualified target");
|
|
24
|
+
return {
|
|
25
|
+
kind,
|
|
26
|
+
id,
|
|
27
|
+
teamId,
|
|
28
|
+
raw,
|
|
29
|
+
normalized: `team:${teamId.toLowerCase()}:${kind}:${id.toLowerCase()}`
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function formatSlackTarget(params) {
|
|
33
|
+
const teamId = params.teamId?.trim();
|
|
34
|
+
const id = params.id.trim();
|
|
35
|
+
if (!teamId) return params.explicitKind ? `${params.kind}:${id}` : id;
|
|
36
|
+
const idPattern = params.kind === "user" ? /^[BUW][A-Z0-9]+$/i : /^[CDG][A-Z0-9]+$/i;
|
|
37
|
+
if (!/^T[A-Z0-9]+$/i.test(teamId) || !idPattern.test(id)) throw new Error("Invalid Slack workspace-qualified target");
|
|
38
|
+
return `team:${encodeURIComponent(teamId)}:${params.kind}:${encodeURIComponent(id)}`;
|
|
39
|
+
}
|
|
5
40
|
function isUnambiguousSlackUserId(rawId) {
|
|
6
41
|
const id = rawId.trim();
|
|
7
42
|
return /^[UW][A-Z0-9]+$/.test(id) || /^[uw][0-9][a-z0-9]{7,}$/.test(id);
|
|
@@ -15,6 +50,8 @@ function canonicalizeSlackApiTargetId(kind, rawId, rawTarget) {
|
|
|
15
50
|
function parseSlackTarget(raw, options = {}) {
|
|
16
51
|
const trimmed = raw.trim();
|
|
17
52
|
if (!trimmed) return;
|
|
53
|
+
const qualifiedTarget = parseQualifiedSlackTarget(trimmed);
|
|
54
|
+
if (qualifiedTarget) return qualifiedTarget;
|
|
18
55
|
const userTarget = parseMentionPrefixOrAtUserTarget({
|
|
19
56
|
raw: trimmed,
|
|
20
57
|
mentionPattern: /^<@([A-Z0-9]+)>$/i,
|
|
@@ -66,8 +103,9 @@ function looksLikeSlackTargetId(raw) {
|
|
|
66
103
|
if (/^<@([A-Z0-9]+)>$/i.test(trimmed)) return true;
|
|
67
104
|
if (/^(user|channel):/i.test(trimmed)) return true;
|
|
68
105
|
if (/^slack:/i.test(trimmed)) return true;
|
|
106
|
+
if (/^team:/i.test(trimmed)) return true;
|
|
69
107
|
if (/^[@#]/.test(trimmed)) return true;
|
|
70
108
|
return /^[CUWGD][A-Z0-9]{8,}$/i.test(trimmed);
|
|
71
109
|
}
|
|
72
110
|
//#endregion
|
|
73
|
-
export {
|
|
111
|
+
export { parseSlackTarget as a, normalizeSlackMessagingTarget as i, formatSlackTarget as n, resolveSlackChannelId as o, looksLikeSlackTargetId as r, slackTargetsMatch as s, canonicalizeSlackApiTargetId as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as parseSlackTarget, s as slackTargetsMatch } from "./target-parsing-BnMD2ZqZ.js";
|
|
2
2
|
//#region extensions/slack/src/targets.ts
|
|
3
3
|
function matchesResolvedUserTarget(target, currentMessagingTarget) {
|
|
4
4
|
const resolvedId = target.trim();
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 27 Jul 2026 17:32:10 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1185,7 +1185,7 @@ declare module "node:crypto" {
|
|
|
1185
1185
|
* and it will be impossible to extract the private key from the returned object.
|
|
1186
1186
|
* @since v11.6.0
|
|
1187
1187
|
*/
|
|
1188
|
-
function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput |
|
|
1188
|
+
function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput | KeyLike): KeyObject;
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Creates and returns a new key object containing a secret key for symmetric
|
|
1191
1191
|
* encryption or `Hmac`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "26.1.
|
|
3
|
+
"version": "26.1.2",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": "~8.3.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "359a01a58cecf5a30fb7b7a7b10c4f5c332339421ef5cbc9932fc492f472a5b4",
|
|
154
154
|
"typeScriptVersion": "5.6"
|
|
155
155
|
}
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 27 Jul 2026 17:32:10 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1185,7 +1185,7 @@ declare module "node:crypto" {
|
|
|
1185
1185
|
* and it will be impossible to extract the private key from the returned object.
|
|
1186
1186
|
* @since v11.6.0
|
|
1187
1187
|
*/
|
|
1188
|
-
function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput |
|
|
1188
|
+
function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput | KeyLike): KeyObject;
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Creates and returns a new key object containing a secret key for symmetric
|
|
1191
1191
|
* encryption or `Hmac`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "26.1.
|
|
3
|
+
"version": "26.1.2",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": "~8.3.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "359a01a58cecf5a30fb7b7a7b10c4f5c332339421ef5cbc9932fc492f472a5b4",
|
|
154
154
|
"typeScriptVersion": "5.6"
|
|
155
155
|
}
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 27 Jul 2026 17:32:10 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1185,7 +1185,7 @@ declare module "node:crypto" {
|
|
|
1185
1185
|
* and it will be impossible to extract the private key from the returned object.
|
|
1186
1186
|
* @since v11.6.0
|
|
1187
1187
|
*/
|
|
1188
|
-
function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput |
|
|
1188
|
+
function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput | KeyLike): KeyObject;
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Creates and returns a new key object containing a secret key for symmetric
|
|
1191
1191
|
* encryption or `Hmac`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "26.1.
|
|
3
|
+
"version": "26.1.2",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": "~8.3.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "359a01a58cecf5a30fb7b7a7b10c4f5c332339421ef5cbc9932fc492f472a5b4",
|
|
154
154
|
"typeScriptVersion": "5.6"
|
|
155
155
|
}
|
|
@@ -218,17 +218,62 @@ class MemoryCacheStore extends EventEmitter {
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
function findEntry (key, entries, now) {
|
|
221
|
-
|
|
222
|
-
entry
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
221
|
+
for (let i = 0; i < entries.length; i++) {
|
|
222
|
+
const entry = entries[i]
|
|
223
|
+
if (
|
|
224
|
+
entry.deleteAt > now &&
|
|
225
|
+
entry.method === key.method &&
|
|
226
|
+
varyMatches(key, entry)
|
|
227
|
+
) {
|
|
228
|
+
return entry
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function varyMatches (key, entry) {
|
|
234
|
+
if (entry.vary == null) {
|
|
235
|
+
return true
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
for (const headerName in entry.vary) {
|
|
239
|
+
if (Object.hasOwn(entry.vary, headerName) && !headerValueEquals(key.headers?.[headerName], entry.vary[headerName])) {
|
|
240
|
+
return false
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return true
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @param {string|string[]|null|undefined} lhs
|
|
249
|
+
* @param {string|string[]|null|undefined} rhs
|
|
250
|
+
* @returns {boolean}
|
|
251
|
+
*/
|
|
252
|
+
function headerValueEquals (lhs, rhs) {
|
|
253
|
+
if (lhs == null && rhs == null) {
|
|
254
|
+
return true
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if ((lhs == null && rhs != null) ||
|
|
258
|
+
(lhs != null && rhs == null)) {
|
|
259
|
+
return false
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (Array.isArray(lhs) && Array.isArray(rhs)) {
|
|
263
|
+
if (lhs.length !== rhs.length) {
|
|
264
|
+
return false
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
for (let i = 0; i < lhs.length; i++) {
|
|
268
|
+
if (lhs[i] !== rhs[i]) {
|
|
269
|
+
return false
|
|
227
270
|
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return true
|
|
274
|
+
}
|
|
228
275
|
|
|
229
|
-
|
|
230
|
-
}))
|
|
231
|
-
))
|
|
276
|
+
return lhs === rhs
|
|
232
277
|
}
|
|
233
278
|
|
|
234
279
|
module.exports = MemoryCacheStore
|
|
@@ -454,7 +454,13 @@ function headerValueEquals (lhs, rhs) {
|
|
|
454
454
|
return false
|
|
455
455
|
}
|
|
456
456
|
|
|
457
|
-
|
|
457
|
+
for (let i = 0; i < lhs.length; i++) {
|
|
458
|
+
if (lhs[i] !== rhs[i]) {
|
|
459
|
+
return false
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
return true
|
|
458
464
|
}
|
|
459
465
|
|
|
460
466
|
return lhs === rhs
|
|
@@ -390,7 +390,13 @@ function processHeader (request, key, val) {
|
|
|
390
390
|
} else if (typeof val[i] === 'object') {
|
|
391
391
|
throw new InvalidArgumentError(`invalid ${key} header`)
|
|
392
392
|
} else {
|
|
393
|
-
|
|
393
|
+
// Coerce primitives (and reject unsafe coercions such as functions
|
|
394
|
+
// with a crafted toString/Symbol.toPrimitive).
|
|
395
|
+
const str = `${val[i]}`
|
|
396
|
+
if (!isValidHeaderValue(str)) {
|
|
397
|
+
throw new InvalidArgumentError(`invalid ${key} header`)
|
|
398
|
+
}
|
|
399
|
+
arr.push(str)
|
|
394
400
|
}
|
|
395
401
|
}
|
|
396
402
|
val = arr
|
|
@@ -401,7 +407,12 @@ function processHeader (request, key, val) {
|
|
|
401
407
|
} else if (val === null) {
|
|
402
408
|
val = ''
|
|
403
409
|
} else {
|
|
410
|
+
// Coerce primitives (and reject unsafe coercions such as functions
|
|
411
|
+
// with a crafted toString/Symbol.toPrimitive).
|
|
404
412
|
val = `${val}`
|
|
413
|
+
if (!isValidHeaderValue(val)) {
|
|
414
|
+
throw new InvalidArgumentError(`invalid ${key} header`)
|
|
415
|
+
}
|
|
405
416
|
}
|
|
406
417
|
|
|
407
418
|
if (headerName === 'host') {
|
|
@@ -10,6 +10,7 @@ const {
|
|
|
10
10
|
RequestContentLengthMismatchError,
|
|
11
11
|
ResponseContentLengthMismatchError,
|
|
12
12
|
RequestAbortedError,
|
|
13
|
+
InvalidArgumentError,
|
|
13
14
|
HeadersTimeoutError,
|
|
14
15
|
HeadersOverflowError,
|
|
15
16
|
SocketError,
|
|
@@ -1134,8 +1135,16 @@ function writeH1 (client, request) {
|
|
|
1134
1135
|
}
|
|
1135
1136
|
body = bodyStream.stream
|
|
1136
1137
|
contentLength = bodyStream.length
|
|
1137
|
-
} else if (util.isBlobLike(body) && request.contentType == null
|
|
1138
|
-
|
|
1138
|
+
} else if (util.isBlobLike(body) && request.contentType == null) {
|
|
1139
|
+
const contentType = body.type
|
|
1140
|
+
if (contentType) {
|
|
1141
|
+
const contentTypeValue = `${contentType}`
|
|
1142
|
+
if (!util.isValidHeaderValue(contentTypeValue)) {
|
|
1143
|
+
util.errorRequest(client, request, new InvalidArgumentError('invalid content-type header'))
|
|
1144
|
+
return false
|
|
1145
|
+
}
|
|
1146
|
+
headers.push('content-type', contentTypeValue)
|
|
1147
|
+
}
|
|
1139
1148
|
}
|
|
1140
1149
|
|
|
1141
1150
|
if (body && typeof body.read === 'function') {
|