@openclaw/slack 2026.8.1 → 2026.8.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-CN2hBsim.js → account-inspect-C3sePHWa.js} +3 -3
- package/dist/account-inspect-api.js +1 -1
- package/dist/{action-runtime-044ldvNL.js → action-runtime-B0kRJ69h.js} +50 -40
- package/dist/action-runtime.runtime-IuA14rev.js +2 -0
- package/dist/{actions-BI7JkfVm.js → actions-BOxiu2Vy.js} +18 -12
- package/dist/api.js +14 -14
- package/dist/{approval-handler.runtime-DYv0UIZS.js → approval-handler.runtime-l5_2JLqi.js} +7 -6
- package/dist/{channel-1vIJOzPx.js → channel-BguxhhNG.js} +39 -31
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-DlFSKeIZ.js → channel-type-ChkODKBW.js} +2 -2
- package/dist/{channel.setup-ofDi3_Pu.js → channel.setup-BJohRJha.js} +23 -22
- package/dist/{config-schema-BVIMyiDN.js → config-schema-B9GwoRlE.js} +5 -3
- package/dist/{conversation-binding-route-DFVLUdYF.js → conversation-binding-route-Vee8Dgbf.js} +2 -2
- package/dist/{directory-config-DqfQ42OV.js → directory-config-Bmw4ykSy.js} +4 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-BPaNHjmP.js → directory-live-BOILcXPo.js} +1 -1
- package/dist/{doctor-contract-BAy7-EUQ.js → doctor-contract-BNjw9bxb.js} +5 -4
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-BdwszjYn.js → group-policy-BYH74y50.js} +70 -39
- package/dist/{message-tool-api-CJ0kjcg5.js → message-tool-api-BsZbsulu.js} +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Dq5Cmrvp.js → monitor-B72wWXWg.js} +3 -3
- package/dist/{outbound-adapter-DYaI8ThX.js → outbound-adapter-CPgYQ-BM.js} +3 -3
- package/dist/{pipeline.runtime-Bd22U0ga.js → pipeline.runtime-CcdujV99.js} +238 -393
- package/dist/{policy-CtQVbde1.js → policy-CUpBeOt9.js} +7 -5
- package/dist/{probe-0usmAb0i.js → probe-gj5yQgN2.js} +113 -112
- package/dist/{provider-CN_8hFv2.js → provider-DW9YC_no.js} +69 -44
- package/dist/{relay-source-BNGpsdwV.js → relay-source-BLMdBrAw.js} +6 -4
- package/dist/{replies-BSiRQOJ1.js → replies-DLjQ8RYU.js} +13 -8
- package/dist/{resolve-channels-Czheznc8.js → resolve-channels-Bv6IiGZ4.js} +4 -3
- package/dist/{resolve-users-BAOlNimr.js → resolve-users-BXw2pA7y.js} +4 -3
- package/dist/runtime-api.js +10 -10
- package/dist/{scopes-COSlmhnH.js → scopes-B9HRguDe.js} +1 -1
- package/dist/{send-DS9ICrBI.js → send-GUz4_v2E.js} +21 -13
- package/dist/{send.runtime-D_Bb6IuH.js → send.runtime-rScD-UJi.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BGnd2pSe.js → setup-surface-Cc3P-z35.js} +5 -5
- package/dist/{shared-D5B-5hBg.js → shared-CQGVZ_8a.js} +5 -5
- package/dist/{slash-dispatch.runtime-CilDmI0c.js → slash-dispatch.runtime-C2015r6s.js} +1 -1
- package/dist/{target-parsing-BnMD2ZqZ.js → target-parsing-PbxGDbr9.js} +11 -6
- package/dist/{targets-Cx5W_n3W.js → targets-7FexXJ62.js} +1 -1
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/accept.js +54 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/charset.js +10 -34
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/encoding.js +9 -30
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/language.js +15 -36
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/mediaType.js +16 -134
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/README.md +71 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/package.json +52 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/package.json +16 -10
- package/node_modules/typebox/build/format/email.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
- package/node_modules/typebox/package.json +1 -1
- package/package.json +5 -5
- package/dist/action-runtime.runtime-BL3KzX13.js +0 -2
- package/node_modules/@slack/bolt/node_modules/negotiator/HISTORY.md +0 -114
package/dist/{conversation-binding-route-DFVLUdYF.js → conversation-binding-route-Vee8Dgbf.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
2
|
-
import "./targets-
|
|
1
|
+
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
2
|
+
import "./targets-7FexXJ62.js";
|
|
3
3
|
import { resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-runtime";
|
|
4
4
|
//#region extensions/slack/src/account-reply-mode.ts
|
|
5
5
|
function normalizeSlackChatType(raw) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
4
|
-
import "./targets-
|
|
3
|
+
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
4
|
+
import "./targets-7FexXJ62.js";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
@@ -37,7 +37,8 @@ const listSlackDirectoryPeersFromConfig = createResolvedDirectoryEntriesLister({
|
|
|
37
37
|
normalizeId: (raw) => {
|
|
38
38
|
const normalizedUserId = (raw.match(/^<@([A-Z0-9]+)>$/i)?.[1] ?? raw).replace(/^(slack|user):/i, "").trim();
|
|
39
39
|
if (!normalizedUserId) return null;
|
|
40
|
-
const
|
|
40
|
+
const target = `user:${normalizedUserId}`;
|
|
41
|
+
const normalized = parseSlackTarget(target, { defaultKind: "user" });
|
|
41
42
|
return normalized?.kind === "user" ? `user:${normalizeLowercaseStringOrEmpty(normalized.id)}` : null;
|
|
42
43
|
}
|
|
43
44
|
});
|
|
@@ -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-Bmw4ykSy.js";
|
|
2
2
|
export { listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as resolveSlackAccount } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import {
|
|
3
|
+
import { s as createSlackLookupClient } from "./probe-gj5yQgN2.js";
|
|
4
4
|
import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
//#region extensions/slack/src/directory-live.ts
|
|
@@ -171,11 +171,12 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
171
171
|
scope: "root-and-accounts",
|
|
172
172
|
onRemove: ({ key, pathPrefix }) => changes.push(`Removed retired ${pathPrefix}.${key}; Slack detects org-wide installations automatically.`)
|
|
173
173
|
});
|
|
174
|
+
const aliases = streamingAliasMigration.normalizeChannelConfig({
|
|
175
|
+
cfg: retired.config,
|
|
176
|
+
changes
|
|
177
|
+
});
|
|
174
178
|
return normalizeChannelConfigEntries({
|
|
175
|
-
cfg:
|
|
176
|
-
cfg: retired.config,
|
|
177
|
-
changes
|
|
178
|
-
}).config,
|
|
179
|
+
cfg: aliases.config,
|
|
179
180
|
channelId: "slack",
|
|
180
181
|
changes,
|
|
181
182
|
normalizeEntry: normalizeSlackEntry
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BNjw9bxb.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { n as isSlackPluginAccountConfigured } from "./account-configured-sUohAxZr.js";
|
|
2
2
|
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
4
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
3
|
+
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-PbxGDbr9.js";
|
|
4
|
+
import { t as slackContextTargetsMatch } from "./targets-7FexXJ62.js";
|
|
5
|
+
import { C as normalizeAllowListLower, D as resolveSlackUserAllowListForTeam, E as resolveSlackAllowListMatch } from "./probe-gj5yQgN2.js";
|
|
5
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
6
7
|
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
8
|
import { normalizeMessageChannel } from "openclaw/plugin-sdk/routing";
|
|
@@ -11,6 +12,7 @@ import { buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
|
|
|
11
12
|
import { createNativeApprovalChannelRouteGates, doesApprovalRequestSelectChannelAccount, resolveApprovalKind, resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
12
13
|
import { createChannelApprovalAuth, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
13
14
|
import { createChannelExecApprovalProfile, isChannelExecApprovalClientEnabledFromConfig, isChannelExecApprovalTargetRecipient, matchesApprovalRequestFilters } from "openclaw/plugin-sdk/approval-client-runtime";
|
|
15
|
+
import { normalizeHyphenSlug } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
14
16
|
import { channelRouteTargetsMatchExact, stringifyRouteThreadId } from "openclaw/plugin-sdk/channel-route";
|
|
15
17
|
import { resolveGlobalMap } from "openclaw/plugin-sdk/global-singleton";
|
|
16
18
|
import { legacyInteractiveReplyToPresentation, normalizeMessagePresentation, renderMessagePresentationChartFallbackText, renderMessagePresentationFallbackText, renderMessagePresentationTableFallbackText, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
|
|
@@ -21,7 +23,6 @@ import { eastAsianWidthType } from "get-east-asian-width";
|
|
|
21
23
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
22
24
|
import { sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
23
25
|
import { readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
24
|
-
import { normalizeHyphenSlug } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
25
26
|
import { resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
26
27
|
//#region extensions/slack/src/action-threading.ts
|
|
27
28
|
const SLACK_PRIVATE_ACTION_DELIVERY_RESULT = Symbol("slack.action.delivery-result");
|
|
@@ -43,14 +44,24 @@ function normalizeSlackUserLikeId(value) {
|
|
|
43
44
|
const upper = value.toUpperCase();
|
|
44
45
|
return /^[UW][A-Z0-9]+$/.test(upper) ? upper : void 0;
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function normalizeSlackApproverTarget(value) {
|
|
47
48
|
const trimmed = normalizeStringifiedOptionalString(value);
|
|
48
49
|
if (!trimmed) return;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
try {
|
|
51
|
+
const target = parseSlackTarget(trimmed, { defaultKind: "user" });
|
|
52
|
+
const id = target?.kind === "user" ? normalizeSlackUserLikeId(target.id) : void 0;
|
|
53
|
+
return target?.teamId && id ? formatSlackTarget({
|
|
54
|
+
kind: "user",
|
|
55
|
+
id,
|
|
56
|
+
teamId: target.teamId.toUpperCase()
|
|
57
|
+
}) : id;
|
|
58
|
+
} catch {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function normalizeSlackApproverId(value) {
|
|
63
|
+
const target = normalizeSlackApproverTarget(value);
|
|
64
|
+
return target?.startsWith("team:") ? void 0 : target;
|
|
54
65
|
}
|
|
55
66
|
function resolveSlackOwnerApprovers(cfg) {
|
|
56
67
|
const ownerAllowFrom = cfg.commands?.ownerAllowFrom;
|
|
@@ -87,27 +98,40 @@ const resolveSlackExecApprovalTarget = slackExecApprovalProfile.resolveTarget;
|
|
|
87
98
|
const shouldSuppressLocalSlackExecApprovalPrompt = slackExecApprovalProfile.shouldSuppressLocalPrompt;
|
|
88
99
|
//#endregion
|
|
89
100
|
//#region extensions/slack/src/approval-auth.ts
|
|
101
|
+
function resolveSlackApprovalInputs(params) {
|
|
102
|
+
const account = resolveSlackAccount(params).config;
|
|
103
|
+
return {
|
|
104
|
+
allowFrom: resolveSlackAccountAllowFrom(params),
|
|
105
|
+
defaultTo: account.defaultTo
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function slackApprovalTargetMatches(senderId, approvers) {
|
|
109
|
+
const sender = parseSlackTarget(senderId, { defaultKind: "user" });
|
|
110
|
+
return sender?.kind === "user" && resolveSlackAllowListMatch({
|
|
111
|
+
allowList: normalizeAllowListLower([...approvers]),
|
|
112
|
+
teamId: sender.teamId,
|
|
113
|
+
id: sender.id
|
|
114
|
+
}).allowed;
|
|
115
|
+
}
|
|
90
116
|
const slackApproval = createChannelApprovalAuth({
|
|
91
117
|
channelLabel: "Slack",
|
|
92
|
-
resolveInputs:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return {
|
|
98
|
-
allowFrom: resolveSlackAccountAllowFrom({
|
|
99
|
-
cfg,
|
|
100
|
-
accountId
|
|
101
|
-
}),
|
|
102
|
-
defaultTo: account.defaultTo
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
normalizeApprover: normalizeSlackApproverId,
|
|
106
|
-
normalizeDefaultTo: normalizeSlackApproverId,
|
|
107
|
-
isWildcardAuthorized: ({ purpose, senderId, inputs, approvers }) => purpose === "sender" && Boolean(senderId) && approvers.length === 0 && inputs.allowFrom?.some((entry) => String(entry).trim() === "*") === true
|
|
118
|
+
resolveInputs: resolveSlackApprovalInputs,
|
|
119
|
+
normalizeApprover: normalizeSlackApproverTarget,
|
|
120
|
+
normalizeDefaultTo: normalizeSlackApproverTarget,
|
|
121
|
+
normalizeSenderId: normalizeSlackApproverTarget,
|
|
122
|
+
isWildcardAuthorized: ({ purpose, senderId, inputs, approvers }) => Boolean(senderId && (slackApprovalTargetMatches(senderId, approvers) || purpose === "sender" && approvers.length === 0 && inputs.allowFrom?.some((entry) => String(entry).trim() === "*")))
|
|
108
123
|
});
|
|
109
124
|
const getSlackApprovalApprovers = slackApproval.resolveApprovers;
|
|
110
125
|
const isSlackApprovalAuthorizedSender = slackApproval.isAuthorizedSender;
|
|
126
|
+
function getSlackApprovalApproversForTeam(params) {
|
|
127
|
+
return resolveApprovalApprovers({
|
|
128
|
+
allowFrom: resolveSlackUserAllowListForTeam({
|
|
129
|
+
allowList: getSlackApprovalApprovers(params),
|
|
130
|
+
teamId: params.teamId
|
|
131
|
+
}),
|
|
132
|
+
normalizeApprover: normalizeSlackApproverTarget
|
|
133
|
+
});
|
|
134
|
+
}
|
|
111
135
|
//#endregion
|
|
112
136
|
//#region extensions/slack/src/installation-identity-state.ts
|
|
113
137
|
const slackInstallationStates = resolveGlobalMap(Symbol.for("openclaw.slack.installation-identities"), "close-and-restart");
|
|
@@ -142,7 +166,8 @@ const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
|
|
|
142
166
|
const SLACK_DM_CHANNEL_ID_RE = /^D[A-Z0-9]{8,}$/i;
|
|
143
167
|
const SLACK_USER_ID_RE = /^[UW][A-Z0-9]{8,}$/i;
|
|
144
168
|
function isSlackApprovalTransportEnabled(params) {
|
|
145
|
-
|
|
169
|
+
const account = resolveSlackAccount(params);
|
|
170
|
+
return isSlackPluginAccountConfigured(account);
|
|
146
171
|
}
|
|
147
172
|
function resolveSlackNativeApprovalConfig(params) {
|
|
148
173
|
return resolveSlackAccount(params).config.execApprovals;
|
|
@@ -158,7 +183,8 @@ function normalizeComparableTarget(value) {
|
|
|
158
183
|
}
|
|
159
184
|
function extractSlackSessionKind(sessionKey) {
|
|
160
185
|
if (!sessionKey) return null;
|
|
161
|
-
const
|
|
186
|
+
const match = sessionKey.match(/slack:(direct|channel|group):/i);
|
|
187
|
+
const kind = normalizeLowercaseStringOrEmpty(match?.[1]);
|
|
162
188
|
return kind ? kind : null;
|
|
163
189
|
}
|
|
164
190
|
function resolveSlackTurnSourceDefaultKind(params) {
|
|
@@ -169,9 +195,10 @@ function resolveTurnSourceSlackOriginTarget(request) {
|
|
|
169
195
|
const turnSourceChannel = normalizeLowercaseStringOrEmpty(request.request.turnSourceChannel);
|
|
170
196
|
const turnSourceTo = normalizeOptionalString(request.request.turnSourceTo) ?? "";
|
|
171
197
|
if (turnSourceChannel !== "slack" || !turnSourceTo) return null;
|
|
198
|
+
const sessionKind = extractSlackSessionKind(request.request.sessionKey ?? void 0);
|
|
172
199
|
const parsed = parseSlackTarget(turnSourceTo, { defaultKind: resolveSlackTurnSourceDefaultKind({
|
|
173
200
|
turnSourceTo,
|
|
174
|
-
sessionKind
|
|
201
|
+
sessionKind
|
|
175
202
|
}) });
|
|
176
203
|
if (!parsed) return null;
|
|
177
204
|
return {
|
|
@@ -263,11 +290,12 @@ const { canApprovalPotentiallyRouteToChannel: canApprovalPotentiallyRouteToSlack
|
|
|
263
290
|
targetsMatch: slackTargetsMatch
|
|
264
291
|
});
|
|
265
292
|
function hasSlackPluginApprovers(params) {
|
|
266
|
-
return
|
|
293
|
+
return getSlackApprovalApproversForTeam(params).length > 0;
|
|
267
294
|
}
|
|
268
295
|
function isSlackPluginNativeApprovalClientConfigEnabled(params) {
|
|
296
|
+
const slackNativeConfig = resolveSlackNativeApprovalConfig(params);
|
|
269
297
|
return isChannelExecApprovalClientEnabledFromConfig({
|
|
270
|
-
enabled:
|
|
298
|
+
enabled: slackNativeConfig?.enabled,
|
|
271
299
|
approverCount: getSlackApprovalApprovers(params).length
|
|
272
300
|
});
|
|
273
301
|
}
|
|
@@ -304,7 +332,10 @@ function matchesSlackNativeApprovalFilters(params) {
|
|
|
304
332
|
}
|
|
305
333
|
function isSlackNativeApprovalAccountEligible(params) {
|
|
306
334
|
const config = resolveSlackNativeApprovalConfig(params);
|
|
307
|
-
const approverCount = params.approvalKind === "exec" ? getSlackExecApprovalApprovers(params).length :
|
|
335
|
+
const approverCount = params.approvalKind === "exec" ? getSlackExecApprovalApprovers(params).length : getSlackApprovalApproversForTeam({
|
|
336
|
+
...params,
|
|
337
|
+
teamId: resolveEnterpriseApprovalTeamId(params.request)
|
|
338
|
+
}).length;
|
|
308
339
|
return isSlackApprovalTransportEnabled(params) && isChannelExecApprovalClientEnabledFromConfig({
|
|
309
340
|
enabled: config?.enabled,
|
|
310
341
|
approverCount
|
|
@@ -1163,9 +1194,7 @@ function projectSlackMrkdwnVisibleText(text, dateDisplay) {
|
|
|
1163
1194
|
}
|
|
1164
1195
|
function protectSlackAssistantTranscriptRoleHeaders(text) {
|
|
1165
1196
|
if (text.startsWith(SLACK_ASSISTANT_TRANSCRIPT_PREFIX)) return text;
|
|
1166
|
-
|
|
1167
|
-
const fallbackProjection = projectSlackMrkdwnVisibleText(text, "fallback");
|
|
1168
|
-
if (!slackProjectionHasRoleHeader(tokenProjection) && !slackProjectionHasRoleHeader(fallbackProjection)) return text;
|
|
1197
|
+
if (!slackProjectionHasRoleHeader(projectSlackMrkdwnVisibleText(text, "token")) && (!text.includes("<!date^") || !slackProjectionHasRoleHeader(projectSlackMrkdwnVisibleText(text, "fallback")))) return text;
|
|
1169
1198
|
return `${SLACK_ASSISTANT_TRANSCRIPT_PREFIX}${text}`;
|
|
1170
1199
|
}
|
|
1171
1200
|
function buildSlackRenderOptions() {
|
|
@@ -1202,14 +1231,15 @@ function buildSlackRenderOptions() {
|
|
|
1202
1231
|
};
|
|
1203
1232
|
}
|
|
1204
1233
|
function normalizeSlackOutboundText(markdown, options = {}) {
|
|
1205
|
-
|
|
1234
|
+
const ir = makeSlackEmphasisStylesSafe(markdownToIR(markdown ?? "", {
|
|
1206
1235
|
assistantTranscriptRoleHeaders: true,
|
|
1207
1236
|
linkify: false,
|
|
1208
1237
|
autolink: false,
|
|
1209
1238
|
headingStyle: "rich",
|
|
1210
1239
|
blockquotePrefix: "> ",
|
|
1211
1240
|
tableMode: options.tableMode
|
|
1212
|
-
}))
|
|
1241
|
+
}));
|
|
1242
|
+
return protectSlackAssistantTranscriptRoleHeaders(renderMarkdownWithMarkers(ir, buildSlackRenderOptions(), SLACK_FORMAT_PROFILE));
|
|
1213
1243
|
}
|
|
1214
1244
|
/** Chunk already-rendered Slack mrkdwn without splitting entities or code markers. */
|
|
1215
1245
|
function chunkSlackMrkdwnText(text, limit) {
|
|
@@ -1874,7 +1904,7 @@ function buildSlackCompleteBlocksFallbackText(blocks) {
|
|
|
1874
1904
|
//#endregion
|
|
1875
1905
|
//#region extensions/slack/src/native-data-blocks.ts
|
|
1876
1906
|
const SLACK_MALFORMED_NATIVE_DATA_FALLBACK = "Slack could not render this chart or table data.";
|
|
1877
|
-
const SLACK_RESPONSE_URL_BODY_LIMIT_BYTES =
|
|
1907
|
+
const SLACK_RESPONSE_URL_BODY_LIMIT_BYTES = 16384;
|
|
1878
1908
|
const SLACK_RESPONSE_URL_BODY_TIMEOUT_MS = 3e4;
|
|
1879
1909
|
/** Detect a native Slack chart or table block. */
|
|
1880
1910
|
function hasSlackNativeDataBlock(blocks) {
|
|
@@ -2366,8 +2396,9 @@ function resolveSlackGroupRequireMention(params) {
|
|
|
2366
2396
|
return resolveScopeRequireMention(resolveSlackGroupPolicyScope(params));
|
|
2367
2397
|
}
|
|
2368
2398
|
function resolveSlackGroupToolPolicy(params) {
|
|
2399
|
+
const scope = resolveSlackGroupPolicyScope(params);
|
|
2369
2400
|
return resolveScopeToolsPolicy({
|
|
2370
|
-
...
|
|
2401
|
+
...scope,
|
|
2371
2402
|
senderPolicyMode: params.senderPolicyMode,
|
|
2372
2403
|
senderId: params.senderId,
|
|
2373
2404
|
senderName: params.senderName,
|
|
@@ -2376,4 +2407,4 @@ function resolveSlackGroupToolPolicy(params) {
|
|
|
2376
2407
|
});
|
|
2377
2408
|
}
|
|
2378
2409
|
//#endregion
|
|
2379
|
-
export { renderSlackMessagePresentationFallbackText as $, SLACK_MESSAGE_TEXT_HARD_LIMIT as A, SLACK_PRIVATE_ACTION_DELIVERY_RESULT as At, SLACK_REPLY_BUTTON_ACTION_ID as B, isSlackNativeResponseUrlRejection as C, isSlackApprovalAuthorizedSender as Ct, renderSlackBlockFallbackText as D, normalizeSlackApproverId as Dt, buildSlackCompleteBlocksFallbackText as E, isSlackExecApprovalClientEnabled as Et, canRenderSlackPresentation as F, isSlackCallbackActionId as G, SLACK_REPLY_SELECT_ACTION_ID as H, countSlackTextUtf8Bytes as I, decodeSlackQuestionAction as J, isSlackQuestionActionId as K, truncateSlackText as L, SLACK_TEXT_LIMIT as M, buildSlackInteractiveBlocks as N, resolveSlackAuthoredTextPlacement as O, resolveSlackExecApprovalTarget as Ot, buildSlackPresentationBlocks as P, normalizeSlackOutboundText as Q, truncateSlackTextByUtf8Bytes as R, isSlackInvalidBlocksResponse as S,
|
|
2410
|
+
export { renderSlackMessagePresentationFallbackText as $, SLACK_MESSAGE_TEXT_HARD_LIMIT as A, SLACK_PRIVATE_ACTION_DELIVERY_RESULT as At, SLACK_REPLY_BUTTON_ACTION_ID as B, isSlackNativeResponseUrlRejection as C, isSlackApprovalAuthorizedSender as Ct, renderSlackBlockFallbackText as D, normalizeSlackApproverId as Dt, buildSlackCompleteBlocksFallbackText as E, isSlackExecApprovalClientEnabled as Et, canRenderSlackPresentation as F, isSlackCallbackActionId as G, SLACK_REPLY_SELECT_ACTION_ID as H, countSlackTextUtf8Bytes as I, decodeSlackQuestionAction as J, isSlackQuestionActionId as K, truncateSlackText as L, SLACK_TEXT_LIMIT as M, buildSlackInteractiveBlocks as N, resolveSlackAuthoredTextPlacement as O, resolveSlackExecApprovalTarget as Ot, buildSlackPresentationBlocks as P, normalizeSlackOutboundText as Q, truncateSlackTextByUtf8Bytes as R, isSlackInvalidBlocksResponse as S, getSlackApprovalApproversForTeam as St, buildSlackBlocksFallbackText as T, isSlackExecApprovalAuthorizedSender as Tt, SLACK_SESSION_LINK_ACTION_ID as U, SLACK_REPLY_LINK_ACTION_ID as V, isSlackApprovalActionId as W, chunkSlackMrkdwnText as X, resolveSlackQuestionAction as Y, markdownToSlackMrkdwnChunks as Z, appendSlackNativeDataPlainTextFallback as _, shouldHandleSlackPluginViaForwardingSession as _t, qualifySlackConversationId as a, SLACK_MAX_BLOCKS as at, hasSlackNativeDataBlock as b, isSlackWorkspaceInstallation as bt, assertSlackDetachedTargetAllowed as c, hasSlackPluginApprovers as ct, resolveSlackReplyBlockResolution as d, normalizeSlackOriginTarget as dt, escapeSlackMrkdwn as et, resolveSlackReplyBlocks as f, resolveEnterpriseApprovalTeamId as ft, appendSlackNativeDataFallbackText as g, shouldHandleSlackNativeApprovalRequest as gt, SLACK_MALFORMED_NATIVE_DATA_FALLBACK as h, resolveTurnSourceSlackOriginTarget as ht, resolveSlackGroupToolPolicy as i, SLACK_SECTION_TEXT_MAX as it, SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT as j, resolveSlackAutoThreadId as jt, SLACK_EDIT_TEXT_MAX_BYTES as k, shouldSuppressLocalSlackExecApprovalPrompt as kt, hasSlackReplyStructuredContent as l, isSlackAnyNativeApprovalClientEnabled as lt, resolveSlackReplyRenderPlan as m, resolveSlackFallbackOriginTarget as mt, buildSlackChannelPolicyScope as n, decodeSlackApprovalAction as nt, qualifySlackRoutePeerId as o, parseSlackBlocksInput as ot, resolveSlackReplyDeliveryMessages as p, resolveSessionSlackOriginTarget as pt, resolveSlackQuestionActionIds as q, resolveSlackGroupRequireMention as r, SLACK_PRESENTATION_CAPABILITIES as rt, resolveSlackEnterpriseMainDmSessionKey as s, validateSlackBlocksArray as st, buildSlackChannelIdCandidates as t, SLACK_APPROVAL_HEADER_BLOCK_ID as tt, parseSlackReplyBlockSegments as u, normalizeSlackForwardTarget as ut, buildSlackNativeDataAccessibilityText as v, slackTargetsMatch as vt, stripSlackNativeDataBlocks as w, getSlackExecApprovalApprovers as wt, isSlackInvalidBlocksError as x, registerSlackInstallationState as xt, createSlackNativeDataBaseTextConsumer as y, getSlackInstallationKind as yt, SLACK_QUESTION_FINALIZATION_BLOCKS as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as listSlackAccountIds } from "./accounts-Dm_H77gH.js";
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-C3sePHWa.js";
|
|
3
3
|
import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
|
|
4
4
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
package/dist/message-tool-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as describeSlackMessageTool } from "./message-tool-api-
|
|
1
|
+
import { t as describeSlackMessageTool } from "./message-tool-api-BsZbsulu.js";
|
|
2
2
|
export { describeSlackMessageTool as describeMessageTool };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { T as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-
|
|
3
|
-
import { t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
4
|
-
import { o as resolveSlackThreadTs } from "./replies-
|
|
2
|
+
import { T as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-DW9YC_no.js";
|
|
3
|
+
import { t as isSlackChannelAllowedByPolicy } from "./policy-CUpBeOt9.js";
|
|
4
|
+
import { o as resolveSlackThreadTs } from "./replies-DLjQ8RYU.js";
|
|
5
5
|
//#region extensions/slack/src/monitor.ts
|
|
6
6
|
var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-Dm_H77gH.js";
|
|
2
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
3
|
-
import { M as SLACK_TEXT_LIMIT, O as resolveSlackAuthoredTextPlacement, c as assertSlackDetachedTargetAllowed, d as resolveSlackReplyBlockResolution, et as escapeSlackMrkdwn, p as resolveSlackReplyDeliveryMessages, q as resolveSlackQuestionActionIds, rt as SLACK_PRESENTATION_CAPABILITIES, u as parseSlackReplyBlockSegments, z as SLACK_QUESTION_FINALIZATION_BLOCKS } from "./group-policy-
|
|
2
|
+
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
3
|
+
import { M as SLACK_TEXT_LIMIT, O as resolveSlackAuthoredTextPlacement, c as assertSlackDetachedTargetAllowed, d as resolveSlackReplyBlockResolution, et as escapeSlackMrkdwn, p as resolveSlackReplyDeliveryMessages, q as resolveSlackQuestionActionIds, rt as SLACK_PRESENTATION_CAPABILITIES, u as parseSlackReplyBlockSegments, z as SLACK_QUESTION_FINALIZATION_BLOCKS } from "./group-policy-BYH74y50.js";
|
|
4
4
|
import { n as resolveSlackThreadTsValue } from "./thread-ts-DUGhaYKq.js";
|
|
5
5
|
import { t as mergeSlackSendResults } from "./send-results-eeOu_HYm.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -51,7 +51,7 @@ function readSlackRenderedPresentation(slackData) {
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
54
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-rScD-UJi.js"));
|
|
55
55
|
function resolveSlackSendIdentity(identity) {
|
|
56
56
|
if (!identity) return;
|
|
57
57
|
const username = normalizeOptionalString(identity.name);
|