@openclaw/slack 2026.7.2-beta.7 → 2026.8.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-inspect-DEKpg9Ip.js → account-inspect-YJvFBbCR.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-CHAeNZOX.js → accounts-BlzxuYle.js} +7 -3
- package/dist/{accounts.runtime-BHD4Ma2R.js → accounts.runtime-CbabBL8x.js} +1 -1
- package/dist/{action-runtime-DfuYoMjG.js → action-runtime-D6jg2CQd.js} +193 -125
- package/dist/action-runtime.runtime-JtoOK9l5.js +2 -0
- package/dist/{actions-D3NuJvva.js → actions-DFk0ANVB.js} +116 -235
- package/dist/actions.runtime-CYLsYRai.js +2 -0
- package/dist/api.js +17 -17
- package/dist/{approval-handler.runtime-BA05P0QT.js → approval-handler.runtime-BNvAoKdK.js} +53 -14
- package/dist/{channel-B9fVdW3s.js → channel-CA5w7qDF.js} +209 -110
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-DXyos1d2.js → channel-type-CZWv55Wu.js} +9 -12
- package/dist/{config-adapter-CxBQH8fq.js → channel.setup-CpyYsEXH.js} +83 -25
- package/dist/{config-schema-SgZT6nXV.js → config-schema-CN3XZRX5.js} +27 -17
- package/dist/conversation-binding-route-DFVLUdYF.js +115 -0
- package/dist/{directory-config-CnCIAktf.js → directory-config-BGYyuzWh.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DKunWh3A.js → directory-live-DjUJQLbq.js} +13 -22
- package/dist/{doctor-contract-CsGH1Dfc.js → doctor-contract-BAy7-EUQ.js} +30 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-NQZti9t-.js → group-policy-DyfB_ZIE.js} +282 -183
- package/dist/index.js +4 -1
- package/dist/{message-tool-api-DkhFpMoy.js → message-tool-api-CqMr5Rmc.js} +14 -3
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-CmKz0wtI.js → monitor-Chrecrb9.js} +3 -3
- package/dist/{outbound-adapter-BkuMp2Vs.js → outbound-adapter-DuRqAQXK.js} +35 -23
- package/dist/{pipeline.runtime-DgtmuYCP.js → pipeline.runtime-Bbfd5VFW.js} +1386 -929
- package/dist/{policy-PRysPn23.js → policy-BKXSxrIS.js} +18 -14
- package/dist/{probe-CgDsSops.js → probe-BVA65leh.js} +38 -18
- package/dist/{provider-DmRizMZt.js → provider-CUUiwsg2.js} +3454 -2601
- package/dist/{relay-source-Blxj8xb4.js → relay-source-mhpMMRG-.js} +11 -21
- package/dist/{replies-4s_Vq_z9.js → replies-SnWyXcsL.js} +84 -27
- package/dist/{resolve-channels-yEqmM-3I.js → resolve-channels-BSpqC8jU.js} +39 -12
- package/dist/{resolve-users-BOrt5K-5.js → resolve-users-Dvz9pDe0.js} +28 -5
- package/dist/{runtime-api-QMb-Q5Ko.js → runtime-api-DBi7xc_g.js} +3 -3
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-BJSrkAp6.js → scopes-BSk4GZvZ.js} +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-DsLeZpST.js → send-CtnOxKCc.js} +249 -163
- package/dist/{send.runtime-gUdK6V3h.js → send.runtime-kYctMHSd.js} +1 -1
- package/dist/setup-entry.js +1 -4
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BeNzrMrJ.js → setup-surface-BPFfp6So.js} +6 -6
- package/dist/{shared-DgIN3Dcr.js → shared-DJBaslN7.js} +45 -45
- package/dist/{block-text-DkHaoGem.js → slack-client-kind-BXyOOICI.js} +17 -2
- package/dist/{slash-dispatch.runtime-zPkyl7dB.js → slash-dispatch.runtime-Cf2FTrnf.js} +2 -2
- package/dist/{streaming-compat-3_X-21wW.js → streaming-compat-B-e0mqM0.js} +3 -8
- package/dist/{target-parsing-N6lHogYZ.js → target-parsing-BnMD2ZqZ.js} +40 -2
- package/dist/{targets-KmjP2E8s.js → targets-Cx5W_n3W.js} +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
- package/node_modules/undici/lib/core/request.js +12 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
- package/node_modules/undici/lib/handler/cache-handler.js +246 -64
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
- package/node_modules/undici/lib/handler/retry-handler.js +24 -0
- package/node_modules/undici/lib/interceptor/cache.js +159 -52
- package/node_modules/undici/lib/util/cache.js +324 -62
- package/node_modules/undici/lib/util/date.js +23 -6
- package/node_modules/undici/lib/web/cookies/util.js +79 -9
- package/node_modules/undici/package.json +1 -1
- package/openclaw.plugin.json +280 -33
- package/package.json +9 -11
- package/skills/slack/SKILL.md +10 -68
- package/dist/account-reply-mode-DrUXogvO.js +0 -14
- package/dist/action-runtime.runtime-DQErZYpz.js +0 -2
- package/dist/actions.runtime-BIRU_G4M.js +0 -2
- package/dist/channel.setup-CLP5oTvh.js +0 -56
- package/dist/preflight-audio.runtime-D5Bgags0.js +0 -3
- package/dist/slash-plugin-commands.runtime-Dosfcx3X.js +0 -2
- package/node_modules/p-map/index.d.ts +0 -155
- package/node_modules/p-map/index.js +0 -285
- package/node_modules/p-map/license +0 -9
- package/node_modules/p-map/package.json +0 -57
- package/node_modules/p-map/readme.md +0 -190
- package/dist/{security-audit-DR097212.js → security-audit-B_yKr7MW.js} +1 -1
package/dist/index.js
CHANGED
|
@@ -23,7 +23,10 @@ var slack_default = defineBundledChannelEntry({
|
|
|
23
23
|
specifier: "./account-inspect-api.js",
|
|
24
24
|
exportName: "inspectSlackReadOnlyAccount"
|
|
25
25
|
},
|
|
26
|
-
registerFull:
|
|
26
|
+
registerFull: (api) => {
|
|
27
|
+
if (api.registrationMode !== "full") return;
|
|
28
|
+
registerSlackPluginHttpRoutes(api);
|
|
29
|
+
}
|
|
27
30
|
});
|
|
28
31
|
//#endregion
|
|
29
32
|
export { slack_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as listSlackAccountIds } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { n as listSlackAccountIds } from "./accounts-BlzxuYle.js";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-YJvFBbCR.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";
|
|
@@ -74,6 +74,13 @@ function createSlackFileActionSchema() {
|
|
|
74
74
|
function createSlackReactionEmojiSchema() {
|
|
75
75
|
return { emoji: Type.Optional(Type.String({ description: "Slack emoji shortcode name (for example \"white_check_mark\" or \"+1\") or common emoji character (for example \"✅\"). Colons are optional around shortcodes." })) };
|
|
76
76
|
}
|
|
77
|
+
function createSlackForcedMediaSchema() {
|
|
78
|
+
const description = "Preserve original image bytes without image optimization. Slack still uploads a regular file; this does not convert it into a Slack document.";
|
|
79
|
+
return {
|
|
80
|
+
forceDocument: Type.Optional(Type.Boolean({ description })),
|
|
81
|
+
asDocument: Type.Optional(Type.Boolean({ description: `Alias for forceDocument. ${description}` }))
|
|
82
|
+
};
|
|
83
|
+
}
|
|
77
84
|
function createSlackMessageIdActionSchema() {
|
|
78
85
|
const description = "Slack message timestamp/message id (for example \"1777423717.666499\"). Used by react, reactions, edit, delete, pin, and unpin actions. React defaults to the current inbound message when available. Not used by download-file, which requires fileId from event.files[].id.";
|
|
79
86
|
return {
|
|
@@ -83,12 +90,16 @@ function createSlackMessageIdActionSchema() {
|
|
|
83
90
|
}
|
|
84
91
|
function createSlackSendActionSchema() {
|
|
85
92
|
return {
|
|
93
|
+
...createSlackForcedMediaSchema(),
|
|
86
94
|
topLevel: Type.Optional(Type.Boolean({ description: "Slack-only opt-out for action=\"send\" from a threaded same-channel context. Set true to post a new parent-channel message instead of inheriting the current Slack thread. `threadId: null` is accepted as the same top-level request." })),
|
|
87
95
|
replyBroadcast: Type.Optional(Type.Boolean({ description: "Slack-only opt-in for action=\"send\" thread replies. Set true with threadId or replyTo on text/block sends to also broadcast the reply to the parent channel. Not supported for media or upload-file." }))
|
|
88
96
|
};
|
|
89
97
|
}
|
|
90
98
|
function createSlackTopLevelActionSchema() {
|
|
91
|
-
return {
|
|
99
|
+
return {
|
|
100
|
+
...createSlackForcedMediaSchema(),
|
|
101
|
+
topLevel: Type.Optional(Type.Boolean({ description: "Slack-only opt-out from threaded same-channel context. Set true to post at the channel root instead of inheriting the current Slack thread." }))
|
|
102
|
+
};
|
|
92
103
|
}
|
|
93
104
|
function describeSlackMessageTool({ cfg, accountId }) {
|
|
94
105
|
const actions = listSlackMessageActions(cfg, accountId);
|
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-CqMr5Rmc.js";
|
|
2
2
|
export { describeSlackMessageTool as describeMessageTool };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
4
|
-
import { o as resolveSlackThreadTs } from "./replies-
|
|
2
|
+
import { C as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-CUUiwsg2.js";
|
|
3
|
+
import { t as isSlackChannelAllowedByPolicy } from "./policy-BKXSxrIS.js";
|
|
4
|
+
import { o as resolveSlackThreadTs } from "./replies-SnWyXcsL.js";
|
|
5
5
|
//#region extensions/slack/src/monitor.ts
|
|
6
6
|
var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as parseSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
|
|
2
|
+
import { U as SLACK_TEXT_LIMIT, X as SLACK_QUESTION_FINALIZATION_BLOCKS, ct as escapeSlackMrkdwn, dt as SLACK_PRESENTATION_CAPABILITIES, it as resolveSlackQuestionActionIds, v as parseSlackReplyBlockSegments, x as resolveSlackReplyDeliveryMessages, y as resolveSlackReplyBlockResolution, z as resolveSlackAuthoredTextPlacement } from "./group-policy-DyfB_ZIE.js";
|
|
2
3
|
import { n as resolveSlackThreadTsValue } from "./thread-ts-DUGhaYKq.js";
|
|
3
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
5
|
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -9,6 +10,16 @@ import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
|
|
|
9
10
|
import { resolvePayloadMediaUrls, sendPayloadMediaSequenceAndFinalize, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
10
11
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
11
12
|
//#region extensions/slack/src/outbound-adapter.ts
|
|
13
|
+
function toSlackOutboundResult(result) {
|
|
14
|
+
const { channelId, ...delivery } = result;
|
|
15
|
+
return channelId === void 0 ? delivery : {
|
|
16
|
+
...delivery,
|
|
17
|
+
target: {
|
|
18
|
+
kind: "channel",
|
|
19
|
+
id: channelId
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
12
23
|
const SLACK_RENDERED_PRESENTATION_PROVENANCE_KEY = randomBytes(32);
|
|
13
24
|
function createSlackRenderedPresentationProvenance(resolution) {
|
|
14
25
|
return createHmac("sha256", SLACK_RENDERED_PRESENTATION_PROVENANCE_KEY).update(JSON.stringify([resolution.authoredTextPlacement, resolution.segments])).digest("base64url");
|
|
@@ -38,7 +49,7 @@ function readSlackRenderedPresentation(slackData) {
|
|
|
38
49
|
return;
|
|
39
50
|
}
|
|
40
51
|
}
|
|
41
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
52
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-kYctMHSd.js"));
|
|
42
53
|
function resolveSlackSendIdentity(identity) {
|
|
43
54
|
if (!identity) return;
|
|
44
55
|
const username = normalizeOptionalString(identity.name);
|
|
@@ -101,7 +112,8 @@ async function sendSlackOutboundMessage(params) {
|
|
|
101
112
|
mediaUrl: params.mediaUrl,
|
|
102
113
|
mediaAccess: params.mediaAccess,
|
|
103
114
|
mediaLocalRoots: params.mediaLocalRoots,
|
|
104
|
-
mediaReadFile: params.mediaReadFile
|
|
115
|
+
mediaReadFile: params.mediaReadFile,
|
|
116
|
+
...params.forceDocument ? { forceDocument: true } : {}
|
|
105
117
|
} : {},
|
|
106
118
|
...params.blocks ? { blocks: params.blocks } : {},
|
|
107
119
|
...params.authoredTextPlacement ? { authoredTextPlacement: params.authoredTextPlacement } : {},
|
|
@@ -111,7 +123,7 @@ async function sendSlackOutboundMessage(params) {
|
|
|
111
123
|
...params.deliveryQueueId ? { deliveryQueueId: params.deliveryQueueId } : {},
|
|
112
124
|
...params.onPlatformSendDispatch ? { onPlatformSendDispatch: params.onPlatformSendDispatch } : {},
|
|
113
125
|
...params.onDeliveryResult ? { onDeliveryResult: async (progress) => {
|
|
114
|
-
await params.onDeliveryResult?.(attachChannelToResult("slack", progress));
|
|
126
|
+
await params.onDeliveryResult?.(attachChannelToResult("slack", toSlackOutboundResult(progress)));
|
|
115
127
|
} } : {}
|
|
116
128
|
};
|
|
117
129
|
return await send(params.to, params.text, sendOptions);
|
|
@@ -119,8 +131,8 @@ async function sendSlackOutboundMessage(params) {
|
|
|
119
131
|
function createSlackAttachedSendAdapter() {
|
|
120
132
|
return createAttachedChannelResultAdapter({
|
|
121
133
|
channel: "slack",
|
|
122
|
-
sendText: sendSlackOutboundMessage,
|
|
123
|
-
sendMedia: sendSlackOutboundMessage
|
|
134
|
+
sendText: async (ctx) => toSlackOutboundResult(await sendSlackOutboundMessage(ctx)),
|
|
135
|
+
sendMedia: async (ctx) => toSlackOutboundResult(await sendSlackOutboundMessage(ctx))
|
|
124
136
|
});
|
|
125
137
|
}
|
|
126
138
|
const slackOutbound = {
|
|
@@ -161,15 +173,14 @@ const slackOutbound = {
|
|
|
161
173
|
text: payload.text
|
|
162
174
|
});
|
|
163
175
|
const useSingleDeliveryMarker = mediaUrls.length === 0 && deliveryMessages.length === 1;
|
|
164
|
-
return attachChannelToResult("slack", await sendPayloadMediaSequenceAndFinalize({
|
|
176
|
+
return attachChannelToResult("slack", toSlackOutboundResult(await sendPayloadMediaSequenceAndFinalize({
|
|
165
177
|
text: "",
|
|
166
178
|
mediaUrls,
|
|
167
179
|
send: async ({ text, mediaUrl }) => await sendSlackOutboundMessage({
|
|
168
180
|
...ctx,
|
|
169
181
|
text,
|
|
170
182
|
mediaUrl,
|
|
171
|
-
deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
|
|
172
|
-
onPlatformSendDispatch: useSingleDeliveryMarker ? ctx.onPlatformSendDispatch : void 0
|
|
183
|
+
deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
|
|
173
184
|
}),
|
|
174
185
|
finalize: async () => {
|
|
175
186
|
let lastResult;
|
|
@@ -180,13 +191,12 @@ const slackOutbound = {
|
|
|
180
191
|
...message.authoredTextPlacement ? { authoredTextPlacement: message.authoredTextPlacement } : {},
|
|
181
192
|
...message.nativeDataFallbackBaseText ? { nativeDataFallbackBaseText: message.nativeDataFallbackBaseText } : {},
|
|
182
193
|
...message.textIsSlackPlainText ? { textIsSlackPlainText: true } : {},
|
|
183
|
-
deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
|
|
184
|
-
onPlatformSendDispatch: useSingleDeliveryMarker ? ctx.onPlatformSendDispatch : void 0
|
|
194
|
+
deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
|
|
185
195
|
});
|
|
186
196
|
if (!lastResult) throw new Error("Slack rendered presentation produced no deliverable segment");
|
|
187
197
|
return lastResult;
|
|
188
198
|
}
|
|
189
|
-
}));
|
|
199
|
+
})));
|
|
190
200
|
},
|
|
191
201
|
afterDeliverPayload: async ({ cfg, target, payload, results }) => {
|
|
192
202
|
const questionId = questionGatewayRuntime.readAskUserQuestionId(payload);
|
|
@@ -194,25 +204,26 @@ const slackOutbound = {
|
|
|
194
204
|
if (!questionId) return;
|
|
195
205
|
const resolution = readSlackRenderedPresentation(slackData);
|
|
196
206
|
if (!resolution) return;
|
|
197
|
-
const
|
|
207
|
+
const deliveryMessage = resolveSlackReplyDeliveryMessages({
|
|
198
208
|
authoredTextPlacement: resolution.authoredTextPlacement,
|
|
199
209
|
segments: resolution.segments,
|
|
200
210
|
text: payload.text
|
|
201
|
-
});
|
|
202
|
-
const
|
|
203
|
-
const
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const channelId = result.channelId;
|
|
211
|
+
}).find((message) => resolveSlackQuestionActionIds(message.blocks).length > 0);
|
|
212
|
+
const questionActionIds = resolveSlackQuestionActionIds(deliveryMessage?.blocks);
|
|
213
|
+
const result = results.find(({ channel, meta }) => channel === "slack" && Array.isArray(meta?.slackQuestionActionIds) && meta.slackQuestionActionIds.some((actionId) => typeof actionId === "string" && questionActionIds.includes(actionId)));
|
|
214
|
+
const deliveredDisplayBlocks = (result?.meta)?.[SLACK_QUESTION_FINALIZATION_BLOCKS];
|
|
215
|
+
if (!deliveryMessage || !deliveredDisplayBlocks || !result?.messageId) return;
|
|
216
|
+
const channelId = result.target?.kind === "channel" ? result.target.id : void 0;
|
|
208
217
|
if (!channelId) return;
|
|
218
|
+
const teamId = parseSlackTarget(target.to, { defaultKind: "channel" })?.teamId;
|
|
219
|
+
const questionMessageId = typeof result.meta?.slackQuestionMessageId === "string" ? result.meta.slackQuestionMessageId : result.messageId;
|
|
209
220
|
questionGatewayRuntime.registerChannelDelivery({
|
|
210
221
|
questionId,
|
|
211
|
-
deliveryId: `slack:${target.accountId ?? "default"}:${channelId}:${
|
|
222
|
+
deliveryId: `slack:${target.accountId ?? "default"}:${channelId}:${questionMessageId}`,
|
|
212
223
|
finalize: async (statusLine) => {
|
|
213
224
|
const { updateMessageSlack } = await loadSlackSendRuntime();
|
|
214
225
|
const escapedStatusLine = escapeSlackMrkdwn(statusLine);
|
|
215
|
-
const blocks = [...
|
|
226
|
+
const blocks = [...deliveredDisplayBlocks, {
|
|
216
227
|
type: "context",
|
|
217
228
|
elements: [{
|
|
218
229
|
type: "mrkdwn",
|
|
@@ -223,7 +234,8 @@ const slackOutbound = {
|
|
|
223
234
|
cfg,
|
|
224
235
|
accountId: target.accountId ?? void 0,
|
|
225
236
|
channelId,
|
|
226
|
-
|
|
237
|
+
teamId,
|
|
238
|
+
messageTs: questionMessageId,
|
|
227
239
|
text: `${deliveryMessage.text}\n\n${escapedStatusLine}`,
|
|
228
240
|
blocks
|
|
229
241
|
});
|