@openclaw/slack 2026.7.1 → 2026.7.2-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/accounts.runtime-KvftRRek.js +2 -0
- package/dist/{action-runtime-DoQGk_8D.js → action-runtime-Cee2ih0s.js} +209 -30
- package/dist/action-runtime.runtime-DZfd7IFr.js +2 -0
- package/dist/{actions-DMpDmKEA.js → actions-BZiuSTIq.js} +88 -143
- package/dist/{actions.runtime-C103_BPW.js → actions.runtime-DoD0-gxw.js} +1 -1
- package/dist/api.js +14 -13
- package/dist/{approval-handler.runtime-CIUbOt5T.js → approval-handler.runtime-CUPtIM4k.js} +3 -3
- package/dist/{channel-BjlsaGHn.js → channel-DaIiGUOp.js} +119 -141
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/channel-type-Cfm6_6n1.js +109 -0
- package/dist/{channel.setup-Dq6syTNU.js → channel.setup-C-mLz50O.js} +3 -3
- package/dist/{client-DGxwSL7f.js → client-WIPAS3Yr.js} +46 -2
- package/dist/config-api-Df9a1B8C.js +3 -0
- package/dist/{config-schema-BzqzFW__.js → config-schema-xPSnK2VK.js} +32 -37
- package/dist/cursor-pages-DSmTg0su.js +13 -0
- package/dist/{directory-config-BZuS8141.js → directory-config-DRkFujwG.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-BNsxCgqP.js → directory-live-D_yZhjgp.js} +2 -2
- package/dist/{doctor-contract-XL6HeNCb.js → doctor-contract-DddfkMlF.js} +25 -38
- package/dist/doctor-contract-api.js +1 -1
- package/dist/group-policy-85UWiriS.js +2345 -0
- package/dist/{interactive-replies-CXpT-vA_.js → interactive-replies-BilWUdcI.js} +5 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-BgWKyu2r.js → message-tool-api-CA9jZrCY.js} +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Ux-wzUWI.js → monitor-CalGciTs.js} +3 -3
- package/dist/outbound-adapter-BiLKcnyH.js +228 -0
- package/dist/{pipeline.runtime-rpVpay59.js → pipeline.runtime-DofAvTtb.js} +657 -221
- package/dist/{policy-Dj-puVPb.js → policy-BVs4LiSa.js} +7 -7
- package/dist/preflight-audio.runtime-D5Bgags0.js +3 -0
- package/dist/{probe-CuwRDE5j.js → probe-CN0ssfLN.js} +2 -2
- package/dist/{provider-C1-DFSpw.js → provider-CmeoUiIM.js} +907 -206
- package/dist/{relay-source-D2jv1iGg.js → relay-source-DMmgtvg4.js} +6 -17
- package/dist/replies-CJJCp6qz.js +420 -0
- package/dist/{resolve-channels-CstkChBE.js → resolve-channels-Rfts6POK.js} +17 -6
- package/dist/{resolve-users-C3NP2c-Q.js → resolve-users-y6wAxR8E.js} +11 -6
- package/dist/runtime-JSVZSWAj.js +8 -0
- package/dist/{runtime-api-CEmqYxR-.js → runtime-api-BGDyOt1D.js} +3 -3
- package/dist/runtime-api.js +11 -11
- package/dist/runtime-setter-api.js +1 -1
- package/dist/{scopes-DCWVD5-8.js → scopes-CuxNQZ6v.js} +2 -2
- package/dist/{secret-contract-C3ChHo5A.js → secret-contract-CMohXFWS.js} +18 -113
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-DKDXoeoV.js → send-DYp8ca-l.js} +662 -325
- package/dist/{send.runtime-GPRa63l1.js → send.runtime-CJLxAt26.js} +1 -1
- package/dist/{setup-core-fGd6Gquy.js → setup-core-CkwVLzFO.js} +15 -21
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-Dv2fIJNB.js → setup-surface-oSd3NX9J.js} +4 -4
- package/dist/{shared-CosfcFri.js → shared-D9yz5Otg.js} +17 -38
- package/dist/{slash-dispatch.runtime-CcMbbT3_.js → slash-dispatch.runtime-CSja9VuD.js} +1 -1
- package/dist/{streaming-compat-DjlgH-Be.js → streaming-compat-3_X-21wW.js} +1 -0
- package/dist/{target-parsing-3jYH8LfB.js → target-parsing-N6lHogYZ.js} +16 -3
- package/dist/{targets-Dll4NJgs.js → targets-KmjP2E8s.js} +1 -1
- package/node_modules/p-map/index.d.ts +155 -0
- package/node_modules/p-map/index.js +284 -0
- package/node_modules/p-map/license +9 -0
- package/node_modules/p-map/package.json +57 -0
- package/node_modules/p-map/readme.md +190 -0
- package/npm-shrinkwrap.json +16 -3
- package/openclaw.plugin.json +84 -0
- package/package.json +7 -7
- package/dist/accounts.runtime-DWvaCb-X.js +0 -2
- package/dist/action-runtime.runtime-BABj3aM-.js +0 -2
- package/dist/config-api-DnT9ohtE.js +0 -2
- package/dist/configured-state.js +0 -11
- package/dist/format-YCNoNkM2.js +0 -107
- package/dist/outbound-adapter-DVoBfBW5.js +0 -272
- package/dist/replies-DpF38e1y.js +0 -287
- package/dist/reply-blocks-BGQ6zSqM.js +0 -877
- package/dist/resolve-allowlist-common-CP8SH0Zf.js +0 -43
- package/dist/runtime-BOk7xkOl.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./target-parsing-
|
|
1
|
+
import "./target-parsing-N6lHogYZ.js";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
3
3
|
import { PAIRING_APPROVED_MESSAGE, projectCredentialSnapshotFields, resolveConfiguredFromRequiredCredentialStatuses } from "openclaw/plugin-sdk/channel-status";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -29,6 +29,8 @@ const SLACK_DEFAULT_RETRY_OPTIONS = {
|
|
|
29
29
|
randomize: true
|
|
30
30
|
};
|
|
31
31
|
const SLACK_WRITE_RETRY_OPTIONS = { retries: 0 };
|
|
32
|
+
const SLACK_LOOKUP_TIMEOUT_MS = 3e4;
|
|
33
|
+
const SLACK_LOOKUP_RETRY_OPTIONS = { retries: 0 };
|
|
32
34
|
/**
|
|
33
35
|
* Build an HTTPS proxy agent from env vars (HTTPS_PROXY, HTTP_PROXY, etc.)
|
|
34
36
|
* for use as the `agent` option in Slack WebClient and Socket Mode connections.
|
|
@@ -75,13 +77,33 @@ function resolveSlackWriteClientOptions(options = {}) {
|
|
|
75
77
|
resolved.retryConfig ??= SLACK_WRITE_RETRY_OPTIONS;
|
|
76
78
|
return resolved;
|
|
77
79
|
}
|
|
80
|
+
function resolveSlackLookupClientOptions(options = {}) {
|
|
81
|
+
const resolved = Object.assign({}, options);
|
|
82
|
+
applySlackApiUrlAndProxyOptions(resolved);
|
|
83
|
+
resolved.rejectRateLimitedCalls = true;
|
|
84
|
+
resolved.retryConfig = SLACK_LOOKUP_RETRY_OPTIONS;
|
|
85
|
+
resolved.timeout ??= SLACK_LOOKUP_TIMEOUT_MS;
|
|
86
|
+
return resolved;
|
|
87
|
+
}
|
|
78
88
|
//#endregion
|
|
79
89
|
//#region extensions/slack/src/client.ts
|
|
80
90
|
const SLACK_WRITE_CLIENT_CACHE_MAX = 32;
|
|
81
91
|
const slackWriteClientCache = /* @__PURE__ */ new Map();
|
|
92
|
+
let slackListenerUploadCompletionClientCache = /* @__PURE__ */ new WeakMap();
|
|
82
93
|
function createSlackWebClient(token, options = {}) {
|
|
83
94
|
return new WebClient(token, resolveSlackWebClientOptions(options));
|
|
84
95
|
}
|
|
96
|
+
function createSlackStartupAuthClient(token, options = {}) {
|
|
97
|
+
return createSlackWebClient(token, {
|
|
98
|
+
...options,
|
|
99
|
+
rejectRateLimitedCalls: true,
|
|
100
|
+
retryConfig: { retries: 0 },
|
|
101
|
+
timeout: 1e4
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function createSlackLookupClient(token, options = {}) {
|
|
105
|
+
return new WebClient(token, resolveSlackLookupClientOptions(options));
|
|
106
|
+
}
|
|
85
107
|
function createSlackWriteClient(token, options = {}) {
|
|
86
108
|
return new WebClient(token, resolveSlackWriteClientOptions(options));
|
|
87
109
|
}
|
|
@@ -109,8 +131,30 @@ function getSlackWriteClient(token, options = {}) {
|
|
|
109
131
|
slackWriteClientCache.set(tokenKey, client);
|
|
110
132
|
return client;
|
|
111
133
|
}
|
|
134
|
+
function getSlackListenerUploadCompletionClient(params) {
|
|
135
|
+
const token = params.listenerClient.token?.trim();
|
|
136
|
+
const teamId = params.teamId.trim().toUpperCase();
|
|
137
|
+
if (!token || !teamId) return;
|
|
138
|
+
const cached = slackListenerUploadCompletionClientCache.get(params.listenerClient);
|
|
139
|
+
if (cached) return cached.teamId === teamId ? cached.client : void 0;
|
|
140
|
+
const headers = Object.fromEntries(Object.entries(params.clientOptions?.headers ?? {}).filter(([name]) => name.toLowerCase() !== "authorization"));
|
|
141
|
+
const client = new WebClient(token, resolveSlackWriteClientOptions({
|
|
142
|
+
...params.clientOptions,
|
|
143
|
+
headers,
|
|
144
|
+
slackApiUrl: params.listenerClient.slackApiUrl,
|
|
145
|
+
teamId,
|
|
146
|
+
retryConfig: SLACK_WRITE_RETRY_OPTIONS,
|
|
147
|
+
timeout: 0
|
|
148
|
+
}));
|
|
149
|
+
slackListenerUploadCompletionClientCache.set(params.listenerClient, {
|
|
150
|
+
teamId,
|
|
151
|
+
client
|
|
152
|
+
});
|
|
153
|
+
return client;
|
|
154
|
+
}
|
|
112
155
|
function clearSlackWriteClientCacheForTest() {
|
|
113
156
|
slackWriteClientCache.clear();
|
|
157
|
+
slackListenerUploadCompletionClientCache = /* @__PURE__ */ new WeakMap();
|
|
114
158
|
}
|
|
115
159
|
//#endregion
|
|
116
|
-
export {
|
|
160
|
+
export { resolveConfiguredFromRequiredCredentialStatuses as _, createSlackWebClient as a, getSlackWriteClient as c, resolveSlackWebClientOptions as d, resolveSlackWriteClientOptions as f, projectCredentialSnapshotFields as g, getChatChannelMeta as h, createSlackTokenCacheKey as i, SLACK_DEFAULT_RETRY_OPTIONS as l, PAIRING_APPROVED_MESSAGE as m, createSlackLookupClient as n, createSlackWriteClient as o, DEFAULT_ACCOUNT_ID$1 as p, createSlackStartupAuthClient as r, getSlackListenerUploadCompletionClient as s, clearSlackWriteClientCacheForTest as t, SLACK_WRITE_RETRY_OPTIONS as u };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { n as buildChannelConfigSchema, t as SlackConfigSchema } from "./config-api-
|
|
1
|
+
import { n as buildChannelConfigSchema, t as SlackConfigSchema } from "./config-api-Df9a1B8C.js";
|
|
2
|
+
import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
|
|
2
3
|
//#endregion
|
|
3
4
|
//#region extensions/slack/src/config-schema.ts
|
|
4
5
|
const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { uiHints: {
|
|
@@ -6,42 +7,24 @@ const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { u
|
|
|
6
7
|
label: "Slack",
|
|
7
8
|
help: "Slack channel provider configuration for bot/app tokens, streaming behavior, and DM policy controls. Keep token handling and thread behavior explicit to avoid noisy workspace interactions."
|
|
8
9
|
},
|
|
9
|
-
|
|
10
|
-
label: "Slack
|
|
11
|
-
help: "
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
help: "\"allow\" enables configured regex mention patterns unless denyIn matches; \"deny\" disables them unless allowIn matches."
|
|
28
|
-
},
|
|
29
|
-
"mentionPatterns.allowIn": {
|
|
30
|
-
label: "Slack Mention Pattern Allowlist",
|
|
31
|
-
help: "Slack channel IDs where configured regex mention patterns are enabled when mode is deny."
|
|
32
|
-
},
|
|
33
|
-
"mentionPatterns.denyIn": {
|
|
34
|
-
label: "Slack Mention Pattern Denylist",
|
|
35
|
-
help: "Slack channel IDs where configured regex mention patterns are disabled. Native @mentions still trigger."
|
|
36
|
-
},
|
|
37
|
-
"commands.native": {
|
|
38
|
-
label: "Slack Native Commands",
|
|
39
|
-
help: "Override native commands for Slack (bool or \"auto\")."
|
|
40
|
-
},
|
|
41
|
-
"commands.nativeSkills": {
|
|
42
|
-
label: "Slack Native Skill Commands",
|
|
43
|
-
help: "Override native skill commands for Slack (bool or \"auto\")."
|
|
44
|
-
},
|
|
10
|
+
enterpriseOrgInstall: {
|
|
11
|
+
label: "Slack Enterprise Grid Org Install",
|
|
12
|
+
help: "Enable only for an Enterprise Grid org-wide bot installation. OpenClaw verifies the token with Slack auth.test at startup; DMs must be disabled or use dmPolicy=\"open\" with allowFrom=[\"*\"]."
|
|
13
|
+
},
|
|
14
|
+
...createChannelConfigUiHints({
|
|
15
|
+
channelLabel: "Slack",
|
|
16
|
+
dmPolicy: {
|
|
17
|
+
channelKey: "slack",
|
|
18
|
+
includeLegacyNestedPolicy: true
|
|
19
|
+
},
|
|
20
|
+
configWrites: true,
|
|
21
|
+
mentionPatterns: {
|
|
22
|
+
targetDescription: "Slack channel IDs",
|
|
23
|
+
policyNote: "Native Slack @mentions still trigger even when regex patterns are denied.",
|
|
24
|
+
denyNote: "Native @mentions still trigger."
|
|
25
|
+
},
|
|
26
|
+
nativeCommands: true
|
|
27
|
+
}),
|
|
45
28
|
allowBots: {
|
|
46
29
|
label: "Slack Allow Bot Messages",
|
|
47
30
|
help: "Allow bot-authored messages to trigger Slack replies (default: false)."
|
|
@@ -122,6 +105,18 @@ const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { u
|
|
|
122
105
|
label: "Slack Exec Approvals",
|
|
123
106
|
help: "Slack-native exec approval routing and approver authorization. When unset, OpenClaw auto-enables DM-first native approvals if approvers can be resolved for this workspace account."
|
|
124
107
|
},
|
|
108
|
+
presenceEvents: {
|
|
109
|
+
label: "Slack Presence Events",
|
|
110
|
+
help: "Poll observed human participants and wake the routed agent on away-to-active transitions. Default: \"off\"."
|
|
111
|
+
},
|
|
112
|
+
"presenceEvents.mode": {
|
|
113
|
+
label: "Slack Presence Event Mode",
|
|
114
|
+
help: "\"off\" disables polling; \"auto\" covers DMs, MPIMs, and recent threads with up to 8 observed people; \"on\" also covers larger threads and top-level channels."
|
|
115
|
+
},
|
|
116
|
+
"channels.*.presenceEvents.mode": {
|
|
117
|
+
label: "Slack Channel Presence Event Mode",
|
|
118
|
+
help: "Override presence events for one Slack channel. Use \"on\" to include large threads or top-level channel sessions."
|
|
119
|
+
},
|
|
125
120
|
"execApprovals.enabled": {
|
|
126
121
|
label: "Slack Exec Approvals Enabled",
|
|
127
122
|
help: "Controls Slack native exec approvals for this account: unset or \"auto\" enables DM-first native approvals when approvers can be resolved, true forces native approvals on, and false disables them."
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region extensions/slack/src/cursor-pages.ts
|
|
2
|
+
async function collectSlackCursorPages(params) {
|
|
3
|
+
const items = [];
|
|
4
|
+
let cursor;
|
|
5
|
+
do {
|
|
6
|
+
const response = await params.fetchPage(cursor);
|
|
7
|
+
items.push(...params.collectPageItems(response));
|
|
8
|
+
cursor = response.response_metadata?.next_cursor?.trim() || void 0;
|
|
9
|
+
} while (cursor);
|
|
10
|
+
return items;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { collectSlackCursorPages as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-BOJJiHSr.js";
|
|
3
|
-
import {
|
|
4
|
-
import "./targets-
|
|
3
|
+
import { i as parseSlackTarget } from "./target-parsing-N6lHogYZ.js";
|
|
4
|
+
import "./targets-KmjP2E8s.js";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-DRkFujwG.js";
|
|
2
2
|
export { listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { a as resolveSlackAccount } from "./accounts-BOJJiHSr.js";
|
|
3
|
-
import {
|
|
3
|
+
import { n as createSlackLookupClient } from "./client-WIPAS3Yr.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/slack/src/directory-live.ts
|
|
6
6
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -14,7 +14,7 @@ function createSlackDirectoryClient(params) {
|
|
|
14
14
|
accountId: params.accountId
|
|
15
15
|
});
|
|
16
16
|
const token = account.userToken ?? account.botToken?.trim();
|
|
17
|
-
return token ?
|
|
17
|
+
return token ? createSlackLookupClient(token) : null;
|
|
18
18
|
}
|
|
19
19
|
function normalizeQuery(value) {
|
|
20
20
|
return normalizeLowercaseStringOrEmpty(value);
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode } from "./streaming-compat-
|
|
2
|
-
import { asObjectRecord,
|
|
1
|
+
import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode } from "./streaming-compat-3_X-21wW.js";
|
|
2
|
+
import { asObjectRecord, defineChannelAliasMigration } from "openclaw/plugin-sdk/runtime-doctor";
|
|
3
3
|
//#region extensions/slack/src/doctor-contract.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const streamingAliasMigration = defineChannelAliasMigration({
|
|
5
|
+
channelId: "slack",
|
|
6
|
+
streaming: {
|
|
7
|
+
defaultMode: "partial",
|
|
8
|
+
resolveMode: resolveSlackStreamingMode,
|
|
9
|
+
resolveNativeTransport: resolveSlackNativeStreaming
|
|
10
|
+
},
|
|
11
|
+
dm: {
|
|
12
|
+
root: true,
|
|
13
|
+
accounts: true
|
|
14
|
+
}
|
|
15
|
+
});
|
|
7
16
|
function hasLegacySlackChannelAllowAlias(value) {
|
|
8
17
|
const channels = asObjectRecord(asObjectRecord(value)?.channels);
|
|
9
18
|
if (!channels) return false;
|
|
@@ -30,20 +39,7 @@ function normalizeSlackChannelAllowAliases(params) {
|
|
|
30
39
|
};
|
|
31
40
|
}
|
|
32
41
|
const legacyConfigRules = [
|
|
33
|
-
|
|
34
|
-
path: ["channels", "slack"],
|
|
35
|
-
message: "channels.slack.streamMode, channels.slack.streaming (scalar), chunkMode, blockStreaming, blockStreamingCoalesce, and nativeStreaming are legacy; use channels.slack.streaming.{mode,chunkMode,block.enabled,block.coalesce,nativeTransport}.",
|
|
36
|
-
match: hasLegacySlackStreamingAliases
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
path: [
|
|
40
|
-
"channels",
|
|
41
|
-
"slack",
|
|
42
|
-
"accounts"
|
|
43
|
-
],
|
|
44
|
-
message: "channels.slack.accounts.<id>.streamMode, streaming (scalar), chunkMode, blockStreaming, blockStreamingCoalesce, and nativeStreaming are legacy; use channels.slack.accounts.<id>.streaming.{mode,chunkMode,block.enabled,block.coalesce,nativeTransport}.",
|
|
45
|
-
match: (value) => hasLegacyAccountStreamingAliases(value, hasLegacySlackStreamingAliases)
|
|
46
|
-
},
|
|
42
|
+
...streamingAliasMigration.legacyConfigRules,
|
|
47
43
|
{
|
|
48
44
|
path: ["channels", "slack"],
|
|
49
45
|
message: "channels.slack.channels.<id>.allow is legacy; use channels.slack.channels.<id>.enabled instead. Run \"openclaw doctor --fix\".",
|
|
@@ -64,27 +60,18 @@ const legacyConfigRules = [
|
|
|
64
60
|
}
|
|
65
61
|
];
|
|
66
62
|
function normalizeCompatibilityConfig({ cfg }) {
|
|
67
|
-
const
|
|
63
|
+
const changes = [];
|
|
64
|
+
const aliases = streamingAliasMigration.normalizeChannelConfig({
|
|
65
|
+
cfg,
|
|
66
|
+
changes
|
|
67
|
+
});
|
|
68
|
+
const rawEntry = asObjectRecord(aliases.config.channels?.slack);
|
|
68
69
|
if (!rawEntry) return {
|
|
69
70
|
config: cfg,
|
|
70
71
|
changes: []
|
|
71
72
|
};
|
|
72
|
-
|
|
73
|
-
let
|
|
74
|
-
let changed;
|
|
75
|
-
const aliases = normalizeLegacyChannelAliases({
|
|
76
|
-
entry: rawEntry,
|
|
77
|
-
pathPrefix: "channels.slack",
|
|
78
|
-
changes,
|
|
79
|
-
normalizeDm: true,
|
|
80
|
-
normalizeAccountDm: true,
|
|
81
|
-
resolveStreamingOptions: (entry) => ({
|
|
82
|
-
resolvedMode: resolveSlackStreamingMode(entry),
|
|
83
|
-
resolvedNativeTransport: resolveSlackNativeStreaming(entry)
|
|
84
|
-
})
|
|
85
|
-
});
|
|
86
|
-
updated = aliases.entry;
|
|
87
|
-
changed = aliases.changed;
|
|
73
|
+
let updated = rawEntry;
|
|
74
|
+
let changed = aliases.config !== cfg;
|
|
88
75
|
const channels = asObjectRecord(updated.channels);
|
|
89
76
|
if (channels) {
|
|
90
77
|
const normalized = normalizeSlackChannelAllowAliases({
|
|
@@ -134,9 +121,9 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
134
121
|
};
|
|
135
122
|
return {
|
|
136
123
|
config: {
|
|
137
|
-
...
|
|
124
|
+
...aliases.config,
|
|
138
125
|
channels: {
|
|
139
|
-
...
|
|
126
|
+
...aliases.config.channels,
|
|
140
127
|
slack: updated
|
|
141
128
|
}
|
|
142
129
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DddfkMlF.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|