@openclaw/slack 2026.5.27-beta.1 → 2026.5.28-beta.1
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-vVg3pT03.js → account-inspect-CdGk6R7l.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-BnLQ3fe2.js → accounts-f6Xcv9Vi.js} +42 -1
- package/dist/accounts.runtime-BJt1IxOS.js +2 -0
- package/dist/{action-runtime-JVb7KyQs.js → action-runtime-BOEgcnv6.js} +7 -8
- package/dist/action-runtime.runtime-BXQYV0yA.js +2 -0
- package/dist/{actions-1o9nMIY8.js → actions-zfVWcIY6.js} +4 -4
- package/dist/{actions.runtime-qQtdNww-.js → actions.runtime-CoijPN8g.js} +1 -1
- package/dist/api.js +14 -17
- package/dist/{approval-handler.runtime-Ba8nwnYi.js → approval-handler.runtime-CWz3XLfN.js} +12 -69
- package/dist/{channel-Bd7eept6.js → channel-B9uavFQM.js} +25 -28
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-WNNVmCm0.js → channel.setup-oGp4gSTP.js} +4 -4
- package/dist/{client-Dc2Ji2YN.js → client-DowBk5k0.js} +6 -24
- package/dist/{config-schema-CUiDK8HV.js → config-schema-C0RewpJQ.js} +4 -0
- package/dist/contract-api.js +1 -1
- package/dist/{directory-config-9_djLTOK.js → directory-config-8UPAEyNg.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-Cl83cGLZ.js → directory-live-BFB1pSax.js} +2 -2
- package/dist/http-routes-api.js +1 -1
- package/dist/index.js +3 -7
- package/dist/{interactive-replies-DtYu4Sf5.js → interactive-replies-DrBq4Mld.js} +1 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-BieXX5lk.js → message-tool-api-B9M0zzlQ.js} +2 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Cn7LUDFL.js → monitor-BzzGqB63.js} +3 -4
- package/dist/{outbound-adapter-ChuR4_0v.js → outbound-adapter-BHZMgblN.js} +4 -7
- package/dist/{prepare-Bl5WcC3f.js → pipeline.runtime-XK36f1W3.js} +1769 -47
- package/dist/plugin-routes-B9PvcDQJ.js +22 -0
- package/dist/{policy-pu8tsF8_.js → policy-BBDU-PQK.js} +1 -1
- package/dist/{probe-cBVPhCKZ.js → probe-Djes9Fy6.js} +1 -1
- package/dist/{provider-Bccng2Wp.js → provider-CfZypaNV.js} +826 -26
- package/dist/{replies-jiEDV6lH.js → replies-DkmWK7JW.js} +2 -4
- package/dist/{resolve-channels-CT4oiz_9.js → resolve-channels-zXt5f47h.js} +1 -1
- package/dist/{resolve-users-o5S-Ijks.js → resolve-users-BLfGAz1v.js} +1 -1
- package/dist/{runtime-api-CyPE-EvY.js → runtime-api-DvpUD2hw.js} +2 -2
- package/dist/runtime-api.js +12 -12
- package/dist/{scopes-CnyhLIPT.js → scopes-DiiHsqh1.js} +1 -1
- package/dist/{send-DvfE8LVm.js → send-BURYyCXI.js} +4 -4
- package/dist/send.runtime-CKaMG3s-.js +2 -0
- package/dist/{setup-core-DKe7Ug3V.js → setup-core-POfI_bgP.js} +2 -2
- package/dist/setup-entry.js +8 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-gjRthuZA.js → setup-surface-DJTHAguz.js} +5 -5
- package/dist/{shared-D8A7iVVH.js → shared-D9WMYymo.js} +5 -5
- package/dist/{slash-dispatch.runtime-BBhdJHb8.js → slash-dispatch.runtime-lsyTm_q5.js} +1 -1
- package/dist/thread-ts-NSVqWybn.js +646 -0
- package/node_modules/semver/classes/range.js +7 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/semver/ranges/subset.js +2 -2
- package/npm-shrinkwrap.json +6 -29
- package/openclaw.plugin.json +10 -0
- package/package.json +8 -7
- package/dist/accounts.runtime-BVdtQeuq.js +0 -2
- package/dist/action-runtime.runtime-BZa5VDjs.js +0 -2
- package/dist/allow-list-B1lkGjwl.js +0 -82
- package/dist/blocks-render-CNC4vQnd.js +0 -232
- package/dist/inbound-contract-test-api.js +0 -3
- package/dist/magic-string.es-BPXBBMwL.js +0 -1011
- package/dist/outbound-payload-test-api.js +0 -2
- package/dist/outbound-payload.test-harness-8MnHFgR1.js +0 -13551
- package/dist/pipeline.runtime-BVK8yXw_.js +0 -1473
- package/dist/plugin-routes-DRR3ijKM.js +0 -20
- package/dist/prepare.test-helpers-BcAo4KMw.js +0 -49
- package/dist/reply-blocks-BlOURkUm.js +0 -290
- package/dist/room-context-BmNTBiw5.js +0 -816
- package/dist/send.runtime-Dv6ajTGK.js +0 -2
- package/dist/send.runtime-v3TSw9xY.js +0 -2
- package/dist/test-api.js +0 -8
- package/dist/thread-ts-ks-O8cEG.js +0 -52
- package/node_modules/agent-base/LICENSE +0 -22
- package/node_modules/agent-base/README.md +0 -69
- package/node_modules/agent-base/dist/helpers.d.ts +0 -10
- package/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
- package/node_modules/agent-base/dist/helpers.js +0 -37
- package/node_modules/agent-base/dist/helpers.js.map +0 -1
- package/node_modules/agent-base/dist/index.d.ts +0 -37
- package/node_modules/agent-base/dist/index.d.ts.map +0 -1
- package/node_modules/agent-base/dist/index.js +0 -146
- package/node_modules/agent-base/dist/index.js.map +0 -1
- package/node_modules/agent-base/package.json +0 -46
- package/node_modules/https-proxy-agent/LICENSE +0 -22
- package/node_modules/https-proxy-agent/README.md +0 -70
- package/node_modules/https-proxy-agent/dist/index.d.ts +0 -43
- package/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/https-proxy-agent/dist/index.js +0 -150
- package/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -12
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -94
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
- package/node_modules/https-proxy-agent/package.json +0 -50
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-
|
|
1
|
+
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-f6Xcv9Vi.js";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
3
3
|
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { t as inspectSlackAccount } from "./account-inspect-CdGk6R7l.js";
|
|
2
2
|
//#region extensions/slack/account-inspect-api.ts
|
|
3
3
|
function inspectSlackReadOnlyAccount(cfg, accountId) {
|
|
4
4
|
return inspectSlackAccount({
|
|
@@ -49,13 +49,54 @@ const resolveDefaultSlackAccountId = resolveDefaultAccountId;
|
|
|
49
49
|
function resolveSlackAccountConfig(cfg, accountId) {
|
|
50
50
|
return resolveAccountEntry(cfg.channels?.slack?.accounts, accountId);
|
|
51
51
|
}
|
|
52
|
+
function asStreamingConfigObject(value) {
|
|
53
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
54
|
+
}
|
|
55
|
+
function asLegacyStreamingScalar(value) {
|
|
56
|
+
return typeof value === "boolean" || typeof value === "string" ? value : void 0;
|
|
57
|
+
}
|
|
58
|
+
function mergeSlackStreamingConfig(base, account) {
|
|
59
|
+
const accountObject = asStreamingConfigObject(account);
|
|
60
|
+
if (account !== void 0 && !accountObject) return asLegacyStreamingScalar(account);
|
|
61
|
+
const baseObject = asStreamingConfigObject(base);
|
|
62
|
+
if (base !== void 0 && !baseObject) return accountObject ?? asLegacyStreamingScalar(base);
|
|
63
|
+
const baseConfig = baseObject;
|
|
64
|
+
const accountConfig = accountObject;
|
|
65
|
+
if (!baseConfig || !accountConfig) return accountConfig ?? baseConfig;
|
|
66
|
+
return {
|
|
67
|
+
...baseConfig,
|
|
68
|
+
...accountConfig,
|
|
69
|
+
...baseConfig.preview || accountConfig.preview ? { preview: {
|
|
70
|
+
...baseConfig.preview,
|
|
71
|
+
...accountConfig.preview
|
|
72
|
+
} } : {},
|
|
73
|
+
...baseConfig.progress || accountConfig.progress ? { progress: {
|
|
74
|
+
...baseConfig.progress,
|
|
75
|
+
...accountConfig.progress
|
|
76
|
+
} } : {},
|
|
77
|
+
...baseConfig.block || accountConfig.block ? { block: {
|
|
78
|
+
...baseConfig.block,
|
|
79
|
+
...accountConfig.block,
|
|
80
|
+
...baseConfig.block?.coalesce || accountConfig.block?.coalesce ? { coalesce: {
|
|
81
|
+
...baseConfig.block?.coalesce,
|
|
82
|
+
...accountConfig.block?.coalesce
|
|
83
|
+
} } : {}
|
|
84
|
+
} } : {}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
52
87
|
function mergeSlackAccountConfig(cfg, accountId) {
|
|
53
|
-
|
|
88
|
+
const accountConfig = resolveSlackAccountConfig(cfg, accountId);
|
|
89
|
+
const merged = resolveMergedAccountConfig({
|
|
54
90
|
channelConfig: cfg.channels?.slack,
|
|
55
91
|
accounts: cfg.channels?.slack?.accounts,
|
|
56
92
|
accountId,
|
|
57
93
|
nestedObjectKeys: ["botLoopProtection"]
|
|
58
94
|
});
|
|
95
|
+
const streaming = mergeSlackStreamingConfig((cfg.channels?.slack)?.streaming, accountConfig?.streaming);
|
|
96
|
+
return streaming !== void 0 ? {
|
|
97
|
+
...merged,
|
|
98
|
+
streaming
|
|
99
|
+
} : merged;
|
|
59
100
|
}
|
|
60
101
|
function resolveSlackAccountAllowFrom(params) {
|
|
61
102
|
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSlackAccountId(params.cfg));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as resolveSlackChannelId, r as parseSlackTarget } from "./target-parsing-C7eeWg7M.js";
|
|
2
2
|
import "./targets-nUqxHGgg.js";
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
3
|
+
import { a as parseSlackBlocksInput } from "./thread-ts-NSVqWybn.js";
|
|
4
|
+
import { a as readPositiveIntegerParam, c as withNormalizedTimestamp, n as imageResultFromFile, o as readReactionParams, r as jsonResult, s as readStringParam, t as createActionGate } from "./runtime-api-DvpUD2hw.js";
|
|
5
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-BBDU-PQK.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
|
|
8
8
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -30,11 +30,11 @@ function sameSlackChannelTarget(targetChannel, currentChannelId) {
|
|
|
30
30
|
let slackActionsRuntimePromise;
|
|
31
31
|
let slackAccountsRuntimePromise;
|
|
32
32
|
function loadSlackActionsRuntime() {
|
|
33
|
-
slackActionsRuntimePromise ??= import("./actions.runtime-
|
|
33
|
+
slackActionsRuntimePromise ??= import("./actions.runtime-CoijPN8g.js");
|
|
34
34
|
return slackActionsRuntimePromise;
|
|
35
35
|
}
|
|
36
36
|
function loadSlackAccountsRuntime() {
|
|
37
|
-
slackAccountsRuntimePromise ??= import("./accounts.runtime-
|
|
37
|
+
slackAccountsRuntimePromise ??= import("./accounts.runtime-BJt1IxOS.js");
|
|
38
38
|
return slackAccountsRuntimePromise;
|
|
39
39
|
}
|
|
40
40
|
function createLazySlackAction(key) {
|
|
@@ -270,8 +270,7 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
270
270
|
cfg,
|
|
271
271
|
channelId
|
|
272
272
|
});
|
|
273
|
-
const
|
|
274
|
-
const limit = typeof limitRaw === "number" && Number.isFinite(limitRaw) ? limitRaw : void 0;
|
|
273
|
+
const limit = readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." });
|
|
275
274
|
const before = readStringParam(params, "before");
|
|
276
275
|
const after = readStringParam(params, "after");
|
|
277
276
|
const threadId = readStringParam(params, "threadId");
|
|
@@ -379,8 +378,8 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
379
378
|
}
|
|
380
379
|
if (action === "emojiList") {
|
|
381
380
|
if (!isActionEnabled("emojiList")) throw new Error("Slack emoji list is disabled.");
|
|
381
|
+
const limit = readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." });
|
|
382
382
|
const result = readOpts ? await slackActionRuntime.listSlackEmojis(readOpts) : await slackActionRuntime.listSlackEmojis();
|
|
383
|
-
const limit = readNumberParam(params, "limit", { integer: true });
|
|
384
383
|
if (limit != null && limit > 0 && result.emoji != null) {
|
|
385
384
|
const entries = Object.entries(result.emoji).toSorted(([a], [b]) => a.localeCompare(b));
|
|
386
385
|
if (entries.length > limit) return jsonResult({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-
|
|
3
|
-
import {
|
|
4
|
-
import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-
|
|
5
|
-
import { c as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-
|
|
2
|
+
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-f6Xcv9Vi.js";
|
|
3
|
+
import { b as truncateSlackText, o as validateSlackBlocksArray, s as SLACK_TEXT_LIMIT } from "./thread-ts-NSVqWybn.js";
|
|
4
|
+
import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-DowBk5k0.js";
|
|
5
|
+
import { c as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-BURYyCXI.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
8
8
|
import { logVerbose, logVerbose as logVerbose$1 } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-
|
|
1
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-zfVWcIY6.js";
|
|
2
2
|
export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, sendSlackMessage, unpinSlackMessage };
|
package/dist/api.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
1
|
+
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-bbjH7IHX.js";
|
|
2
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackReplyToMode, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts } from "./accounts-f6Xcv9Vi.js";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-CdGk6R7l.js";
|
|
3
4
|
import { i as resolveSlackChannelId, n as normalizeSlackMessagingTarget, r as parseSlackTarget, t as looksLikeSlackTargetId } from "./target-parsing-C7eeWg7M.js";
|
|
4
5
|
import "./targets-nUqxHGgg.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
11
|
-
import { a as
|
|
12
|
-
import { a as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-1o9nMIY8.js";
|
|
16
|
-
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-9_djLTOK.js";
|
|
17
|
-
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-bbjH7IHX.js";
|
|
18
|
-
import { t as probeSlack } from "./probe-cBVPhCKZ.js";
|
|
6
|
+
import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-B9uavFQM.js";
|
|
7
|
+
import { _ as buildSlackInteractiveBlocks, a as parseSlackBlocksInput, c as resolveSlackGroupRequireMention, d as normalizeAllowList, f as normalizeAllowListLower, g as resolveSlackUserAllowed, h as resolveSlackAllowListMatch, i as SLACK_MAX_BLOCKS, l as resolveSlackGroupToolPolicy, m as normalizeSlackSlug, o as validateSlackBlocksArray, p as normalizeSlackAllowOwnerEntry, u as allowListMatches, v as buildSlackPresentationBlocks } from "./thread-ts-NSVqWybn.js";
|
|
8
|
+
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-B9M0zzlQ.js";
|
|
9
|
+
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-DrBq4Mld.js";
|
|
10
|
+
import { a as getSlackWriteClient, c as resolveSlackWebClientOptions, i as createSlackWriteClient, l as resolveSlackWriteClientOptions, n as createSlackTokenCacheKey, o as SLACK_DEFAULT_RETRY_OPTIONS, r as createSlackWebClient, s as SLACK_WRITE_RETRY_OPTIONS, t as clearSlackWriteClientCacheForTest } from "./client-DowBk5k0.js";
|
|
11
|
+
import { t as slackSetupPlugin } from "./channel.setup-oGp4gSTP.js";
|
|
12
|
+
import { a as recordSlackThreadParticipation, n as clearSlackThreadParticipationCache, r as hasSlackThreadParticipation } from "./send-BURYyCXI.js";
|
|
13
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-zfVWcIY6.js";
|
|
14
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-8UPAEyNg.js";
|
|
15
|
+
import { t as probeSlack } from "./probe-Djes9Fy6.js";
|
|
19
16
|
import { t as collectSlackSecurityAuditFindings } from "./security-audit-CikQhBUY.js";
|
|
20
|
-
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-
|
|
17
|
+
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-CfZypaNV.js";
|
|
21
18
|
export { SLACK_DEFAULT_RETRY_OPTIONS, SLACK_MAX_BLOCKS, SLACK_WRITE_RETRY_OPTIONS, resetSlackChannelTypeCacheForTest as __resetSlackChannelTypeCacheForTest, resetSlackChannelTypeCacheForTest, allowListMatches, buildSlackInteractiveBlocks, buildSlackPresentationBlocks, buildSlackThreadingToolContext, clearSlackThreadParticipationCache, clearSlackWriteClientCacheForTest, collectSlackSecurityAuditFindings, compileSlackInteractiveReplies, createSlackTokenCacheKey, createSlackWebClient, createSlackWriteClient, deleteSlackMessage, downloadSlackFile, editSlackMessage, extractSlackToolSend, getSlackMemberInfo, getSlackWriteClient, handleSlackHttpRequest, hasSlackThreadParticipation, inspectSlackAccount, isSlackInteractiveRepliesEnabled, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig, listSlackEmojis, listSlackMessageActions, listSlackPins, listSlackReactions, looksLikeSlackTargetId, mergeSlackAccountConfig, normalizeAllowList, normalizeAllowListLower, normalizeSlackAllowOwnerEntry, normalizeSlackMessagingTarget, normalizeSlackSlug, normalizeSlackWebhookPath, parseSlackBlocksInput, parseSlackOptionsLine, parseSlackTarget, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, recordSlackThreadParticipation, registerSlackHttpHandler, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAllowListMatch, resolveSlackAutoThreadId, resolveSlackChannelId, resolveSlackChannelType, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackReplyToMode, resolveSlackRuntimeGroupPolicy, resolveSlackUserAllowed, resolveSlackWebClientOptions, resolveSlackWriteClientOptions, sendSlackMessage, slackPlugin, slackSetupPlugin, unpinSlackMessage, validateSlackBlocksArray };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as sendMessageSlack } from "./send-DvfE8LVm.js";
|
|
1
|
+
import { C as isSlackAnyNativeApprovalClientEnabled, T as shouldHandleSlackNativeApprovalRequest, b as truncateSlackText, j as normalizeSlackApproverId, r as resolveSlackReplyBlocks, w as resolveSlackApprovalKind } from "./thread-ts-NSVqWybn.js";
|
|
2
|
+
import { t as sendMessageSlack } from "./send-BURYyCXI.js";
|
|
4
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
4
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
6
5
|
import { logError } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -59,62 +58,6 @@ function buildSlackMetadataContextElements(metadata) {
|
|
|
59
58
|
});
|
|
60
59
|
return elements;
|
|
61
60
|
}
|
|
62
|
-
function isSlackApprovalDecision(value) {
|
|
63
|
-
return value === "allow-once" || value === "allow-always" || value === "deny";
|
|
64
|
-
}
|
|
65
|
-
function isSlackCommandApprovalAction(action) {
|
|
66
|
-
return action.kind === "command" && action.command.trim().length > 0;
|
|
67
|
-
}
|
|
68
|
-
function buildSlackApprovalCommandText(params) {
|
|
69
|
-
return `/approve ${params.approvalCommandId} ${params.decision}`;
|
|
70
|
-
}
|
|
71
|
-
function listSlackDecisionApprovalActions(approvalId, actions) {
|
|
72
|
-
const decisionActions = [];
|
|
73
|
-
for (const action of actions) {
|
|
74
|
-
const raw = action;
|
|
75
|
-
if ((raw.kind === "command" ? "command" : "decision") !== "decision" || !isSlackApprovalDecision(raw.decision)) continue;
|
|
76
|
-
if (typeof raw.label !== "string" || typeof raw.command !== "string" || raw.style !== "primary" && raw.style !== "secondary" && raw.style !== "success" && raw.style !== "danger") continue;
|
|
77
|
-
decisionActions.push({
|
|
78
|
-
kind: "decision",
|
|
79
|
-
decision: raw.decision,
|
|
80
|
-
label: raw.label,
|
|
81
|
-
command: buildSlackApprovalCommandText({
|
|
82
|
-
approvalCommandId: approvalId,
|
|
83
|
-
decision: raw.decision
|
|
84
|
-
}),
|
|
85
|
-
style: raw.style
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
return decisionActions;
|
|
89
|
-
}
|
|
90
|
-
function buildSlackDecisionActionBlocks(view) {
|
|
91
|
-
return resolveSlackReplyBlocks({
|
|
92
|
-
text: "",
|
|
93
|
-
presentation: buildApprovalPresentationFromActionDescriptors(listSlackDecisionApprovalActions(view.approvalId, view.actions))
|
|
94
|
-
}) ?? [];
|
|
95
|
-
}
|
|
96
|
-
function buildSlackCommandActionTextLines(actions) {
|
|
97
|
-
const commandActions = actions.filter(isSlackCommandApprovalAction);
|
|
98
|
-
if (commandActions.length === 0) return [];
|
|
99
|
-
return [
|
|
100
|
-
"",
|
|
101
|
-
"*Command actions*",
|
|
102
|
-
...commandActions.flatMap((action) => [truncateSlackMrkdwn(action.label, 120), buildSlackCodeBlock(action.command.trim())])
|
|
103
|
-
];
|
|
104
|
-
}
|
|
105
|
-
function buildSlackCommandActionBlocks(actions) {
|
|
106
|
-
return actions.filter(isSlackCommandApprovalAction).map((action, index) => {
|
|
107
|
-
const label = truncateSlackMrkdwn(action.label, 120);
|
|
108
|
-
const command = truncateSlackMrkdwn(action.command.trim(), 2600);
|
|
109
|
-
return {
|
|
110
|
-
type: "section",
|
|
111
|
-
text: {
|
|
112
|
-
type: "mrkdwn",
|
|
113
|
-
text: `${index === 0 ? "*Command actions*\n" : ""}${label}\n${buildSlackCodeBlock(command)}`
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
61
|
function resolveSlackApprovalDecisionLabel(decision) {
|
|
119
62
|
return decision === "allow-once" ? "Allowed once" : decision === "allow-always" ? "Allowed always" : "Denied";
|
|
120
63
|
}
|
|
@@ -135,8 +78,7 @@ function buildSlackExecPendingApprovalText(view) {
|
|
|
135
78
|
"",
|
|
136
79
|
"*Command*",
|
|
137
80
|
buildSlackCodeBlock(view.commandText),
|
|
138
|
-
...metadataLines
|
|
139
|
-
...buildSlackCommandActionTextLines(view.actions)
|
|
81
|
+
...metadataLines
|
|
140
82
|
].join("\n");
|
|
141
83
|
}
|
|
142
84
|
function buildSlackPluginPendingApprovalText(view) {
|
|
@@ -147,8 +89,7 @@ function buildSlackPluginPendingApprovalText(view) {
|
|
|
147
89
|
"",
|
|
148
90
|
"*Request*",
|
|
149
91
|
view.title,
|
|
150
|
-
...metadataLines
|
|
151
|
-
...buildSlackCommandActionTextLines(view.actions)
|
|
92
|
+
...metadataLines
|
|
152
93
|
].join("\n");
|
|
153
94
|
}
|
|
154
95
|
function buildSlackPendingApprovalText(view) {
|
|
@@ -156,8 +97,10 @@ function buildSlackPendingApprovalText(view) {
|
|
|
156
97
|
}
|
|
157
98
|
function buildSlackExecPendingApprovalBlocks(view) {
|
|
158
99
|
const metadataElements = buildSlackMetadataContextElements(view.metadata);
|
|
159
|
-
const
|
|
160
|
-
|
|
100
|
+
const interactiveBlocks = resolveSlackReplyBlocks({
|
|
101
|
+
text: "",
|
|
102
|
+
presentation: buildApprovalPresentationFromActionDescriptors(view.actions)
|
|
103
|
+
}) ?? [];
|
|
161
104
|
return [
|
|
162
105
|
{
|
|
163
106
|
type: "section",
|
|
@@ -177,14 +120,15 @@ function buildSlackExecPendingApprovalBlocks(view) {
|
|
|
177
120
|
type: "context",
|
|
178
121
|
elements: metadataElements
|
|
179
122
|
}] : [],
|
|
180
|
-
...commandActionBlocks,
|
|
181
123
|
...interactiveBlocks
|
|
182
124
|
];
|
|
183
125
|
}
|
|
184
126
|
function buildSlackPluginPendingApprovalBlocks(view) {
|
|
185
127
|
const metadataElements = buildSlackMetadataContextElements(buildSlackPluginMetadata(view));
|
|
186
|
-
const
|
|
187
|
-
|
|
128
|
+
const interactiveBlocks = resolveSlackReplyBlocks({
|
|
129
|
+
text: "",
|
|
130
|
+
presentation: buildApprovalPresentationFromActionDescriptors(view.actions)
|
|
131
|
+
}) ?? [];
|
|
188
132
|
return [
|
|
189
133
|
{
|
|
190
134
|
type: "section",
|
|
@@ -204,7 +148,6 @@ function buildSlackPluginPendingApprovalBlocks(view) {
|
|
|
204
148
|
type: "context",
|
|
205
149
|
elements: metadataElements
|
|
206
150
|
}] : [],
|
|
207
|
-
...commandActionBlocks,
|
|
208
151
|
...interactiveBlocks
|
|
209
152
|
];
|
|
210
153
|
}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackReplyToMode, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackReplyToMode, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-f6Xcv9Vi.js";
|
|
2
2
|
import { i as resolveSlackChannelId, n as normalizeSlackMessagingTarget, r as parseSlackTarget, t as looksLikeSlackTargetId } from "./target-parsing-C7eeWg7M.js";
|
|
3
3
|
import "./targets-nUqxHGgg.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import { n as
|
|
7
|
-
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-BieXX5lk.js";
|
|
8
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-DtYu4Sf5.js";
|
|
4
|
+
import { A as isSlackExecApprovalClientEnabled, C as isSlackAnyNativeApprovalClientEnabled, D as isSlackApprovalAuthorizedSender, E as getSlackApprovalApprovers, M as resolveSlackExecApprovalTarget, N as shouldSuppressLocalSlackExecApprovalPrompt, O as getSlackExecApprovalApprovers, T as shouldHandleSlackNativeApprovalRequest, _ as buildSlackInteractiveBlocks, c as resolveSlackGroupRequireMention, f as normalizeAllowListLower, k as isSlackExecApprovalAuthorizedSender, l as resolveSlackGroupToolPolicy, n as resolveSlackThreadTsValue, r as resolveSlackReplyBlocks, s as SLACK_TEXT_LIMIT, t as normalizeSlackThreadTsCandidate, v as buildSlackPresentationBlocks, w as resolveSlackApprovalKind, y as resolveSlackInteractiveBlockOffsets } from "./thread-ts-NSVqWybn.js";
|
|
5
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-B9M0zzlQ.js";
|
|
6
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-DrBq4Mld.js";
|
|
9
7
|
import { a as resolveConfiguredFromRequiredCredentialStatuses, i as projectCredentialSnapshotFields, n as PAIRING_APPROVED_MESSAGE, t as DEFAULT_ACCOUNT_ID } from "./channel-api-DdLCPu8a.js";
|
|
10
|
-
import { r as createSlackWebClient } from "./client-
|
|
11
|
-
import { r as normalizeAllowListLower } from "./allow-list-B1lkGjwl.js";
|
|
8
|
+
import { r as createSlackWebClient } from "./client-DowBk5k0.js";
|
|
12
9
|
import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
|
|
13
|
-
import { i as slackSecurityAdapter, n as isSlackPluginAccountConfigured, r as slackConfigAdapter, t as createSlackPluginBase } from "./shared-
|
|
14
|
-
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-
|
|
10
|
+
import { i as slackSecurityAdapter, n as isSlackPluginAccountConfigured, r as slackConfigAdapter, t as createSlackPluginBase } from "./shared-D9WMYymo.js";
|
|
11
|
+
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-POfI_bgP.js";
|
|
15
12
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
13
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
17
14
|
import { buildOutboundBaseSessionKey, normalizeMessageChannel } from "openclaw/plugin-sdk/routing";
|
|
@@ -30,7 +27,7 @@ import { createChannelNativeOriginTargetResolver, resolveApprovalRequestSessionC
|
|
|
30
27
|
import { channelRouteTargetsMatchExact, stringifyRouteThreadId } from "openclaw/plugin-sdk/channel-route";
|
|
31
28
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
32
29
|
import { normalizeInteractiveReply, normalizeMessagePresentation } from "openclaw/plugin-sdk/interactive-runtime";
|
|
33
|
-
import {
|
|
30
|
+
import { readPositiveIntegerParam, readStringParam } from "openclaw/plugin-sdk/param-readers";
|
|
34
31
|
//#region extensions/slack/src/action-threading.ts
|
|
35
32
|
function resolveSlackAutoThreadId(params) {
|
|
36
33
|
const context = params.toolContext;
|
|
@@ -235,7 +232,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
235
232
|
approvalKind: resolveSlackApprovalKind(request),
|
|
236
233
|
request
|
|
237
234
|
}),
|
|
238
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
235
|
+
load: async () => (await import("./approval-handler.runtime-CWz3XLfN.js")).slackApprovalNativeRuntime
|
|
239
236
|
})
|
|
240
237
|
});
|
|
241
238
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
|
|
@@ -328,7 +325,7 @@ async function handleSlackMessageAction(params) {
|
|
|
328
325
|
}
|
|
329
326
|
if (action === "reactions") {
|
|
330
327
|
const messageId = readStringParam(actionParams, "messageId", { required: true });
|
|
331
|
-
const limit =
|
|
328
|
+
const limit = readPositiveIntegerParam(actionParams, "limit", { message: "limit must be a positive integer." });
|
|
332
329
|
return await invoke({
|
|
333
330
|
action: "reactions",
|
|
334
331
|
channelId: resolveChannelId(),
|
|
@@ -338,7 +335,7 @@ async function handleSlackMessageAction(params) {
|
|
|
338
335
|
}, cfg);
|
|
339
336
|
}
|
|
340
337
|
if (action === "read") {
|
|
341
|
-
const limit =
|
|
338
|
+
const limit = readPositiveIntegerParam(actionParams, "limit", { message: "limit must be a positive integer." });
|
|
342
339
|
const readAction = {
|
|
343
340
|
action: "readMessages",
|
|
344
341
|
channelId: resolveChannelId(),
|
|
@@ -391,7 +388,7 @@ async function handleSlackMessageAction(params) {
|
|
|
391
388
|
}, cfg);
|
|
392
389
|
if (action === "emoji-list") return await invoke({
|
|
393
390
|
action: "emojiList",
|
|
394
|
-
limit:
|
|
391
|
+
limit: readPositiveIntegerParam(actionParams, "limit", { message: "limit must be a positive integer." }),
|
|
395
392
|
accountId
|
|
396
393
|
}, cfg);
|
|
397
394
|
if (action === "download-file") {
|
|
@@ -434,7 +431,7 @@ async function handleSlackMessageAction(params) {
|
|
|
434
431
|
//#region extensions/slack/src/channel-actions.ts
|
|
435
432
|
let slackActionRuntimePromise$1;
|
|
436
433
|
async function loadSlackActionRuntime$1() {
|
|
437
|
-
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-
|
|
434
|
+
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-BXQYV0yA.js");
|
|
438
435
|
return await slackActionRuntimePromise$1;
|
|
439
436
|
}
|
|
440
437
|
function resolveSlackActionContext(params) {
|
|
@@ -564,9 +561,9 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
|
|
|
564
561
|
const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
|
|
565
562
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
|
|
566
563
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
|
|
567
|
-
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-
|
|
568
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
569
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
564
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-DJTHAguz.js"));
|
|
565
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-DiiHsqh1.js"));
|
|
566
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-BHZMgblN.js"));
|
|
570
567
|
async function resolveSlackHandleAction() {
|
|
571
568
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
572
569
|
}
|
|
@@ -586,27 +583,27 @@ let slackSendRuntimePromise;
|
|
|
586
583
|
let slackProbeModulePromise;
|
|
587
584
|
let slackMonitorModulePromise;
|
|
588
585
|
let slackDirectoryLiveModulePromise;
|
|
589
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
590
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
591
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
586
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-8UPAEyNg.js").then((n) => n.t));
|
|
587
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-zXt5f47h.js").then((n) => n.n));
|
|
588
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-BLfGAz1v.js").then((n) => n.n));
|
|
592
589
|
async function loadSlackActionRuntime() {
|
|
593
|
-
slackActionRuntimePromise ??= import("./action-runtime.runtime-
|
|
590
|
+
slackActionRuntimePromise ??= import("./action-runtime.runtime-BXQYV0yA.js");
|
|
594
591
|
return await slackActionRuntimePromise;
|
|
595
592
|
}
|
|
596
593
|
async function loadSlackSendRuntime() {
|
|
597
|
-
slackSendRuntimePromise ??= import("./send.runtime-
|
|
594
|
+
slackSendRuntimePromise ??= import("./send.runtime-CKaMG3s-.js");
|
|
598
595
|
return await slackSendRuntimePromise;
|
|
599
596
|
}
|
|
600
597
|
async function loadSlackProbeModule() {
|
|
601
|
-
slackProbeModulePromise ??= import("./probe-
|
|
598
|
+
slackProbeModulePromise ??= import("./probe-Djes9Fy6.js").then((n) => n.n);
|
|
602
599
|
return await slackProbeModulePromise;
|
|
603
600
|
}
|
|
604
601
|
async function loadSlackMonitorModule() {
|
|
605
|
-
slackMonitorModulePromise ??= import("./monitor-
|
|
602
|
+
slackMonitorModulePromise ??= import("./monitor-BzzGqB63.js").then((n) => n.t);
|
|
606
603
|
return await slackMonitorModulePromise;
|
|
607
604
|
}
|
|
608
605
|
async function loadSlackDirectoryLiveModule() {
|
|
609
|
-
slackDirectoryLiveModulePromise ??= import("./directory-live-
|
|
606
|
+
slackDirectoryLiveModulePromise ??= import("./directory-live-BFB1pSax.js").then((n) => n.t);
|
|
610
607
|
return await slackDirectoryLiveModulePromise;
|
|
611
608
|
}
|
|
612
609
|
async function resolveSlackSendContext(params) {
|
|
@@ -1088,4 +1085,4 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1088
1085
|
outbound: slackChannelOutbound
|
|
1089
1086
|
});
|
|
1090
1087
|
//#endregion
|
|
1091
|
-
export {
|
|
1088
|
+
export { resolveSlackAutoThreadId as a, resolveSlackChannelType as i, buildSlackThreadingToolContext as n, resetSlackChannelTypeCacheForTest as r, slackPlugin as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-C0RewpJQ.js";
|
|
2
2
|
export { SlackChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-B9uavFQM.js";
|
|
2
2
|
export { slackPlugin };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-f6Xcv9Vi.js";
|
|
2
2
|
import "./channel-api-DdLCPu8a.js";
|
|
3
|
-
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-
|
|
4
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
3
|
+
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-POfI_bgP.js";
|
|
4
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-C0RewpJQ.js";
|
|
5
5
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
6
6
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
7
7
|
//#region extensions/slack/src/channel.setup.ts
|
|
8
|
-
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-
|
|
8
|
+
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-DJTHAguz.js")).slackSetupWizard }));
|
|
9
9
|
const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
|
|
10
10
|
sectionKey: SLACK_CHANNEL,
|
|
11
11
|
listAccountIds: listSlackAccountIds,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { WebClient } from "@slack/web-api";
|
|
3
|
-
import {
|
|
4
|
-
import { resolveActiveManagedProxyTlsOptions, resolveEnvHttpProxyUrl } from "openclaw/plugin-sdk/fetch-runtime";
|
|
3
|
+
import { createNodeProxyAgent } from "openclaw/plugin-sdk/fetch-runtime";
|
|
5
4
|
//#region extensions/slack/src/client-options.ts
|
|
6
5
|
const SLACK_DEFAULT_RETRY_OPTIONS = {
|
|
7
6
|
retries: 2,
|
|
@@ -12,22 +11,6 @@ const SLACK_DEFAULT_RETRY_OPTIONS = {
|
|
|
12
11
|
};
|
|
13
12
|
const SLACK_WRITE_RETRY_OPTIONS = { retries: 0 };
|
|
14
13
|
/**
|
|
15
|
-
* Check whether a hostname is excluded from proxying by `NO_PROXY` / `no_proxy`.
|
|
16
|
-
* Supports comma-separated entries with optional leading dots (e.g. `.slack.com`).
|
|
17
|
-
*/
|
|
18
|
-
function isHostExcludedByNoProxy(hostname, env = process.env) {
|
|
19
|
-
const raw = env.no_proxy ?? env.NO_PROXY;
|
|
20
|
-
if (!raw) return false;
|
|
21
|
-
const entries = raw.split(/[,\s]+/).map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
22
|
-
const lower = hostname.toLowerCase();
|
|
23
|
-
for (const entry of entries) {
|
|
24
|
-
if (entry === "*") return true;
|
|
25
|
-
const bare = entry.startsWith("*.") ? entry.slice(2) : entry.startsWith(".") ? entry.slice(1) : entry;
|
|
26
|
-
if (lower === bare || lower.endsWith(`.${bare}`)) return true;
|
|
27
|
-
}
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
14
|
* Build an HTTPS proxy agent from env vars (HTTPS_PROXY, HTTP_PROXY, etc.)
|
|
32
15
|
* for use as the `agent` option in Slack WebClient and Socket Mode connections.
|
|
33
16
|
*
|
|
@@ -43,13 +26,12 @@ function isHostExcludedByNoProxy(hostname, env = process.env) {
|
|
|
43
26
|
* are excluded by `NO_PROXY`.
|
|
44
27
|
*/
|
|
45
28
|
function resolveSlackProxyAgent() {
|
|
46
|
-
const proxyUrl = resolveEnvHttpProxyUrl("https");
|
|
47
|
-
if (!proxyUrl) return;
|
|
48
|
-
if (isHostExcludedByNoProxy("slack.com")) return;
|
|
49
|
-
const proxyTls = resolveActiveManagedProxyTlsOptions({ proxyUrl });
|
|
50
|
-
const proxyAgentOptions = proxyTls?.ca ? { ca: proxyTls.ca } : void 0;
|
|
51
29
|
try {
|
|
52
|
-
return
|
|
30
|
+
return createNodeProxyAgent({
|
|
31
|
+
mode: "env",
|
|
32
|
+
targetUrl: "https://slack.com/",
|
|
33
|
+
protocol: "https"
|
|
34
|
+
});
|
|
53
35
|
} catch {
|
|
54
36
|
return;
|
|
55
37
|
}
|
|
@@ -162,6 +162,10 @@ const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { u
|
|
|
162
162
|
label: "Slack Progress Renderer",
|
|
163
163
|
help: "Progress draft renderer: \"text\" uses one portable text body; \"rich\" renders structured Slack Block Kit fields with the same text fallback."
|
|
164
164
|
},
|
|
165
|
+
"streaming.progress.nativeTaskCards": {
|
|
166
|
+
label: "Slack Native Progress Task Cards",
|
|
167
|
+
help: "Opt in to Slack native task-card progress updates when channels.slack.streaming.mode=\"progress\" and streaming.nativeTransport is enabled. Default: false."
|
|
168
|
+
},
|
|
165
169
|
"streaming.progress.toolProgress": {
|
|
166
170
|
label: "Slack Progress Tool Lines",
|
|
167
171
|
help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery."
|
package/dist/contract-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DIMUXDHO.js";
|
|
2
2
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-g_PPWuoD.js";
|
|
3
|
-
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-
|
|
3
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-8UPAEyNg.js";
|
|
4
4
|
import { t as collectSlackSecurityAuditFindings } from "./security-audit-CikQhBUY.js";
|
|
5
5
|
export { collectRuntimeConfigAssignments, collectSlackSecurityAuditFindings, legacyConfigRules, listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig, normalizeCompatibilityConfig, secretTargetRegistryEntries };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-
|
|
2
|
+
import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-f6Xcv9Vi.js";
|
|
3
3
|
import { r as parseSlackTarget } from "./target-parsing-C7eeWg7M.js";
|
|
4
4
|
import "./targets-nUqxHGgg.js";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
@@ -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-8UPAEyNg.js";
|
|
2
2
|
export { listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { r as createSlackWebClient } from "./client-
|
|
2
|
+
import { a as resolveSlackAccount } from "./accounts-f6Xcv9Vi.js";
|
|
3
|
+
import { r as createSlackWebClient } from "./client-DowBk5k0.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({
|
package/dist/http-routes-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-
|
|
1
|
+
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-B9PvcDQJ.js";
|
|
2
2
|
export { registerSlackPluginHttpRoutes };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-B9PvcDQJ.js";
|
|
2
|
+
import "./http-routes-api.js";
|
|
3
|
+
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
4
|
//#region extensions/slack/index.ts
|
|
3
|
-
function registerSlackPluginHttpRoutes(api) {
|
|
4
|
-
loadBundledEntryExportSync(import.meta.url, {
|
|
5
|
-
specifier: "./http-routes-api.js",
|
|
6
|
-
exportName: "registerSlackPluginHttpRoutes"
|
|
7
|
-
})(api);
|
|
8
|
-
}
|
|
9
5
|
var slack_default = defineBundledChannelEntry({
|
|
10
6
|
id: "slack",
|
|
11
7
|
name: "Slack",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId } from "./accounts-f6Xcv9Vi.js";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries, normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/slack/src/interactive-replies.ts
|
|
4
4
|
const SLACK_BUTTON_MAX_ITEMS = 5;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
1
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-DrBq4Mld.js";
|
|
2
2
|
export { compileSlackInteractiveReplies, isSlackInteractiveRepliesEnabled };
|