@openclaw/slack 2026.7.2-beta.1 → 2026.7.2-beta.3
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-configured-DzC407uv.js → account-configured-BwfXBo_F.js} +1 -1
- package/dist/{account-inspect-Di7ditqZ.js → account-inspect-Bvbtu3iH.js} +9 -2
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-BOJJiHSr.js → accounts-DQEbYKh9.js} +9 -0
- package/dist/accounts.runtime-BIKmJdtJ.js +2 -0
- package/dist/{action-runtime-p6M2ULpv.js → action-runtime-DqkRwO3Z.js} +14 -17
- package/dist/action-runtime.runtime-DEWOcFM4.js +2 -0
- package/dist/{actions-DkTcWmpT.js → actions-CF0tUY5q.js} +5 -9
- package/dist/{actions.runtime-BSxpwgUc.js → actions.runtime-hCbx4RXg.js} +1 -1
- package/dist/api.js +13 -14
- package/dist/{approval-handler.runtime-UGbnz9OC.js → approval-handler.runtime-Em8I1-8-.js} +2 -2
- package/dist/{channel-B0_j6C6z.js → channel-4-TRi1D6.js} +75 -41
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-BpeTezY4.js → channel-type-Cu1yjNg2.js} +3 -3
- package/dist/{channel.setup-BQFut21T.js → channel.setup-CgkADtZg.js} +6 -4
- package/dist/{config-schema-DYI01PV2.js → config-schema-XjJGfwQC.js} +18 -5
- package/dist/{directory-config-DRkFujwG.js → directory-config-Bv0lcUlH.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DX7yFsM-.js → directory-live-CzUIB7th.js} +2 -2
- package/dist/{doctor-contract-DddfkMlF.js → doctor-contract-DKpe5VBr.js} +80 -12
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-C-b2ZnSl.js → group-policy-Bw-65m3V.js} +94 -135
- package/dist/{interactive-replies-BilWUdcI.js → interactive-replies-Dm_t2R9S.js} +1 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-CA9jZrCY.js → message-tool-api-C2pcf5du.js} +3 -3
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-BN_uuvrQ.js → monitor-CNFeF30h.js} +3 -3
- package/dist/{outbound-adapter-ECl0go7d.js → outbound-adapter-CVi2uok0.js} +49 -5
- package/dist/{pipeline.runtime-f0eJJoJL.js → pipeline.runtime-CTvokbty.js} +485 -251
- package/dist/{policy-f8b0edSi.js → policy-b_dOPDCq.js} +7 -7
- package/dist/probe-Borhn9PQ.js +340 -0
- package/dist/{provider-Ds-y-imP.js → provider-B-HVL5ZE.js} +831 -329
- package/dist/{relay-source-B-6LFUdz.js → relay-source-Ea_P9VcO.js} +6 -11
- package/dist/{replies-BMvf3ihj.js → replies-B4bOdrYb.js} +3 -3
- package/dist/{resolve-channels-DOMgNCWb.js → resolve-channels-KTc568SU.js} +1 -1
- package/dist/{resolve-users-aL6-Ssee.js → resolve-users-DeGJf1yp.js} +1 -1
- package/dist/{runtime-CauEvswP.js → runtime-JSVZSWAj.js} +2 -2
- package/dist/{runtime-api-CVb6CQjX.js → runtime-api-BFfNpzDe.js} +1 -1
- package/dist/runtime-api.js +12 -12
- package/dist/runtime-setter-api.js +1 -1
- package/dist/{scopes-Dw8wbU0j.js → scopes-lx08L56K.js} +1 -2
- package/dist/{secret-contract-CMohXFWS.js → secret-contract-DxmvbxBF.js} +1 -0
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-NEfJ0GvM.js → send-KuTDky7i.js} +29 -12
- package/dist/send.runtime-CXyxws1D.js +2 -0
- package/dist/setup-core-CeiAVwQ3.js +502 -0
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BN2WeG5c.js → setup-surface-DLA0vHXp.js} +23 -13
- package/dist/{shared-BLnB9R1T.js → shared-C4yVB0Q-.js} +64 -41
- package/dist/{slash-dispatch.runtime-C0Otuf_T.js → slash-dispatch.runtime-BT-mMm-f.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/openclaw.plugin.json +134 -10
- package/package.json +5 -7
- package/dist/accounts.runtime-KvftRRek.js +0 -2
- package/dist/action-runtime.runtime-DQstDkHG.js +0 -2
- package/dist/client-D2F6m8CP.js +0 -152
- package/dist/configured-state.js +0 -11
- package/dist/probe-CfALk0l4.js +0 -48
- package/dist/send.runtime-BkKpitPu.js +0 -2
- package/dist/setup-core-fGd6Gquy.js +0 -343
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
import { a as resolveSlackAccount } from "./accounts-BOJJiHSr.js";
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-Di7ditqZ.js";
|
|
3
|
-
import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
|
|
4
|
-
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
5
|
-
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
import { DEFAULT_ACCOUNT_ID, createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createAllowlistSetupWizardProxy, createEnvPatchedAccountSetupAdapter, createLegacyCompatChannelDmPolicy, createSetupTranslator, createStandardChannelSetupStatus, parseMentionOrPrefixedId, patchChannelConfigForAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
|
|
7
|
-
import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
8
|
-
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
9
|
-
//#region extensions/slack/src/setup-shared.ts
|
|
10
|
-
const SLACK_CHANNEL = "slack";
|
|
11
|
-
function buildSlackManifest(botName = "OpenClaw") {
|
|
12
|
-
const safeName = botName.trim() || "OpenClaw";
|
|
13
|
-
const manifest = {
|
|
14
|
-
display_information: {
|
|
15
|
-
name: safeName,
|
|
16
|
-
description: `${safeName} connector for OpenClaw`
|
|
17
|
-
},
|
|
18
|
-
features: {
|
|
19
|
-
bot_user: {
|
|
20
|
-
display_name: safeName,
|
|
21
|
-
always_online: true
|
|
22
|
-
},
|
|
23
|
-
app_home: {
|
|
24
|
-
home_tab_enabled: true,
|
|
25
|
-
messages_tab_enabled: true,
|
|
26
|
-
messages_tab_read_only_enabled: false
|
|
27
|
-
},
|
|
28
|
-
assistant_view: {
|
|
29
|
-
assistant_description: `${safeName} connects Slack assistant threads to OpenClaw agents.`,
|
|
30
|
-
suggested_prompts: [
|
|
31
|
-
{
|
|
32
|
-
title: "What can you do?",
|
|
33
|
-
message: "What can you help me with?"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
title: "Summarize this channel",
|
|
37
|
-
message: "Summarize the recent activity in this channel."
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
title: "Draft a reply",
|
|
41
|
-
message: "Help me draft a reply."
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
slash_commands: [{
|
|
46
|
-
command: "/openclaw",
|
|
47
|
-
description: "Send a message to OpenClaw",
|
|
48
|
-
should_escape: false
|
|
49
|
-
}]
|
|
50
|
-
},
|
|
51
|
-
oauth_config: { scopes: { bot: [
|
|
52
|
-
"app_mentions:read",
|
|
53
|
-
"assistant:write",
|
|
54
|
-
"channels:history",
|
|
55
|
-
"channels:read",
|
|
56
|
-
"chat:write",
|
|
57
|
-
"commands",
|
|
58
|
-
"emoji:read",
|
|
59
|
-
"files:read",
|
|
60
|
-
"files:write",
|
|
61
|
-
"groups:history",
|
|
62
|
-
"groups:read",
|
|
63
|
-
"im:history",
|
|
64
|
-
"im:read",
|
|
65
|
-
"im:write",
|
|
66
|
-
"mpim:history",
|
|
67
|
-
"mpim:read",
|
|
68
|
-
"mpim:write",
|
|
69
|
-
"pins:read",
|
|
70
|
-
"pins:write",
|
|
71
|
-
"reactions:read",
|
|
72
|
-
"reactions:write",
|
|
73
|
-
"usergroups:read",
|
|
74
|
-
"users:read"
|
|
75
|
-
] } },
|
|
76
|
-
settings: {
|
|
77
|
-
socket_mode_enabled: true,
|
|
78
|
-
event_subscriptions: { bot_events: [
|
|
79
|
-
"app_home_opened",
|
|
80
|
-
"app_mention",
|
|
81
|
-
"assistant_thread_context_changed",
|
|
82
|
-
"assistant_thread_started",
|
|
83
|
-
"channel_rename",
|
|
84
|
-
"member_joined_channel",
|
|
85
|
-
"member_left_channel",
|
|
86
|
-
"message.channels",
|
|
87
|
-
"message.groups",
|
|
88
|
-
"message.im",
|
|
89
|
-
"message.mpim",
|
|
90
|
-
"pin_added",
|
|
91
|
-
"pin_removed",
|
|
92
|
-
"reaction_added",
|
|
93
|
-
"reaction_removed"
|
|
94
|
-
] }
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
return JSON.stringify(manifest, null, 2);
|
|
98
|
-
}
|
|
99
|
-
function buildSlackSetupLines() {
|
|
100
|
-
return [
|
|
101
|
-
"1) Slack API -> Create App -> From scratch or From manifest (with the JSON below)",
|
|
102
|
-
"2) Add Socket Mode + enable it to get the app-level token (xapp-...)",
|
|
103
|
-
"3) Install App to workspace to get the xoxb- bot token",
|
|
104
|
-
"4) Enable Event Subscriptions (socket) for message, App Home, and assistant events",
|
|
105
|
-
"5) App Home -> enable the Home tab, Messages tab for DMs, and AI assistant view",
|
|
106
|
-
"Manifest JSON follows as plain text for copy/paste.",
|
|
107
|
-
"Tip: set SLACK_BOT_TOKEN + SLACK_APP_TOKEN in your env.",
|
|
108
|
-
`Docs: ${formatDocsLink("/slack", "slack")}`
|
|
109
|
-
];
|
|
110
|
-
}
|
|
111
|
-
function setSlackChannelAllowlist(cfg, accountId, channelKeys) {
|
|
112
|
-
const channels = Object.fromEntries(channelKeys.map((key) => [key, { enabled: true }]));
|
|
113
|
-
return patchChannelConfigForAccount({
|
|
114
|
-
cfg,
|
|
115
|
-
channel: SLACK_CHANNEL,
|
|
116
|
-
accountId,
|
|
117
|
-
patch: { channels }
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function isSlackSetupAccountConfigured(account) {
|
|
121
|
-
if (account.config.mode === "relay") return isSlackPluginAccountConfigured(account);
|
|
122
|
-
const hasConfiguredBotToken = Boolean(account.botToken?.trim()) || hasConfiguredSecretInput(account.config.botToken);
|
|
123
|
-
const hasConfiguredAppToken = Boolean(account.appToken?.trim()) || hasConfiguredSecretInput(account.config.appToken);
|
|
124
|
-
return hasConfiguredBotToken && hasConfiguredAppToken;
|
|
125
|
-
}
|
|
126
|
-
function describeSlackSetupAccount(account) {
|
|
127
|
-
return describeAccountSnapshot({
|
|
128
|
-
account,
|
|
129
|
-
configured: isSlackSetupAccountConfigured(account),
|
|
130
|
-
extra: {
|
|
131
|
-
botTokenSource: account.botTokenSource,
|
|
132
|
-
appTokenSource: account.appTokenSource
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region extensions/slack/src/setup-core.ts
|
|
138
|
-
const t = createSetupTranslator();
|
|
139
|
-
function enableSlackAccount(cfg, accountId) {
|
|
140
|
-
return patchChannelConfigForAccount({
|
|
141
|
-
cfg,
|
|
142
|
-
channel: SLACK_CHANNEL,
|
|
143
|
-
accountId,
|
|
144
|
-
patch: { enabled: true }
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function hasSlackInteractiveRepliesConfig(cfg, accountId) {
|
|
148
|
-
const capabilities = resolveSlackAccount({
|
|
149
|
-
cfg,
|
|
150
|
-
accountId
|
|
151
|
-
}).config.capabilities;
|
|
152
|
-
if (Array.isArray(capabilities)) return capabilities.some((entry) => normalizeLowercaseStringOrEmpty(entry) === "interactivereplies");
|
|
153
|
-
if (!capabilities || typeof capabilities !== "object") return false;
|
|
154
|
-
return "interactiveReplies" in capabilities;
|
|
155
|
-
}
|
|
156
|
-
function setSlackInteractiveReplies(cfg, accountId, interactiveReplies) {
|
|
157
|
-
const capabilities = resolveSlackAccount({
|
|
158
|
-
cfg,
|
|
159
|
-
accountId
|
|
160
|
-
}).config.capabilities;
|
|
161
|
-
return patchChannelConfigForAccount({
|
|
162
|
-
cfg,
|
|
163
|
-
channel: SLACK_CHANNEL,
|
|
164
|
-
accountId,
|
|
165
|
-
patch: { capabilities: Array.isArray(capabilities) ? interactiveReplies ? uniqueStrings([...capabilities, "interactiveReplies"]) : capabilities.filter((entry) => normalizeLowercaseStringOrEmpty(entry) !== "interactivereplies") : {
|
|
166
|
-
...capabilities && typeof capabilities === "object" ? capabilities : {},
|
|
167
|
-
interactiveReplies
|
|
168
|
-
} }
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
function createSlackTokenCredential(params) {
|
|
172
|
-
return {
|
|
173
|
-
inputKey: params.inputKey,
|
|
174
|
-
providerHint: params.providerHint,
|
|
175
|
-
credentialLabel: params.credentialLabel,
|
|
176
|
-
preferredEnvVar: params.preferredEnvVar,
|
|
177
|
-
envPrompt: `${params.preferredEnvVar} detected. Use env var?`,
|
|
178
|
-
keepPrompt: params.keepPrompt,
|
|
179
|
-
inputPrompt: params.inputPrompt,
|
|
180
|
-
allowEnv: ({ accountId }) => accountId === DEFAULT_ACCOUNT_ID,
|
|
181
|
-
inspect: ({ cfg, accountId }) => {
|
|
182
|
-
const resolved = resolveSlackAccount({
|
|
183
|
-
cfg,
|
|
184
|
-
accountId
|
|
185
|
-
});
|
|
186
|
-
const configuredValue = params.inputKey === "botToken" ? resolved.config.botToken : resolved.config.appToken;
|
|
187
|
-
const resolvedValue = params.inputKey === "botToken" ? resolved.botToken : resolved.appToken;
|
|
188
|
-
return {
|
|
189
|
-
accountConfigured: Boolean(resolvedValue) || hasConfiguredSecretInput(configuredValue),
|
|
190
|
-
hasConfiguredValue: hasConfiguredSecretInput(configuredValue),
|
|
191
|
-
resolvedValue: normalizeOptionalString(resolvedValue),
|
|
192
|
-
envValue: accountId === DEFAULT_ACCOUNT_ID ? normalizeOptionalString(process.env[params.preferredEnvVar]) : void 0
|
|
193
|
-
};
|
|
194
|
-
},
|
|
195
|
-
applyUseEnv: ({ cfg, accountId }) => enableSlackAccount(cfg, accountId),
|
|
196
|
-
applySet: ({ cfg, accountId, value }) => patchChannelConfigForAccount({
|
|
197
|
-
cfg,
|
|
198
|
-
channel: SLACK_CHANNEL,
|
|
199
|
-
accountId,
|
|
200
|
-
patch: {
|
|
201
|
-
enabled: true,
|
|
202
|
-
[params.inputKey]: value
|
|
203
|
-
}
|
|
204
|
-
})
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
const slackSetupAdapter = createEnvPatchedAccountSetupAdapter({
|
|
208
|
-
channelKey: SLACK_CHANNEL,
|
|
209
|
-
defaultAccountOnlyEnvError: "Slack env tokens can only be used for the default account.",
|
|
210
|
-
missingCredentialError: "Slack requires --bot-token and --app-token (or --use-env).",
|
|
211
|
-
hasCredentials: (input) => Boolean(input.botToken && input.appToken),
|
|
212
|
-
buildPatch: (input) => ({
|
|
213
|
-
...input.botToken ? { botToken: input.botToken } : {},
|
|
214
|
-
...input.appToken ? { appToken: input.appToken } : {}
|
|
215
|
-
})
|
|
216
|
-
});
|
|
217
|
-
function createSlackSetupWizardBase(handlers) {
|
|
218
|
-
const slackDmPolicy = createLegacyCompatChannelDmPolicy({
|
|
219
|
-
label: "Slack",
|
|
220
|
-
channel: SLACK_CHANNEL,
|
|
221
|
-
promptAllowFrom: handlers.promptAllowFrom
|
|
222
|
-
});
|
|
223
|
-
return {
|
|
224
|
-
channel: SLACK_CHANNEL,
|
|
225
|
-
status: createStandardChannelSetupStatus({
|
|
226
|
-
channelLabel: "Slack",
|
|
227
|
-
configuredLabel: t("wizard.channels.statusConfigured"),
|
|
228
|
-
unconfiguredLabel: t("wizard.channels.statusNeedsTokens"),
|
|
229
|
-
configuredHint: t("wizard.channels.statusConfigured"),
|
|
230
|
-
unconfiguredHint: t("wizard.channels.statusNeedsTokens"),
|
|
231
|
-
configuredScore: 2,
|
|
232
|
-
unconfiguredScore: 1,
|
|
233
|
-
resolveConfigured: ({ cfg, accountId }) => inspectSlackAccount({
|
|
234
|
-
cfg,
|
|
235
|
-
accountId
|
|
236
|
-
}).configured
|
|
237
|
-
}),
|
|
238
|
-
introNote: {
|
|
239
|
-
title: t("wizard.slack.socketModeTokensTitle"),
|
|
240
|
-
lines: buildSlackSetupLines(),
|
|
241
|
-
shouldShow: ({ cfg, accountId }) => !isSlackSetupAccountConfigured(resolveSlackAccount({
|
|
242
|
-
cfg,
|
|
243
|
-
accountId
|
|
244
|
-
}))
|
|
245
|
-
},
|
|
246
|
-
prepare: async ({ cfg, accountId, prompter }) => {
|
|
247
|
-
if (isSlackSetupAccountConfigured(resolveSlackAccount({
|
|
248
|
-
cfg,
|
|
249
|
-
accountId
|
|
250
|
-
}))) return;
|
|
251
|
-
const manifest = buildSlackManifest();
|
|
252
|
-
if (prompter.plain) await prompter.plain(manifest);
|
|
253
|
-
else await prompter.note(manifest, "Slack manifest JSON");
|
|
254
|
-
},
|
|
255
|
-
envShortcut: {
|
|
256
|
-
prompt: t("wizard.slack.envPrompt"),
|
|
257
|
-
preferredEnvVar: "SLACK_BOT_TOKEN",
|
|
258
|
-
isAvailable: ({ cfg, accountId }) => accountId === DEFAULT_ACCOUNT_ID && Boolean(process.env.SLACK_BOT_TOKEN?.trim()) && Boolean(process.env.SLACK_APP_TOKEN?.trim()) && !isSlackSetupAccountConfigured(resolveSlackAccount({
|
|
259
|
-
cfg,
|
|
260
|
-
accountId
|
|
261
|
-
})),
|
|
262
|
-
apply: ({ cfg, accountId }) => enableSlackAccount(cfg, accountId)
|
|
263
|
-
},
|
|
264
|
-
credentials: [createSlackTokenCredential({
|
|
265
|
-
inputKey: "botToken",
|
|
266
|
-
providerHint: "slack-bot",
|
|
267
|
-
credentialLabel: t("wizard.slack.botToken"),
|
|
268
|
-
preferredEnvVar: "SLACK_BOT_TOKEN",
|
|
269
|
-
keepPrompt: t("wizard.slack.botTokenKeep"),
|
|
270
|
-
inputPrompt: t("wizard.slack.botTokenInput")
|
|
271
|
-
}), createSlackTokenCredential({
|
|
272
|
-
inputKey: "appToken",
|
|
273
|
-
providerHint: "slack-app",
|
|
274
|
-
credentialLabel: t("wizard.slack.appToken"),
|
|
275
|
-
preferredEnvVar: "SLACK_APP_TOKEN",
|
|
276
|
-
keepPrompt: t("wizard.slack.appTokenKeep"),
|
|
277
|
-
inputPrompt: t("wizard.slack.appTokenInput")
|
|
278
|
-
})],
|
|
279
|
-
dmPolicy: slackDmPolicy,
|
|
280
|
-
allowFrom: createAccountScopedAllowFromSection({
|
|
281
|
-
channel: SLACK_CHANNEL,
|
|
282
|
-
credentialInputKey: "botToken",
|
|
283
|
-
helpTitle: t("wizard.slack.allowlistTitle"),
|
|
284
|
-
helpLines: [
|
|
285
|
-
t("wizard.slack.allowlistIntro"),
|
|
286
|
-
t("wizard.slack.examples"),
|
|
287
|
-
"- U12345678",
|
|
288
|
-
"- @alice",
|
|
289
|
-
t("wizard.slack.multipleEntries"),
|
|
290
|
-
t("wizard.channels.docs", { link: formatDocsLink("/slack", "slack") })
|
|
291
|
-
],
|
|
292
|
-
message: t("wizard.slack.allowFromPrompt"),
|
|
293
|
-
placeholder: "@alice, U12345678",
|
|
294
|
-
invalidWithoutCredentialNote: t("wizard.slack.allowFromInvalidWithoutToken"),
|
|
295
|
-
parseId: (value) => parseMentionOrPrefixedId({
|
|
296
|
-
value,
|
|
297
|
-
mentionPattern: /^<@([A-Z0-9]+)>$/i,
|
|
298
|
-
prefixPattern: /^(slack:|user:)/i,
|
|
299
|
-
idPattern: /^[A-Z][A-Z0-9]+$/i,
|
|
300
|
-
normalizeId: (id) => id.toUpperCase()
|
|
301
|
-
}),
|
|
302
|
-
resolveEntries: handlers.resolveAllowFromEntries
|
|
303
|
-
}),
|
|
304
|
-
groupAccess: createAccountScopedGroupAccessSection({
|
|
305
|
-
channel: SLACK_CHANNEL,
|
|
306
|
-
label: t("wizard.slack.channelsLabel"),
|
|
307
|
-
placeholder: "#general, #private, C123",
|
|
308
|
-
currentPolicy: ({ cfg, accountId }) => resolveSlackAccount({
|
|
309
|
-
cfg,
|
|
310
|
-
accountId
|
|
311
|
-
}).config.groupPolicy ?? "allowlist",
|
|
312
|
-
currentEntries: ({ cfg, accountId }) => Object.entries(resolveSlackAccount({
|
|
313
|
-
cfg,
|
|
314
|
-
accountId
|
|
315
|
-
}).config.channels ?? {}).filter(([, value]) => value?.enabled !== false).map(([key]) => key),
|
|
316
|
-
updatePrompt: ({ cfg, accountId }) => Boolean(resolveSlackAccount({
|
|
317
|
-
cfg,
|
|
318
|
-
accountId
|
|
319
|
-
}).config.channels),
|
|
320
|
-
resolveAllowlist: handlers.resolveGroupAllowlist,
|
|
321
|
-
fallbackResolved: (entries) => entries,
|
|
322
|
-
applyAllowlist: ({ cfg, accountId, resolved }) => setSlackChannelAllowlist(cfg, accountId, resolved)
|
|
323
|
-
}),
|
|
324
|
-
finalize: async ({ cfg, accountId, options, prompter }) => {
|
|
325
|
-
if (hasSlackInteractiveRepliesConfig(cfg, accountId)) return;
|
|
326
|
-
if (options?.quickstartDefaults) return { cfg: setSlackInteractiveReplies(cfg, accountId, true) };
|
|
327
|
-
return { cfg: setSlackInteractiveReplies(cfg, accountId, await prompter.confirm({
|
|
328
|
-
message: t("wizard.slack.interactiveRepliesPrompt"),
|
|
329
|
-
initialValue: true
|
|
330
|
-
})) };
|
|
331
|
-
},
|
|
332
|
-
disable: (cfg) => setSetupChannelEnabled(cfg, SLACK_CHANNEL, false)
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
function createSlackSetupWizardProxy(loadWizard) {
|
|
336
|
-
return createAllowlistSetupWizardProxy({
|
|
337
|
-
loadWizard: async () => (await loadWizard()).slackSetupWizard,
|
|
338
|
-
createBase: createSlackSetupWizardBase,
|
|
339
|
-
fallbackResolvedGroupAllowlist: (entries) => entries
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
//#endregion
|
|
343
|
-
export { describeSlackSetupAccount as a, SLACK_CHANNEL as i, createSlackSetupWizardProxy as n, isSlackSetupAccountConfigured as o, slackSetupAdapter as r, createSlackSetupWizardBase as t };
|