@openclaw/slack 2026.11.8 → 2026.11.9
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-configured-zcR9TJJN.mjs → account-configured-35y0-Hso.mjs} +1 -2
- package/dist/.setup/{account-inspect-BLVha-ov.mjs → account-inspect-DgQgj0wk.mjs} +3 -4
- package/dist/.setup/{accounts-CGJScKtk.mjs → accounts-EaPP0fFY.mjs} +6 -10
- package/dist/.setup/{action-runtime-D01wBhx5.mjs → action-runtime-CK9QZgQl.mjs} +9 -10
- package/dist/.setup/action-runtime.runtime-CpZktret.mjs +1 -0
- package/dist/.setup/{actions-D5S6D_BU.mjs → actions-s3CcFO45.mjs} +14 -22
- package/dist/.setup/{approval-handler.runtime-Buw5jh2Y.mjs → approval-handler.runtime-Ch7BecYK.mjs} +7 -8
- package/dist/.setup/{approval-message-updates-pmXcve5E.mjs → approval-message-updates-CqcRoa28.mjs} +2 -3
- package/dist/.setup/{channel-meta-C443t-lI.mjs → channel-meta-C5vsCo3a.mjs} +1 -2
- package/dist/.setup/{channel-type-B5P3w9eA.mjs → channel-type-9Lw6yLf2.mjs} +5 -6
- package/dist/.setup/{channel-DSi3yBu5.mjs → channel-zlQxHZXl.mjs} +36 -45
- package/dist/.setup/{channel.setup-Lq2OxKkF.mjs → channel.setup-BlgXNuCJ.mjs} +10 -14
- package/dist/.setup/{config-schema-BWAaa5au.mjs → config-schema-Bx1tCZB0.mjs} +2 -4
- package/dist/.setup/{cursor-pages-CATAzbTT.mjs → cursor-pages-jVn3Vkfi.mjs} +4 -8
- package/dist/.setup/{directory-config-D-hf9KGQ.mjs → directory-config-CGvKYg9F.mjs} +5 -6
- package/dist/.setup/{directory-live-onKAFI1E.mjs → directory-live-DNdw97LA.mjs} +4 -5
- package/dist/.setup/{doctor-contract-9-QJRCXk.mjs → doctor-contract-BB2KJ9Ni.mjs} +7 -13
- package/dist/.setup/{message-tool-api-LGIgVXJf.mjs → message-tool-api-B38BpEaE.mjs} +5 -7
- package/dist/.setup/{monitor-CZGrHb5a.mjs → monitor-BJId9dWb.mjs} +73 -128
- package/dist/.setup/{outbound-adapter-C-95EWl2.mjs → outbound-adapter-BH6iPWBj.mjs} +9 -10
- package/dist/.setup/{paths-B1u59oLK.mjs → paths-CQZI_5WY.mjs} +1 -2
- package/dist/.setup/{pipeline.runtime-B-EtO-8F.mjs → pipeline.runtime-Bwv_G13H.mjs} +43 -71
- package/dist/.setup/{policy-DxhGRvc2.mjs → policy-C6_DdlSf.mjs} +3 -5
- package/dist/.setup/{probe-DANukR3O.mjs → probe-B_Ax1vS1.mjs} +36 -66
- package/dist/.setup/{question-delivery-CWC7sRhH.mjs → question-delivery-D3qAIwuv.mjs} +2 -3
- package/dist/.setup/{relay-source-BH-NPqBP.mjs → relay-source-D1SVBMhk.mjs} +3 -4
- package/dist/.setup/{replies-B5e7p3dD.mjs → replies-C9j_tM8I.mjs} +8 -10
- package/dist/.setup/{reply-blocks-BzsXUUUL.mjs → reply-blocks-DyYYRrP_.mjs} +4 -7
- package/dist/.setup/{resolve-channels-XDPgnesf.mjs → resolve-channels-CF2JME9q.mjs} +4 -5
- package/dist/.setup/{resolve-users-aDAv24U2.mjs → resolve-users-DDcCAjH1.mjs} +4 -5
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
- package/dist/.setup/{runtime-JSVZSWAj.mjs → runtime-C6HKn7Av.mjs} +1 -2
- package/dist/.setup/runtime-setter-api-DrXr965r.mjs +2 -0
- package/dist/.setup/{scopes-BocHwImV.mjs → scopes-CzHC_dwV.mjs} +3 -4
- package/dist/.setup/{secret-contract-uiQtoNlu.mjs → secret-contract-CqVqR7MP.mjs} +2 -3
- package/dist/.setup/{secret-contract-api-BlLz88mj.mjs → secret-contract-api-DaCXZ47j.mjs} +1 -1
- package/dist/.setup/{security-audit-DFGiFLqd.mjs → security-audit-C3hXCfDt.mjs} +2 -3
- package/dist/.setup/{send-yK6_-px6.mjs → send-WJZ73VSf.mjs} +13 -19
- package/dist/.setup/{send-results-BGxlroJ-.mjs → send-results-Bm6V1ekL.mjs} +1 -2
- package/dist/.setup/setup-plugin-api-DJXIB8CF.mjs +2 -0
- package/dist/.setup/{setup-surface-C0KRtyqa.mjs → setup-surface-uIqP2B0Y.mjs} +6 -7
- package/dist/.setup/{slash-dispatch.runtime-CZuMRdRx.mjs → slash-dispatch.runtime-DhIREf-h.mjs} +1 -1
- package/dist/.setup/{target-parsing-Bx2UZniD.mjs → target-parsing-DwYAP3ts.mjs} +1 -2
- package/dist/.setup/{targets-D-ASeWHy.mjs → targets-eeOxA_b_.mjs} +2 -3
- package/dist/.setup/{thread-ts-Cvt7WD6B.mjs → thread-ts-47Au2-Yn.mjs} +1 -2
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/account-inspect-api.js +2 -3
- package/dist/api.js +16 -16
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-entry.js +1 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +2 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +1 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +10 -10
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +4 -5
- package/dist/setup-plugin-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/action-runtime.runtime-VQGaR6g8.mjs +0 -1
- package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +0 -2
- package/dist/.setup/setup-plugin-api-Cfz58xoh.mjs +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { d as resolveSlackMarkdownOptions, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode } from "./accounts-
|
|
3
|
-
import { n as formatSlackTarget } from "./target-parsing-
|
|
4
|
-
import { F as truncateSlackText, Gt as resolveSlackUserAllowed, I as truncateSlackTextByUtf8Bytes, O as hasSlackNativeDataBlock, P as countSlackTextUtf8Bytes, Tt as escapeSlackMrkdwn, U as SLACK_SESSION_LINK_ACTION_ID, Vt as normalizeSlackAllowOwnerEntry, _ as qualifySlackRoutePeerId, at as buildSlackCompleteBlocksFallbackText, it as buildSlackBlocksFallbackText, m as formatSlackError, vt as SLACK_EDIT_TEXT_MAX_BYTES, wt as normalizeSlackOutboundText, xt as SLACK_TEXT_LIMIT } from "./probe-
|
|
5
|
-
import { n as resolveSlackReplyThreadTs } from "./thread-ts-
|
|
6
|
-
import { c as resolveSlackReplyRenderPlan, i as prepareSlackReply, o as resolveSlackReplyBlocks } from "./reply-blocks-
|
|
7
|
-
import { d as getOrCreateWeakOwnerMap, m as writeLruMapEntry, p as readLruMapEntry } from "./cursor-pages-
|
|
8
|
-
import { C as hasSlackTableBlock, D as buildSlackEditTextPayload, E as resolveSlackMessageText$1, T as resolveSlackBlocksText, a as editSlackRenderedMessage, b as formatSlackFileReference, d as reactSlackMessage, i as editSlackMessage, m as removeSlackReaction, n as deleteSlackMessage, w as isSlackUnfurlAttachment, x as formatSlackFileReferenceList } from "./actions-
|
|
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 { C as normalizeSlackChannelType, D as stripSlackMentionsForCommandDetection, E as readSlackAssistantThreadContext, T as buildSlackAssistantThreadMetadata, _ as SlackStreamNotDeliveredError, b as startSlackStream, c as registerSlackSessionRun, g as SlackStreamMessageTooLongError, h as resolveSlackEffectiveAllowFrom, l as resolveSlackThreadContext, m as resolveSlackCommandIngress, o as authorizeSlackDirectMessage, p as authorizeSlackBotRoomMessage, r as resolveSlackRoomContextHints, s as resolveSlackRoutingContext, u as trackSlackDraftMessage, v as appendSlackStream, w as resolveSlackChatType, x as stopSlackStream, y as markSlackStreamFallbackDelivered } from "./monitor-
|
|
12
|
-
import { a as emitSlackMessageSentHooks, i as sanitizeSlackMonitorReplyPayload, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { d as resolveSlackMarkdownOptions, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
+
import { n as formatSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
4
|
+
import { F as truncateSlackText, Gt as resolveSlackUserAllowed, I as truncateSlackTextByUtf8Bytes, O as hasSlackNativeDataBlock, P as countSlackTextUtf8Bytes, Tt as escapeSlackMrkdwn, U as SLACK_SESSION_LINK_ACTION_ID, Vt as normalizeSlackAllowOwnerEntry, _ as qualifySlackRoutePeerId, at as buildSlackCompleteBlocksFallbackText, it as buildSlackBlocksFallbackText, m as formatSlackError, vt as SLACK_EDIT_TEXT_MAX_BYTES, wt as normalizeSlackOutboundText, xt as SLACK_TEXT_LIMIT } from "./probe-B_Ax1vS1.mjs";
|
|
5
|
+
import { n as resolveSlackReplyThreadTs } from "./thread-ts-47Au2-Yn.mjs";
|
|
6
|
+
import { c as resolveSlackReplyRenderPlan, i as prepareSlackReply, o as resolveSlackReplyBlocks } from "./reply-blocks-DyYYRrP_.mjs";
|
|
7
|
+
import { d as getOrCreateWeakOwnerMap, m as writeLruMapEntry, p as readLruMapEntry } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
8
|
+
import { C as hasSlackTableBlock, D as buildSlackEditTextPayload, E as resolveSlackMessageText$1, T as resolveSlackBlocksText, a as editSlackRenderedMessage, b as formatSlackFileReference, d as reactSlackMessage, i as editSlackMessage, m as removeSlackReaction, n as deleteSlackMessage, w as isSlackUnfurlAttachment, x as formatSlackFileReferenceList } from "./actions-s3CcFO45.mjs";
|
|
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-WJZ73VSf.mjs";
|
|
10
|
+
import { n as resolveSlackChannelConfig } from "./policy-C6_DdlSf.mjs";
|
|
11
|
+
import { C as normalizeSlackChannelType, D as stripSlackMentionsForCommandDetection, E as readSlackAssistantThreadContext, T as buildSlackAssistantThreadMetadata, _ as SlackStreamNotDeliveredError, b as startSlackStream, c as registerSlackSessionRun, g as SlackStreamMessageTooLongError, h as resolveSlackEffectiveAllowFrom, l as resolveSlackThreadContext, m as resolveSlackCommandIngress, o as authorizeSlackDirectMessage, p as authorizeSlackBotRoomMessage, r as resolveSlackRoomContextHints, s as resolveSlackRoutingContext, u as trackSlackDraftMessage, v as appendSlackStream, w as resolveSlackChatType, x as stopSlackStream, y as markSlackStreamFallbackDelivered } from "./monitor-BJId9dWb.mjs";
|
|
12
|
+
import { a as emitSlackMessageSentHooks, i as sanitizeSlackMonitorReplyPayload, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-C9j_tM8I.mjs";
|
|
13
13
|
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
14
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
15
15
|
import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
@@ -45,7 +45,7 @@ import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
|
|
|
45
45
|
import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
46
46
|
import { DEFAULT_GROUP_HISTORY_LIMIT, buildHistoryContextFromEntries, buildInboundHistoryFromEntries } from "openclaw/plugin-sdk/reply-history";
|
|
47
47
|
import { createChannelPreflightAudio, formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
|
|
48
|
-
|
|
48
|
+
// extensions/slack/src/monitor/message-handler/timestamp.ts
|
|
49
49
|
const SLACK_TIMESTAMP_RE = /^\d+(?:\.\d+)?$/;
|
|
50
50
|
const MAX_SAFE_SLACK_TIMESTAMP_SECONDS = Number.MAX_SAFE_INTEGER / 1e3;
|
|
51
51
|
function resolveSlackTimestampMs(ts) {
|
|
@@ -57,8 +57,7 @@ function resolveSlackTimestampMs(ts) {
|
|
|
57
57
|
});
|
|
58
58
|
return seconds === void 0 ? void 0 : Math.round(seconds * 1e3);
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
//#region extensions/slack/src/monitor/message-handler/dispatch-helpers.ts
|
|
60
|
+
// extensions/slack/src/monitor/message-handler/dispatch-helpers.ts
|
|
62
61
|
function resolveSlackBotLoopProtection(prepared) {
|
|
63
62
|
const senderBotId = prepared.message.bot_id;
|
|
64
63
|
if (!senderBotId) return;
|
|
@@ -133,8 +132,7 @@ async function resolveSlackStreamRecipientTeamId(params) {
|
|
|
133
132
|
}
|
|
134
133
|
return params.fallbackTeamId;
|
|
135
134
|
}
|
|
136
|
-
|
|
137
|
-
//#region extensions/slack/src/draft-stream.ts
|
|
135
|
+
// extensions/slack/src/draft-stream.ts
|
|
138
136
|
const DEFAULT_THROTTLE_MS = 1e3;
|
|
139
137
|
function createSlackDraftStream(params) {
|
|
140
138
|
const maxChars = Math.min(params.maxChars ?? 8e3, SLACK_TEXT_LIMIT);
|
|
@@ -305,8 +303,7 @@ function createSlackDraftStream(params) {
|
|
|
305
303
|
channelId: () => streamMessage?.channelId
|
|
306
304
|
};
|
|
307
305
|
}
|
|
308
|
-
|
|
309
|
-
//#region extensions/slack/src/stream-mode.ts
|
|
306
|
+
// extensions/slack/src/stream-mode.ts
|
|
310
307
|
function resolveSlackStreamingConfig(params) {
|
|
311
308
|
return {
|
|
312
309
|
mode: params.streaming?.mode ?? "progress",
|
|
@@ -355,8 +352,7 @@ function applyAppendOnlyStreamUpdate(params) {
|
|
|
355
352
|
changed: true
|
|
356
353
|
};
|
|
357
354
|
}
|
|
358
|
-
|
|
359
|
-
//#region extensions/slack/src/progress-blocks.ts
|
|
355
|
+
// extensions/slack/src/progress-blocks.ts
|
|
360
356
|
const SLACK_PROGRESS_FIELD_MAX = 1800;
|
|
361
357
|
const DEFAULT_SLACK_PROGRESS_DETAIL_MAX_CHARS = 120;
|
|
362
358
|
const DEFAULT_SLACK_PROGRESS_TASK_DETAIL_MAX_CHARS = 48;
|
|
@@ -729,8 +725,7 @@ function reconcileSlackNativeTaskChunks(params) {
|
|
|
729
725
|
}
|
|
730
726
|
};
|
|
731
727
|
}
|
|
732
|
-
|
|
733
|
-
//#region extensions/slack/src/monitor/message-handler/dispatch-progress-render.ts
|
|
728
|
+
// extensions/slack/src/monitor/message-handler/dispatch-progress-render.ts
|
|
734
729
|
function resolveStructuredProgressLines(lines) {
|
|
735
730
|
return lines.map((line) => {
|
|
736
731
|
if (typeof line !== "string") return line;
|
|
@@ -771,8 +766,7 @@ function isSlackProgressTitleText(text, snapshot, explicitTitle) {
|
|
|
771
766
|
const title = normalizeProgressText(combineProgressHeadlineAndExplanation(explicitTitle ?? (snapshot.statusHeadlineFormat === "plain" ? void 0 : snapshot.statusHeadline), snapshot.planExplanationFormat === "plain" ? void 0 : snapshot.planExplanation));
|
|
772
767
|
return title.length > 0 && title.includes(candidate);
|
|
773
768
|
}
|
|
774
|
-
|
|
775
|
-
//#region extensions/slack/src/monitor/message-handler/preview-finalize.ts
|
|
769
|
+
// extensions/slack/src/monitor/message-handler/preview-finalize.ts
|
|
776
770
|
function blocksMatch(expected, actual) {
|
|
777
771
|
if (!expected?.length) return !actual?.length;
|
|
778
772
|
if (!actual?.length) {
|
|
@@ -843,8 +837,7 @@ async function finalizeSlackPreviewEdit(params) {
|
|
|
843
837
|
throw err;
|
|
844
838
|
}
|
|
845
839
|
}
|
|
846
|
-
|
|
847
|
-
//#region extensions/slack/src/monitor/message-handler/dispatch-progress-card.ts
|
|
840
|
+
// extensions/slack/src/monitor/message-handler/dispatch-progress-card.ts
|
|
848
841
|
const MAX_VISIBLE_WORK_LINKS = 5;
|
|
849
842
|
function createSlackDraftProgressCardRuntime(params) {
|
|
850
843
|
const { cfg, prepared, slackClient } = params.setup;
|
|
@@ -972,8 +965,7 @@ function formatSlackProgressDraftLine(line) {
|
|
|
972
965
|
enclosingStyle: "italic"
|
|
973
966
|
})}_`;
|
|
974
967
|
}
|
|
975
|
-
|
|
976
|
-
//#region extensions/slack/src/monitor/message-handler/dispatch-progress-native.ts
|
|
968
|
+
// extensions/slack/src/monitor/message-handler/dispatch-progress-native.ts
|
|
977
969
|
function createSlackNativeProgressTransport(params) {
|
|
978
970
|
const { replyPlan } = params.setup;
|
|
979
971
|
const { delivery } = params;
|
|
@@ -1034,8 +1026,7 @@ function createSlackNativeProgressTransport(params) {
|
|
|
1034
1026
|
waitForStart
|
|
1035
1027
|
};
|
|
1036
1028
|
}
|
|
1037
|
-
|
|
1038
|
-
//#region extensions/slack/src/monitor/message-handler/dispatch-progress.ts
|
|
1029
|
+
// extensions/slack/src/monitor/message-handler/dispatch-progress.ts
|
|
1039
1030
|
function createSlackProgressRuntime(runtimeParams) {
|
|
1040
1031
|
const { setup, delivery } = runtimeParams;
|
|
1041
1032
|
const { cfg, hasSlackCustomIdentity, prepared, replyPlan, runtime, slackIdentity, slackStreaming, slackProgressStyle, quietProgress, shouldUseDraftStream, useStreaming, previewStreamingEnabled } = setup;
|
|
@@ -1511,8 +1502,7 @@ function createSlackProgressRuntime(runtimeParams) {
|
|
|
1511
1502
|
updateDraftFromPartial
|
|
1512
1503
|
};
|
|
1513
1504
|
}
|
|
1514
|
-
|
|
1515
|
-
//#region extensions/slack/src/monitor/message-handler/dispatch-setup.ts
|
|
1505
|
+
// extensions/slack/src/monitor/message-handler/dispatch-setup.ts
|
|
1516
1506
|
async function createSlackDispatchSetup(prepared) {
|
|
1517
1507
|
const { ctx, account, message, route } = prepared;
|
|
1518
1508
|
const slackClient = prepared.eventScope?.client ?? ctx.app.client;
|
|
@@ -1728,8 +1718,7 @@ async function createSlackDispatchSetup(prepared) {
|
|
|
1728
1718
|
useStreaming
|
|
1729
1719
|
};
|
|
1730
1720
|
}
|
|
1731
|
-
|
|
1732
|
-
//#region extensions/slack/src/monitor/message-handler/dispatch-streaming.ts
|
|
1721
|
+
// extensions/slack/src/monitor/message-handler/dispatch-streaming.ts
|
|
1733
1722
|
function createSlackStreamingDeliveryRuntime(setup) {
|
|
1734
1723
|
const { isThreadReply, messageSentHookContext, messageSentHookTarget, prepared, replyDeliveryMode, replyPlan, runtime, slackClient, slackClientOptions, slackIdentity, slackStreamFallbackTeamId } = setup;
|
|
1735
1724
|
const { account, ctx, forcedReplyThreadTs, message, slackMessageMetadata } = prepared;
|
|
@@ -2073,8 +2062,7 @@ function createSlackStreamingDeliveryRuntime(setup) {
|
|
|
2073
2062
|
resetDeliveryTracker: () => deliveredKeys.clear()
|
|
2074
2063
|
});
|
|
2075
2064
|
}
|
|
2076
|
-
|
|
2077
|
-
//#region extensions/slack/src/monitor/message-handler/failure-notice.ts
|
|
2065
|
+
// extensions/slack/src/monitor/message-handler/failure-notice.ts
|
|
2078
2066
|
/** One outage policy for immediate replies and later origin-routed queue drains. */
|
|
2079
2067
|
function createSlackFailureNoticePolicy(params, hasVisibleReply) {
|
|
2080
2068
|
const { context, accountId, channelId, failureNoticeThreadTs, failureNoticeTeamId, statusThreadTs } = params;
|
|
@@ -2142,8 +2130,7 @@ function createSlackQueuedFailureNoticePolicy(params, beginSessionRun) {
|
|
|
2142
2130
|
}
|
|
2143
2131
|
};
|
|
2144
2132
|
}
|
|
2145
|
-
|
|
2146
|
-
//#region extensions/slack/src/monitor/message-handler/dispatch.ts
|
|
2133
|
+
// extensions/slack/src/monitor/message-handler/dispatch.ts
|
|
2147
2134
|
function formatSlackGroupThreadReply(text, participant) {
|
|
2148
2135
|
return `**${participant.name.replace(/[\\`*_{}[\]()<>#!|]/g, "\\$&").replace(/\s+/g, " ")}**\n${text}`;
|
|
2149
2136
|
}
|
|
@@ -2480,8 +2467,7 @@ async function dispatchSlackMessageWithSetup(setup, beginSessionRun, turnAdoptio
|
|
|
2480
2467
|
if (progress.useDraftProgressCard) await draftStream?.clear();
|
|
2481
2468
|
}
|
|
2482
2469
|
}
|
|
2483
|
-
|
|
2484
|
-
//#region extensions/slack/src/agent-context.ts
|
|
2470
|
+
// extensions/slack/src/agent-context.ts
|
|
2485
2471
|
function normalizeEntity(value) {
|
|
2486
2472
|
const entity = asOptionalRecord(value);
|
|
2487
2473
|
const type = normalizeOptionalString(entity?.type);
|
|
@@ -2519,8 +2505,7 @@ function normalizeSlackAppContextEntities(value) {
|
|
|
2519
2505
|
return normalized ? [normalized] : [];
|
|
2520
2506
|
});
|
|
2521
2507
|
}
|
|
2522
|
-
|
|
2523
|
-
//#region extensions/slack/src/monitor/thread.ts
|
|
2508
|
+
// extensions/slack/src/monitor/thread.ts
|
|
2524
2509
|
const threadStarterCache = createStaleWhileRevalidateCache({
|
|
2525
2510
|
maxEntries: 2e3,
|
|
2526
2511
|
maxPending: Number.POSITIVE_INFINITY,
|
|
@@ -2694,8 +2679,7 @@ async function resolveSlackChannelHistory(params) {
|
|
|
2694
2679
|
}
|
|
2695
2680
|
return messages.slice(0, params.limit).reverse();
|
|
2696
2681
|
}
|
|
2697
|
-
|
|
2698
|
-
//#region extensions/slack/src/monitor/message-handler/preflight-audio.ts
|
|
2682
|
+
// extensions/slack/src/monitor/message-handler/preflight-audio.ts
|
|
2699
2683
|
function isSlackAudioFile(file) {
|
|
2700
2684
|
if (file.subtype === "slack_audio") return true;
|
|
2701
2685
|
if ((file.mimetype?.split(";")[0]?.trim().toLowerCase())?.startsWith("audio/")) return true;
|
|
@@ -2738,13 +2722,12 @@ const sendSlackPreflightAudioTranscriptEcho = slackPreflightAudio.send.bind(slac
|
|
|
2738
2722
|
async function discardSlackPreflightMedia(media) {
|
|
2739
2723
|
await Promise.allSettled((media ?? []).map((entry) => fs.rm(entry.path, { force: true })));
|
|
2740
2724
|
}
|
|
2741
|
-
|
|
2742
|
-
//#region extensions/slack/src/monitor/message-handler/prepare-content.ts
|
|
2725
|
+
// extensions/slack/src/monitor/message-handler/prepare-content.ts
|
|
2743
2726
|
const SLACK_MENTION_RESOLUTION_CONCURRENCY = 4;
|
|
2744
2727
|
const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
|
|
2745
2728
|
const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
|
|
2746
2729
|
const MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS = 2e3;
|
|
2747
|
-
const loadSlackMediaModule$2 = createLazyRuntimeModule(() => import("./actions-
|
|
2730
|
+
const loadSlackMediaModule$2 = createLazyRuntimeModule(() => import("./actions-s3CcFO45.mjs").then((n) => n._));
|
|
2748
2731
|
function formatSlackUnavailableMedia(params) {
|
|
2749
2732
|
let fileReferences = params.files?.map((file) => `${formatSlackFileReference(file)} unavailable (${file.reason})`).join(", ");
|
|
2750
2733
|
if (fileReferences && fileReferences.length > MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS) fileReferences = `${truncateUtf16Safe(fileReferences, MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS)}; … (file references truncated)`;
|
|
@@ -2840,8 +2823,7 @@ async function resolveSlackMessageContent(params) {
|
|
|
2840
2823
|
mentionStripPatterns
|
|
2841
2824
|
} : null;
|
|
2842
2825
|
}
|
|
2843
|
-
|
|
2844
|
-
//#region extensions/slack/src/monitor/message-handler/prepare-dm-history.ts
|
|
2826
|
+
// extensions/slack/src/monitor/message-handler/prepare-dm-history.ts
|
|
2845
2827
|
function resolveSlackDmHistoryLimit(params) {
|
|
2846
2828
|
const override = params.userId ? params.account.config.dms?.[params.userId]?.historyLimit : void 0;
|
|
2847
2829
|
return resolvePromptHistoryLimit(override ?? params.defaultLimit, 0);
|
|
@@ -2914,21 +2896,19 @@ async function resolveSlackDmHistoryContext(params) {
|
|
|
2914
2896
|
};
|
|
2915
2897
|
}
|
|
2916
2898
|
}
|
|
2917
|
-
|
|
2918
|
-
//#region extensions/slack/src/monitor/message-handler/prepare-thread-context-root.ts
|
|
2899
|
+
// extensions/slack/src/monitor/message-handler/prepare-thread-context-root.ts
|
|
2919
2900
|
function isSlackThreadAuthorCurrentBot(params) {
|
|
2920
2901
|
const { identity, author } = params;
|
|
2921
2902
|
if (identity.botUserId && author.userId && author.userId === identity.botUserId) return true;
|
|
2922
2903
|
if (identity.botId && author.botId && author.botId === identity.botId) return true;
|
|
2923
2904
|
return false;
|
|
2924
2905
|
}
|
|
2925
|
-
|
|
2926
|
-
//#region extensions/slack/src/monitor/message-handler/prepare-room-history.ts
|
|
2906
|
+
// extensions/slack/src/monitor/message-handler/prepare-room-history.ts
|
|
2927
2907
|
const SLACK_HISTORY_MEDIA_MAX_ATTACHMENTS = 4;
|
|
2928
2908
|
const SLACK_HISTORY_MEDIA_MAX_BYTES = 10485760;
|
|
2929
2909
|
const SLACK_HISTORY_MEDIA_IDLE_TIMEOUT_MS = 1e3;
|
|
2930
2910
|
const SLACK_HISTORY_MEDIA_TOTAL_TIMEOUT_MS = 3e3;
|
|
2931
|
-
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-
|
|
2911
|
+
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-s3CcFO45.mjs").then((n) => n._));
|
|
2932
2912
|
async function resolveSlackRoomHistory(params) {
|
|
2933
2913
|
if (params.ctx.historyLimit <= 0 || !params.message.ts) return [];
|
|
2934
2914
|
const warnOmission = (reason) => {
|
|
@@ -3053,17 +3033,15 @@ function sliceSlackImageFileCandidates(files, limit) {
|
|
|
3053
3033
|
if (limit <= 0 || !files?.length) return [];
|
|
3054
3034
|
return files.filter(isSlackImageFileCandidate).slice(0, limit);
|
|
3055
3035
|
}
|
|
3056
|
-
|
|
3057
|
-
//#region extensions/slack/src/monitor/message-handler/prepare-session-presentation.ts
|
|
3036
|
+
// extensions/slack/src/monitor/message-handler/prepare-session-presentation.ts
|
|
3058
3037
|
function resolveSlackGroupSessionSubject(params) {
|
|
3059
3038
|
const channelName = normalizeOptionalString(params.channelName);
|
|
3060
3039
|
const workspaceName = normalizeOptionalString(params.installationIdentity?.kind === "workspace" && params.installationIdentity.teamId === params.workspaceId ? params.installationIdentity.teamName : void 0);
|
|
3061
3040
|
if (channelName && workspaceName) return `${workspaceName} #${channelName}`;
|
|
3062
3041
|
return `Slack Channel (Workspace ID: ${params.workspaceId}, Channel ID: ${params.channelId})`;
|
|
3063
3042
|
}
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-D5S6D_BU.mjs").then((n) => n._));
|
|
3043
|
+
// extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
|
|
3044
|
+
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-s3CcFO45.mjs").then((n) => n._));
|
|
3067
3045
|
const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
|
|
3068
3046
|
function formatSlackThreadLabelSnippet(text) {
|
|
3069
3047
|
return truncateUtf16Safe(text.replace(/\s+/g, " "), 80);
|
|
@@ -3251,8 +3229,7 @@ async function resolveSlackThreadContextData(params) {
|
|
|
3251
3229
|
}
|
|
3252
3230
|
return readThreadContextData();
|
|
3253
3231
|
}
|
|
3254
|
-
|
|
3255
|
-
//#region src/channels/mention-gating.ts
|
|
3232
|
+
// src/channels/mention-gating.ts
|
|
3256
3233
|
function resolveBotThreadMentionPolicy(params) {
|
|
3257
3234
|
if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
|
|
3258
3235
|
requireMention: params.requireMention,
|
|
@@ -3263,13 +3240,11 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
3263
3240
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
3264
3241
|
};
|
|
3265
3242
|
}
|
|
3266
|
-
|
|
3267
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/channel-mention-gating
|
|
3243
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/channel-mention-gating
|
|
3268
3244
|
var channel_mention_gating_exports = /* @__PURE__ */ __exportAll({ resolveBotThreadMentionPolicy: () => resolveBotThreadMentionPolicy });
|
|
3269
3245
|
import * as import_openclaw_plugin_sdk_channel_mention_gating from "openclaw/plugin-sdk/channel-mention-gating";
|
|
3270
3246
|
__reExport(channel_mention_gating_exports, import_openclaw_plugin_sdk_channel_mention_gating);
|
|
3271
|
-
|
|
3272
|
-
//#region extensions/slack/src/monitor/message-handler/prepare-thread-mentions.ts
|
|
3247
|
+
// extensions/slack/src/monitor/message-handler/prepare-thread-mentions.ts
|
|
3273
3248
|
async function resolveSlackThreadMentionPolicy(params) {
|
|
3274
3249
|
const { ctx, account, message, conversation, thread } = params;
|
|
3275
3250
|
const { isRoom, isDirectMessage, channelConfig } = conversation;
|
|
@@ -3303,8 +3278,7 @@ async function resolveSlackThreadMentionPolicy(params) {
|
|
|
3303
3278
|
implicitMentionKinds
|
|
3304
3279
|
});
|
|
3305
3280
|
}
|
|
3306
|
-
|
|
3307
|
-
//#region extensions/slack/src/monitor/message-handler/subteam-mentions.ts
|
|
3281
|
+
// extensions/slack/src/monitor/message-handler/subteam-mentions.ts
|
|
3308
3282
|
const SUBTEAM_MENTION_RE = /<!subteam\^([A-Z0-9]+)(?:\|[^>]*)?>/gi;
|
|
3309
3283
|
const SUBTEAM_MEMBER_CACHE_TTL_MS = 3e5;
|
|
3310
3284
|
const subteamMemberCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -3362,8 +3336,7 @@ async function isSlackSubteamMentionForBot(params) {
|
|
|
3362
3336
|
}
|
|
3363
3337
|
return false;
|
|
3364
3338
|
}
|
|
3365
|
-
|
|
3366
|
-
//#region extensions/slack/src/monitor/message-handler/prepare.ts
|
|
3339
|
+
// extensions/slack/src/monitor/message-handler/prepare.ts
|
|
3367
3340
|
const mentionRegexCache = /* @__PURE__ */ new WeakMap();
|
|
3368
3341
|
const SLACK_ANY_MENTION_RE = /<@[^>]+>|<!subteam\^[^>]+>/;
|
|
3369
3342
|
const SLACK_USER_MENTION_RE = /<@([^>|]+)(?:\|[^>]+)?>/g;
|
|
@@ -4241,5 +4214,4 @@ async function prepareSlackMessage(params) {
|
|
|
4241
4214
|
ackReactionPromise
|
|
4242
4215
|
};
|
|
4243
4216
|
}
|
|
4244
|
-
//#endregion
|
|
4245
4217
|
export { dispatchPreparedSlackMessage, prepareSlackMessage };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Ht as normalizeSlackSlug, Wt as resolveSlackUserAllowListForTeam, c as buildSlackChannelIdCandidates, l as buildSlackChannelPolicyScope } from "./probe-
|
|
1
|
+
import { Ht as normalizeSlackSlug, Wt as resolveSlackUserAllowListForTeam, c as buildSlackChannelIdCandidates, l as buildSlackChannelPolicyScope } from "./probe-B_Ax1vS1.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";
|
|
5
|
-
|
|
5
|
+
// extensions/slack/src/monitor/channel-config.ts
|
|
6
6
|
function resolveSlackChannelLabel(params) {
|
|
7
7
|
const channelName = params.channelName?.trim();
|
|
8
8
|
if (channelName) return `#${normalizeSlackSlug(channelName) || channelName}`;
|
|
@@ -51,11 +51,9 @@ function resolveSlackChannelConfig(params) {
|
|
|
51
51
|
};
|
|
52
52
|
return applyChannelMatchMeta(result, match);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
//#region extensions/slack/src/monitor/policy.ts
|
|
54
|
+
// extensions/slack/src/monitor/policy.ts
|
|
56
55
|
function isSlackChannelAllowedByPolicy(params) {
|
|
57
56
|
if (params.groupPolicy === "disabled") return false;
|
|
58
57
|
return params.groupPolicy !== "allowlist" || params.channelAllowlistConfigured && params.channelAllowed;
|
|
59
58
|
}
|
|
60
|
-
//#endregion
|
|
61
59
|
export { resolveSlackChannelConfig as n, resolveSlackChannelLabel as r, isSlackChannelAllowedByPolicy as t };
|