@openclaw/slack 2026.11.5-beta.1 → 2026.11.5-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-configured-35y0-Hso.mjs → account-configured-zcR9TJJN.mjs} +2 -1
- package/dist/.setup/{account-inspect-DgQgj0wk.mjs → account-inspect-BLVha-ov.mjs} +4 -3
- package/dist/.setup/{accounts-EaPP0fFY.mjs → accounts-CGJScKtk.mjs} +10 -6
- package/dist/.setup/{action-runtime-CK9QZgQl.mjs → action-runtime-D01wBhx5.mjs} +10 -9
- package/dist/.setup/action-runtime.runtime-VQGaR6g8.mjs +1 -0
- package/dist/.setup/{actions-s3CcFO45.mjs → actions-D5S6D_BU.mjs} +22 -14
- package/dist/.setup/{approval-handler.runtime-Ch7BecYK.mjs → approval-handler.runtime-Buw5jh2Y.mjs} +8 -7
- package/dist/.setup/{approval-message-updates-CqcRoa28.mjs → approval-message-updates-pmXcve5E.mjs} +3 -2
- package/dist/.setup/{channel-CAvo_WNZ.mjs → channel-lxmLyPDr.mjs} +45 -36
- package/dist/.setup/{channel-meta-C5vsCo3a.mjs → channel-meta-C443t-lI.mjs} +2 -1
- package/dist/.setup/{channel-type-9Lw6yLf2.mjs → channel-type-B5P3w9eA.mjs} +6 -5
- package/dist/.setup/{channel.setup-BlgXNuCJ.mjs → channel.setup-Lq2OxKkF.mjs} +14 -10
- package/dist/.setup/{config-schema-Bx1tCZB0.mjs → config-schema-BWAaa5au.mjs} +4 -2
- package/dist/.setup/{cursor-pages-jVn3Vkfi.mjs → cursor-pages-CATAzbTT.mjs} +8 -4
- package/dist/.setup/{directory-config-CGvKYg9F.mjs → directory-config-D-hf9KGQ.mjs} +6 -5
- package/dist/.setup/{directory-live-DNdw97LA.mjs → directory-live-onKAFI1E.mjs} +5 -4
- package/dist/.setup/{doctor-contract-BB2KJ9Ni.mjs → doctor-contract-9-QJRCXk.mjs} +13 -7
- package/dist/.setup/{message-tool-api-B38BpEaE.mjs → message-tool-api-LGIgVXJf.mjs} +7 -5
- package/dist/.setup/{monitor-BD86SotB.mjs → monitor-C1oM6vom.mjs} +128 -73
- package/dist/.setup/{outbound-adapter-BH6iPWBj.mjs → outbound-adapter-C-95EWl2.mjs} +10 -9
- package/dist/.setup/{paths-CQZI_5WY.mjs → paths-B1u59oLK.mjs} +2 -1
- package/dist/.setup/{pipeline.runtime-C4ELxaRU.mjs → pipeline.runtime-D398MsEc.mjs} +72 -43
- package/dist/.setup/{policy-C6_DdlSf.mjs → policy-DxhGRvc2.mjs} +5 -3
- package/dist/.setup/{probe-B_Ax1vS1.mjs → probe-DANukR3O.mjs} +66 -36
- package/dist/.setup/{question-delivery-D3qAIwuv.mjs → question-delivery-CWC7sRhH.mjs} +3 -2
- package/dist/.setup/{relay-source-a8jodKuO.mjs → relay-source-DNdK-_wn.mjs} +4 -3
- package/dist/.setup/{replies-Bq7n0gfM.mjs → replies-BGZkt6tB.mjs} +10 -8
- package/dist/.setup/{reply-blocks-DyYYRrP_.mjs → reply-blocks-BzsXUUUL.mjs} +7 -4
- package/dist/.setup/{resolve-channels-CF2JME9q.mjs → resolve-channels-XDPgnesf.mjs} +5 -4
- package/dist/.setup/{resolve-users-DDcCAjH1.mjs → resolve-users-aDAv24U2.mjs} +5 -4
- package/dist/.setup/{rolldown-runtime-nwUcYXjP.mjs → rolldown-runtime-B4FMCO8f.mjs} +2 -1
- package/dist/.setup/{runtime-C6HKn7Av.mjs → runtime-JSVZSWAj.mjs} +2 -1
- package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +2 -0
- package/dist/.setup/{scopes-CzHC_dwV.mjs → scopes-BocHwImV.mjs} +4 -3
- package/dist/.setup/{secret-contract-api-DaCXZ47j.mjs → secret-contract-api-BlLz88mj.mjs} +1 -1
- package/dist/.setup/{secret-contract-CqVqR7MP.mjs → secret-contract-uiQtoNlu.mjs} +3 -2
- package/dist/.setup/{security-audit-C3hXCfDt.mjs → security-audit-DFGiFLqd.mjs} +3 -2
- package/dist/.setup/{send-results-Bm6V1ekL.mjs → send-results-BGxlroJ-.mjs} +2 -1
- package/dist/.setup/{send-WJZ73VSf.mjs → send-yK6_-px6.mjs} +19 -13
- package/dist/.setup/setup-plugin-api-Cfz58xoh.mjs +2 -0
- package/dist/.setup/{setup-surface-uIqP2B0Y.mjs → setup-surface-C0KRtyqa.mjs} +7 -6
- package/dist/.setup/{slash-dispatch.runtime-Cwuwv7FL.mjs → slash-dispatch.runtime-B9IcPnHV.mjs} +1 -1
- package/dist/.setup/{target-parsing-DwYAP3ts.mjs → target-parsing-Bx2UZniD.mjs} +2 -1
- package/dist/.setup/{targets-eeOxA_b_.mjs → targets-D-ASeWHy.mjs} +3 -2
- package/dist/.setup/{thread-ts-47Au2-Yn.mjs → thread-ts-Cvt7WD6B.mjs} +2 -1
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/account-inspect-api.js +3 -2
- package/dist/api.js +16 -16
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-entry.js +2 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +3 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +2 -1
- 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 +5 -4
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/@slack/bolt/node_modules/body-parser/README.md +17 -13
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/@slack/bolt/node_modules/body-parser/package.json +7 -12
- package/package.json +4 -4
- package/dist/.setup/action-runtime.runtime-CpZktret.mjs +0 -1
- package/dist/.setup/runtime-setter-api-DrXr965r.mjs +0 -2
- package/dist/.setup/setup-plugin-api-DJXIB8CF.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 resolveSlackChatType, E as stripSlackMentionsForCommandDetection, S as normalizeSlackChannelType, T as readSlackAssistantThreadContext, _ as appendSlackStream, b as stopSlackStream, c as registerSlackSessionRun, g as SlackStreamNotDeliveredError, 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 markSlackStreamFallbackDelivered, w as buildSlackAssistantThreadMetadata, y as startSlackStream } 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-B4FMCO8f.mjs";
|
|
2
|
+
import { d as resolveSlackMarkdownOptions, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode } from "./accounts-CGJScKtk.mjs";
|
|
3
|
+
import { n as formatSlackTarget } from "./target-parsing-Bx2UZniD.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-DANukR3O.mjs";
|
|
5
|
+
import { n as resolveSlackReplyThreadTs } from "./thread-ts-Cvt7WD6B.mjs";
|
|
6
|
+
import { c as resolveSlackReplyRenderPlan, i as prepareSlackReply, o as resolveSlackReplyBlocks } from "./reply-blocks-BzsXUUUL.mjs";
|
|
7
|
+
import { d as getOrCreateWeakOwnerMap, m as writeLruMapEntry, p as readLruMapEntry } from "./cursor-pages-CATAzbTT.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-D5S6D_BU.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-yK6_-px6.mjs";
|
|
10
|
+
import { n as resolveSlackChannelConfig } from "./policy-DxhGRvc2.mjs";
|
|
11
|
+
import { C as resolveSlackChatType, E as stripSlackMentionsForCommandDetection, S as normalizeSlackChannelType, T as readSlackAssistantThreadContext, _ as appendSlackStream, b as stopSlackStream, c as registerSlackSessionRun, g as SlackStreamNotDeliveredError, 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 markSlackStreamFallbackDelivered, w as buildSlackAssistantThreadMetadata, y as startSlackStream } from "./monitor-C1oM6vom.mjs";
|
|
12
|
+
import { a as emitSlackMessageSentHooks, i as sanitizeSlackMonitorReplyPayload, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-BGZkt6tB.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
|
+
//#region 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,7 +57,8 @@ function resolveSlackTimestampMs(ts) {
|
|
|
57
57
|
});
|
|
58
58
|
return seconds === void 0 ? void 0 : Math.round(seconds * 1e3);
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-helpers.ts
|
|
61
62
|
function resolveSlackBotLoopProtection(prepared) {
|
|
62
63
|
const senderBotId = prepared.message.bot_id;
|
|
63
64
|
if (!senderBotId) return;
|
|
@@ -132,7 +133,8 @@ async function resolveSlackStreamRecipientTeamId(params) {
|
|
|
132
133
|
}
|
|
133
134
|
return params.fallbackTeamId;
|
|
134
135
|
}
|
|
135
|
-
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region extensions/slack/src/draft-stream.ts
|
|
136
138
|
const DEFAULT_THROTTLE_MS = 1e3;
|
|
137
139
|
function createSlackDraftStream(params) {
|
|
138
140
|
const maxChars = Math.min(params.maxChars ?? 8e3, SLACK_TEXT_LIMIT);
|
|
@@ -303,7 +305,8 @@ function createSlackDraftStream(params) {
|
|
|
303
305
|
channelId: () => streamMessage?.channelId
|
|
304
306
|
};
|
|
305
307
|
}
|
|
306
|
-
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region extensions/slack/src/stream-mode.ts
|
|
307
310
|
function resolveSlackStreamingConfig(params) {
|
|
308
311
|
return {
|
|
309
312
|
mode: params.streaming?.mode ?? "progress",
|
|
@@ -352,7 +355,8 @@ function applyAppendOnlyStreamUpdate(params) {
|
|
|
352
355
|
changed: true
|
|
353
356
|
};
|
|
354
357
|
}
|
|
355
|
-
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region extensions/slack/src/progress-blocks.ts
|
|
356
360
|
const SLACK_PROGRESS_FIELD_MAX = 1800;
|
|
357
361
|
const DEFAULT_SLACK_PROGRESS_DETAIL_MAX_CHARS = 120;
|
|
358
362
|
const DEFAULT_SLACK_PROGRESS_TASK_DETAIL_MAX_CHARS = 48;
|
|
@@ -725,7 +729,8 @@ function reconcileSlackNativeTaskChunks(params) {
|
|
|
725
729
|
}
|
|
726
730
|
};
|
|
727
731
|
}
|
|
728
|
-
|
|
732
|
+
//#endregion
|
|
733
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-progress-render.ts
|
|
729
734
|
function resolveStructuredProgressLines(lines) {
|
|
730
735
|
return lines.map((line) => {
|
|
731
736
|
if (typeof line !== "string") return line;
|
|
@@ -766,7 +771,8 @@ function isSlackProgressTitleText(text, snapshot, explicitTitle) {
|
|
|
766
771
|
const title = normalizeProgressText(combineProgressHeadlineAndExplanation(explicitTitle ?? (snapshot.statusHeadlineFormat === "plain" ? void 0 : snapshot.statusHeadline), snapshot.planExplanationFormat === "plain" ? void 0 : snapshot.planExplanation));
|
|
767
772
|
return title.length > 0 && title.includes(candidate);
|
|
768
773
|
}
|
|
769
|
-
|
|
774
|
+
//#endregion
|
|
775
|
+
//#region extensions/slack/src/monitor/message-handler/preview-finalize.ts
|
|
770
776
|
function blocksMatch(expected, actual) {
|
|
771
777
|
if (!expected?.length) return !actual?.length;
|
|
772
778
|
if (!actual?.length) {
|
|
@@ -837,7 +843,8 @@ async function finalizeSlackPreviewEdit(params) {
|
|
|
837
843
|
throw err;
|
|
838
844
|
}
|
|
839
845
|
}
|
|
840
|
-
|
|
846
|
+
//#endregion
|
|
847
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-progress-card.ts
|
|
841
848
|
const MAX_VISIBLE_WORK_LINKS = 5;
|
|
842
849
|
function createSlackDraftProgressCardRuntime(params) {
|
|
843
850
|
const { cfg, prepared, slackClient } = params.setup;
|
|
@@ -965,7 +972,8 @@ function formatSlackProgressDraftLine(line) {
|
|
|
965
972
|
enclosingStyle: "italic"
|
|
966
973
|
})}_`;
|
|
967
974
|
}
|
|
968
|
-
|
|
975
|
+
//#endregion
|
|
976
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-progress-native.ts
|
|
969
977
|
function createSlackNativeProgressTransport(params) {
|
|
970
978
|
const { replyPlan } = params.setup;
|
|
971
979
|
const { delivery } = params;
|
|
@@ -1026,7 +1034,8 @@ function createSlackNativeProgressTransport(params) {
|
|
|
1026
1034
|
waitForStart
|
|
1027
1035
|
};
|
|
1028
1036
|
}
|
|
1029
|
-
|
|
1037
|
+
//#endregion
|
|
1038
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-progress.ts
|
|
1030
1039
|
function createSlackProgressRuntime(runtimeParams) {
|
|
1031
1040
|
const { setup, delivery } = runtimeParams;
|
|
1032
1041
|
const { cfg, hasSlackCustomIdentity, prepared, replyPlan, runtime, slackIdentity, slackStreaming, slackProgressStyle, quietProgress, shouldUseDraftStream, useStreaming, previewStreamingEnabled } = setup;
|
|
@@ -1379,6 +1388,7 @@ function createSlackProgressRuntime(runtimeParams) {
|
|
|
1379
1388
|
const pushReasoningProgress = async (payload) => {
|
|
1380
1389
|
if (!payload?.text) return false;
|
|
1381
1390
|
if (!isProgressMode) {
|
|
1391
|
+
if (!previewToolProgressEnabled) return false;
|
|
1382
1392
|
const normalized = progressDraft.mergeReasoningProgress(payload.text, { snapshot: payload.isReasoningSnapshot === true }).replace(/^_(.*)_$/su, "$1").trim();
|
|
1383
1393
|
if (!normalized) return false;
|
|
1384
1394
|
const visible = await progressDraft.pushToolProgress({
|
|
@@ -1498,7 +1508,8 @@ function createSlackProgressRuntime(runtimeParams) {
|
|
|
1498
1508
|
updateDraftFromPartial
|
|
1499
1509
|
};
|
|
1500
1510
|
}
|
|
1501
|
-
|
|
1511
|
+
//#endregion
|
|
1512
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-setup.ts
|
|
1502
1513
|
async function createSlackDispatchSetup(prepared) {
|
|
1503
1514
|
const { ctx, account, message, route } = prepared;
|
|
1504
1515
|
const slackClient = prepared.eventScope?.client ?? ctx.app.client;
|
|
@@ -1714,7 +1725,8 @@ async function createSlackDispatchSetup(prepared) {
|
|
|
1714
1725
|
useStreaming
|
|
1715
1726
|
};
|
|
1716
1727
|
}
|
|
1717
|
-
|
|
1728
|
+
//#endregion
|
|
1729
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-streaming.ts
|
|
1718
1730
|
function createSlackStreamingDeliveryRuntime(setup) {
|
|
1719
1731
|
const { isThreadReply, messageSentHookContext, messageSentHookTarget, prepared, replyDeliveryMode, replyPlan, runtime, slackClient, slackClientOptions, slackIdentity, slackStreamFallbackTeamId } = setup;
|
|
1720
1732
|
const { account, ctx, forcedReplyThreadTs, message, slackMessageMetadata } = prepared;
|
|
@@ -2053,7 +2065,8 @@ function createSlackStreamingDeliveryRuntime(setup) {
|
|
|
2053
2065
|
resetDeliveryTracker: () => deliveredKeys.clear()
|
|
2054
2066
|
});
|
|
2055
2067
|
}
|
|
2056
|
-
|
|
2068
|
+
//#endregion
|
|
2069
|
+
//#region extensions/slack/src/monitor/message-handler/failure-notice.ts
|
|
2057
2070
|
/** One outage policy for immediate replies and later origin-routed queue drains. */
|
|
2058
2071
|
function createSlackFailureNoticePolicy(params, hasVisibleReply) {
|
|
2059
2072
|
const { context, accountId, channelId, failureNoticeThreadTs, failureNoticeTeamId, statusThreadTs } = params;
|
|
@@ -2121,7 +2134,8 @@ function createSlackQueuedFailureNoticePolicy(params, beginSessionRun) {
|
|
|
2121
2134
|
}
|
|
2122
2135
|
};
|
|
2123
2136
|
}
|
|
2124
|
-
|
|
2137
|
+
//#endregion
|
|
2138
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch.ts
|
|
2125
2139
|
function formatSlackGroupThreadReply(text, participant) {
|
|
2126
2140
|
return `**${participant.name.replace(/[\\`*_{}[\]()<>#!|]/g, "\\$&").replace(/\s+/g, " ")}**\n${text}`;
|
|
2127
2141
|
}
|
|
@@ -2458,7 +2472,8 @@ async function dispatchSlackMessageWithSetup(setup, beginSessionRun, turnAdoptio
|
|
|
2458
2472
|
if (progress.useDraftProgressCard) await draftStream?.clear();
|
|
2459
2473
|
}
|
|
2460
2474
|
}
|
|
2461
|
-
|
|
2475
|
+
//#endregion
|
|
2476
|
+
//#region extensions/slack/src/agent-context.ts
|
|
2462
2477
|
function normalizeEntity(value) {
|
|
2463
2478
|
const entity = asOptionalRecord(value);
|
|
2464
2479
|
const type = normalizeOptionalString(entity?.type);
|
|
@@ -2496,7 +2511,8 @@ function normalizeSlackAppContextEntities(value) {
|
|
|
2496
2511
|
return normalized ? [normalized] : [];
|
|
2497
2512
|
});
|
|
2498
2513
|
}
|
|
2499
|
-
|
|
2514
|
+
//#endregion
|
|
2515
|
+
//#region extensions/slack/src/monitor/thread.ts
|
|
2500
2516
|
const threadStarterCache = createStaleWhileRevalidateCache({
|
|
2501
2517
|
maxEntries: 2e3,
|
|
2502
2518
|
maxPending: Number.POSITIVE_INFINITY,
|
|
@@ -2670,7 +2686,8 @@ async function resolveSlackChannelHistory(params) {
|
|
|
2670
2686
|
}
|
|
2671
2687
|
return messages.slice(0, params.limit).reverse();
|
|
2672
2688
|
}
|
|
2673
|
-
|
|
2689
|
+
//#endregion
|
|
2690
|
+
//#region extensions/slack/src/monitor/message-handler/preflight-audio.ts
|
|
2674
2691
|
function isSlackAudioFile(file) {
|
|
2675
2692
|
if (file.subtype === "slack_audio") return true;
|
|
2676
2693
|
if ((file.mimetype?.split(";")[0]?.trim().toLowerCase())?.startsWith("audio/")) return true;
|
|
@@ -2713,12 +2730,13 @@ const sendSlackPreflightAudioTranscriptEcho = slackPreflightAudio.send.bind(slac
|
|
|
2713
2730
|
async function discardSlackPreflightMedia(media) {
|
|
2714
2731
|
await Promise.allSettled((media ?? []).map((entry) => fs.rm(entry.path, { force: true })));
|
|
2715
2732
|
}
|
|
2716
|
-
|
|
2733
|
+
//#endregion
|
|
2734
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-content.ts
|
|
2717
2735
|
const SLACK_MENTION_RESOLUTION_CONCURRENCY = 4;
|
|
2718
2736
|
const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
|
|
2719
2737
|
const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
|
|
2720
2738
|
const MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS = 2e3;
|
|
2721
|
-
const loadSlackMediaModule$2 = createLazyRuntimeModule(() => import("./actions-
|
|
2739
|
+
const loadSlackMediaModule$2 = createLazyRuntimeModule(() => import("./actions-D5S6D_BU.mjs").then((n) => n._));
|
|
2722
2740
|
function formatSlackUnavailableMedia(params) {
|
|
2723
2741
|
let fileReferences = params.files?.map((file) => `${formatSlackFileReference(file)} unavailable (${file.reason})`).join(", ");
|
|
2724
2742
|
if (fileReferences && fileReferences.length > MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS) fileReferences = `${truncateUtf16Safe(fileReferences, MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS)}; … (file references truncated)`;
|
|
@@ -2814,7 +2832,8 @@ async function resolveSlackMessageContent(params) {
|
|
|
2814
2832
|
mentionStripPatterns
|
|
2815
2833
|
} : null;
|
|
2816
2834
|
}
|
|
2817
|
-
|
|
2835
|
+
//#endregion
|
|
2836
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-dm-history.ts
|
|
2818
2837
|
function resolveSlackDmHistoryLimit(params) {
|
|
2819
2838
|
const override = params.userId ? params.account.config.dms?.[params.userId]?.historyLimit : void 0;
|
|
2820
2839
|
return resolvePromptHistoryLimit(override ?? params.defaultLimit, 0);
|
|
@@ -2887,19 +2906,21 @@ async function resolveSlackDmHistoryContext(params) {
|
|
|
2887
2906
|
};
|
|
2888
2907
|
}
|
|
2889
2908
|
}
|
|
2890
|
-
|
|
2909
|
+
//#endregion
|
|
2910
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-thread-context-root.ts
|
|
2891
2911
|
function isSlackThreadAuthorCurrentBot(params) {
|
|
2892
2912
|
const { identity, author } = params;
|
|
2893
2913
|
if (identity.botUserId && author.userId && author.userId === identity.botUserId) return true;
|
|
2894
2914
|
if (identity.botId && author.botId && author.botId === identity.botId) return true;
|
|
2895
2915
|
return false;
|
|
2896
2916
|
}
|
|
2897
|
-
|
|
2917
|
+
//#endregion
|
|
2918
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-room-history.ts
|
|
2898
2919
|
const SLACK_HISTORY_MEDIA_MAX_ATTACHMENTS = 4;
|
|
2899
2920
|
const SLACK_HISTORY_MEDIA_MAX_BYTES = 10485760;
|
|
2900
2921
|
const SLACK_HISTORY_MEDIA_IDLE_TIMEOUT_MS = 1e3;
|
|
2901
2922
|
const SLACK_HISTORY_MEDIA_TOTAL_TIMEOUT_MS = 3e3;
|
|
2902
|
-
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-
|
|
2923
|
+
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-D5S6D_BU.mjs").then((n) => n._));
|
|
2903
2924
|
async function resolveSlackRoomHistory(params) {
|
|
2904
2925
|
if (params.ctx.historyLimit <= 0 || !params.message.ts) return [];
|
|
2905
2926
|
const warnOmission = (reason) => {
|
|
@@ -3024,15 +3045,17 @@ function sliceSlackImageFileCandidates(files, limit) {
|
|
|
3024
3045
|
if (limit <= 0 || !files?.length) return [];
|
|
3025
3046
|
return files.filter(isSlackImageFileCandidate).slice(0, limit);
|
|
3026
3047
|
}
|
|
3027
|
-
|
|
3048
|
+
//#endregion
|
|
3049
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-session-presentation.ts
|
|
3028
3050
|
function resolveSlackGroupSessionSubject(params) {
|
|
3029
3051
|
const channelName = normalizeOptionalString(params.channelName);
|
|
3030
3052
|
const workspaceName = normalizeOptionalString(params.installationIdentity?.kind === "workspace" && params.installationIdentity.teamId === params.workspaceId ? params.installationIdentity.teamName : void 0);
|
|
3031
3053
|
if (channelName && workspaceName) return `${workspaceName} #${channelName}`;
|
|
3032
3054
|
return `Slack Channel (Workspace ID: ${params.workspaceId}, Channel ID: ${params.channelId})`;
|
|
3033
3055
|
}
|
|
3034
|
-
|
|
3035
|
-
|
|
3056
|
+
//#endregion
|
|
3057
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
|
|
3058
|
+
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-D5S6D_BU.mjs").then((n) => n._));
|
|
3036
3059
|
const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
|
|
3037
3060
|
function formatSlackThreadLabelSnippet(text) {
|
|
3038
3061
|
return truncateUtf16Safe(text.replace(/\s+/g, " "), 80);
|
|
@@ -3220,7 +3243,8 @@ async function resolveSlackThreadContextData(params) {
|
|
|
3220
3243
|
}
|
|
3221
3244
|
return readThreadContextData();
|
|
3222
3245
|
}
|
|
3223
|
-
|
|
3246
|
+
//#endregion
|
|
3247
|
+
//#region src/channels/mention-gating.ts
|
|
3224
3248
|
function resolveBotThreadMentionPolicy(params) {
|
|
3225
3249
|
if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
|
|
3226
3250
|
requireMention: params.requireMention,
|
|
@@ -3231,11 +3255,13 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
3231
3255
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
3232
3256
|
};
|
|
3233
3257
|
}
|
|
3234
|
-
|
|
3258
|
+
//#endregion
|
|
3259
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/channel-mention-gating
|
|
3235
3260
|
var channel_mention_gating_exports = /* @__PURE__ */ __exportAll({ resolveBotThreadMentionPolicy: () => resolveBotThreadMentionPolicy });
|
|
3236
3261
|
import * as import_openclaw_plugin_sdk_channel_mention_gating from "openclaw/plugin-sdk/channel-mention-gating";
|
|
3237
3262
|
__reExport(channel_mention_gating_exports, import_openclaw_plugin_sdk_channel_mention_gating);
|
|
3238
|
-
|
|
3263
|
+
//#endregion
|
|
3264
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-thread-mentions.ts
|
|
3239
3265
|
async function resolveSlackThreadMentionPolicy(params) {
|
|
3240
3266
|
const { ctx, account, message, conversation, thread } = params;
|
|
3241
3267
|
const { isRoom, isDirectMessage, channelConfig } = conversation;
|
|
@@ -3269,7 +3295,8 @@ async function resolveSlackThreadMentionPolicy(params) {
|
|
|
3269
3295
|
implicitMentionKinds
|
|
3270
3296
|
});
|
|
3271
3297
|
}
|
|
3272
|
-
|
|
3298
|
+
//#endregion
|
|
3299
|
+
//#region extensions/slack/src/monitor/message-handler/subteam-mentions.ts
|
|
3273
3300
|
const SUBTEAM_MENTION_RE = /<!subteam\^([A-Z0-9]+)(?:\|[^>]*)?>/gi;
|
|
3274
3301
|
const SUBTEAM_MEMBER_CACHE_TTL_MS = 3e5;
|
|
3275
3302
|
const subteamMemberCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -3327,7 +3354,8 @@ async function isSlackSubteamMentionForBot(params) {
|
|
|
3327
3354
|
}
|
|
3328
3355
|
return false;
|
|
3329
3356
|
}
|
|
3330
|
-
|
|
3357
|
+
//#endregion
|
|
3358
|
+
//#region extensions/slack/src/monitor/message-handler/prepare.ts
|
|
3331
3359
|
const mentionRegexCache = /* @__PURE__ */ new WeakMap();
|
|
3332
3360
|
const SLACK_ANY_MENTION_RE = /<@[^>]+>|<!subteam\^[^>]+>/;
|
|
3333
3361
|
const SLACK_USER_MENTION_RE = /<@([^>|]+)(?:\|[^>]+)?>/g;
|
|
@@ -4205,4 +4233,5 @@ async function prepareSlackMessage(params) {
|
|
|
4205
4233
|
ackReactionPromise
|
|
4206
4234
|
};
|
|
4207
4235
|
}
|
|
4236
|
+
//#endregion
|
|
4208
4237
|
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-DANukR3O.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
|
+
//#region 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,9 +51,11 @@ function resolveSlackChannelConfig(params) {
|
|
|
51
51
|
};
|
|
52
52
|
return applyChannelMatchMeta(result, match);
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region extensions/slack/src/monitor/policy.ts
|
|
55
56
|
function isSlackChannelAllowedByPolicy(params) {
|
|
56
57
|
if (params.groupPolicy === "disabled") return false;
|
|
57
58
|
return params.groupPolicy !== "allowlist" || params.channelAllowlistConfigured && params.channelAllowed;
|
|
58
59
|
}
|
|
60
|
+
//#endregion
|
|
59
61
|
export { resolveSlackChannelConfig as n, resolveSlackChannelLabel as r, isSlackChannelAllowedByPolicy as t };
|