@openclaw/slack 2026.12.1-beta.2 → 2026.12.1-beta.4
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/.setup/{account-inspect-DgQgj0wk.mjs → account-inspect-Cvn3f95c.mjs} +1 -1
- package/dist/.setup/{accounts-EaPP0fFY.mjs → accounts-Dsl3wabY.mjs} +1 -1
- package/dist/.setup/{action-runtime-BvoZDGSu.mjs → action-runtime-zVonj7Ub.mjs} +6 -6
- package/dist/.setup/action-runtime.runtime-YBV3dNF-.mjs +1 -0
- package/dist/.setup/{actions-DAWAKRJ9.mjs → actions-0x2TsQH6.mjs} +4 -4
- package/dist/.setup/{approval-handler.runtime-BIePVIYr.mjs → approval-handler.runtime-BBYoz7El.mjs} +4 -4
- package/dist/.setup/{approval-message-updates-DocYhToX.mjs → approval-message-updates-BrGg-eis.mjs} +1 -1
- package/dist/.setup/{channel-paKIY8u4.mjs → channel-C6-Cp-Fz.mjs} +20 -20
- package/dist/.setup/{channel-type-Ku_QceM7.mjs → channel-type-BQCZqcgg.mjs} +3 -3
- package/dist/.setup/{channel.setup-BW3ogoi5.mjs → channel.setup-Dzt1s8XR.mjs} +3 -3
- package/dist/.setup/{directory-config-CGvKYg9F.mjs → directory-config-CWeEzb_Y.mjs} +2 -2
- package/dist/.setup/{directory-live-CJl5MPac.mjs → directory-live-ZhSt3r1s.mjs} +2 -2
- package/dist/.setup/{doctor-contract-BB2KJ9Ni.mjs → doctor-contract-CcNdculn.mjs} +27 -2
- package/dist/.setup/{fork-Cua6YBp0.mjs → fork-CiiHD26T.mjs} +3 -3
- package/dist/.setup/{literal-text-CXYRhsDp.mjs → literal-text-DXy7nGRR.mjs} +1 -1
- package/dist/.setup/{message-tool-api-CTxYxzPZ.mjs → message-tool-api-9DmIWHzY.mjs} +2 -2
- package/dist/.setup/{monitor-CkoNScT9.mjs → monitor-D5erEc0i.mjs} +218 -16
- package/dist/.setup/{outbound-adapter-lDejfL01.mjs → outbound-adapter-BmJCT3Qj.mjs} +5 -5
- package/dist/.setup/{pipeline.runtime-B4H65MB2.mjs → pipeline.runtime-C51V3mhq.mjs} +46 -234
- package/dist/.setup/{policy-B7_AZUCl.mjs → policy-l2IjJV43.mjs} +1 -1
- package/dist/.setup/{probe-ME1HsC0x.mjs → probe-DKu67cjh.mjs} +3 -3
- package/dist/.setup/{question-delivery-CFd8xhhn.mjs → question-delivery-BRQza6lN.mjs} +1 -1
- package/dist/.setup/{relay-source-D6xKiatj.mjs → relay-source-D2WA09C-.mjs} +2 -2
- package/dist/.setup/{replies-BLOhFQoK.mjs → replies-kwdtXt3e.mjs} +5 -5
- package/dist/.setup/{reply-blocks-BXQwrMaA.mjs → reply-blocks-Cf8e9Sau.mjs} +1 -1
- package/dist/.setup/{resolve-channels-CtkJuB1X.mjs → resolve-channels-BoQiIEny.mjs} +1 -1
- package/dist/.setup/{resolve-users-Bqf-wJF9.mjs → resolve-users-PpJHZiBC.mjs} +1 -1
- package/dist/.setup/{scopes-Dbu5pO1O.mjs → scopes-bvZxH5i3.mjs} +1 -1
- package/dist/.setup/{security-audit-C3hXCfDt.mjs → security-audit-DaQskAsg.mjs} +1 -1
- package/dist/.setup/{send-CNGjlL3z.mjs → send-DJpeS70B.mjs} +4 -4
- package/dist/.setup/setup-plugin-api-DPOqeRW0.mjs +2 -0
- package/dist/.setup/{setup-surface--ug5_htx.mjs → setup-surface-BqdskNYS.mjs} +5 -5
- package/dist/.setup/{slash-dispatch.runtime-ln-mu0Wb.mjs → slash-dispatch.runtime-CMQgSmJc.mjs} +1 -1
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/api.js +12 -12
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +9 -9
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/action-runtime.runtime-BwRLINj-.mjs +0 -1
- package/dist/.setup/rolldown-runtime-nwUcYXjP.mjs +0 -27
- package/dist/.setup/setup-plugin-api-gni0-Cwn.mjs +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as resolveSlackMarkdownOptions, f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-
|
|
1
|
+
import { d as resolveSlackMarkdownOptions, f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-Dsl3wabY.mjs";
|
|
2
2
|
import { a as parseSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
|
-
import { B as resolveSlackQuestionActionIds, T as assertSlackDetachedTargetAllowed, mt as SLACK_PRESENTATION_CAPABILITIES, xt as SLACK_TEXT_LIMIT } from "./probe-
|
|
3
|
+
import { B as resolveSlackQuestionActionIds, T as assertSlackDetachedTargetAllowed, mt as SLACK_PRESENTATION_CAPABILITIES, xt as SLACK_TEXT_LIMIT } from "./probe-DKu67cjh.mjs";
|
|
4
4
|
import { r as resolveSlackThreadTsValue } from "./thread-ts-47Au2-Yn.mjs";
|
|
5
|
-
import { a as resolveSlackReplyBlockResolution, d as resolveSlackAuthoredTextPlacement, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-
|
|
5
|
+
import { a as resolveSlackReplyBlockResolution, d as resolveSlackAuthoredTextPlacement, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-Cf8e9Sau.mjs";
|
|
6
6
|
import { t as mergeSlackSendResults } from "./send-results-Bm6V1ekL.mjs";
|
|
7
|
-
import { t as registerSlackQuestionDelivery } from "./question-delivery-
|
|
7
|
+
import { t as registerSlackQuestionDelivery } from "./question-delivery-BRQza6lN.mjs";
|
|
8
8
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
10
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -45,7 +45,7 @@ function readSlackRenderedPresentation(slackData) {
|
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
48
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-DJpeS70B.mjs").then((n) => n.n));
|
|
49
49
|
function resolveSlackSendIdentity(identity) {
|
|
50
50
|
if (!identity) return;
|
|
51
51
|
const username = normalizeOptionalString(identity.name);
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as resolveSlackMarkdownOptions, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode } from "./accounts-EaPP0fFY.mjs";
|
|
1
|
+
import { d as resolveSlackMarkdownOptions, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode } from "./accounts-Dsl3wabY.mjs";
|
|
3
2
|
import { n as formatSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
4
|
-
import { $ as buildSlackBlocksFallbackText, D as truncateSlackText, E as countSlackTextUtf8Bytes, F as SLACK_SESSION_LINK_ACTION_ID, Gt as resolveSlackUserAllowed, O as truncateSlackTextByUtf8Bytes, Tt as escapeSlackMrkdwn, Vt as normalizeSlackAllowOwnerEntry, et as buildSlackCompleteBlocksFallbackText, g as formatSlackError, rt as hasSlackNativeDataBlock, vt as SLACK_EDIT_TEXT_MAX_BYTES, wt as normalizeSlackOutboundText, xt as SLACK_TEXT_LIMIT, y as qualifySlackRoutePeerId } from "./probe-
|
|
3
|
+
import { $ as buildSlackBlocksFallbackText, D as truncateSlackText, E as countSlackTextUtf8Bytes, F as SLACK_SESSION_LINK_ACTION_ID, Gt as resolveSlackUserAllowed, O as truncateSlackTextByUtf8Bytes, Tt as escapeSlackMrkdwn, Vt as normalizeSlackAllowOwnerEntry, et as buildSlackCompleteBlocksFallbackText, g as formatSlackError, rt as hasSlackNativeDataBlock, vt as SLACK_EDIT_TEXT_MAX_BYTES, wt as normalizeSlackOutboundText, xt as SLACK_TEXT_LIMIT, y as qualifySlackRoutePeerId } from "./probe-DKu67cjh.mjs";
|
|
5
4
|
import { n as resolveSlackReplyThreadTs } from "./thread-ts-47Au2-Yn.mjs";
|
|
6
|
-
import { c as resolveSlackReplyRenderPlan, i as prepareSlackReply, o as resolveSlackReplyBlocks } from "./reply-blocks-
|
|
5
|
+
import { c as resolveSlackReplyRenderPlan, i as prepareSlackReply, o as resolveSlackReplyBlocks } from "./reply-blocks-Cf8e9Sau.mjs";
|
|
7
6
|
import { d as readLruMapEntry, f as writeLruMapEntry, l as getOrCreateWeakOwnerMap } from "./client-DQqLIemQ.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import { a as clearSlackThreadFailureNotice, c as hasSlackThreadParticipation, d as recordSlackThreadParticipation, h as buildSlackNativeDataDeliveryPlan, l as hasSlackThreadParticipationWithPersistence, m as hasSlackMessageIdentity, s as hasSlackThreadFailureNotice, t as sendMessageSlack, u as recordSlackThreadFailureNotice } from "./send-
|
|
10
|
-
import { n as resolveSlackChannelConfig } from "./policy-
|
|
11
|
-
import {
|
|
12
|
-
import { a as emitSlackMessageSentHooks, i as sanitizeSlackMonitorReplyPayload, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
13
|
-
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString
|
|
7
|
+
import { D as buildSlackEditTextPayload, E as resolveSlackMessageText, a as editSlackRenderedMessage, b as formatSlackFileReference, d as reactSlackMessage, i as editSlackMessage, m as removeSlackReaction, n as deleteSlackMessage } from "./actions-0x2TsQH6.mjs";
|
|
8
|
+
import { a as clearSlackThreadFailureNotice, c as hasSlackThreadParticipation, d as recordSlackThreadParticipation, h as buildSlackNativeDataDeliveryPlan, l as hasSlackThreadParticipationWithPersistence, m as hasSlackMessageIdentity, s as hasSlackThreadFailureNotice, t as sendMessageSlack, u as recordSlackThreadFailureNotice } from "./send-DJpeS70B.mjs";
|
|
9
|
+
import { n as resolveSlackChannelConfig } from "./policy-l2IjJV43.mjs";
|
|
10
|
+
import { A as buildSlackAssistantThreadMetadata, C as discardSlackStreamPendingText, E as stopSlackStream, M as stripSlackMentionsForCommandDetection, O as normalizeSlackChannelType, S as appendSlackStream, T as startSlackStream, _ as authorizeSlackBotRoomMessage, b as SlackStreamMessageTooLongError, c as registerSlackSessionRun, d as resolveSlackThreadHistory, f as resolveSlackThreadStarter, j as readSlackAssistantThreadContext, k as resolveSlackChatType, l as resolveSlackThreadContext, m as trackSlackDraftMessage, o as authorizeSlackDirectMessage, p as resolveSlackTimestampMs, r as resolveSlackRoomContextHints, s as resolveSlackRoutingContext, u as resolveSlackChannelHistory, v as resolveSlackCommandIngress, w as markSlackStreamFallbackDelivered, x as SlackStreamNotDeliveredError, y as resolveSlackEffectiveAllowFrom } from "./monitor-D5erEc0i.mjs";
|
|
11
|
+
import { a as emitSlackMessageSentHooks, i as sanitizeSlackMonitorReplyPayload, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-kwdtXt3e.mjs";
|
|
12
|
+
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
13
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
15
14
|
import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
16
15
|
import { buildChannelProgressDraftLine, compactChannelProgressDraftLine, createChannelMessageReplyPipeline, createChannelProgressDraftCompositor, createChannelProgressWorkCounter, createDraftStreamLoop, createFinalizableDraftLifecycle, createLivePreviewLifecycle, createMessageReceiptFromOutboundResults, resolveAgentOutboundIdentity, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelProgressDraftConfig, resolveChannelProgressDraftMaxLineChars, resolveChannelProgressDraftMaxLines, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages, selectPlanChecklistSteps } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -18,8 +17,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
|
18
17
|
import { danger, logVerbose, shouldLogVerbose, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
19
18
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
20
19
|
import { normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
21
|
-
import {
|
|
22
|
-
import { asFiniteNumberInRange, parseStrictFiniteNumber, resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
|
|
20
|
+
import { resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
|
|
23
21
|
import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement, isReplyPayloadNonTerminalToolErrorWarning, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
24
22
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
25
23
|
import { hash } from "node:crypto";
|
|
@@ -247,18 +245,6 @@ function planSlackStreamUpdateFit(ledger, update, budget = SLACK_STREAM_MESSAGE_
|
|
|
247
245
|
deferredTaskIds
|
|
248
246
|
};
|
|
249
247
|
}
|
|
250
|
-
// extensions/slack/src/monitor/message-handler/timestamp.ts
|
|
251
|
-
const SLACK_TIMESTAMP_RE = /^\d+(?:\.\d+)?$/;
|
|
252
|
-
const MAX_SAFE_SLACK_TIMESTAMP_SECONDS = Number.MAX_SAFE_INTEGER / 1e3;
|
|
253
|
-
function resolveSlackTimestampMs(ts) {
|
|
254
|
-
const trimmed = ts?.trim();
|
|
255
|
-
if (!trimmed || !SLACK_TIMESTAMP_RE.test(trimmed)) return;
|
|
256
|
-
const seconds = asFiniteNumberInRange(parseStrictFiniteNumber(trimmed), {
|
|
257
|
-
min: 0,
|
|
258
|
-
max: MAX_SAFE_SLACK_TIMESTAMP_SECONDS
|
|
259
|
-
});
|
|
260
|
-
return seconds === void 0 ? void 0 : Math.round(seconds * 1e3);
|
|
261
|
-
}
|
|
262
248
|
// extensions/slack/src/monitor/message-handler/dispatch-helpers.ts
|
|
263
249
|
function resolveSlackBotLoopProtection(prepared) {
|
|
264
250
|
const senderBotId = prepared.message.bot_id;
|
|
@@ -2904,14 +2890,13 @@ async function createSlackDispatchSetup(prepared) {
|
|
|
2904
2890
|
ctx: prepared.ctxPayload
|
|
2905
2891
|
});
|
|
2906
2892
|
}
|
|
2893
|
+
const { forcedReplyThreadTs, replyToMode: replyDeliveryMode } = prepared;
|
|
2907
2894
|
const threadContext = resolveSlackThreadContext({
|
|
2908
2895
|
message,
|
|
2909
|
-
replyToMode:
|
|
2896
|
+
replyToMode: replyDeliveryMode
|
|
2910
2897
|
});
|
|
2911
|
-
const forcedReplyThreadTs = prepared.forcedReplyThreadTs;
|
|
2912
2898
|
const statusThreadTs = forcedReplyThreadTs ?? threadContext.messageThreadId;
|
|
2913
2899
|
const isThreadReply = threadContext.isThreadReply;
|
|
2914
|
-
const replyDeliveryMode = forcedReplyThreadTs ? "off" : prepared.replyToMode;
|
|
2915
2900
|
const sourceReplyDeliveryMode = resolveChannelMessageSourceReplyDeliveryMode({
|
|
2916
2901
|
cfg,
|
|
2917
2902
|
ctx: prepared.ctxPayload
|
|
@@ -3915,180 +3900,6 @@ function normalizeSlackAppContextEntities(value) {
|
|
|
3915
3900
|
return normalized ? [normalized] : [];
|
|
3916
3901
|
});
|
|
3917
3902
|
}
|
|
3918
|
-
// extensions/slack/src/monitor/thread.ts
|
|
3919
|
-
const threadStarterCache = createStaleWhileRevalidateCache({
|
|
3920
|
-
maxEntries: 2e3,
|
|
3921
|
-
maxPending: Number.POSITIVE_INFINITY,
|
|
3922
|
-
ttlMs: 216e5,
|
|
3923
|
-
cacheable: (starter) => starter !== null
|
|
3924
|
-
});
|
|
3925
|
-
function formatSlackFilePlaceholder(files) {
|
|
3926
|
-
return `[attached: ${formatSlackFileReferenceList(files)}]`;
|
|
3927
|
-
}
|
|
3928
|
-
function pushUniqueText(parts, value, options = {}) {
|
|
3929
|
-
const text = options.preserveWhitespace ? readNonBlankString(value) : normalizeOptionalString(value);
|
|
3930
|
-
if (text && !parts.includes(text)) parts.push(text);
|
|
3931
|
-
}
|
|
3932
|
-
function resolveSlackAttachmentFallbackText(attachments) {
|
|
3933
|
-
if (!Array.isArray(attachments) || attachments.length === 0) return;
|
|
3934
|
-
const parts = [];
|
|
3935
|
-
for (const attachment of attachments) {
|
|
3936
|
-
const excludeTableBlocks = isSlackUnfurlAttachment(attachment);
|
|
3937
|
-
const fallbackBlocks = (blocks) => excludeTableBlocks ? blocks?.filter((block) => !hasSlackTableBlock([block])) : blocks;
|
|
3938
|
-
pushUniqueText(parts, attachment.pretext);
|
|
3939
|
-
pushUniqueText(parts, attachment.title);
|
|
3940
|
-
pushUniqueText(parts, attachment.text);
|
|
3941
|
-
if (!(hasSlackTableBlock(attachment.blocks) && normalizeOptionalString(attachment.fallback) === "[no preview available]")) pushUniqueText(parts, attachment.fallback);
|
|
3942
|
-
for (const field of attachment.fields ?? []) {
|
|
3943
|
-
pushUniqueText(parts, field.title);
|
|
3944
|
-
pushUniqueText(parts, field.value);
|
|
3945
|
-
}
|
|
3946
|
-
pushUniqueText(parts, resolveSlackBlocksText(fallbackBlocks(attachment.blocks))?.text, { preserveWhitespace: true });
|
|
3947
|
-
pushUniqueText(parts, resolveSlackBlocksText(fallbackBlocks(attachment.message_blocks))?.text, { preserveWhitespace: true });
|
|
3948
|
-
}
|
|
3949
|
-
return parts.length > 0 ? parts.join("\n") : void 0;
|
|
3950
|
-
}
|
|
3951
|
-
function resolveSlackMessageText(message) {
|
|
3952
|
-
const messageText = normalizeOptionalString(message.text) ?? resolveSlackAttachmentFallbackText(message.attachments) ?? (message.attachments?.some((attachment) => attachment.is_share === true && (normalizeOptionalString(attachment.image_url) || attachment.files?.length)) ? "[Slack media attachment]" : void 0);
|
|
3953
|
-
return resolveSlackMessageText$1({
|
|
3954
|
-
...message,
|
|
3955
|
-
text: messageText
|
|
3956
|
-
}, { preserveMessageTextWhitespace: true });
|
|
3957
|
-
}
|
|
3958
|
-
async function resolveSlackThreadStarter(params) {
|
|
3959
|
-
const cacheKey = JSON.stringify([
|
|
3960
|
-
params.workspaceScope.accountId,
|
|
3961
|
-
params.workspaceScope.teamId,
|
|
3962
|
-
params.channelId,
|
|
3963
|
-
params.threadTs
|
|
3964
|
-
]);
|
|
3965
|
-
try {
|
|
3966
|
-
const { value } = await threadStarterCache.read(cacheKey, async () => {
|
|
3967
|
-
const message = (await params.client.conversations.replies({
|
|
3968
|
-
channel: params.channelId,
|
|
3969
|
-
ts: params.threadTs,
|
|
3970
|
-
limit: 1,
|
|
3971
|
-
inclusive: true
|
|
3972
|
-
}))?.messages?.[0];
|
|
3973
|
-
const text = message ? resolveSlackMessageText(message) : void 0;
|
|
3974
|
-
const files = message?.files?.length ? message.files : void 0;
|
|
3975
|
-
if (!message || !text && !files) return null;
|
|
3976
|
-
return {
|
|
3977
|
-
text: text || formatSlackFilePlaceholder(files),
|
|
3978
|
-
userId: message.user,
|
|
3979
|
-
botId: message.bot_id,
|
|
3980
|
-
ts: message.ts,
|
|
3981
|
-
files
|
|
3982
|
-
};
|
|
3983
|
-
}, {
|
|
3984
|
-
allowStale: false,
|
|
3985
|
-
refresh: params.refresh
|
|
3986
|
-
});
|
|
3987
|
-
return value;
|
|
3988
|
-
} catch (err) {
|
|
3989
|
-
logVerbose(`slack thread starter fetch failed channel=${params.channelId} ts=${params.threadTs}: ${formatErrorMessage(err)}`);
|
|
3990
|
-
return null;
|
|
3991
|
-
}
|
|
3992
|
-
}
|
|
3993
|
-
const SLACK_THREAD_HISTORY_MAX_PAGES = 3;
|
|
3994
|
-
function toSlackHistoryMessage(message, text) {
|
|
3995
|
-
return {
|
|
3996
|
-
text: text ?? formatSlackFilePlaceholder(message.files),
|
|
3997
|
-
userId: message.user,
|
|
3998
|
-
botId: message.bot_id,
|
|
3999
|
-
ts: message.ts,
|
|
4000
|
-
files: message.files,
|
|
4001
|
-
attachments: message.attachments
|
|
4002
|
-
};
|
|
4003
|
-
}
|
|
4004
|
-
/**
|
|
4005
|
-
* Fetches the most recent messages in a Slack thread (excluding the current message).
|
|
4006
|
-
* Used to populate thread context when a new thread session starts.
|
|
4007
|
-
*
|
|
4008
|
-
* Uses cursor pagination and keeps only the latest N retained messages when the full
|
|
4009
|
-
* thread fits in the bounded fetch window.
|
|
4010
|
-
*/
|
|
4011
|
-
async function resolveSlackThreadHistory(params) {
|
|
4012
|
-
const maxMessages = params.limit ?? 20;
|
|
4013
|
-
if (!Number.isFinite(maxMessages) || maxMessages <= 0) return [];
|
|
4014
|
-
const fetchLimit = 200;
|
|
4015
|
-
const retained = [];
|
|
4016
|
-
let cursor;
|
|
4017
|
-
let pagesFetched = 0;
|
|
4018
|
-
try {
|
|
4019
|
-
do {
|
|
4020
|
-
pagesFetched += 1;
|
|
4021
|
-
params.assertCurrent?.();
|
|
4022
|
-
const response = await params.client.conversations.replies({
|
|
4023
|
-
channel: params.channelId,
|
|
4024
|
-
ts: params.threadTs,
|
|
4025
|
-
limit: fetchLimit,
|
|
4026
|
-
inclusive: false,
|
|
4027
|
-
...params.currentMessageTs ? { latest: params.currentMessageTs } : {},
|
|
4028
|
-
...params.oldest ? { oldest: params.oldest } : {},
|
|
4029
|
-
...cursor ? { cursor } : {}
|
|
4030
|
-
});
|
|
4031
|
-
params.assertCurrent?.();
|
|
4032
|
-
for (const msg of response.messages ?? []) {
|
|
4033
|
-
const timestamp = resolveSlackTimestampMs(msg.ts);
|
|
4034
|
-
const text = resolveSlackMessageText(msg);
|
|
4035
|
-
if (!text && !msg.files?.length) continue;
|
|
4036
|
-
if (!msg.ts || msg.ts === params.currentMessageTs || params.currentMessageTs && timestamp !== void 0 && Number(msg.ts) >= Number(params.currentMessageTs) || params.oldest && (timestamp === void 0 || Number(msg.ts) <= Number(params.oldest)) || params.excludedMessageIds?.has(msg.ts)) continue;
|
|
4037
|
-
if (retained.some(([entry]) => entry.ts === msg.ts)) continue;
|
|
4038
|
-
retained.push([msg, text]);
|
|
4039
|
-
}
|
|
4040
|
-
if (retained.length > maxMessages) retained.splice(0, retained.length - maxMessages);
|
|
4041
|
-
cursor = normalizeOptionalString(response.response_metadata?.next_cursor);
|
|
4042
|
-
if (response.has_more && !cursor) {
|
|
4043
|
-
params.onOmission?.("Slack returned an incomplete thread page without a cursor");
|
|
4044
|
-
return [];
|
|
4045
|
-
}
|
|
4046
|
-
} while (cursor && pagesFetched < SLACK_THREAD_HISTORY_MAX_PAGES);
|
|
4047
|
-
if (cursor) {
|
|
4048
|
-
logVerbose(`slack thread history capped channel=${params.channelId} ts=${params.threadTs} pages=${SLACK_THREAD_HISTORY_MAX_PAGES}`);
|
|
4049
|
-
params.onOmission?.("Slack thread exceeds the three-page automatic history budget");
|
|
4050
|
-
return [];
|
|
4051
|
-
}
|
|
4052
|
-
return retained.map(([message, text]) => toSlackHistoryMessage(message, text));
|
|
4053
|
-
} catch (err) {
|
|
4054
|
-
params.assertCurrent?.();
|
|
4055
|
-
params.onOmission?.(formatErrorMessage(err));
|
|
4056
|
-
logVerbose(`slack thread history fetch failed channel=${params.channelId} ts=${params.threadTs}: ${formatErrorMessage(err)}`);
|
|
4057
|
-
return [];
|
|
4058
|
-
}
|
|
4059
|
-
}
|
|
4060
|
-
/** Slack channel history is newest first, unlike chronological thread replies. */
|
|
4061
|
-
async function resolveSlackChannelHistory(params) {
|
|
4062
|
-
if (!Number.isFinite(params.limit) || params.limit <= 0) return [];
|
|
4063
|
-
const messages = [];
|
|
4064
|
-
const seen = /* @__PURE__ */ new Set();
|
|
4065
|
-
let cursor;
|
|
4066
|
-
let scanned = 0;
|
|
4067
|
-
const maxPages = Math.ceil(params.limit / 200);
|
|
4068
|
-
for (let page = 0; page < maxPages; page += 1) {
|
|
4069
|
-
params.assertCurrent?.();
|
|
4070
|
-
const response = await params.client.conversations.history({
|
|
4071
|
-
channel: params.channelId,
|
|
4072
|
-
latest: params.currentMessageTs,
|
|
4073
|
-
...params.oldest ? { oldest: params.oldest } : {},
|
|
4074
|
-
inclusive: false,
|
|
4075
|
-
limit: Math.min(200, params.limit - scanned),
|
|
4076
|
-
...cursor ? { cursor } : {}
|
|
4077
|
-
});
|
|
4078
|
-
params.assertCurrent?.();
|
|
4079
|
-
for (const message of response.messages ?? []) {
|
|
4080
|
-
scanned += 1;
|
|
4081
|
-
if (!message.ts || Number(message.ts) >= Number(params.currentMessageTs) || params.oldest && Number(message.ts) <= Number(params.oldest) || params.excludedMessageIds.has(message.ts) || seen.has(message.ts)) continue;
|
|
4082
|
-
seen.add(message.ts);
|
|
4083
|
-
const text = resolveSlackMessageText(message);
|
|
4084
|
-
if (!text && !message.files?.length) continue;
|
|
4085
|
-
messages.push(toSlackHistoryMessage(message, text));
|
|
4086
|
-
}
|
|
4087
|
-
cursor = response.response_metadata?.next_cursor?.trim() || void 0;
|
|
4088
|
-
if (!cursor || scanned >= params.limit) break;
|
|
4089
|
-
}
|
|
4090
|
-
return messages.slice(0, params.limit).reverse();
|
|
4091
|
-
}
|
|
4092
3903
|
// extensions/slack/src/monitor/message-handler/preflight-audio.ts
|
|
4093
3904
|
function isSlackAudioFile(file) {
|
|
4094
3905
|
if (file.subtype === "slack_audio") return true;
|
|
@@ -4137,7 +3948,7 @@ const SLACK_MENTION_RESOLUTION_CONCURRENCY = 4;
|
|
|
4137
3948
|
const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
|
|
4138
3949
|
const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
|
|
4139
3950
|
const MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS = 2e3;
|
|
4140
|
-
const loadSlackMediaModule$2 = createLazyRuntimeModule(() => import("./actions-
|
|
3951
|
+
const loadSlackMediaModule$2 = createLazyRuntimeModule(() => import("./actions-0x2TsQH6.mjs").then((n) => n._));
|
|
4141
3952
|
function formatSlackUnavailableMedia(params) {
|
|
4142
3953
|
let fileReferences = params.files?.map((file) => `${formatSlackFileReference(file)} unavailable (${file.reason})`).join(", ");
|
|
4143
3954
|
if (fileReferences && fileReferences.length > MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS) fileReferences = `${truncateUtf16Safe(fileReferences, MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS)}; … (file references truncated)`;
|
|
@@ -4192,7 +4003,7 @@ async function resolveSlackMessageContent(params) {
|
|
|
4192
4003
|
let botAttachmentText;
|
|
4193
4004
|
if (params.isBotMessage && !attachmentContent?.text) botAttachmentText = (params.message.attachments ?? []).map((attachment) => normalizeOptionalString(attachment.text) ?? normalizeOptionalString(attachment.fallback)).filter(Boolean).join("\n") || void 0;
|
|
4194
4005
|
const textParts = [
|
|
4195
|
-
resolveSlackMessageText
|
|
4006
|
+
resolveSlackMessageText(params.message),
|
|
4196
4007
|
attachmentContent?.text,
|
|
4197
4008
|
botAttachmentText
|
|
4198
4009
|
];
|
|
@@ -4322,7 +4133,7 @@ const SLACK_HISTORY_MEDIA_MAX_ATTACHMENTS = 4;
|
|
|
4322
4133
|
const SLACK_HISTORY_MEDIA_MAX_BYTES = 10485760;
|
|
4323
4134
|
const SLACK_HISTORY_MEDIA_IDLE_TIMEOUT_MS = 1e3;
|
|
4324
4135
|
const SLACK_HISTORY_MEDIA_TOTAL_TIMEOUT_MS = 3e3;
|
|
4325
|
-
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-
|
|
4136
|
+
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-0x2TsQH6.mjs").then((n) => n._));
|
|
4326
4137
|
async function resolveSlackRoomHistory(params) {
|
|
4327
4138
|
if (params.ctx.historyLimit <= 0 || !params.message.ts) return [];
|
|
4328
4139
|
const warnOmission = (reason) => {
|
|
@@ -4468,7 +4279,7 @@ function resolveSlackGroupSessionSubject(params) {
|
|
|
4468
4279
|
return `Slack Channel (Workspace ID: ${params.workspaceId}, Channel ID: ${params.channelId})`;
|
|
4469
4280
|
}
|
|
4470
4281
|
// extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
|
|
4471
|
-
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-
|
|
4282
|
+
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-0x2TsQH6.mjs").then((n) => n._));
|
|
4472
4283
|
const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
|
|
4473
4284
|
function formatSlackThreadLabelSnippet(text) {
|
|
4474
4285
|
return truncateUtf16Safe(text.replace(/\s+/g, " "), 80);
|
|
@@ -4667,29 +4478,21 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
4667
4478
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
4668
4479
|
};
|
|
4669
4480
|
}
|
|
4670
|
-
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/channel-mention-gating
|
|
4671
|
-
var channel_mention_gating_exports = /* @__PURE__ */ __exportAll({ resolveBotThreadMentionPolicy: () => resolveBotThreadMentionPolicy });
|
|
4672
|
-
import * as import_openclaw_plugin_sdk_channel_mention_gating from "openclaw/plugin-sdk/channel-mention-gating";
|
|
4673
|
-
__reExport(channel_mention_gating_exports, import_openclaw_plugin_sdk_channel_mention_gating);
|
|
4674
4481
|
// extensions/slack/src/monitor/message-handler/prepare-thread-mentions.ts
|
|
4675
4482
|
async function resolveSlackThreadMentionPolicy(params) {
|
|
4676
4483
|
const { ctx, account, message, conversation, thread } = params;
|
|
4677
4484
|
const { isRoom, isDirectMessage, channelConfig } = conversation;
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
channelId: message.channel,
|
|
4684
|
-
threadTs: message.thread_ts,
|
|
4685
|
-
teamId: params.teamId
|
|
4686
|
-
}));
|
|
4687
|
-
}
|
|
4485
|
+
const implicitMentions = resolveChannelImplicitMentions({
|
|
4486
|
+
cfg: ctx.cfg,
|
|
4487
|
+
channel: "slack",
|
|
4488
|
+
accountId: account.accountId
|
|
4489
|
+
});
|
|
4688
4490
|
const requireMentionInBotThreads = channelConfig?.requireMentionInBotThreads ?? account.config.requireMentionInBotThreads;
|
|
4491
|
+
const parentUserId = normalizeOptionalString(message.parent_user_id) ?? (message.subtype === "thread_broadcast" ? normalizeOptionalString(message.root?.user) : void 0);
|
|
4492
|
+
const repliesToBot = Boolean(ctx.botUserId && parentUserId === ctx.botUserId);
|
|
4689
4493
|
let isBotOwnedThread = false;
|
|
4690
4494
|
if (isRoom && thread.isThreadReply && requireMentionInBotThreads !== void 0) {
|
|
4691
|
-
|
|
4692
|
-
if (parentUserId) isBotOwnedThread = Boolean(ctx.botUserId && parentUserId === ctx.botUserId);
|
|
4495
|
+
if (parentUserId) isBotOwnedThread = repliesToBot;
|
|
4693
4496
|
else {
|
|
4694
4497
|
const starter = await params.getThreadStarter();
|
|
4695
4498
|
isBotOwnedThread = Boolean(starter && starter.ts === thread.threadTs && isSlackThreadAuthorCurrentBot({
|
|
@@ -4698,12 +4501,25 @@ async function resolveSlackThreadMentionPolicy(params) {
|
|
|
4698
4501
|
}));
|
|
4699
4502
|
}
|
|
4700
4503
|
}
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4504
|
+
const implicitMentionKinds = [];
|
|
4505
|
+
if (!isDirectMessage && message.thread_ts && !params.wasMentioned && !(isBotOwnedThread && requireMentionInBotThreads)) {
|
|
4506
|
+
if (repliesToBot) implicitMentionKinds.push("reply_to_bot");
|
|
4507
|
+
if (implicitMentions.threadParticipation && !(repliesToBot && implicitMentions.replyToBot) && await hasSlackThreadParticipationWithPersistence({
|
|
4508
|
+
accountId: account.accountId,
|
|
4509
|
+
channelId: message.channel,
|
|
4510
|
+
threadTs: message.thread_ts,
|
|
4511
|
+
teamId: params.teamId
|
|
4512
|
+
})) implicitMentionKinds.push("bot_thread_participant");
|
|
4513
|
+
}
|
|
4514
|
+
return {
|
|
4515
|
+
implicitMentions,
|
|
4516
|
+
...resolveBotThreadMentionPolicy({
|
|
4517
|
+
isBotOwnedThread,
|
|
4518
|
+
requireMentionInBotThreads,
|
|
4519
|
+
requireMention: isRoom ? channelConfig?.requireMention ?? ctx.defaultRequireMention : false,
|
|
4520
|
+
implicitMentionKinds
|
|
4521
|
+
})
|
|
4522
|
+
};
|
|
4707
4523
|
}
|
|
4708
4524
|
// extensions/slack/src/monitor/message-handler/subteam-mentions.ts
|
|
4709
4525
|
const SUBTEAM_MENTION_RE = /<!subteam\^([A-Z0-9]+)(?:\|[^>]*)?>/gi;
|
|
@@ -5094,7 +4910,7 @@ async function prepareSlackMessage(params) {
|
|
|
5094
4910
|
cfg,
|
|
5095
4911
|
surface: "slack"
|
|
5096
4912
|
});
|
|
5097
|
-
const { requireMention: shouldRequireMention, implicitMentionKinds } = await resolveSlackThreadMentionPolicy({
|
|
4913
|
+
const { requireMention: shouldRequireMention, implicitMentionKinds, implicitMentions } = await resolveSlackThreadMentionPolicy({
|
|
5098
4914
|
ctx,
|
|
5099
4915
|
account,
|
|
5100
4916
|
message,
|
|
@@ -5110,11 +4926,6 @@ async function prepareSlackMessage(params) {
|
|
|
5110
4926
|
});
|
|
5111
4927
|
opts.abortSignal?.throwIfAborted();
|
|
5112
4928
|
if (opts.isRuntimePolicyCurrent?.() === false) return drop("final-route-denied");
|
|
5113
|
-
const implicitMentions = resolveChannelImplicitMentions({
|
|
5114
|
-
cfg,
|
|
5115
|
-
channel: "slack",
|
|
5116
|
-
accountId: account.accountId
|
|
5117
|
-
});
|
|
5118
4929
|
if (message["_ambiguousThreadReply"]) return drop("ambiguous-thread", message.parent_user_id);
|
|
5119
4930
|
let canDetectMention = groupThreadConfigured || Boolean(ctx.botUserId) || mentionRegexes.length > 0;
|
|
5120
4931
|
const textForCommandDetection = stripSlackMentionsForCommandDetection(message.text ?? "");
|
|
@@ -5241,7 +5052,8 @@ async function prepareSlackMessage(params) {
|
|
|
5241
5052
|
preflightAudioTranscript = void 0;
|
|
5242
5053
|
preflightAudioMedia = void 0;
|
|
5243
5054
|
}
|
|
5244
|
-
const { route, runtimeBinding,
|
|
5055
|
+
const { route, runtimeBinding, threadContext, threadTs, isThreadReply, threadKeys, sessionKey } = routing;
|
|
5056
|
+
const replyToMode = forcedReplyThreadTs ? "off" : routing.replyToMode;
|
|
5245
5057
|
const directThreadRoutedToDmSession = !assistantThreadContext && !agentViewThreadTs && isDirectMessage && isThreadReply && threadTs && runtimeBinding?.conversation.conversationId !== threadTs;
|
|
5246
5058
|
const mentionDecision = resolveInboundMentionDecision({
|
|
5247
5059
|
facts: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ht as normalizeSlackSlug, Wt as resolveSlackUserAllowListForTeam, l as buildSlackChannelIdCandidates, u as buildSlackChannelPolicyScope } from "./probe-
|
|
1
|
+
import { Ht as normalizeSlackSlug, Wt as resolveSlackUserAllowListForTeam, l as buildSlackChannelIdCandidates, u as buildSlackChannelPolicyScope } from "./probe-DKu67cjh.mjs";
|
|
2
2
|
import { applyChannelMatchMeta, buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
|
|
3
3
|
import { firstDefined } from "openclaw/plugin-sdk/allow-from";
|
|
4
4
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-CcNdculn.mjs";
|
|
2
2
|
import { r as isSlackPluginAccountConfigured } from "./account-configured-35y0-Hso.mjs";
|
|
3
|
-
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, m as formatSlackBotTokenIdentityWarning, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-
|
|
3
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, m as formatSlackBotTokenIdentityWarning, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-Dsl3wabY.mjs";
|
|
4
4
|
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-DwYAP3ts.mjs";
|
|
5
5
|
import { t as slackContextTargetsMatch } from "./targets-eeOxA_b_.mjs";
|
|
6
6
|
import { h as createSlackProbeDispatcher, n as createSlackReadClient } from "./client-DQqLIemQ.mjs";
|
|
@@ -1558,7 +1558,7 @@ function assertSlackDetachedTargetAllowed(accountId, teamId) {
|
|
|
1558
1558
|
}
|
|
1559
1559
|
// extensions/slack/src/conversation-binding-route.ts
|
|
1560
1560
|
const slackConversationBindings = {
|
|
1561
|
-
prepareFork: async (params) => (await import("./fork-
|
|
1561
|
+
prepareFork: async (params) => (await import("./fork-CiiHD26T.mjs")).prepareSlackFork(params),
|
|
1562
1562
|
isCurrentConversationBindingSupported: ({ accountId }) => isSlackWorkspaceInstallation(accountId)
|
|
1563
1563
|
};
|
|
1564
1564
|
const slackRouteBindingConfigCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SLACK_QUESTION_FINALIZATION_BLOCKS, B as resolveSlackQuestionActionIds, R as isSlackQuestionActionForQuestion, Tt as escapeSlackMrkdwn, et as buildSlackCompleteBlocksFallbackText } from "./probe-
|
|
1
|
+
import { A as SLACK_QUESTION_FINALIZATION_BLOCKS, B as resolveSlackQuestionActionIds, R as isSlackQuestionActionForQuestion, Tt as escapeSlackMrkdwn, et as buildSlackCompleteBlocksFallbackText } from "./probe-DKu67cjh.mjs";
|
|
2
2
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
3
3
|
// extensions/slack/src/question-delivery.ts
|
|
4
4
|
function registerSlackQuestionDelivery(params) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as formatSlackError } from "./probe-
|
|
2
|
-
import {
|
|
1
|
+
import { g as formatSlackError } from "./probe-DKu67cjh.mjs";
|
|
2
|
+
import { D as SLACK_SOCKET_RECONNECT_POLICY, g as requireSlackMessageEvent, h as parseSlackMessageEvent } from "./monitor-D5erEc0i.mjs";
|
|
3
3
|
import { asOptionalRecord, normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { createNodeProxyAgent } from "openclaw/plugin-sdk/fetch-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ct as markdownToSlackMrkdwnChunks, rt as hasSlackNativeDataBlock, xt as SLACK_TEXT_LIMIT } from "./probe-
|
|
1
|
+
import { Ct as markdownToSlackMrkdwnChunks, rt as hasSlackNativeDataBlock, xt as SLACK_TEXT_LIMIT } from "./probe-DKu67cjh.mjs";
|
|
2
2
|
import { n as resolveSlackReplyThreadTs } from "./thread-ts-47Au2-Yn.mjs";
|
|
3
|
-
import { a as resolveSlackReplyBlockResolution, n as iterateSlackReplyDeliveryMessages, t as hasSlackReplyStructuredContent } from "./reply-blocks-
|
|
4
|
-
import { g as chunkSlackTextAtHardLimit, h as buildSlackNativeDataDeliveryPlan, i as updateMessageSlack, t as sendMessageSlack, v as isSlackInvalidBlocksResponse, y as isSlackNativeResponseUrlRejection } from "./send-
|
|
5
|
-
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./monitor-
|
|
6
|
-
import { t as registerSlackQuestionDelivery } from "./question-delivery-
|
|
3
|
+
import { a as resolveSlackReplyBlockResolution, n as iterateSlackReplyDeliveryMessages, t as hasSlackReplyStructuredContent } from "./reply-blocks-Cf8e9Sau.mjs";
|
|
4
|
+
import { g as chunkSlackTextAtHardLimit, h as buildSlackNativeDataDeliveryPlan, i as updateMessageSlack, t as sendMessageSlack, v as isSlackInvalidBlocksResponse, y as isSlackNativeResponseUrlRejection } from "./send-DJpeS70B.mjs";
|
|
5
|
+
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./monitor-D5erEc0i.mjs";
|
|
6
|
+
import { t as registerSlackQuestionDelivery } from "./question-delivery-BRQza6lN.mjs";
|
|
7
7
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
8
8
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
9
9
|
import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as buildSlackBlocksFallbackText, Ct as markdownToSlackMrkdwnChunks, D as truncateSlackText, H as encodeSlackQuestionAction, J as parseSlackBlocksInput, K as encodeSlackApprovalAction, P as SLACK_SELECT_ACTION_IDS, St as chunkSlackMrkdwnText, Tt as escapeSlackMrkdwn, Z as appendSlackNativeDataFallbackText, ct as hasSlackDataVisualizationBlock, dt as countSlackDataTableBlocksCellCharacters, et as buildSlackCompleteBlocksFallbackText, ft as countSlackDataTableCellCharacters, gt as renderSlackMessagePresentationChartFallbackText, ht as SLACK_SECTION_TEXT_MAX, it as renderSlackBlockFallbackText, k as SLACK_BUTTON_ACTION_IDS, rt as hasSlackNativeDataBlock, st as buildSlackDataVisualizationBlock, tt as buildSlackNativeDataAccessibilityText, ut as buildSlackDataTableBlock } from "./probe-
|
|
1
|
+
import { $ as buildSlackBlocksFallbackText, Ct as markdownToSlackMrkdwnChunks, D as truncateSlackText, H as encodeSlackQuestionAction, J as parseSlackBlocksInput, K as encodeSlackApprovalAction, P as SLACK_SELECT_ACTION_IDS, St as chunkSlackMrkdwnText, Tt as escapeSlackMrkdwn, Z as appendSlackNativeDataFallbackText, ct as hasSlackDataVisualizationBlock, dt as countSlackDataTableBlocksCellCharacters, et as buildSlackCompleteBlocksFallbackText, ft as countSlackDataTableCellCharacters, gt as renderSlackMessagePresentationChartFallbackText, ht as SLACK_SECTION_TEXT_MAX, it as renderSlackBlockFallbackText, k as SLACK_BUTTON_ACTION_IDS, rt as hasSlackNativeDataBlock, st as buildSlackDataVisualizationBlock, tt as buildSlackNativeDataAccessibilityText, ut as buildSlackDataTableBlock } from "./probe-DKu67cjh.mjs";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
4
4
|
import { legacyInteractiveReplyToPresentation, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-CcNdculn.mjs";
|
|
2
2
|
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
3
|
import { n as collectSlackCursorPages, r as fetchSlackChannelListPage } from "./cursor-pages-DiOrzZtc.mjs";
|
|
4
4
|
import { t as createSlackLookupClient } from "./client-DQqLIemQ.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-CcNdculn.mjs";
|
|
2
2
|
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
3
|
import { n as collectSlackCursorPages } from "./cursor-pages-DiOrzZtc.mjs";
|
|
4
4
|
import { t as createSlackLookupClient } from "./client-DQqLIemQ.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as formatSlackError } from "./probe-
|
|
1
|
+
import { g as formatSlackError } from "./probe-DKu67cjh.mjs";
|
|
2
2
|
import { n as createSlackReadClient } from "./client-DQqLIemQ.mjs";
|
|
3
3
|
import { isRecord, normalizeOptionalString, normalizeTrimmedStringList, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
// extensions/slack/src/scopes.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-CcNdculn.mjs";
|
|
2
2
|
import { coerceNativeSetting, normalizeAllowFromList } from "openclaw/plugin-sdk/channel-policy";
|
|
3
3
|
import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runtime";
|
|
4
4
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-
|
|
1
|
+
import { i as __exportAll } from "./doctor-contract-CcNdculn.mjs";
|
|
2
|
+
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-Dsl3wabY.mjs";
|
|
3
3
|
import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-DwYAP3ts.mjs";
|
|
4
|
-
import { A as SLACK_QUESTION_FINALIZATION_BLOCKS, B as resolveSlackQuestionActionIds, Ct as markdownToSlackMrkdwnChunks, D as truncateSlackText, O as truncateSlackTextByUtf8Bytes, St as chunkSlackMrkdwnText, T as assertSlackDetachedTargetAllowed, Y as validateSlackBlocksArray, _ as getSlackWebApiErrorData, at as renderSlackNativeDataPlainTextBlock, bt as SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT, et as buildSlackCompleteBlocksFallbackText, g as formatSlackError, h as enrichSlackWebApiError, it as renderSlackBlockFallbackText, nt as createSlackNativeDataBaseTextConsumer, ot as stripSlackNativeDataBlocks, rt as hasSlackNativeDataBlock, tt as buildSlackNativeDataAccessibilityText, vt as SLACK_EDIT_TEXT_MAX_BYTES, xt as SLACK_TEXT_LIMIT, yt as SLACK_MESSAGE_TEXT_HARD_LIMIT } from "./probe-
|
|
4
|
+
import { A as SLACK_QUESTION_FINALIZATION_BLOCKS, B as resolveSlackQuestionActionIds, Ct as markdownToSlackMrkdwnChunks, D as truncateSlackText, O as truncateSlackTextByUtf8Bytes, St as chunkSlackMrkdwnText, T as assertSlackDetachedTargetAllowed, Y as validateSlackBlocksArray, _ as getSlackWebApiErrorData, at as renderSlackNativeDataPlainTextBlock, bt as SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT, et as buildSlackCompleteBlocksFallbackText, g as formatSlackError, h as enrichSlackWebApiError, it as renderSlackBlockFallbackText, nt as createSlackNativeDataBaseTextConsumer, ot as stripSlackNativeDataBlocks, rt as hasSlackNativeDataBlock, tt as buildSlackNativeDataAccessibilityText, vt as SLACK_EDIT_TEXT_MAX_BYTES, xt as SLACK_TEXT_LIMIT, yt as SLACK_MESSAGE_TEXT_HARD_LIMIT } from "./probe-DKu67cjh.mjs";
|
|
5
5
|
import { r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
|
|
6
6
|
import { c as getSlackWriteClient, f as writeLruMapEntry, i as createSlackTokenCacheKey, l as getOrCreateWeakOwnerMap, n as createSlackReadClient, o as createSlackWriteClient } from "./client-DQqLIemQ.mjs";
|
|
7
|
-
import { t as buildSlackLiteralText } from "./literal-text-
|
|
7
|
+
import { t as buildSlackLiteralText } from "./literal-text-DXy7nGRR.mjs";
|
|
8
8
|
import { t as getOptionalSlackRuntime } from "./runtime-C6HKn7Av.mjs";
|
|
9
9
|
import { asOptionalObjectRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as resolveSlackAccountAllowFrom, o as resolveDefaultSlackAccountId } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
3
|
-
import { a as buildSlackAllowFromPrompt, i as SLACK_CHANNEL, n as createSlackSetupWizardBase } from "./channel.setup-
|
|
4
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
5
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
1
|
+
import { c as resolveSlackAccountAllowFrom, o as resolveDefaultSlackAccountId } from "./accounts-Dsl3wabY.mjs";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-Cvn3f95c.mjs";
|
|
3
|
+
import { a as buildSlackAllowFromPrompt, i as SLACK_CHANNEL, n as createSlackSetupWizardBase } from "./channel.setup-Dzt1s8XR.mjs";
|
|
4
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-BoQiIEny.mjs";
|
|
5
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-PpJHZiBC.mjs";
|
|
6
6
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { resolveBasicAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
8
8
|
import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, patchChannelConfigForAccount, promptResolvedAllowFrom, resolveEntriesWithOptionalToken, resolveSetupAccountId, splitSetupEntries } from "openclaw/plugin-sdk/setup-runtime";
|
package/dist/.setup/{slash-dispatch.runtime-ln-mu0Wb.mjs → slash-dispatch.runtime-CMQgSmJc.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as sanitizeSlackMonitorReplyPayload, r as deliverSlackSlashReplies } from "./replies-
|
|
1
|
+
import { i as sanitizeSlackMonitorReplyPayload, r as deliverSlackSlashReplies } from "./replies-kwdtXt3e.mjs";
|
|
2
2
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
3
3
|
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
4
4
|
import { resolveConversationLabel } from "openclaw/plugin-sdk/conversation-runtime";
|