@openclaw/slack 2026.9.1-beta.1 → 2026.9.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-BoSeX09X.js → action-runtime-DftQWpI4.js} +84 -66
- package/dist/action-runtime.runtime-rHI3UAh4.js +2 -0
- package/dist/{actions-XdQyjG_p.js → actions-CFkvEv1d.js} +198 -54
- package/dist/api.js +14 -14
- package/dist/{approval-handler.runtime-DxXfGX_Z.js → approval-handler.runtime-BeILKdw4.js} +47 -25
- package/dist/{channel-C_vnTgxo.js → channel-CmOuxbOD.js} +76 -133
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-j-2lalcC.js → channel-type-BWt2CRaI.js} +2 -2
- package/dist/{channel.setup-aal8tokM.js → channel.setup-D5z1ReaT.js} +29 -23
- package/dist/{config-schema-CN3XZRX5.js → config-schema-JDx_f9Zb.js} +26 -17
- package/dist/{cursor-pages-eX7p8Wwt.js → cursor-pages-ByFwo-Py.js} +7 -1
- package/dist/{directory-config-DqfQ42OV.js → directory-config-Bmw4ykSy.js} +4 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-lC6X_Ru-.js → directory-live-BuBPHmju.js} +3 -8
- package/dist/{doctor-contract-BAy7-EUQ.js → doctor-contract-BNjw9bxb.js} +5 -4
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{message-tool-api-CWosHSi5.js → message-tool-api-uNEfQYGY.js} +19 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-DrNCGneD.js → monitor-DI07pfJl.js} +3 -3
- package/dist/{outbound-adapter-DkT2vUE9.js → outbound-adapter-B5QyTRpJ.js} +96 -91
- package/dist/{pipeline.runtime-CRRng_Nw.js → pipeline.runtime-BdIwZgm4.js} +596 -920
- package/dist/{policy-BoP6t88v.js → policy-Bh5TOqII.js} +7 -4
- package/dist/{probe-4_aHtVT3.js → probe-Biy--yhL.js} +251 -12
- package/dist/{provider-D4nDgxCh.js → provider-DoaUvAM4.js} +5621 -4944
- package/dist/{relay-source-CEmze11m.js → relay-source-D4uecp68.js} +6 -4
- package/dist/{replies-D9XMM_S0.js → replies-DENuTcPO.js} +21 -16
- package/dist/reply-blocks-PRkhyAN7.js +790 -0
- package/dist/{resolve-channels-DSamDgVs.js → resolve-channels-DQGV2VrE.js} +6 -10
- package/dist/{resolve-users-CIzwbaJR.js → resolve-users-DRGt_Q4I.js} +5 -4
- package/dist/runtime-api.js +10 -10
- package/dist/{scopes-BBrUzpBH.js → scopes-CZzeGdWV.js} +1 -1
- package/dist/{send-DtjEnlLh.js → send-DElUcgIs.js} +32 -24
- package/dist/send-results-eeOu_HYm.js +23 -0
- package/dist/{send.runtime-DQeNKa2J.js → send.runtime-C8D6cKGm.js} +1 -1
- package/dist/{group-policy-CU1tEGpS.js → session-status-BynwcZSO.js} +284 -1013
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-CsBCM4rP.js → setup-surface-B1_gpGBl.js} +5 -5
- package/dist/{shared-D9GeeR9K.js → shared-CNQsWJT7.js} +7 -5
- package/dist/{slash-dispatch.runtime-Chr3YHnT.js → slash-dispatch.runtime-DhsXavSY.js} +2 -2
- package/dist/{target-parsing-BnMD2ZqZ.js → target-parsing-PbxGDbr9.js} +11 -6
- package/dist/{targets-Cx5W_n3W.js → targets-7FexXJ62.js} +1 -1
- package/dist/{thread-ts-DUGhaYKq.js → thread-ts-CukseRVL.js} +5 -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/build/format/json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
- package/node_modules/typebox/build/system/memory/create.mjs +3 -4
- package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
- package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
- package/node_modules/typebox/build/system/memory/update.mjs +3 -2
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
- package/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/undici/lib/handler/retry-handler.js +42 -7
- package/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/undici/lib/interceptor/decompress.js +146 -14
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/openclaw.plugin.json +17 -9
- package/package.json +6 -6
- package/skills/_vendor/slack-skills-plugin.LICENSE +21 -0
- package/skills/_vendor/slack-skills-plugin.json +31 -0
- package/skills/block-kit/SKILL.md +37 -0
- package/skills/block-kit/references/official-block-kit.md +257 -0
- package/skills/block-kit/references/official-common-patterns.md +385 -0
- package/skills/slack/SKILL.md +1 -1
- package/dist/action-runtime.runtime-Dpa16J87.js +0 -2
- package/dist/conversation-binding-route-DFVLUdYF.js +0 -115
- package/dist/slack-client-kind-hSfjXyUM.js +0 -94
- package/node_modules/@slack/bolt/node_modules/negotiator/HISTORY.md +0 -114
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as formatUnknownError, i as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-DoaUvAM4.js";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
4
4
|
import { isIP } from "node:net";
|
|
@@ -10,7 +10,7 @@ const SLACK_RELAY_ROUTE_KINDS = /* @__PURE__ */ new Set([
|
|
|
10
10
|
"thread_affinity",
|
|
11
11
|
"channel_default"
|
|
12
12
|
]);
|
|
13
|
-
const SLACK_RELAY_MAX_PAYLOAD_BYTES =
|
|
13
|
+
const SLACK_RELAY_MAX_PAYLOAD_BYTES = 1048576;
|
|
14
14
|
async function monitorSlackRelaySource(params) {
|
|
15
15
|
let reconnectAttempts = 0;
|
|
16
16
|
while (!params.abortSignal?.aborted) {
|
|
@@ -56,7 +56,8 @@ async function monitorSlackRelaySource(params) {
|
|
|
56
56
|
function openRelayWebSocket(config, abortSignal) {
|
|
57
57
|
if (abortSignal?.aborted) return Promise.reject(/* @__PURE__ */ new Error("Slack relay websocket aborted before connect"));
|
|
58
58
|
return new Promise((resolve, reject) => {
|
|
59
|
-
const
|
|
59
|
+
const url = buildRelayWebSocketUrl(config);
|
|
60
|
+
const ws = new WebSocket(url, buildRelayWebSocketOptions(config.authToken));
|
|
60
61
|
const cleanup = () => {
|
|
61
62
|
ws.off("open", onOpen);
|
|
62
63
|
ws.off("error", onError);
|
|
@@ -210,7 +211,8 @@ function extractRelaySlackMessageEvent(frame) {
|
|
|
210
211
|
const routeRecord = asOptionalRecord(record.route);
|
|
211
212
|
const routeKind = stringValue(routeRecord?.kind);
|
|
212
213
|
const routeKey = stringValue(routeRecord?.key);
|
|
213
|
-
const
|
|
214
|
+
const payload = asOptionalRecord(record.payload);
|
|
215
|
+
const event = asOptionalRecord(payload?.event);
|
|
214
216
|
if (event?.type !== "message" || typeof event.channel !== "string") return;
|
|
215
217
|
if (!deliveryId || !routeKind || !SLACK_RELAY_ROUTE_KINDS.has(routeKind) || !routeKey) return;
|
|
216
218
|
return {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { C as buildSlackBlocksFallbackText, J as markdownToSlackMrkdwnChunks, b as isSlackInvalidBlocksResponse, g as buildSlackNativeDataAccessibilityText, k as SLACK_TEXT_LIMIT, v as hasSlackNativeDataBlock, x as isSlackNativeResponseUrlRejection } from "./session-status-BynwcZSO.js";
|
|
2
|
+
import { i as resolveSlackReplyBlocks, r as resolveSlackReplyBlockResolution, t as hasSlackReplyStructuredContent } from "./reply-blocks-PRkhyAN7.js";
|
|
3
|
+
import { n as resolveSlackReplyThreadTs } from "./thread-ts-CukseRVL.js";
|
|
4
|
+
import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-DElUcgIs.js";
|
|
5
|
+
import { c as createSlackResponseUrlBudget, s as SlackResponseAlreadyReportedError } from "./provider-DoaUvAM4.js";
|
|
4
6
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
5
7
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
6
8
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
9
|
+
import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
7
10
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
8
11
|
import { SILENT_REPLY_TOKEN, chunkMarkdownTextWithMode, isSilentReplyText } from "openclaw/plugin-sdk/reply-chunking";
|
|
9
|
-
import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
10
12
|
import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
|
|
11
13
|
import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
|
|
12
14
|
import { buildCanonicalSentMessageHookContext, createInternalHookEvent, fireAndForgetHook, toInternalMessageSentContext, toPluginMessageContext, toPluginMessageSentEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
|
|
@@ -127,21 +129,20 @@ function sanitizeSlackMonitorReplyPayload(payload) {
|
|
|
127
129
|
function resolveSlackMediaHookSpokenText(payload) {
|
|
128
130
|
return (getReplyPayloadTtsSupplement(payload)?.spokenText ?? payload.spokenText)?.trim() || void 0;
|
|
129
131
|
}
|
|
130
|
-
function resolveDeliveredSlackReplyThreadTs(params) {
|
|
131
|
-
return (params.replyToMode === "off" ? void 0 : params.payloadReplyToId) ?? params.replyThreadTs;
|
|
132
|
-
}
|
|
133
132
|
async function deliverReplies(params) {
|
|
134
133
|
let latestResult;
|
|
135
134
|
for (const payload of params.replies) {
|
|
136
135
|
if (payload.isReasoning === true) continue;
|
|
137
|
-
const threadTs =
|
|
136
|
+
const threadTs = resolveSlackReplyThreadTs({
|
|
138
137
|
replyToMode: params.replyToMode,
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
replyToId: payload.replyToId,
|
|
139
|
+
threadId: params.replyThreadTs,
|
|
140
|
+
replyToCurrent: payload.replyToCurrent
|
|
141
141
|
});
|
|
142
142
|
const reply = resolveSendableOutboundReplyParts(payload);
|
|
143
143
|
const textRaw = reply.hasText && !isSilentReplyText(reply.trimmedText, SILENT_REPLY_TOKEN) ? reply.trimmedText : void 0;
|
|
144
|
-
const
|
|
144
|
+
const materializeAuthoredText = !reply.hasMedia && hasSlackReplyStructuredContent(payload);
|
|
145
|
+
const { authoredTextPlacement, segments } = resolveSlackReplyBlockResolution(payload, { materializeAuthoredText });
|
|
145
146
|
if (!textRaw && !reply.hasMedia && segments.length === 0) continue;
|
|
146
147
|
const acceptedResults = [];
|
|
147
148
|
const sendReply = async (input) => {
|
|
@@ -297,8 +298,9 @@ function resolveSlackThreadTs(params) {
|
|
|
297
298
|
}).use();
|
|
298
299
|
}
|
|
299
300
|
function createSlackReplyReferencePlanner(params) {
|
|
301
|
+
const effectiveMode = params.isThreadReply ?? Boolean(params.incomingThreadTs && params.incomingThreadTs !== params.messageTs) ? "all" : params.replyToMode;
|
|
300
302
|
return createReplyReferencePlanner({
|
|
301
|
-
replyToMode:
|
|
303
|
+
replyToMode: effectiveMode,
|
|
302
304
|
existingId: params.incomingThreadTs,
|
|
303
305
|
startId: params.messageTs,
|
|
304
306
|
hasReplied: params.hasReplied
|
|
@@ -345,7 +347,8 @@ async function deliverSlackSlashReplies(params) {
|
|
|
345
347
|
if (payload.isReasoning === true) continue;
|
|
346
348
|
const reply = resolveSendableOutboundReplyParts(payload);
|
|
347
349
|
const textRaw = reply.hasText && !isSilentReplyText(reply.trimmedText, SILENT_REPLY_TOKEN) ? reply.trimmedText : void 0;
|
|
348
|
-
const
|
|
350
|
+
const materializeAuthoredText = hasSlackReplyStructuredContent(payload);
|
|
351
|
+
const { authoredTextPlacement, segments } = resolveSlackReplyBlockResolution(payload, { materializeAuthoredText });
|
|
349
352
|
let outsideText = authoredTextPlacement === "outside-blocks" ? textRaw ?? "" : "";
|
|
350
353
|
const messages = [];
|
|
351
354
|
const hookParts = [];
|
|
@@ -457,7 +460,8 @@ async function deliverSlackSlashReplies(params) {
|
|
|
457
460
|
if (initialRemaining !== void 0 && initialMinimumCalls > initialRemaining) await failOversizedDelivery();
|
|
458
461
|
const deliverNativeFallback = async (messages, onVisible) => {
|
|
459
462
|
for (const message of messages) {
|
|
460
|
-
|
|
463
|
+
const response = await respond(message);
|
|
464
|
+
if (await isSlackInvalidBlocksResponse(response)) throw new Error("Slack rejected the native-data fallback blocks with invalid_blocks.");
|
|
461
465
|
onVisible();
|
|
462
466
|
}
|
|
463
467
|
};
|
|
@@ -484,7 +488,8 @@ async function deliverSlackSlashReplies(params) {
|
|
|
484
488
|
}
|
|
485
489
|
let rejectedNativeBlocks = false;
|
|
486
490
|
try {
|
|
487
|
-
|
|
491
|
+
const response = await respond(planned.message);
|
|
492
|
+
rejectedNativeBlocks = await isSlackInvalidBlocksResponse(response);
|
|
488
493
|
if (!rejectedNativeBlocks) markVisible();
|
|
489
494
|
} catch (error) {
|
|
490
495
|
if (!isSlackNativeResponseUrlRejection(error)) throw error;
|
|
@@ -521,4 +526,4 @@ async function deliverSlackSlashReplies(params) {
|
|
|
521
526
|
}
|
|
522
527
|
}
|
|
523
528
|
//#endregion
|
|
524
|
-
export {
|
|
529
|
+
export { resolveSlackThreadTs as a, readSlackReplyBlocks as i, deliverReplies as n, sanitizeSlackMonitorReplyPayload as o, deliverSlackSlashReplies as r, emitSlackMessageSentHooks as s, createSlackReplyDeliveryPlan as t };
|