@openclaw/slack 2026.11.5-beta.1 → 2026.11.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.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-C_R98Nbv.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-Cm1TuqxN.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-DGnV6akc.mjs} +71 -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-DoyOlTbK.mjs} +4 -3
- package/dist/.setup/{replies-Bq7n0gfM.mjs → replies-BcmUKord.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-CyVC3bYx.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-Cm1TuqxN.mjs";
|
|
12
|
+
import { a as emitSlackMessageSentHooks, i as sanitizeSlackMonitorReplyPayload, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-BcmUKord.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;
|
|
@@ -1498,7 +1507,8 @@ function createSlackProgressRuntime(runtimeParams) {
|
|
|
1498
1507
|
updateDraftFromPartial
|
|
1499
1508
|
};
|
|
1500
1509
|
}
|
|
1501
|
-
|
|
1510
|
+
//#endregion
|
|
1511
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-setup.ts
|
|
1502
1512
|
async function createSlackDispatchSetup(prepared) {
|
|
1503
1513
|
const { ctx, account, message, route } = prepared;
|
|
1504
1514
|
const slackClient = prepared.eventScope?.client ?? ctx.app.client;
|
|
@@ -1714,7 +1724,8 @@ async function createSlackDispatchSetup(prepared) {
|
|
|
1714
1724
|
useStreaming
|
|
1715
1725
|
};
|
|
1716
1726
|
}
|
|
1717
|
-
|
|
1727
|
+
//#endregion
|
|
1728
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch-streaming.ts
|
|
1718
1729
|
function createSlackStreamingDeliveryRuntime(setup) {
|
|
1719
1730
|
const { isThreadReply, messageSentHookContext, messageSentHookTarget, prepared, replyDeliveryMode, replyPlan, runtime, slackClient, slackClientOptions, slackIdentity, slackStreamFallbackTeamId } = setup;
|
|
1720
1731
|
const { account, ctx, forcedReplyThreadTs, message, slackMessageMetadata } = prepared;
|
|
@@ -2053,7 +2064,8 @@ function createSlackStreamingDeliveryRuntime(setup) {
|
|
|
2053
2064
|
resetDeliveryTracker: () => deliveredKeys.clear()
|
|
2054
2065
|
});
|
|
2055
2066
|
}
|
|
2056
|
-
|
|
2067
|
+
//#endregion
|
|
2068
|
+
//#region extensions/slack/src/monitor/message-handler/failure-notice.ts
|
|
2057
2069
|
/** One outage policy for immediate replies and later origin-routed queue drains. */
|
|
2058
2070
|
function createSlackFailureNoticePolicy(params, hasVisibleReply) {
|
|
2059
2071
|
const { context, accountId, channelId, failureNoticeThreadTs, failureNoticeTeamId, statusThreadTs } = params;
|
|
@@ -2121,7 +2133,8 @@ function createSlackQueuedFailureNoticePolicy(params, beginSessionRun) {
|
|
|
2121
2133
|
}
|
|
2122
2134
|
};
|
|
2123
2135
|
}
|
|
2124
|
-
|
|
2136
|
+
//#endregion
|
|
2137
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch.ts
|
|
2125
2138
|
function formatSlackGroupThreadReply(text, participant) {
|
|
2126
2139
|
return `**${participant.name.replace(/[\\`*_{}[\]()<>#!|]/g, "\\$&").replace(/\s+/g, " ")}**\n${text}`;
|
|
2127
2140
|
}
|
|
@@ -2458,7 +2471,8 @@ async function dispatchSlackMessageWithSetup(setup, beginSessionRun, turnAdoptio
|
|
|
2458
2471
|
if (progress.useDraftProgressCard) await draftStream?.clear();
|
|
2459
2472
|
}
|
|
2460
2473
|
}
|
|
2461
|
-
|
|
2474
|
+
//#endregion
|
|
2475
|
+
//#region extensions/slack/src/agent-context.ts
|
|
2462
2476
|
function normalizeEntity(value) {
|
|
2463
2477
|
const entity = asOptionalRecord(value);
|
|
2464
2478
|
const type = normalizeOptionalString(entity?.type);
|
|
@@ -2496,7 +2510,8 @@ function normalizeSlackAppContextEntities(value) {
|
|
|
2496
2510
|
return normalized ? [normalized] : [];
|
|
2497
2511
|
});
|
|
2498
2512
|
}
|
|
2499
|
-
|
|
2513
|
+
//#endregion
|
|
2514
|
+
//#region extensions/slack/src/monitor/thread.ts
|
|
2500
2515
|
const threadStarterCache = createStaleWhileRevalidateCache({
|
|
2501
2516
|
maxEntries: 2e3,
|
|
2502
2517
|
maxPending: Number.POSITIVE_INFINITY,
|
|
@@ -2670,7 +2685,8 @@ async function resolveSlackChannelHistory(params) {
|
|
|
2670
2685
|
}
|
|
2671
2686
|
return messages.slice(0, params.limit).reverse();
|
|
2672
2687
|
}
|
|
2673
|
-
|
|
2688
|
+
//#endregion
|
|
2689
|
+
//#region extensions/slack/src/monitor/message-handler/preflight-audio.ts
|
|
2674
2690
|
function isSlackAudioFile(file) {
|
|
2675
2691
|
if (file.subtype === "slack_audio") return true;
|
|
2676
2692
|
if ((file.mimetype?.split(";")[0]?.trim().toLowerCase())?.startsWith("audio/")) return true;
|
|
@@ -2713,12 +2729,13 @@ const sendSlackPreflightAudioTranscriptEcho = slackPreflightAudio.send.bind(slac
|
|
|
2713
2729
|
async function discardSlackPreflightMedia(media) {
|
|
2714
2730
|
await Promise.allSettled((media ?? []).map((entry) => fs.rm(entry.path, { force: true })));
|
|
2715
2731
|
}
|
|
2716
|
-
|
|
2732
|
+
//#endregion
|
|
2733
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-content.ts
|
|
2717
2734
|
const SLACK_MENTION_RESOLUTION_CONCURRENCY = 4;
|
|
2718
2735
|
const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
|
|
2719
2736
|
const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
|
|
2720
2737
|
const MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS = 2e3;
|
|
2721
|
-
const loadSlackMediaModule$2 = createLazyRuntimeModule(() => import("./actions-
|
|
2738
|
+
const loadSlackMediaModule$2 = createLazyRuntimeModule(() => import("./actions-D5S6D_BU.mjs").then((n) => n._));
|
|
2722
2739
|
function formatSlackUnavailableMedia(params) {
|
|
2723
2740
|
let fileReferences = params.files?.map((file) => `${formatSlackFileReference(file)} unavailable (${file.reason})`).join(", ");
|
|
2724
2741
|
if (fileReferences && fileReferences.length > MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS) fileReferences = `${truncateUtf16Safe(fileReferences, MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS)}; … (file references truncated)`;
|
|
@@ -2814,7 +2831,8 @@ async function resolveSlackMessageContent(params) {
|
|
|
2814
2831
|
mentionStripPatterns
|
|
2815
2832
|
} : null;
|
|
2816
2833
|
}
|
|
2817
|
-
|
|
2834
|
+
//#endregion
|
|
2835
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-dm-history.ts
|
|
2818
2836
|
function resolveSlackDmHistoryLimit(params) {
|
|
2819
2837
|
const override = params.userId ? params.account.config.dms?.[params.userId]?.historyLimit : void 0;
|
|
2820
2838
|
return resolvePromptHistoryLimit(override ?? params.defaultLimit, 0);
|
|
@@ -2887,19 +2905,21 @@ async function resolveSlackDmHistoryContext(params) {
|
|
|
2887
2905
|
};
|
|
2888
2906
|
}
|
|
2889
2907
|
}
|
|
2890
|
-
|
|
2908
|
+
//#endregion
|
|
2909
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-thread-context-root.ts
|
|
2891
2910
|
function isSlackThreadAuthorCurrentBot(params) {
|
|
2892
2911
|
const { identity, author } = params;
|
|
2893
2912
|
if (identity.botUserId && author.userId && author.userId === identity.botUserId) return true;
|
|
2894
2913
|
if (identity.botId && author.botId && author.botId === identity.botId) return true;
|
|
2895
2914
|
return false;
|
|
2896
2915
|
}
|
|
2897
|
-
|
|
2916
|
+
//#endregion
|
|
2917
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-room-history.ts
|
|
2898
2918
|
const SLACK_HISTORY_MEDIA_MAX_ATTACHMENTS = 4;
|
|
2899
2919
|
const SLACK_HISTORY_MEDIA_MAX_BYTES = 10485760;
|
|
2900
2920
|
const SLACK_HISTORY_MEDIA_IDLE_TIMEOUT_MS = 1e3;
|
|
2901
2921
|
const SLACK_HISTORY_MEDIA_TOTAL_TIMEOUT_MS = 3e3;
|
|
2902
|
-
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-
|
|
2922
|
+
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-D5S6D_BU.mjs").then((n) => n._));
|
|
2903
2923
|
async function resolveSlackRoomHistory(params) {
|
|
2904
2924
|
if (params.ctx.historyLimit <= 0 || !params.message.ts) return [];
|
|
2905
2925
|
const warnOmission = (reason) => {
|
|
@@ -3024,15 +3044,17 @@ function sliceSlackImageFileCandidates(files, limit) {
|
|
|
3024
3044
|
if (limit <= 0 || !files?.length) return [];
|
|
3025
3045
|
return files.filter(isSlackImageFileCandidate).slice(0, limit);
|
|
3026
3046
|
}
|
|
3027
|
-
|
|
3047
|
+
//#endregion
|
|
3048
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-session-presentation.ts
|
|
3028
3049
|
function resolveSlackGroupSessionSubject(params) {
|
|
3029
3050
|
const channelName = normalizeOptionalString(params.channelName);
|
|
3030
3051
|
const workspaceName = normalizeOptionalString(params.installationIdentity?.kind === "workspace" && params.installationIdentity.teamId === params.workspaceId ? params.installationIdentity.teamName : void 0);
|
|
3031
3052
|
if (channelName && workspaceName) return `${workspaceName} #${channelName}`;
|
|
3032
3053
|
return `Slack Channel (Workspace ID: ${params.workspaceId}, Channel ID: ${params.channelId})`;
|
|
3033
3054
|
}
|
|
3034
|
-
|
|
3035
|
-
|
|
3055
|
+
//#endregion
|
|
3056
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
|
|
3057
|
+
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-D5S6D_BU.mjs").then((n) => n._));
|
|
3036
3058
|
const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
|
|
3037
3059
|
function formatSlackThreadLabelSnippet(text) {
|
|
3038
3060
|
return truncateUtf16Safe(text.replace(/\s+/g, " "), 80);
|
|
@@ -3220,7 +3242,8 @@ async function resolveSlackThreadContextData(params) {
|
|
|
3220
3242
|
}
|
|
3221
3243
|
return readThreadContextData();
|
|
3222
3244
|
}
|
|
3223
|
-
|
|
3245
|
+
//#endregion
|
|
3246
|
+
//#region src/channels/mention-gating.ts
|
|
3224
3247
|
function resolveBotThreadMentionPolicy(params) {
|
|
3225
3248
|
if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
|
|
3226
3249
|
requireMention: params.requireMention,
|
|
@@ -3231,11 +3254,13 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
3231
3254
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
3232
3255
|
};
|
|
3233
3256
|
}
|
|
3234
|
-
|
|
3257
|
+
//#endregion
|
|
3258
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/channel-mention-gating
|
|
3235
3259
|
var channel_mention_gating_exports = /* @__PURE__ */ __exportAll({ resolveBotThreadMentionPolicy: () => resolveBotThreadMentionPolicy });
|
|
3236
3260
|
import * as import_openclaw_plugin_sdk_channel_mention_gating from "openclaw/plugin-sdk/channel-mention-gating";
|
|
3237
3261
|
__reExport(channel_mention_gating_exports, import_openclaw_plugin_sdk_channel_mention_gating);
|
|
3238
|
-
|
|
3262
|
+
//#endregion
|
|
3263
|
+
//#region extensions/slack/src/monitor/message-handler/prepare-thread-mentions.ts
|
|
3239
3264
|
async function resolveSlackThreadMentionPolicy(params) {
|
|
3240
3265
|
const { ctx, account, message, conversation, thread } = params;
|
|
3241
3266
|
const { isRoom, isDirectMessage, channelConfig } = conversation;
|
|
@@ -3269,7 +3294,8 @@ async function resolveSlackThreadMentionPolicy(params) {
|
|
|
3269
3294
|
implicitMentionKinds
|
|
3270
3295
|
});
|
|
3271
3296
|
}
|
|
3272
|
-
|
|
3297
|
+
//#endregion
|
|
3298
|
+
//#region extensions/slack/src/monitor/message-handler/subteam-mentions.ts
|
|
3273
3299
|
const SUBTEAM_MENTION_RE = /<!subteam\^([A-Z0-9]+)(?:\|[^>]*)?>/gi;
|
|
3274
3300
|
const SUBTEAM_MEMBER_CACHE_TTL_MS = 3e5;
|
|
3275
3301
|
const subteamMemberCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -3327,7 +3353,8 @@ async function isSlackSubteamMentionForBot(params) {
|
|
|
3327
3353
|
}
|
|
3328
3354
|
return false;
|
|
3329
3355
|
}
|
|
3330
|
-
|
|
3356
|
+
//#endregion
|
|
3357
|
+
//#region extensions/slack/src/monitor/message-handler/prepare.ts
|
|
3331
3358
|
const mentionRegexCache = /* @__PURE__ */ new WeakMap();
|
|
3332
3359
|
const SLACK_ANY_MENTION_RE = /<@[^>]+>|<!subteam\^[^>]+>/;
|
|
3333
3360
|
const SLACK_USER_MENTION_RE = /<@([^>|]+)(?:\|[^>]+)?>/g;
|
|
@@ -4205,4 +4232,5 @@ async function prepareSlackMessage(params) {
|
|
|
4205
4232
|
ackReactionPromise
|
|
4206
4233
|
};
|
|
4207
4234
|
}
|
|
4235
|
+
//#endregion
|
|
4208
4236
|
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 };
|