@openclaw/slack 2026.5.12 → 2026.5.14-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-D7AZNs8C.js → account-inspect-BJyQLSkN.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-ClAPP5ry.js → accounts-yk5K3wQU.js} +2 -1
- package/dist/accounts.runtime-BhbEu1ZK.js +2 -0
- package/dist/{action-runtime-e2UhRsNx.js → action-runtime-CyE2jfW-.js} +4 -4
- package/dist/action-runtime.runtime-DLhfKw4B.js +2 -0
- package/dist/{media-D1XCd1uP.js → actions-BibhOXpJ.js} +339 -23
- package/dist/{actions.runtime-CO3OaTLb.js → actions.runtime-B9XQG6X4.js} +1 -1
- package/dist/api.js +18 -18
- package/dist/{approval-handler.runtime-CmeRr9qA.js → approval-handler.runtime-BjzVRaXN.js} +3 -4
- package/dist/{blocks-render-BIDw-Pom.js → blocks-render-BAVfd6r0.js} +1 -1
- package/dist/{channel-DRjHBTDB.js → channel-Dh07mU_K.js} +24 -52
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-Cayn7afd.js → channel.setup-CmG37S2W.js} +4 -4
- package/dist/{client-CPe4GmDR.js → client-C_IaJbi5.js} +20 -1
- package/dist/{config-schema-D9B5LB_L.js → config-schema-CNRousxw.js} +21 -1
- package/dist/contract-api.js +4 -4
- package/dist/{directory-config-B3JiHeB7.js → directory-config-CMvFiswf.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-Bf16GwDh.js → directory-live-CZPzpQZF.js} +2 -2
- package/dist/{doctor-contract-KUjHnkQm.js → doctor-contract-B8QIWMs1.js} +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/http-routes-api.js +1 -1
- package/dist/inbound-contract-test-api.js +2 -2
- package/dist/{interactive-replies-qAIfuBor.js → interactive-replies-BSg5hXhj.js} +1 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-6lowf9zE.js → message-tool-api-C7gc7goF.js} +2 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-a97o17G6.js → monitor-DDE5AI2O.js} +3 -3
- package/dist/{outbound-adapter-B_5sEhCg.js → outbound-adapter-BluPNDNi.js} +4 -5
- package/dist/outbound-payload-test-api.js +1 -1
- package/dist/{outbound-payload.test-harness-CVCamg1x.js → outbound-payload.test-harness-BNxnP6MC.js} +2 -2
- package/dist/{pipeline.runtime-DT0hLnq2.js → pipeline.runtime-Dft2-QU4.js} +48 -22
- package/dist/{plugin-routes-DtTPmga1.js → plugin-routes-CRnfsTTX.js} +2 -2
- package/dist/{prepare-D3YqV8jB.js → prepare-D0tMg4dt.js} +9 -10
- package/dist/{prepare.test-helpers-DVcjRhfG.js → prepare.test-helpers-CU1qB54Q.js} +1 -1
- package/dist/{probe-3eZf1FjI.js → probe-FL4sUJsH.js} +2 -2
- package/dist/{provider-D7uAN3Fq.js → provider-C6WxaFFf.js} +69 -30
- package/dist/{replies-Xe_jMR6o.js → replies-D0QXXSPP.js} +4 -4
- package/dist/reply-blocks-BFaJ_ejG.js +134 -0
- package/dist/{resolve-channels-BRYqyNVJ.js → resolve-channels-B_eKaOkE.js} +2 -2
- package/dist/{resolve-users-Bd_SdP8j.js → resolve-users-BzBAJwvq.js} +2 -2
- package/dist/{room-context-0vovmZPU.js → room-context-Cd8jFpS-.js} +4 -2
- package/dist/{runtime-api-Dd1xIV5v.js → runtime-api-B5HGOzX3.js} +2 -2
- package/dist/runtime-api.js +13 -13
- package/dist/runtime-setter-api.js +1 -1
- package/dist/{scopes-CDevO8jg.js → scopes-Bvg_ZzqZ.js} +2 -2
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-D_A9kL-C.js → send-Dg9zcyYT.js} +5 -6
- package/dist/send.runtime-CjjQ9StM.js +2 -0
- package/dist/send.runtime-E47jGN-2.js +2 -0
- package/dist/{setup-core-B9NetDkM.js → setup-core-WWQl-cE9.js} +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-D88QBVOW.js → setup-surface-BLoTgna4.js} +5 -5
- package/dist/{shared-D8U42xFL.js → shared-GoB-OuUq.js} +9 -9
- package/dist/{slash-dispatch.runtime-BJgT0jwV.js → slash-dispatch.runtime-Bz_OkRcR.js} +1 -1
- package/dist/test-api.js +7 -7
- package/dist/thread-ts-As_dcNbD.js +52 -0
- package/openclaw.plugin.json +116 -0
- package/package.json +9 -7
- package/dist/accounts.runtime-DDVcLJUI.js +0 -2
- package/dist/action-runtime.runtime-BFcqMbOm.js +0 -2
- package/dist/actions-CYLFK-Zy.js +0 -292
- package/dist/blocks-input-CwTFVImV.js +0 -29
- package/dist/channel-api-B_nZwosg.js +0 -20
- package/dist/exec-approvals-7xUNgLi9.js +0 -58
- package/dist/group-policy-CyLUK6My.js +0 -41
- package/dist/mrkdwn-Cax-eSfK.js +0 -6
- package/dist/reply-blocks-Z5l6_R6H.js +0 -14
- package/dist/send.runtime-BRE_ncCU.js +0 -2
- package/dist/send.runtime-_l76lUuL.js +0 -2
- package/dist/thread-ts-C2x7c5PP.js +0 -24
- /package/dist/{allow-list-BPnnlRPL.js → allow-list-nwXs_eCP.js} +0 -0
- /package/dist/{config-api-B_jq4NJW.js → config-api-CmgE_ORg.js} +0 -0
- /package/dist/{errors-BYFHR24f.js → errors-C_sW0Zgl.js} +0 -0
- /package/dist/{magic-string.es-BMaGRRZ1.js → magic-string.es-9lw4MGoF.js} +0 -0
- /package/dist/{registry-CeaoNfoP.js → registry-D2cWOLZV.js} +0 -0
- /package/dist/{resolve-allowlist-common-Bk3clYPK.js → resolve-allowlist-common-DLub2I2i.js} +0 -0
- /package/dist/{runtime-Bo-KHM-F.js → runtime-DQxkf7k2.js} +0 -0
- /package/dist/{secret-contract-Bo6lbSkh.js → secret-contract-0TL3L5Kb.js} +0 -0
- /package/dist/{security-audit-BtHGnD3d.js → security-audit-BJzADAw3.js} +0 -0
- /package/dist/{slash-commands.runtime-22kgyst2.js → slash-commands.runtime-bcDwsGnu.js} +0 -0
- /package/dist/{slash-plugin-commands.runtime-CF-n3MeP.js → slash-plugin-commands.runtime-DBHGUSj2.js} +0 -0
- /package/dist/{slash-skill-commands.runtime-BMs0VjTe.js → slash-skill-commands.runtime-rrY2hXvN.js} +0 -0
- /package/dist/{streaming-compat-RkZgTmQ2.js → streaming-compat-eu5Rj5gj.js} +0 -0
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, d as resolveSlackBotToken, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as resolveSlackAppToken } from "./accounts-
|
|
2
|
-
import { i as
|
|
3
|
-
import "./blocks-render-
|
|
4
|
-
import {
|
|
5
|
-
import { c as resolveSlackWebClientOptions } from "./client-
|
|
6
|
-
import { n as normalizeAllowList } from "./allow-list-
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { C as resolveOpenProviderRuntimeGroupPolicy, D as buildSlackSlashCommandMatcher, E as warnMissingProviderGroupPolicyFallbackOnce, O as resolveSlackSlashCommandConfig, S as resolveDefaultGroupPolicy, _ as resolveSlackChannelLabel, d as resolveSlackEffectiveAllowFrom, f as createSlackMonitorContext, g as resolveSlackChannelConfig, h as resolveSlackChatType, i as parsePluginBindingApprovalCustomId, k as stripSlackMentionsForCommandDetection, l as authorizeSlackSystemEventSender, m as normalizeSlackChannelType, n as authorizeSlackDirectMessage, p as isSlackChannelAllowedByPolicy, r as buildPluginBindingResolvedText, s as resolvePluginConversationBindingApproval, t as resolveSlackRoomContextHints, u as resolveSlackCommandIngress, v as getRuntimeConfig$1, y as isDangerousNameMatchingEnabled } from "./room-context-0vovmZPU.js";
|
|
13
|
-
import { t as escapeSlackMrkdwn } from "./mrkdwn-Cax-eSfK.js";
|
|
1
|
+
import { a as resolveSlackAccount, d as resolveSlackBotToken, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as resolveSlackAppToken } from "./accounts-yk5K3wQU.js";
|
|
2
|
+
import { i as isSlackApprovalAuthorizedSender, o as isSlackExecApprovalAuthorizedSender, s as isSlackExecApprovalClientEnabled } from "./reply-blocks-BFaJ_ejG.js";
|
|
3
|
+
import "./blocks-render-BAVfd6r0.js";
|
|
4
|
+
import { o as SLACK_TEXT_LIMIT, s as truncateSlackText } from "./thread-ts-As_dcNbD.js";
|
|
5
|
+
import { c as resolveSlackWebClientOptions } from "./client-C_IaJbi5.js";
|
|
6
|
+
import { n as normalizeAllowList, r as normalizeAllowListLower, t as allowListMatches } from "./allow-list-nwXs_eCP.js";
|
|
7
|
+
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath } from "./registry-D2cWOLZV.js";
|
|
8
|
+
import { t as formatSlackError } from "./errors-C_sW0Zgl.js";
|
|
9
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-B_eKaOkE.js";
|
|
10
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-BzBAJwvq.js";
|
|
11
|
+
import { C as resolveOpenProviderRuntimeGroupPolicy, D as buildSlackSlashCommandMatcher, E as warnMissingProviderGroupPolicyFallbackOnce, O as resolveSlackSlashCommandConfig, S as resolveDefaultGroupPolicy, _ as resolveSlackChannelLabel, d as resolveSlackEffectiveAllowFrom, f as createSlackMonitorContext, g as resolveSlackChannelConfig, h as resolveSlackChatType, i as parsePluginBindingApprovalCustomId, k as stripSlackMentionsForCommandDetection, l as authorizeSlackSystemEventSender, m as normalizeSlackChannelType, n as authorizeSlackDirectMessage, p as isSlackChannelAllowedByPolicy, r as buildPluginBindingResolvedText, s as resolvePluginConversationBindingApproval, t as resolveSlackRoomContextHints, u as resolveSlackCommandIngress, v as getRuntimeConfig$1, y as isDangerousNameMatchingEnabled } from "./room-context-Cd8jFpS-.js";
|
|
14
12
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
15
13
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
14
|
import { normalizeAccountId, normalizeMainKey } from "openclaw/plugin-sdk/routing";
|
|
@@ -30,7 +28,7 @@ import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
|
30
28
|
import { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
31
29
|
import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
|
|
32
30
|
import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
|
|
33
|
-
import {
|
|
31
|
+
import { mutateConfigFile } from "openclaw/plugin-sdk/config-mutation";
|
|
34
32
|
import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
35
33
|
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
|
|
36
34
|
import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
@@ -122,7 +120,8 @@ function registerSlackChannelEvents(params) {
|
|
|
122
120
|
});
|
|
123
121
|
enqueueSystemEvent(`Slack channel ${params.kind}: ${label}.`, {
|
|
124
122
|
sessionKey,
|
|
125
|
-
contextKey: `slack:channel:${params.kind}:${params.channelId ?? params.channelName ?? "unknown"}
|
|
123
|
+
contextKey: `slack:channel:${params.kind}:${params.channelId ?? params.channelName ?? "unknown"}`,
|
|
124
|
+
trusted: false
|
|
126
125
|
});
|
|
127
126
|
};
|
|
128
127
|
ctx.app.event("channel_created", async ({ event, body }) => {
|
|
@@ -177,9 +176,8 @@ function registerSlackChannelEvents(params) {
|
|
|
177
176
|
ctx.runtime.log?.(warn("[slack] Config writes disabled; skipping channel config migration."));
|
|
178
177
|
return;
|
|
179
178
|
}
|
|
180
|
-
const currentConfig = getRuntimeConfig();
|
|
181
179
|
const migration = migrateSlackChannelConfig({
|
|
182
|
-
cfg:
|
|
180
|
+
cfg: getRuntimeConfig(),
|
|
183
181
|
accountId: ctx.accountId,
|
|
184
182
|
oldChannelId,
|
|
185
183
|
newChannelId
|
|
@@ -191,9 +189,16 @@ function registerSlackChannelEvents(params) {
|
|
|
191
189
|
oldChannelId,
|
|
192
190
|
newChannelId
|
|
193
191
|
});
|
|
194
|
-
await
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
await mutateConfigFile({
|
|
193
|
+
afterWrite: { mode: "auto" },
|
|
194
|
+
mutate: (draft) => {
|
|
195
|
+
migrateSlackChannelConfig({
|
|
196
|
+
cfg: draft,
|
|
197
|
+
accountId: ctx.accountId,
|
|
198
|
+
oldChannelId,
|
|
199
|
+
newChannelId
|
|
200
|
+
});
|
|
201
|
+
}
|
|
197
202
|
});
|
|
198
203
|
ctx.runtime.log?.(warn("[slack] Channel config migrated and saved successfully."));
|
|
199
204
|
} else if (migration.skippedExisting) ctx.runtime.log?.(warn(`[slack] Channel config already exists for ${newChannelId}; leaving ${oldChannelId} unchanged`));
|
|
@@ -285,6 +290,11 @@ async function dispatchSlackPluginInteractiveHandler(params) {
|
|
|
285
290
|
});
|
|
286
291
|
}
|
|
287
292
|
//#endregion
|
|
293
|
+
//#region extensions/slack/src/monitor/mrkdwn.ts
|
|
294
|
+
function escapeSlackMrkdwn(value) {
|
|
295
|
+
return value.replaceAll("\\", "\\\\").replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/([*_`~])/g, "\\$1");
|
|
296
|
+
}
|
|
297
|
+
//#endregion
|
|
288
298
|
//#region extensions/slack/src/monitor/events/interactions.block-actions.ts
|
|
289
299
|
function readOptionValues(options) {
|
|
290
300
|
if (!Array.isArray(options)) return;
|
|
@@ -496,7 +506,7 @@ async function handleSlackPluginBindingApproval(params) {
|
|
|
496
506
|
async function handleSlackExecApprovalInteraction(params) {
|
|
497
507
|
const approval = parseExecApprovalCommandText(params.pluginInteractionData);
|
|
498
508
|
if (!approval) return false;
|
|
499
|
-
const pluginApprovalAuthorizedSender =
|
|
509
|
+
const pluginApprovalAuthorizedSender = isSlackApprovalAuthorizedSender({
|
|
500
510
|
cfg: params.ctx.cfg,
|
|
501
511
|
accountId: params.ctx.accountId,
|
|
502
512
|
senderId: params.parsed.userId
|
|
@@ -506,7 +516,11 @@ async function handleSlackExecApprovalInteraction(params) {
|
|
|
506
516
|
accountId: params.ctx.accountId,
|
|
507
517
|
senderId: params.parsed.userId
|
|
508
518
|
});
|
|
509
|
-
|
|
519
|
+
const isPluginApproval = approval.approvalId.startsWith("plugin:");
|
|
520
|
+
const resolveUnprefixedAsPlugin = !isPluginApproval && !execApprovalAuthorizedSender && pluginApprovalAuthorizedSender;
|
|
521
|
+
const authorized = isPluginApproval ? pluginApprovalAuthorizedSender : execApprovalAuthorizedSender || resolveUnprefixedAsPlugin;
|
|
522
|
+
const allowPluginFallback = !isPluginApproval && execApprovalAuthorizedSender && pluginApprovalAuthorizedSender;
|
|
523
|
+
if (!authorized) {
|
|
510
524
|
params.ctx.runtime.log?.(`slack:interaction drop exec approval user=${params.parsed.userId} (not authorized)`);
|
|
511
525
|
await respondEphemeral(params.respond, "You are not authorized to approve this request.");
|
|
512
526
|
return true;
|
|
@@ -517,7 +531,8 @@ async function handleSlackExecApprovalInteraction(params) {
|
|
|
517
531
|
approvalId: approval.approvalId,
|
|
518
532
|
decision: approval.decision,
|
|
519
533
|
senderId: params.parsed.userId,
|
|
520
|
-
allowPluginFallback
|
|
534
|
+
allowPluginFallback,
|
|
535
|
+
...resolveUnprefixedAsPlugin ? { resolveMethod: "plugin" } : {},
|
|
521
536
|
clientDisplayName: `Slack approval (${params.parsed.userId.trim() || "unknown"})`
|
|
522
537
|
});
|
|
523
538
|
} catch (error) {
|
|
@@ -1402,12 +1417,30 @@ function registerSlackPinEvents(params) {
|
|
|
1402
1417
|
}
|
|
1403
1418
|
//#endregion
|
|
1404
1419
|
//#region extensions/slack/src/monitor/events/reactions.ts
|
|
1420
|
+
function shouldEmitSlackReactionNotification(params) {
|
|
1421
|
+
const { ctx, event, actorName } = params;
|
|
1422
|
+
if (ctx.reactionMode === "off") return false;
|
|
1423
|
+
if (ctx.reactionMode === "own") return Boolean(ctx.botUserId && event.item_user === ctx.botUserId);
|
|
1424
|
+
if (ctx.reactionMode === "allowlist") {
|
|
1425
|
+
const allowList = normalizeAllowListLower(ctx.reactionAllowlist);
|
|
1426
|
+
if (allowList.length === 0) return false;
|
|
1427
|
+
return allowListMatches({
|
|
1428
|
+
allowList,
|
|
1429
|
+
id: event.user,
|
|
1430
|
+
name: actorName,
|
|
1431
|
+
allowNameMatching: ctx.allowNameMatching
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1434
|
+
return ctx.reactionMode === "all";
|
|
1435
|
+
}
|
|
1405
1436
|
function registerSlackReactionEvents(params) {
|
|
1406
1437
|
const { ctx, trackEvent } = params;
|
|
1407
1438
|
const handleReactionEvent = async (event, action) => {
|
|
1408
1439
|
try {
|
|
1409
1440
|
const item = event.item;
|
|
1410
1441
|
if (!item || item.type !== "message") return;
|
|
1442
|
+
if (ctx.reactionMode === "off") return;
|
|
1443
|
+
if (ctx.reactionMode === "own" && (!ctx.botUserId || event.item_user !== ctx.botUserId)) return;
|
|
1411
1444
|
trackEvent?.();
|
|
1412
1445
|
const ingressContext = await authorizeAndResolveSlackSystemEventContext({
|
|
1413
1446
|
ctx,
|
|
@@ -1419,13 +1452,19 @@ function registerSlackReactionEvents(params) {
|
|
|
1419
1452
|
const actorInfoPromise = event.user ? ctx.resolveUserName(event.user) : Promise.resolve(void 0);
|
|
1420
1453
|
const authorInfoPromise = event.item_user ? ctx.resolveUserName(event.item_user) : Promise.resolve(void 0);
|
|
1421
1454
|
const [actorInfo, authorInfo] = await Promise.all([actorInfoPromise, authorInfoPromise]);
|
|
1455
|
+
if (!shouldEmitSlackReactionNotification({
|
|
1456
|
+
ctx,
|
|
1457
|
+
event,
|
|
1458
|
+
actorName: actorInfo?.name
|
|
1459
|
+
})) return;
|
|
1422
1460
|
const actorLabel = actorInfo?.name ?? event.user;
|
|
1423
1461
|
const emojiLabel = event.reaction ?? "emoji";
|
|
1424
1462
|
const authorLabel = authorInfo?.name ?? event.item_user;
|
|
1425
1463
|
const baseText = `Slack reaction ${action}: :${emojiLabel}: by ${actorLabel} in ${ingressContext.channelLabel} msg ${item.ts}`;
|
|
1426
1464
|
enqueueSystemEvent(authorLabel ? `${baseText} from ${authorLabel}` : baseText, {
|
|
1427
1465
|
sessionKey: ingressContext.sessionKey,
|
|
1428
|
-
contextKey: `slack:reaction:${action}:${item.channel}:${item.ts}:${event.user}:${emojiLabel}
|
|
1466
|
+
contextKey: `slack:reaction:${action}:${item.channel}:${item.ts}:${event.user}:${emojiLabel}`,
|
|
1467
|
+
trusted: false
|
|
1429
1468
|
});
|
|
1430
1469
|
} catch (err) {
|
|
1431
1470
|
ctx.runtime.error?.(danger(`slack reaction handler failed: ${formatErrorMessage(err)}`));
|
|
@@ -1590,7 +1629,7 @@ function createSlackThreadTsResolver(params) {
|
|
|
1590
1629
|
//#region extensions/slack/src/monitor/message-handler.ts
|
|
1591
1630
|
let slackMessagePipelinePromise;
|
|
1592
1631
|
function loadSlackMessagePipeline() {
|
|
1593
|
-
slackMessagePipelinePromise ??= import("./pipeline.runtime-
|
|
1632
|
+
slackMessagePipelinePromise ??= import("./pipeline.runtime-Dft2-QU4.js");
|
|
1594
1633
|
return slackMessagePipelinePromise;
|
|
1595
1634
|
}
|
|
1596
1635
|
const APP_MENTION_RETRY_TTL_MS = 6e4;
|
|
@@ -2128,19 +2167,19 @@ let slashDispatchRuntimePromise = null;
|
|
|
2128
2167
|
let slackPluginCommandsRuntimePromise = null;
|
|
2129
2168
|
let slashSkillCommandsRuntimePromise = null;
|
|
2130
2169
|
function loadSlashCommandsRuntime() {
|
|
2131
|
-
slashCommandsRuntimePromise ??= import("./slash-commands.runtime-
|
|
2170
|
+
slashCommandsRuntimePromise ??= import("./slash-commands.runtime-bcDwsGnu.js");
|
|
2132
2171
|
return slashCommandsRuntimePromise;
|
|
2133
2172
|
}
|
|
2134
2173
|
function loadSlashDispatchRuntime() {
|
|
2135
|
-
slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-
|
|
2174
|
+
slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-Bz_OkRcR.js");
|
|
2136
2175
|
return slashDispatchRuntimePromise;
|
|
2137
2176
|
}
|
|
2138
2177
|
function loadSlackPluginCommandsRuntime() {
|
|
2139
|
-
slackPluginCommandsRuntimePromise ??= import("./slash-plugin-commands.runtime-
|
|
2178
|
+
slackPluginCommandsRuntimePromise ??= import("./slash-plugin-commands.runtime-DBHGUSj2.js");
|
|
2140
2179
|
return slackPluginCommandsRuntimePromise;
|
|
2141
2180
|
}
|
|
2142
2181
|
function loadSlashSkillCommandsRuntime() {
|
|
2143
|
-
slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-
|
|
2182
|
+
slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-rrY2hXvN.js");
|
|
2144
2183
|
return slashSkillCommandsRuntimePromise;
|
|
2145
2184
|
}
|
|
2146
2185
|
function resolveSlackCommandMenuModelContext(params) {
|
|
@@ -3232,4 +3271,4 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
3232
3271
|
}
|
|
3233
3272
|
const resolveSlackRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy;
|
|
3234
3273
|
//#endregion
|
|
3235
|
-
export { resolveSlackRuntimeGroupPolicy as n, monitorSlackProvider as t };
|
|
3274
|
+
export { resolveSlackRuntimeGroupPolicy as n, escapeSlackMrkdwn as r, monitorSlackProvider as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { o as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-
|
|
4
|
-
import "./send.runtime-
|
|
1
|
+
import { t as resolveSlackReplyBlocks } from "./reply-blocks-BFaJ_ejG.js";
|
|
2
|
+
import { o as SLACK_TEXT_LIMIT } from "./thread-ts-As_dcNbD.js";
|
|
3
|
+
import { o as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-Dg9zcyYT.js";
|
|
4
|
+
import "./send.runtime-CjjQ9StM.js";
|
|
5
5
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
6
6
|
import { SILENT_REPLY_TOKEN, chunkMarkdownTextWithMode, isSilentReplyText } from "openclaw/plugin-sdk/reply-chunking";
|
|
7
7
|
import { deliverTextOrMediaReply, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-yk5K3wQU.js";
|
|
2
|
+
import { t as buildSlackInteractiveBlocks } from "./blocks-render-BAVfd6r0.js";
|
|
3
|
+
import { i as parseSlackBlocksInput } from "./thread-ts-As_dcNbD.js";
|
|
4
|
+
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
5
|
+
import { normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
import { doesApprovalRequestMatchChannelAccount } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
7
|
+
import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
8
|
+
import { createChannelExecApprovalProfile, isChannelExecApprovalTargetRecipient } from "openclaw/plugin-sdk/approval-client-runtime";
|
|
9
|
+
import { normalizeHyphenSlug } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
10
|
+
import { resolveToolsBySender } from "openclaw/plugin-sdk/channel-policy";
|
|
11
|
+
//#region extensions/slack/src/exec-approvals.ts
|
|
12
|
+
function normalizeSlackApproverId(value) {
|
|
13
|
+
const trimmed = normalizeStringifiedOptionalString(value);
|
|
14
|
+
if (!trimmed) return;
|
|
15
|
+
const prefixed = trimmed.match(/^(?:slack|user):([A-Z0-9]+)$/i);
|
|
16
|
+
if (prefixed?.[1]) return prefixed[1];
|
|
17
|
+
const mention = trimmed.match(/^<@([A-Z0-9]+)>$/i);
|
|
18
|
+
if (mention?.[1]) return mention[1];
|
|
19
|
+
return /^[UW][A-Z0-9]+$/i.test(trimmed) ? trimmed : void 0;
|
|
20
|
+
}
|
|
21
|
+
function resolveSlackOwnerApprovers(cfg) {
|
|
22
|
+
const ownerAllowFrom = cfg.commands?.ownerAllowFrom;
|
|
23
|
+
if (!Array.isArray(ownerAllowFrom) || ownerAllowFrom.length === 0) return [];
|
|
24
|
+
return resolveApprovalApprovers({
|
|
25
|
+
explicit: ownerAllowFrom,
|
|
26
|
+
normalizeApprover: normalizeSlackApproverId
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function getSlackExecApprovalApprovers(params) {
|
|
30
|
+
const account = resolveSlackAccount(params).config;
|
|
31
|
+
return resolveApprovalApprovers({
|
|
32
|
+
explicit: account.execApprovals?.approvers ?? resolveSlackOwnerApprovers(params.cfg),
|
|
33
|
+
normalizeApprover: normalizeSlackApproverId
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function isSlackExecApprovalTargetRecipient(params) {
|
|
37
|
+
return isChannelExecApprovalTargetRecipient({
|
|
38
|
+
...params,
|
|
39
|
+
channel: "slack",
|
|
40
|
+
normalizeSenderId: normalizeSlackApproverId,
|
|
41
|
+
matchTarget: ({ target, normalizedSenderId }) => normalizeSlackApproverId(target.to) === normalizedSenderId
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const slackExecApprovalProfile = createChannelExecApprovalProfile({
|
|
45
|
+
resolveConfig: (params) => resolveSlackAccount(params).config.execApprovals,
|
|
46
|
+
resolveApprovers: getSlackExecApprovalApprovers,
|
|
47
|
+
normalizeSenderId: normalizeSlackApproverId,
|
|
48
|
+
isTargetRecipient: isSlackExecApprovalTargetRecipient,
|
|
49
|
+
matchesRequestAccount: (params) => doesApprovalRequestMatchChannelAccount({
|
|
50
|
+
cfg: params.cfg,
|
|
51
|
+
request: params.request,
|
|
52
|
+
channel: "slack",
|
|
53
|
+
accountId: params.accountId
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
const isSlackExecApprovalClientEnabled = slackExecApprovalProfile.isClientEnabled;
|
|
57
|
+
slackExecApprovalProfile.isApprover;
|
|
58
|
+
const isSlackExecApprovalAuthorizedSender = slackExecApprovalProfile.isAuthorizedSender;
|
|
59
|
+
const resolveSlackExecApprovalTarget = slackExecApprovalProfile.resolveTarget;
|
|
60
|
+
const shouldHandleSlackExecApprovalRequest = slackExecApprovalProfile.shouldHandleRequest;
|
|
61
|
+
const shouldSuppressLocalSlackExecApprovalPrompt = slackExecApprovalProfile.shouldSuppressLocalPrompt;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region extensions/slack/src/approval-auth.ts
|
|
64
|
+
function getSlackApprovalApprovers(params) {
|
|
65
|
+
const account = resolveSlackAccount(params).config;
|
|
66
|
+
return resolveApprovalApprovers({
|
|
67
|
+
allowFrom: resolveSlackAccountAllowFrom(params),
|
|
68
|
+
defaultTo: account.defaultTo,
|
|
69
|
+
normalizeApprover: normalizeSlackApproverId,
|
|
70
|
+
normalizeDefaultTo: normalizeSlackApproverId
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function isSlackApprovalAuthorizedSender(params) {
|
|
74
|
+
const senderId = params.senderId ? normalizeSlackApproverId(params.senderId) : void 0;
|
|
75
|
+
if (!senderId) return false;
|
|
76
|
+
return getSlackApprovalApprovers(params).includes(senderId);
|
|
77
|
+
}
|
|
78
|
+
createResolvedApproverActionAuthAdapter({
|
|
79
|
+
channelLabel: "Slack",
|
|
80
|
+
resolveApprovers: ({ cfg, accountId }) => getSlackApprovalApprovers({
|
|
81
|
+
cfg,
|
|
82
|
+
accountId
|
|
83
|
+
}),
|
|
84
|
+
normalizeSenderId: (value) => normalizeSlackApproverId(value)
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region extensions/slack/src/group-policy.ts
|
|
88
|
+
function resolveSlackChannelPolicyEntry(params) {
|
|
89
|
+
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSlackAccountId(params.cfg));
|
|
90
|
+
const channelMap = mergeSlackAccountConfig(params.cfg, accountId).channels ?? {};
|
|
91
|
+
if (Object.keys(channelMap).length === 0) return;
|
|
92
|
+
const channelId = params.groupId?.trim();
|
|
93
|
+
const channelName = params.groupChannel?.replace(/^#/, "");
|
|
94
|
+
const normalizedName = normalizeHyphenSlug(channelName);
|
|
95
|
+
const candidates = [
|
|
96
|
+
channelId ?? "",
|
|
97
|
+
channelName ? `#${channelName}` : "",
|
|
98
|
+
channelName ?? "",
|
|
99
|
+
normalizedName
|
|
100
|
+
].filter(Boolean);
|
|
101
|
+
for (const candidate of candidates) if (candidate && channelMap[candidate]) return channelMap[candidate];
|
|
102
|
+
return channelMap["*"];
|
|
103
|
+
}
|
|
104
|
+
function resolveSenderToolsEntry(entry, params) {
|
|
105
|
+
if (!entry) return;
|
|
106
|
+
return resolveToolsBySender({
|
|
107
|
+
toolsBySender: entry.toolsBySender,
|
|
108
|
+
senderId: params.senderId,
|
|
109
|
+
senderName: params.senderName,
|
|
110
|
+
senderUsername: params.senderUsername,
|
|
111
|
+
senderE164: params.senderE164
|
|
112
|
+
}) ?? entry.tools;
|
|
113
|
+
}
|
|
114
|
+
function resolveSlackGroupRequireMention(params) {
|
|
115
|
+
const resolved = resolveSlackChannelPolicyEntry(params);
|
|
116
|
+
if (typeof resolved?.requireMention === "boolean") return resolved.requireMention;
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
function resolveSlackGroupToolPolicy(params) {
|
|
120
|
+
return resolveSenderToolsEntry(resolveSlackChannelPolicyEntry(params), params);
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region extensions/slack/src/reply-blocks.ts
|
|
124
|
+
function resolveSlackReplyBlocks(payload) {
|
|
125
|
+
const slackData = payload.channelData?.slack;
|
|
126
|
+
const interactiveBlocks = buildSlackInteractiveBlocks(payload.interactive);
|
|
127
|
+
let channelBlocks = [];
|
|
128
|
+
if (slackData && typeof slackData === "object" && !Array.isArray(slackData)) channelBlocks = parseSlackBlocksInput(slackData.blocks) ?? [];
|
|
129
|
+
const blocks = [...channelBlocks, ...interactiveBlocks];
|
|
130
|
+
if (blocks.length > 50) throw new Error(`Slack blocks cannot exceed 50 items after interactive render`);
|
|
131
|
+
return blocks.length > 0 ? blocks : void 0;
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
export { getSlackExecApprovalApprovers as a, normalizeSlackApproverId as c, shouldSuppressLocalSlackExecApprovalPrompt as d, isSlackApprovalAuthorizedSender as i, resolveSlackExecApprovalTarget as l, resolveSlackGroupRequireMention as n, isSlackExecApprovalAuthorizedSender as o, resolveSlackGroupToolPolicy as r, isSlackExecApprovalClientEnabled as s, resolveSlackReplyBlocks as t, shouldHandleSlackExecApprovalRequest as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
-
import { r as createSlackWebClient } from "./client-
|
|
3
|
-
import { n as resolveSlackAllowlistEntries, t as collectSlackCursorItems } from "./resolve-allowlist-common-
|
|
2
|
+
import { r as createSlackWebClient } from "./client-C_IaJbi5.js";
|
|
3
|
+
import { n as resolveSlackAllowlistEntries, t as collectSlackCursorItems } from "./resolve-allowlist-common-DLub2I2i.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/slack/src/resolve-channels.ts
|
|
6
6
|
var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveSlackChannelAllowlist: () => resolveSlackChannelAllowlist });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
-
import { r as createSlackWebClient } from "./client-
|
|
3
|
-
import { n as resolveSlackAllowlistEntries, t as collectSlackCursorItems } from "./resolve-allowlist-common-
|
|
2
|
+
import { r as createSlackWebClient } from "./client-C_IaJbi5.js";
|
|
3
|
+
import { n as resolveSlackAllowlistEntries, t as collectSlackCursorItems } from "./resolve-allowlist-common-DLub2I2i.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/slack/src/resolve-users.ts
|
|
6
6
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveSlackUserAllowlist: () => resolveSlackUserAllowlist });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as normalizeSlackSlug, i as normalizeSlackAllowOwnerEntry, n as normalizeAllowList, o as resolveSlackAllowListMatch, r as normalizeAllowListLower, t as allowListMatches } from "./allow-list-
|
|
2
|
-
import { t as formatSlackError } from "./errors-
|
|
1
|
+
import { a as normalizeSlackSlug, i as normalizeSlackAllowOwnerEntry, n as normalizeAllowList, o as resolveSlackAllowListMatch, r as normalizeAllowListLower, t as allowListMatches } from "./allow-list-nwXs_eCP.js";
|
|
2
|
+
import { t as formatSlackError } from "./errors-C_sW0Zgl.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { resolveAgentRoute, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
5
5
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
@@ -15,6 +15,7 @@ import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context
|
|
|
15
15
|
import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
16
16
|
import { resolveDefaultAgentId } from "openclaw/plugin-sdk/agent-runtime";
|
|
17
17
|
import { applyChannelMatchMeta, buildChannelKeyCandidates, resolveChannelEntryMatchWithFallback } from "openclaw/plugin-sdk/channel-targets";
|
|
18
|
+
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
18
19
|
import { createChannelIngressResolver, defineStableChannelIngressIdentity, readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
19
20
|
import { buildUntrustedChannelMetadata } from "openclaw/plugin-sdk/security-runtime";
|
|
20
21
|
//#region extensions/slack/src/monitor/commands.ts
|
|
@@ -83,6 +84,7 @@ function resolveSlackChannelConfig(params) {
|
|
|
83
84
|
allowed: firstDefined(resolved.enabled, fallback?.enabled, true) ?? true,
|
|
84
85
|
requireMention: firstDefined(resolved.requireMention, fallback?.requireMention, requireMentionDefault) ?? requireMentionDefault,
|
|
85
86
|
allowBots: firstDefined(resolved.allowBots, fallback?.allowBots),
|
|
87
|
+
botLoopProtection: mergePairLoopGuardConfig(fallback?.botLoopProtection, matched?.botLoopProtection),
|
|
86
88
|
users: firstDefined(resolved.users, fallback?.users),
|
|
87
89
|
skills: firstDefined(resolved.skills, fallback?.skills),
|
|
88
90
|
systemPrompt: firstDefined(resolved.systemPrompt, fallback?.systemPrompt)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./target-parsing-CQmv-iSm.js";
|
|
2
|
-
import "./
|
|
3
|
-
import "./config-api-
|
|
2
|
+
import "./client-C_IaJbi5.js";
|
|
3
|
+
import "./config-api-CmgE_ORg.js";
|
|
4
4
|
import { createActionGate as createActionGate$1, imageResultFromFile, jsonResult, readNumberParam, readReactionParams, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
import "openclaw/plugin-sdk/account-id";
|
|
6
6
|
import "openclaw/plugin-sdk/channel-status";
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, d as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts, u as resolveSlackAppToken } from "./accounts-
|
|
2
|
-
import { n as
|
|
3
|
-
import { n as setSlackRuntime } from "./runtime-
|
|
4
|
-
import { t as sendMessageSlack } from "./send-
|
|
5
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-
|
|
6
|
-
import { t as probeSlack } from "./probe-
|
|
7
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
8
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
9
|
-
import { t as monitorSlackProvider } from "./provider-
|
|
10
|
-
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-
|
|
11
|
-
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-
|
|
12
|
-
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-
|
|
13
|
-
import "./monitor-
|
|
1
|
+
import { a as resolveSlackAccount, d as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts, u as resolveSlackAppToken } from "./accounts-yk5K3wQU.js";
|
|
2
|
+
import { n as resolveSlackGroupRequireMention, r as resolveSlackGroupToolPolicy } from "./reply-blocks-BFaJ_ejG.js";
|
|
3
|
+
import { n as setSlackRuntime } from "./runtime-DQxkf7k2.js";
|
|
4
|
+
import { t as sendMessageSlack } from "./send-Dg9zcyYT.js";
|
|
5
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-BibhOXpJ.js";
|
|
6
|
+
import { t as probeSlack } from "./probe-FL4sUJsH.js";
|
|
7
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-B_eKaOkE.js";
|
|
8
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-BzBAJwvq.js";
|
|
9
|
+
import { t as monitorSlackProvider } from "./provider-C6WxaFFf.js";
|
|
10
|
+
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-CRnfsTTX.js";
|
|
11
|
+
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-CyE2jfW-.js";
|
|
12
|
+
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-CZPzpQZF.js";
|
|
13
|
+
import "./monitor-DDE5AI2O.js";
|
|
14
14
|
export { deleteSlackMessage, editSlackMessage, getSlackMemberInfo, handleSlackAction, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsLive, listSlackDirectoryPeersLive, listSlackEmojis, listSlackPins, listSlackReactions, monitorSlackProvider, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, registerSlackPluginHttpRoutes, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAppToken, resolveSlackBotToken, resolveSlackChannelAllowlist, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackUserAllowlist, sendMessageSlack, sendSlackMessage, setSlackRuntime, slackActionRuntime, unpinSlackMessage };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as setSlackRuntime } from "./runtime-
|
|
1
|
+
import { n as setSlackRuntime } from "./runtime-DQxkf7k2.js";
|
|
2
2
|
export { setSlackRuntime };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as createSlackWebClient } from "./client-
|
|
2
|
-
import { t as formatSlackError } from "./errors-
|
|
1
|
+
import { r as createSlackWebClient } from "./client-C_IaJbi5.js";
|
|
2
|
+
import { t as formatSlackError } from "./errors-C_sW0Zgl.js";
|
|
3
3
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/slack/src/scopes.ts
|
|
5
5
|
function collectScopes(value, into) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-
|
|
1
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-0TL3L5Kb.js";
|
|
2
2
|
export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as collectSlackSecurityAuditFindings } from "./security-audit-
|
|
1
|
+
import { t as collectSlackSecurityAuditFindings } from "./security-audit-BJzADAw3.js";
|
|
2
2
|
export { collectSlackSecurityAuditFindings };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-yk5K3wQU.js";
|
|
2
2
|
import { r as parseSlackTarget } from "./target-parsing-CQmv-iSm.js";
|
|
3
3
|
import "./targets-B1tYCAr6.js";
|
|
4
|
-
import {
|
|
5
|
-
import { a as getSlackWriteClient, n as createSlackTokenCacheKey } from "./client-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { i as loadOutboundMediaFromUrl } from "./runtime-api-Dd1xIV5v.js";
|
|
4
|
+
import { a as validateSlackBlocksArray, o as SLACK_TEXT_LIMIT, s as truncateSlackText, t as normalizeSlackThreadTsCandidate } from "./thread-ts-As_dcNbD.js";
|
|
5
|
+
import { a as getSlackWriteClient, n as createSlackTokenCacheKey } from "./client-C_IaJbi5.js";
|
|
6
|
+
import { t as getOptionalSlackRuntime } from "./runtime-DQxkf7k2.js";
|
|
7
|
+
import { i as loadOutboundMediaFromUrl } from "./runtime-api-B5HGOzX3.js";
|
|
9
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
9
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-message";
|
|
11
10
|
import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as resolveSlackAccount } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { a as resolveSlackAccount } from "./accounts-yk5K3wQU.js";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-BJyQLSkN.js";
|
|
3
3
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createAllowlistSetupWizardProxy, createEnvPatchedAccountSetupAdapter, createLegacyCompatChannelDmPolicy, createStandardChannelSetupStatus, parseMentionOrPrefixedId, patchChannelConfigForAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as slackSetupPlugin } from "./channel.setup-CmG37S2W.js";
|
|
2
2
|
export { slackSetupPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-
|
|
2
|
-
import "./shared-
|
|
3
|
-
import { i as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-
|
|
4
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
5
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-yk5K3wQU.js";
|
|
2
|
+
import "./shared-GoB-OuUq.js";
|
|
3
|
+
import { i as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-WWQl-cE9.js";
|
|
4
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-B_eKaOkE.js";
|
|
5
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-BzBAJwvq.js";
|
|
6
6
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
7
7
|
import { noteChannelLookupFailure, noteChannelLookupSummary, parseMentionOrPrefixedId, promptLegacyChannelAllowFromForAccount, resolveEntriesWithOptionalToken } from "openclaw/plugin-sdk/setup-runtime";
|
|
8
8
|
import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
3
|
-
import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-
|
|
4
|
-
import {
|
|
5
|
-
import { i as SLACK_CHANNEL } from "./setup-core-
|
|
6
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
7
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
8
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy } from "./accounts-yk5K3wQU.js";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-BJyQLSkN.js";
|
|
3
|
+
import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-BSg5hXhj.js";
|
|
4
|
+
import { f as getChatChannelMeta } from "./client-C_IaJbi5.js";
|
|
5
|
+
import { i as SLACK_CHANNEL } from "./setup-core-WWQl-cE9.js";
|
|
6
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-CNRousxw.js";
|
|
7
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-B8QIWMs1.js";
|
|
8
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-0TL3L5Kb.js";
|
|
9
9
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
10
10
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
11
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
@@ -45,7 +45,7 @@ const collectSlackSecurityWarnings = createOpenProviderConfiguredRouteWarningCol
|
|
|
45
45
|
remediation: "Set channels.slack.groupPolicy=\"allowlist\" and configure channels.slack.channels"
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-
|
|
48
|
+
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-BJzADAw3.js").then((n) => n.n));
|
|
49
49
|
const slackSecurityAdapter = {
|
|
50
50
|
resolveDmPolicy: resolveSlackDmPolicy,
|
|
51
51
|
collectWarnings: collectSlackSecurityWarnings,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as deliverSlackSlashReplies$1 } from "./replies-
|
|
1
|
+
import { r as deliverSlackSlashReplies$1 } from "./replies-D0QXXSPP.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 { recordInboundSessionMetaSafe as recordInboundSessionMetaSafe$1, resolveConversationLabel as resolveConversationLabel$1 } from "openclaw/plugin-sdk/conversation-runtime";
|
package/dist/test-api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as createSlackActions, t as slackPlugin } from "./channel-
|
|
2
|
-
import { n as setSlackRuntime } from "./runtime-
|
|
3
|
-
import { t as sendMessageSlack } from "./send-
|
|
4
|
-
import { t as prepareSlackMessage } from "./prepare-
|
|
5
|
-
import { t as createInboundSlackTestContext } from "./prepare.test-helpers-
|
|
6
|
-
import { t as createSlackOutboundPayloadHarness } from "./outbound-payload.test-harness-
|
|
7
|
-
import { n as slackOutbound } from "./outbound-adapter-
|
|
1
|
+
import { a as createSlackActions, t as slackPlugin } from "./channel-Dh07mU_K.js";
|
|
2
|
+
import { n as setSlackRuntime } from "./runtime-DQxkf7k2.js";
|
|
3
|
+
import { t as sendMessageSlack } from "./send-Dg9zcyYT.js";
|
|
4
|
+
import { t as prepareSlackMessage } from "./prepare-D0tMg4dt.js";
|
|
5
|
+
import { t as createInboundSlackTestContext } from "./prepare.test-helpers-CU1qB54Q.js";
|
|
6
|
+
import { t as createSlackOutboundPayloadHarness } from "./outbound-payload.test-harness-BNxnP6MC.js";
|
|
7
|
+
import { n as slackOutbound } from "./outbound-adapter-BluPNDNi.js";
|
|
8
8
|
export { createInboundSlackTestContext, createSlackActions, createSlackOutboundPayloadHarness, prepareSlackMessage, sendMessageSlack, setSlackRuntime, slackOutbound, slackPlugin };
|