@openclaw/slack 2026.6.10 → 2026.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-configured-DzC407uv.js +14 -0
- package/dist/{account-inspect-CdGk6R7l.js → account-inspect-DOtQbKkB.js} +5 -3
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-f6Xcv9Vi.js → accounts-BPCiCe8y.js} +3 -2
- package/dist/accounts.runtime-CgWgzjLX.js +2 -0
- package/dist/{action-runtime-CkD5nTPl.js → action-runtime-DfJK7zS0.js} +5 -5
- package/dist/action-runtime.runtime-CIYPRrNy.js +2 -0
- package/dist/{actions-B2w2hCZ2.js → actions-OhnDIN4l.js} +4 -4
- package/dist/{actions.runtime-B56qRt06.js → actions.runtime-DkFXr3-k.js} +1 -1
- package/dist/api.js +13 -13
- package/dist/{approval-handler.runtime-BS6xpR-X.js → approval-handler.runtime-CsFrthnF.js} +2 -2
- package/dist/{channel-DJBl-gwf.js → channel-COCbJwom.js} +28 -26
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-WLGVcaSf.js → channel.setup-DYQGnKPK.js} +4 -4
- package/dist/{client-DhaHONzg.js → client-km2ba2l3.js} +2 -11
- package/dist/{config-schema-BjAjs8_6.js → config-schema-BzqzFW__.js} +16 -0
- package/dist/{directory-config-Dmhi8ECy.js → directory-config-DDVHDmrN.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-D_pIXtL1.js → directory-live-DzOkmJVV.js} +2 -2
- package/dist/{interactive-replies-DrBq4Mld.js → interactive-replies-D-22gTp3.js} +1 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-NLAYFat2.js → message-tool-api--zYyTqrR.js} +2 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Bxdbet-b.js → monitor-Cy-0xYgF.js} +3 -3
- package/dist/{outbound-adapter-CBFfXlOI.js → outbound-adapter-CzX4D5K_.js} +3 -3
- package/dist/{pipeline.runtime-DQXhebqH.js → pipeline.runtime-5R4HgM_7.js} +13 -12
- package/dist/{policy-Dfbxkneh.js → policy-Bi92bs5t.js} +1 -1
- package/dist/{probe-C3PL00Ms.js → probe-BRsYAcGR.js} +1 -1
- package/dist/{provider-DNl27IZC.js → provider-7YKru1TZ.js} +159 -82
- package/dist/relay-source-42fP7Ktr.js +278 -0
- package/dist/{replies-CH4Dmgbr.js → replies-Dlxge48k.js} +3 -2
- package/dist/{reply-blocks-DSfujQlj.js → reply-blocks-BT_sNsDQ.js} +2 -2
- package/dist/{resolve-channels-DNiE0Z0_.js → resolve-channels-CtUOIX8D.js} +1 -1
- package/dist/{resolve-users-D_TmaIfG.js → resolve-users-DfFN2BcP.js} +1 -1
- package/dist/{runtime-api-DYg05-Op.js → runtime-api-ClM1_yX2.js} +1 -1
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-CR4oXiXN.js → scopes-CNKZU1t1.js} +1 -1
- package/dist/{secret-contract-g_PPWuoD.js → secret-contract-C3ChHo5A.js} +46 -6
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-EpqsWCGd.js → send-CRoD-UQw.js} +41 -24
- package/dist/send.runtime-C_y65BU0.js +2 -0
- package/dist/{setup-core-POfI_bgP.js → setup-core-BCGzyZhx.js} +4 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BHsOhTJd.js → setup-surface-D4GE34e2.js} +5 -5
- package/dist/{shared-BxzdaqOc.js → shared-BtJS2bUx.js} +8 -7
- package/dist/{slash-dispatch.runtime-BOl9Cbn9.js → slash-dispatch.runtime-D1qKAWNN.js} +1 -1
- package/npm-shrinkwrap.json +4 -3
- package/openclaw.plugin.json +203 -2
- package/package.json +8 -5
- package/skills/slack/SKILL.md +78 -0
- package/dist/accounts.runtime-BJt1IxOS.js +0 -2
- package/dist/action-runtime.runtime-CJyuCUxj.js +0 -2
- package/dist/send.runtime-CbeGF-al.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { r as createSlackWebClient } from "./client-
|
|
2
|
+
import { r as createSlackWebClient } from "./client-km2ba2l3.js";
|
|
3
3
|
import { n as resolveSlackAllowlistEntries, t as collectSlackCursorItems } from "./resolve-allowlist-common-CP8SH0Zf.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/slack/src/resolve-users.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./target-parsing-3jYH8LfB.js";
|
|
2
|
-
import "./client-
|
|
2
|
+
import "./client-km2ba2l3.js";
|
|
3
3
|
import "./config-api-DnT9ohtE.js";
|
|
4
4
|
import "openclaw/plugin-sdk/account-id";
|
|
5
5
|
import { createActionGate as createActionGate$1, imageResultFromFile, jsonResult, readPositiveIntegerParam, readReactionParams, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-B9PvcDQJ.js";
|
|
2
|
-
import { a as resolveSlackAccount, d as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts, u as resolveSlackAppToken } from "./accounts-
|
|
3
|
-
import { o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy } from "./reply-blocks-
|
|
2
|
+
import { a as resolveSlackAccount, d as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts, u as resolveSlackAppToken } from "./accounts-BPCiCe8y.js";
|
|
3
|
+
import { o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy } from "./reply-blocks-BT_sNsDQ.js";
|
|
4
4
|
import { n as setSlackRuntime } from "./runtime-BOk7xkOl.js";
|
|
5
|
-
import { t as sendMessageSlack } from "./send-
|
|
6
|
-
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-
|
|
7
|
-
import { t as probeSlack } from "./probe-
|
|
8
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
9
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
10
|
-
import { t as monitorSlackProvider } from "./provider-
|
|
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-
|
|
5
|
+
import { t as sendMessageSlack } from "./send-CRoD-UQw.js";
|
|
6
|
+
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-OhnDIN4l.js";
|
|
7
|
+
import { t as probeSlack } from "./probe-BRsYAcGR.js";
|
|
8
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtUOIX8D.js";
|
|
9
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-DfFN2BcP.js";
|
|
10
|
+
import { t as monitorSlackProvider } from "./provider-7YKru1TZ.js";
|
|
11
|
+
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-DfJK7zS0.js";
|
|
12
|
+
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-DzOkmJVV.js";
|
|
13
|
+
import "./monitor-Cy-0xYgF.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,4 +1,4 @@
|
|
|
1
|
-
import { r as createSlackWebClient } from "./client-
|
|
1
|
+
import { r as createSlackWebClient } from "./client-km2ba2l3.js";
|
|
2
2
|
import { t as formatSlackError } from "./errors-CZtmv-h0.js";
|
|
3
3
|
import { isRecord, normalizeOptionalString, normalizeStringEntries, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/slack/src/scopes.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { collectConditionalChannelFieldAssignments, collectSimpleChannelFieldAssignments, getChannelSurface, hasOwnProperty } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
1
|
+
import { collectConditionalChannelFieldAssignments, collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, getChannelSurface, hasOwnProperty } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
2
2
|
//#region extensions/slack/src/secret-contract.ts
|
|
3
3
|
const secretTargetRegistryEntries = [
|
|
4
4
|
{
|
|
@@ -12,6 +12,17 @@ const secretTargetRegistryEntries = [
|
|
|
12
12
|
includeInConfigure: true,
|
|
13
13
|
includeInAudit: true
|
|
14
14
|
},
|
|
15
|
+
{
|
|
16
|
+
id: "channels.slack.accounts.*.relay.authToken",
|
|
17
|
+
targetType: "channels.slack.accounts.*.relay.authToken",
|
|
18
|
+
configFile: "openclaw.json",
|
|
19
|
+
pathPattern: "channels.slack.accounts.*.relay.authToken",
|
|
20
|
+
secretShape: "secret_input",
|
|
21
|
+
expectedResolvedValue: "string",
|
|
22
|
+
includeInPlan: true,
|
|
23
|
+
includeInConfigure: true,
|
|
24
|
+
includeInAudit: true
|
|
25
|
+
},
|
|
15
26
|
{
|
|
16
27
|
id: "channels.slack.accounts.*.botToken",
|
|
17
28
|
targetType: "channels.slack.accounts.*.botToken",
|
|
@@ -67,6 +78,17 @@ const secretTargetRegistryEntries = [
|
|
|
67
78
|
includeInConfigure: true,
|
|
68
79
|
includeInAudit: true
|
|
69
80
|
},
|
|
81
|
+
{
|
|
82
|
+
id: "channels.slack.relay.authToken",
|
|
83
|
+
targetType: "channels.slack.relay.authToken",
|
|
84
|
+
configFile: "openclaw.json",
|
|
85
|
+
pathPattern: "channels.slack.relay.authToken",
|
|
86
|
+
secretShape: "secret_input",
|
|
87
|
+
expectedResolvedValue: "string",
|
|
88
|
+
includeInPlan: true,
|
|
89
|
+
includeInConfigure: true,
|
|
90
|
+
includeInAudit: true
|
|
91
|
+
},
|
|
70
92
|
{
|
|
71
93
|
id: "channels.slack.signingSecret",
|
|
72
94
|
targetType: "channels.slack.signingSecret",
|
|
@@ -94,7 +116,8 @@ function collectRuntimeConfigAssignments(params) {
|
|
|
94
116
|
const resolved = getChannelSurface(params.config, "slack");
|
|
95
117
|
if (!resolved) return;
|
|
96
118
|
const { channel: slack, surface } = resolved;
|
|
97
|
-
const
|
|
119
|
+
const resolveMode = (value) => value === "http" || value === "socket" || value === "relay" ? value : void 0;
|
|
120
|
+
const baseMode = resolveMode(slack.mode) ?? "socket";
|
|
98
121
|
for (const field of ["botToken", "userToken"]) collectSimpleChannelFieldAssignments({
|
|
99
122
|
channelKey: "slack",
|
|
100
123
|
field,
|
|
@@ -105,7 +128,11 @@ function collectRuntimeConfigAssignments(params) {
|
|
|
105
128
|
topInactiveReason: `no enabled account inherits this top-level Slack ${field}.`,
|
|
106
129
|
accountInactiveReason: "Slack account is disabled."
|
|
107
130
|
});
|
|
108
|
-
const resolveAccountMode = (account) => account.mode
|
|
131
|
+
const resolveAccountMode = (account) => resolveMode(account.mode) ?? baseMode;
|
|
132
|
+
const hasNestedAuthTokenOverride = (account) => {
|
|
133
|
+
const relay = account.relay;
|
|
134
|
+
return relay !== null && typeof relay === "object" && !Array.isArray(relay) && hasOwnProperty(relay, "authToken");
|
|
135
|
+
};
|
|
109
136
|
collectConditionalChannelFieldAssignments({
|
|
110
137
|
channelKey: "slack",
|
|
111
138
|
field: "appToken",
|
|
@@ -113,9 +140,9 @@ function collectRuntimeConfigAssignments(params) {
|
|
|
113
140
|
surface,
|
|
114
141
|
defaults: params.defaults,
|
|
115
142
|
context: params.context,
|
|
116
|
-
topLevelActiveWithoutAccounts: baseMode
|
|
117
|
-
topLevelInheritedAccountActive: ({ account, enabled }) => enabled && !hasOwnProperty(account, "appToken") && resolveAccountMode(account)
|
|
118
|
-
accountActive: ({ account, enabled }) => enabled && resolveAccountMode(account)
|
|
143
|
+
topLevelActiveWithoutAccounts: baseMode === "socket",
|
|
144
|
+
topLevelInheritedAccountActive: ({ account, enabled }) => enabled && !hasOwnProperty(account, "appToken") && resolveAccountMode(account) === "socket",
|
|
145
|
+
accountActive: ({ account, enabled }) => enabled && resolveAccountMode(account) === "socket",
|
|
119
146
|
topInactiveReason: "no enabled Slack socket-mode surface inherits this top-level appToken.",
|
|
120
147
|
accountInactiveReason: "Slack account is disabled or not running in socket mode."
|
|
121
148
|
});
|
|
@@ -132,6 +159,19 @@ function collectRuntimeConfigAssignments(params) {
|
|
|
132
159
|
topInactiveReason: "no enabled Slack HTTP-mode surface inherits this top-level signingSecret.",
|
|
133
160
|
accountInactiveReason: "Slack account is disabled or not running in HTTP mode."
|
|
134
161
|
});
|
|
162
|
+
collectNestedChannelFieldAssignments({
|
|
163
|
+
channelKey: "slack",
|
|
164
|
+
nestedKey: "relay",
|
|
165
|
+
field: "authToken",
|
|
166
|
+
channel: slack,
|
|
167
|
+
surface,
|
|
168
|
+
defaults: params.defaults,
|
|
169
|
+
context: params.context,
|
|
170
|
+
topLevelActive: surface.channelEnabled && (!surface.hasExplicitAccounts && baseMode === "relay" || surface.accounts.some(({ account, enabled }) => enabled && resolveAccountMode(account) === "relay" && !hasNestedAuthTokenOverride(account))),
|
|
171
|
+
topInactiveReason: "no enabled Slack relay-mode surface inherits this top-level relay authToken.",
|
|
172
|
+
accountActive: ({ account, enabled }) => enabled && resolveAccountMode(account) === "relay",
|
|
173
|
+
accountInactiveReason: "Slack account is disabled or not running in relay mode."
|
|
174
|
+
});
|
|
135
175
|
}
|
|
136
176
|
const channelSecrets = {
|
|
137
177
|
secretTargetRegistryEntries,
|
|
@@ -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-C3ChHo5A.js";
|
|
2
2
|
export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-BPCiCe8y.js";
|
|
2
2
|
import { r as parseSlackTarget } from "./target-parsing-3jYH8LfB.js";
|
|
3
3
|
import "./targets-Dll4NJgs.js";
|
|
4
|
-
import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-
|
|
5
|
-
import { a as getSlackWriteClient, n as createSlackTokenCacheKey } from "./client-DhaHONzg.js";
|
|
4
|
+
import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
|
|
6
5
|
import { t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
|
|
6
|
+
import { a as getSlackWriteClient, n as createSlackTokenCacheKey } from "./client-km2ba2l3.js";
|
|
7
7
|
import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
|
|
8
|
-
import { i as loadOutboundMediaFromUrl } from "./runtime-api-
|
|
8
|
+
import { i as loadOutboundMediaFromUrl } from "./runtime-api-ClM1_yX2.js";
|
|
9
9
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
11
11
|
import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime";
|
|
@@ -294,9 +294,35 @@ const SLACK_DNS_RETRY_ATTEMPTS = 2;
|
|
|
294
294
|
const SLACK_DNS_RETRY_BASE_DELAY_MS = 250;
|
|
295
295
|
const slackDmChannelCache = /* @__PURE__ */ new Map();
|
|
296
296
|
const slackSendQueues = /* @__PURE__ */ new Map();
|
|
297
|
+
const slackDefaultSendIdentities = /* @__PURE__ */ new Map();
|
|
297
298
|
function hasCustomIdentity(identity) {
|
|
298
299
|
return Boolean(identity?.username || identity?.iconUrl || identity?.iconEmoji);
|
|
299
300
|
}
|
|
301
|
+
function normalizeSlackSendIdentity(identity) {
|
|
302
|
+
const username = normalizeOptionalString(identity?.username);
|
|
303
|
+
const iconUrl = normalizeOptionalString(identity?.iconUrl);
|
|
304
|
+
const iconEmoji = normalizeOptionalString(identity?.iconEmoji);
|
|
305
|
+
const normalized = {
|
|
306
|
+
...username ? { username } : {},
|
|
307
|
+
...iconUrl ? { iconUrl } : {},
|
|
308
|
+
...iconEmoji ? { iconEmoji } : {}
|
|
309
|
+
};
|
|
310
|
+
return hasCustomIdentity(normalized) ? normalized : void 0;
|
|
311
|
+
}
|
|
312
|
+
function setSlackDefaultSendIdentity(accountId, identity) {
|
|
313
|
+
const normalizedAccountId = normalizeOptionalString(accountId);
|
|
314
|
+
if (!normalizedAccountId) return;
|
|
315
|
+
const normalizedIdentity = normalizeSlackSendIdentity(identity);
|
|
316
|
+
if (normalizedIdentity) slackDefaultSendIdentities.set(normalizedAccountId, normalizedIdentity);
|
|
317
|
+
else slackDefaultSendIdentities.delete(normalizedAccountId);
|
|
318
|
+
}
|
|
319
|
+
function getSlackDefaultSendIdentity(accountId) {
|
|
320
|
+
const normalizedAccountId = normalizeOptionalString(accountId);
|
|
321
|
+
return normalizedAccountId ? slackDefaultSendIdentities.get(normalizedAccountId) : void 0;
|
|
322
|
+
}
|
|
323
|
+
function resolveSlackSendIdentity(params) {
|
|
324
|
+
return normalizeSlackSendIdentity(params.explicit) ?? getSlackDefaultSendIdentity(params.accountId);
|
|
325
|
+
}
|
|
300
326
|
function buildSlackUnfurlPayload(options) {
|
|
301
327
|
return {
|
|
302
328
|
unfurl_links: options?.unfurlLinks ?? false,
|
|
@@ -623,6 +649,10 @@ async function sendMessageSlackQueued(params) {
|
|
|
623
649
|
async function sendMessageSlackQueuedInner(params) {
|
|
624
650
|
const { opts, cfg, account, token, recipient, blocks, trimmedMessage } = params;
|
|
625
651
|
const client = opts.client ?? getSlackWriteClient(token);
|
|
652
|
+
const identity = resolveSlackSendIdentity({
|
|
653
|
+
accountId: account.accountId,
|
|
654
|
+
explicit: opts.identity
|
|
655
|
+
});
|
|
626
656
|
if (opts.replyBroadcast && opts.mediaUrl) throw new Error("Slack replyBroadcast is only supported for text or block thread replies.");
|
|
627
657
|
const unfurl = {
|
|
628
658
|
unfurlLinks: account.config.unfurlLinks,
|
|
@@ -645,7 +675,7 @@ async function sendMessageSlackQueuedInner(params) {
|
|
|
645
675
|
text: truncateSlackText(trimmedMessage || buildSlackBlocksFallbackText(blocks), SLACK_TEXT_LIMIT),
|
|
646
676
|
threadTs: opts.threadTs,
|
|
647
677
|
replyBroadcast: opts.replyBroadcast,
|
|
648
|
-
identity
|
|
678
|
+
identity,
|
|
649
679
|
blocks,
|
|
650
680
|
metadata: opts.metadata,
|
|
651
681
|
unfurl
|
|
@@ -679,6 +709,7 @@ async function sendMessageSlackQueuedInner(params) {
|
|
|
679
709
|
let lastMessageId = "";
|
|
680
710
|
let deliveredChannelId = channelId;
|
|
681
711
|
let canonicalDeliveredThreadTs;
|
|
712
|
+
let chunksToPost;
|
|
682
713
|
if (opts.mediaUrl) {
|
|
683
714
|
const [firstChunk, ...rest] = resolvedChunks;
|
|
684
715
|
lastMessageId = await uploadSlackFile({
|
|
@@ -695,30 +726,16 @@ async function sendMessageSlackQueuedInner(params) {
|
|
|
695
726
|
maxBytes: mediaMaxBytes
|
|
696
727
|
});
|
|
697
728
|
sentMessageIds.push(lastMessageId);
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
channelId,
|
|
702
|
-
text: chunk,
|
|
703
|
-
threadTs: opts.threadTs,
|
|
704
|
-
replyBroadcast: sentMessageIds.length === 0 ? opts.replyBroadcast : void 0,
|
|
705
|
-
identity: opts.identity,
|
|
706
|
-
metadata: sentMessageIds.length === 0 ? opts.metadata : void 0,
|
|
707
|
-
unfurl
|
|
708
|
-
});
|
|
709
|
-
lastMessageId = response.ts ?? lastMessageId;
|
|
710
|
-
deliveredChannelId = resolvePostedMessageChannelId(response, deliveredChannelId);
|
|
711
|
-
canonicalDeliveredThreadTs ??= resolvePostedMessageThreadTs(response);
|
|
712
|
-
if (response.ts) sentMessageIds.push(response.ts);
|
|
713
|
-
}
|
|
714
|
-
} else for (const chunk of resolvedChunks.length ? resolvedChunks : [""]) {
|
|
729
|
+
chunksToPost = rest;
|
|
730
|
+
} else chunksToPost = resolvedChunks.length ? resolvedChunks : [""];
|
|
731
|
+
for (const chunk of chunksToPost) {
|
|
715
732
|
const response = await postSlackMessageBestEffort({
|
|
716
733
|
client,
|
|
717
734
|
channelId,
|
|
718
735
|
text: chunk,
|
|
719
736
|
threadTs: opts.threadTs,
|
|
720
737
|
replyBroadcast: sentMessageIds.length === 0 ? opts.replyBroadcast : void 0,
|
|
721
|
-
identity
|
|
738
|
+
identity,
|
|
722
739
|
metadata: sentMessageIds.length === 0 ? opts.metadata : void 0,
|
|
723
740
|
unfurl
|
|
724
741
|
});
|
|
@@ -742,4 +759,4 @@ async function sendMessageSlackQueuedInner(params) {
|
|
|
742
759
|
};
|
|
743
760
|
}
|
|
744
761
|
//#endregion
|
|
745
|
-
export {
|
|
762
|
+
export { hasSlackThreadParticipationWithPersistence as a, normalizeSlackOutboundText as c, hasSlackThreadParticipation as i, buildSlackBlocksFallbackText as l, setSlackDefaultSendIdentity as n, recordSlackThreadParticipation as o, clearSlackThreadParticipationCache as r, markdownToSlackMrkdwnChunks as s, sendMessageSlack as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as resolveSlackAccount } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { a as resolveSlackAccount } from "./accounts-BPCiCe8y.js";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-DOtQbKkB.js";
|
|
3
|
+
import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
|
|
3
4
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
4
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
6
|
import { DEFAULT_ACCOUNT_ID, createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createAllowlistSetupWizardProxy, createEnvPatchedAccountSetupAdapter, createLegacyCompatChannelDmPolicy, createSetupTranslator, createStandardChannelSetupStatus, parseMentionOrPrefixedId, patchChannelConfigForAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -116,6 +117,7 @@ function setSlackChannelAllowlist(cfg, accountId, channelKeys) {
|
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
119
|
function isSlackSetupAccountConfigured(account) {
|
|
120
|
+
if (account.config.mode === "relay") return isSlackPluginAccountConfigured(account);
|
|
119
121
|
const hasConfiguredBotToken = Boolean(account.botToken?.trim()) || hasConfiguredSecretInput(account.config.botToken);
|
|
120
122
|
const hasConfiguredAppToken = Boolean(account.appToken?.trim()) || hasConfiguredSecretInput(account.config.appToken);
|
|
121
123
|
return hasConfiguredBotToken && hasConfiguredAppToken;
|
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-DYQGnKPK.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-BPCiCe8y.js";
|
|
2
|
+
import "./shared-BtJS2bUx.js";
|
|
3
|
+
import { i as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-BCGzyZhx.js";
|
|
4
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtUOIX8D.js";
|
|
5
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-DfFN2BcP.js";
|
|
6
6
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
8
8
|
import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, parseMentionOrPrefixedId, promptLegacyChannelAllowFromForAccount, resolveEntriesWithOptionalToken } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, s as resolveSlackAccountDmPolicy } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
3
|
-
import {
|
|
4
|
-
import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, s as resolveSlackAccountDmPolicy } from "./accounts-BPCiCe8y.js";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-DOtQbKkB.js";
|
|
3
|
+
import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
|
|
4
|
+
import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-D-22gTp3.js";
|
|
5
|
+
import { f as getChatChannelMeta } from "./client-km2ba2l3.js";
|
|
6
|
+
import { i as SLACK_CHANNEL } from "./setup-core-BCGzyZhx.js";
|
|
7
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-BzqzFW__.js";
|
|
7
8
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-XL6HeNCb.js";
|
|
8
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
9
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-C3ChHo5A.js";
|
|
9
10
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
10
11
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
12
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as deliverSlackSlashReplies$1 } from "./replies-
|
|
1
|
+
import { r as deliverSlackSlashReplies$1 } from "./replies-Dlxge48k.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/npm-shrinkwrap.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/slack",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.11",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/slack",
|
|
9
|
-
"version": "2026.6.
|
|
9
|
+
"version": "2026.6.11",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@slack/bolt": "4.7.3",
|
|
12
12
|
"@slack/types": "2.21.1",
|
|
13
13
|
"@slack/web-api": "7.16.0",
|
|
14
14
|
"typebox": "1.1.39",
|
|
15
|
+
"ws": "8.21.0",
|
|
15
16
|
"zod": "4.4.3"
|
|
16
17
|
},
|
|
17
18
|
"peerDependencies": {
|
|
18
|
-
"openclaw": ">=2026.6.
|
|
19
|
+
"openclaw": ">=2026.6.11"
|
|
19
20
|
},
|
|
20
21
|
"peerDependenciesMeta": {
|
|
21
22
|
"openclaw": {
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
"id": "slack",
|
|
3
3
|
"name": "Slack",
|
|
4
4
|
"description": "OpenClaw Slack channel plugin for channels, DMs, commands, and app events.",
|
|
5
|
+
"skills": [
|
|
6
|
+
"./skills"
|
|
7
|
+
],
|
|
5
8
|
"activation": {
|
|
6
9
|
"onStartup": false
|
|
7
10
|
},
|
|
@@ -22,7 +25,8 @@
|
|
|
22
25
|
"type": "string",
|
|
23
26
|
"enum": [
|
|
24
27
|
"socket",
|
|
25
|
-
"http"
|
|
28
|
+
"http",
|
|
29
|
+
"relay"
|
|
26
30
|
]
|
|
27
31
|
},
|
|
28
32
|
"socketMode": {
|
|
@@ -44,6 +48,96 @@
|
|
|
44
48
|
},
|
|
45
49
|
"additionalProperties": false
|
|
46
50
|
},
|
|
51
|
+
"relay": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"url": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"authToken": {
|
|
58
|
+
"anyOf": [
|
|
59
|
+
{
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"oneOf": [
|
|
64
|
+
{
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"source": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"const": "env"
|
|
70
|
+
},
|
|
71
|
+
"provider": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
74
|
+
},
|
|
75
|
+
"id": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"pattern": "^[A-Z][A-Z0-9_]{0,127}$"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": [
|
|
81
|
+
"source",
|
|
82
|
+
"provider",
|
|
83
|
+
"id"
|
|
84
|
+
],
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"source": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"const": "file"
|
|
93
|
+
},
|
|
94
|
+
"provider": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
97
|
+
},
|
|
98
|
+
"id": {
|
|
99
|
+
"type": "string"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"source",
|
|
104
|
+
"provider",
|
|
105
|
+
"id"
|
|
106
|
+
],
|
|
107
|
+
"additionalProperties": false
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"source": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"const": "exec"
|
|
115
|
+
},
|
|
116
|
+
"provider": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
119
|
+
},
|
|
120
|
+
"id": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"required": [
|
|
125
|
+
"source",
|
|
126
|
+
"provider",
|
|
127
|
+
"id"
|
|
128
|
+
],
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"gatewayId": {
|
|
136
|
+
"type": "string"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"additionalProperties": false
|
|
140
|
+
},
|
|
47
141
|
"signingSecret": {
|
|
48
142
|
"anyOf": [
|
|
49
143
|
{
|
|
@@ -1220,7 +1314,8 @@
|
|
|
1220
1314
|
"type": "string",
|
|
1221
1315
|
"enum": [
|
|
1222
1316
|
"socket",
|
|
1223
|
-
"http"
|
|
1317
|
+
"http",
|
|
1318
|
+
"relay"
|
|
1224
1319
|
]
|
|
1225
1320
|
},
|
|
1226
1321
|
"socketMode": {
|
|
@@ -1242,6 +1337,96 @@
|
|
|
1242
1337
|
},
|
|
1243
1338
|
"additionalProperties": false
|
|
1244
1339
|
},
|
|
1340
|
+
"relay": {
|
|
1341
|
+
"type": "object",
|
|
1342
|
+
"properties": {
|
|
1343
|
+
"url": {
|
|
1344
|
+
"type": "string"
|
|
1345
|
+
},
|
|
1346
|
+
"authToken": {
|
|
1347
|
+
"anyOf": [
|
|
1348
|
+
{
|
|
1349
|
+
"type": "string"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"oneOf": [
|
|
1353
|
+
{
|
|
1354
|
+
"type": "object",
|
|
1355
|
+
"properties": {
|
|
1356
|
+
"source": {
|
|
1357
|
+
"type": "string",
|
|
1358
|
+
"const": "env"
|
|
1359
|
+
},
|
|
1360
|
+
"provider": {
|
|
1361
|
+
"type": "string",
|
|
1362
|
+
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
1363
|
+
},
|
|
1364
|
+
"id": {
|
|
1365
|
+
"type": "string",
|
|
1366
|
+
"pattern": "^[A-Z][A-Z0-9_]{0,127}$"
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
"required": [
|
|
1370
|
+
"source",
|
|
1371
|
+
"provider",
|
|
1372
|
+
"id"
|
|
1373
|
+
],
|
|
1374
|
+
"additionalProperties": false
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
"type": "object",
|
|
1378
|
+
"properties": {
|
|
1379
|
+
"source": {
|
|
1380
|
+
"type": "string",
|
|
1381
|
+
"const": "file"
|
|
1382
|
+
},
|
|
1383
|
+
"provider": {
|
|
1384
|
+
"type": "string",
|
|
1385
|
+
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
1386
|
+
},
|
|
1387
|
+
"id": {
|
|
1388
|
+
"type": "string"
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1391
|
+
"required": [
|
|
1392
|
+
"source",
|
|
1393
|
+
"provider",
|
|
1394
|
+
"id"
|
|
1395
|
+
],
|
|
1396
|
+
"additionalProperties": false
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
"type": "object",
|
|
1400
|
+
"properties": {
|
|
1401
|
+
"source": {
|
|
1402
|
+
"type": "string",
|
|
1403
|
+
"const": "exec"
|
|
1404
|
+
},
|
|
1405
|
+
"provider": {
|
|
1406
|
+
"type": "string",
|
|
1407
|
+
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
1408
|
+
},
|
|
1409
|
+
"id": {
|
|
1410
|
+
"type": "string"
|
|
1411
|
+
}
|
|
1412
|
+
},
|
|
1413
|
+
"required": [
|
|
1414
|
+
"source",
|
|
1415
|
+
"provider",
|
|
1416
|
+
"id"
|
|
1417
|
+
],
|
|
1418
|
+
"additionalProperties": false
|
|
1419
|
+
}
|
|
1420
|
+
]
|
|
1421
|
+
}
|
|
1422
|
+
]
|
|
1423
|
+
},
|
|
1424
|
+
"gatewayId": {
|
|
1425
|
+
"type": "string"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
"additionalProperties": false
|
|
1429
|
+
},
|
|
1245
1430
|
"signingSecret": {
|
|
1246
1431
|
"anyOf": [
|
|
1247
1432
|
{
|
|
@@ -2503,6 +2688,22 @@
|
|
|
2503
2688
|
"label": "Slack Socket Mode Ping/Pong Logging",
|
|
2504
2689
|
"help": "Enable Slack SDK ping/pong transport logs while debugging Socket Mode websocket health."
|
|
2505
2690
|
},
|
|
2691
|
+
"relay": {
|
|
2692
|
+
"label": "Slack Relay Mode",
|
|
2693
|
+
"help": "Relay-delivered Slack events. Use with mode=\"relay\" when openclaw-slack-router owns the Slack Socket Mode connection."
|
|
2694
|
+
},
|
|
2695
|
+
"relay.url": {
|
|
2696
|
+
"label": "Slack Relay URL",
|
|
2697
|
+
"help": "Full websocket URL for openclaw-slack-router. Include the route path, for example ws://127.0.0.1:8081/gateway/ws."
|
|
2698
|
+
},
|
|
2699
|
+
"relay.authToken": {
|
|
2700
|
+
"label": "Slack Relay Auth Token",
|
|
2701
|
+
"help": "Bearer token used by this gateway to authenticate its reverse websocket connection to openclaw-slack-router."
|
|
2702
|
+
},
|
|
2703
|
+
"relay.gatewayId": {
|
|
2704
|
+
"label": "Slack Relay Gateway ID",
|
|
2705
|
+
"help": "Destination id that openclaw-slack-router uses when routing user-group mentions to this gateway."
|
|
2706
|
+
},
|
|
2506
2707
|
"botToken": {
|
|
2507
2708
|
"label": "Slack Bot Token",
|
|
2508
2709
|
"help": "Slack bot token used for standard chat actions in the configured workspace. Keep this credential scoped and rotate if workspace app permissions change."
|