@openclaw/slack 2026.11.10-beta.3 → 2026.12.1-beta.1
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/{action-runtime-Cs2IxOLc.mjs → action-runtime-BvoZDGSu.mjs} +228 -85
- package/dist/.setup/action-runtime.runtime-BwRLINj-.mjs +1 -0
- package/dist/.setup/{actions-BNOabmV6.mjs → actions-DAWAKRJ9.mjs} +53 -3
- package/dist/.setup/{approval-handler.runtime-C2C-jNxi.mjs → approval-handler.runtime-BIePVIYr.mjs} +5 -5
- package/dist/.setup/{approval-message-updates-Bx2u_5-z.mjs → approval-message-updates-DocYhToX.mjs} +1 -1
- package/dist/.setup/{channel-DbcKs2sx.mjs → channel-paKIY8u4.mjs} +29 -17
- package/dist/.setup/{channel-type-ZG0ErPTI.mjs → channel-type-Ku_QceM7.mjs} +3 -3
- package/dist/.setup/{channel.setup-DNnvYUKL.mjs → channel.setup-BW3ogoi5.mjs} +1 -1
- package/dist/.setup/{cursor-pages-jVn3Vkfi.mjs → client-DQqLIemQ.mjs} +1 -24
- package/dist/.setup/cursor-pages-DiOrzZtc.mjs +30 -0
- package/dist/.setup/{directory-live-DNdw97LA.mjs → directory-live-CJl5MPac.mjs} +2 -1
- package/dist/.setup/{fork-DTKBA8Fm.mjs → fork-Cua6YBp0.mjs} +3 -3
- package/dist/.setup/{literal-text-DdCRYzYh.mjs → literal-text-CXYRhsDp.mjs} +1 -1
- package/dist/.setup/{message-tool-api-B38BpEaE.mjs → message-tool-api-CTxYxzPZ.mjs} +18 -2
- package/dist/.setup/{monitor-MmW89Bu-.mjs → monitor-CkoNScT9.mjs} +44 -32
- package/dist/.setup/{outbound-adapter-1JpFMcJD.mjs → outbound-adapter-lDejfL01.mjs} +4 -4
- package/dist/.setup/{pipeline.runtime-Jl0lv8Nv.mjs → pipeline.runtime-B4H65MB2.mjs} +1565 -164
- package/dist/.setup/{policy-klXrk5vE.mjs → policy-B7_AZUCl.mjs} +1 -1
- package/dist/.setup/{probe-BHqvMbno.mjs → probe-ME1HsC0x.mjs} +71 -107
- package/dist/.setup/{question-delivery-BGwm5Zmr.mjs → question-delivery-CFd8xhhn.mjs} +1 -1
- package/dist/.setup/{relay-source-CukshFI4.mjs → relay-source-D6xKiatj.mjs} +2 -2
- package/dist/.setup/{replies-iMC3Vvxk.mjs → replies-BLOhFQoK.mjs} +5 -5
- package/dist/.setup/{reply-blocks-CFy-O-2B.mjs → reply-blocks-BXQwrMaA.mjs} +1 -1
- package/dist/.setup/{resolve-channels-CF2JME9q.mjs → resolve-channels-CtkJuB1X.mjs} +2 -1
- package/dist/.setup/{resolve-users-DDcCAjH1.mjs → resolve-users-Bqf-wJF9.mjs} +2 -1
- package/dist/.setup/{scopes-DKl6yqIv.mjs → scopes-Dbu5pO1O.mjs} +2 -2
- package/dist/.setup/{send-kGJWQtLk.mjs → send-CNGjlL3z.mjs} +51 -15
- package/dist/.setup/setup-plugin-api-gni0-Cwn.mjs +2 -0
- package/dist/.setup/{setup-surface-CPFVFPFM.mjs → setup-surface--ug5_htx.mjs} +3 -3
- package/dist/.setup/{slash-dispatch.runtime-COX_8_Kh.mjs → slash-dispatch.runtime-ln-mu0Wb.mjs} +1 -1
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/api.js +9 -9
- package/dist/channel-plugin-api.js +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +8 -8
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/undici/README.md +1 -1
- package/node_modules/undici/docs/docs/api/Dispatcher.md +4 -1
- package/node_modules/undici/docs/docs/api/RetryAgent.md +1 -1
- package/node_modules/undici/docs/docs/api/RetryHandler.md +1 -1
- package/node_modules/undici/docs/docs/index.md +1 -1
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +58 -12
- package/node_modules/undici/lib/dispatcher/client-h1.js +3 -1
- package/node_modules/undici/lib/dispatcher/client-h2.js +80 -23
- package/node_modules/undici/lib/dispatcher/parser-h1.js +2 -1
- package/node_modules/undici/lib/handler/cache-handler.js +305 -39
- package/node_modules/undici/lib/handler/decorator-handler.js +6 -2
- package/node_modules/undici/lib/handler/redirect-handler.js +32 -11
- package/node_modules/undici/lib/interceptor/cache.js +112 -23
- package/node_modules/undici/lib/mock/mock-utils.js +11 -1
- package/node_modules/undici/lib/web/fetch/body.js +28 -8
- package/node_modules/undici/lib/web/fetch/index.js +3 -9
- package/node_modules/undici/lib/web/fetch/request.js +93 -115
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +2 -2
- package/node_modules/undici/package.json +2 -2
- package/node_modules/undici/types/dispatcher.d.ts +1 -1
- package/node_modules/undici/types/formdata.d.ts +6 -6
- package/node_modules/undici/types/retry-handler.d.ts +3 -3
- package/package.json +5 -5
- package/dist/.setup/action-runtime.runtime-me4Yd3j7.mjs +0 -1
- package/dist/.setup/setup-plugin-api-UWUSCOAK.mjs +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
2
|
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
-
import { T as assertSlackDetachedTargetAllowed } from "./probe-
|
|
4
|
-
import {
|
|
3
|
+
import { T as assertSlackDetachedTargetAllowed } from "./probe-ME1HsC0x.mjs";
|
|
4
|
+
import { a as createSlackWebClient, d as readLruMapEntry, i as createSlackTokenCacheKey, n as createSlackReadClient } from "./client-DQqLIemQ.mjs";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
7
7
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
@@ -36,7 +36,7 @@ async function resolveSlackConversationInfo(params) {
|
|
|
36
36
|
});
|
|
37
37
|
assertSlackDetachedTargetAllowed(account.accountId, params.teamId);
|
|
38
38
|
const operation = params.operation ?? "read";
|
|
39
|
-
const token = resolveSlackOperationToken(account, operation);
|
|
39
|
+
const token = params.token ?? resolveSlackOperationToken(account, operation);
|
|
40
40
|
const userToken = normalizeOptionalString(account.userToken);
|
|
41
41
|
const credentialRole = token ? token === userToken ? "user" : "bot" : "none";
|
|
42
42
|
const credentialFingerprint = token ? createSlackTokenCacheKey(token) : "none";
|
|
@@ -547,7 +547,7 @@ const slackSetupPlugin = {
|
|
|
547
547
|
markdownCapable: true,
|
|
548
548
|
preferSessionLookupForAnnounceTarget: true
|
|
549
549
|
},
|
|
550
|
-
setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface
|
|
550
|
+
setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface--ug5_htx.mjs")),
|
|
551
551
|
capabilities: {
|
|
552
552
|
chatTypes: [
|
|
553
553
|
"direct",
|
|
@@ -283,27 +283,4 @@ function getSlackListenerWriteClient(params) {
|
|
|
283
283
|
});
|
|
284
284
|
return client;
|
|
285
285
|
}
|
|
286
|
-
|
|
287
|
-
const SLACK_CURSOR_PAGE_LIMIT = 1e4;
|
|
288
|
-
const fetchSlackChannelListPage = (client, cursor) => client.conversations.list({
|
|
289
|
-
types: "public_channel,private_channel",
|
|
290
|
-
exclude_archived: false,
|
|
291
|
-
limit: 1e3,
|
|
292
|
-
cursor
|
|
293
|
-
});
|
|
294
|
-
async function collectSlackCursorPages(params) {
|
|
295
|
-
const items = [];
|
|
296
|
-
let cursor;
|
|
297
|
-
const seenCursors = /* @__PURE__ */ new Set();
|
|
298
|
-
for (let pageCount = 1; pageCount <= SLACK_CURSOR_PAGE_LIMIT; pageCount += 1) {
|
|
299
|
-
const response = await params.fetchPage(cursor);
|
|
300
|
-
items.push(...params.collectPageItems(response));
|
|
301
|
-
const nextCursor = response.response_metadata?.next_cursor?.trim() || void 0;
|
|
302
|
-
if (!nextCursor) return items;
|
|
303
|
-
if (seenCursors.has(nextCursor)) throw new Error(`Slack cursor pagination repeated a cursor after ${pageCount} pages`);
|
|
304
|
-
seenCursors.add(nextCursor);
|
|
305
|
-
cursor = nextCursor;
|
|
306
|
-
}
|
|
307
|
-
throw new Error(`Slack cursor pagination exceeded ${SLACK_CURSOR_PAGE_LIMIT} pages`);
|
|
308
|
-
}
|
|
309
|
-
export { createSlackProbeDispatcher as _, createSlackStartupAuthClient as a, resolveSlackWebClientOptions as b, createSlackWriteClient as c, getOrCreateWeakOwnerMap as d, pruneExpiredMapEntries as f, SLACK_WRITE_RETRY_OPTIONS as g, SLACK_DEFAULT_RETRY_OPTIONS as h, createSlackReadClient as i, getSlackListenerWriteClient as l, writeLruMapEntry as m, fetchSlackChannelListPage as n, createSlackTokenCacheKey as o, readLruMapEntry as p, createSlackLookupClient as r, createSlackWebClient as s, collectSlackCursorPages as t, getSlackWriteClient as u, resolveSlackLookupClientOptions as v, resolveSlackWriteClientOptions as x, resolveSlackMonitorDispatchers as y };
|
|
286
|
+
export { resolveSlackMonitorDispatchers as _, createSlackWebClient as a, getSlackWriteClient as c, readLruMapEntry as d, writeLruMapEntry as f, resolveSlackLookupClientOptions as g, createSlackProbeDispatcher as h, createSlackTokenCacheKey as i, getOrCreateWeakOwnerMap as l, SLACK_WRITE_RETRY_OPTIONS as m, createSlackReadClient as n, createSlackWriteClient as o, SLACK_DEFAULT_RETRY_OPTIONS as p, createSlackStartupAuthClient as r, getSlackListenerWriteClient as s, createSlackLookupClient as t, pruneExpiredMapEntries as u, resolveSlackWebClientOptions as v, resolveSlackWriteClientOptions as y };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// extensions/slack/src/cursor-pages.ts
|
|
2
|
+
const SLACK_CURSOR_PAGE_LIMIT = 1e4;
|
|
3
|
+
const SLACK_CONVERSATION_LIST_TYPES = [
|
|
4
|
+
"public_channel",
|
|
5
|
+
"private_channel",
|
|
6
|
+
"mpim",
|
|
7
|
+
"im"
|
|
8
|
+
];
|
|
9
|
+
const fetchSlackChannelListPage = (client, cursor, page = {}) => client.conversations.list({
|
|
10
|
+
types: page.types ?? "public_channel,private_channel",
|
|
11
|
+
exclude_archived: page.excludeArchived ?? false,
|
|
12
|
+
limit: page.limit ?? 1e3,
|
|
13
|
+
cursor
|
|
14
|
+
});
|
|
15
|
+
async function collectSlackCursorPages(params) {
|
|
16
|
+
const items = [];
|
|
17
|
+
let cursor;
|
|
18
|
+
const seenCursors = /* @__PURE__ */ new Set();
|
|
19
|
+
for (let pageCount = 1; pageCount <= SLACK_CURSOR_PAGE_LIMIT; pageCount += 1) {
|
|
20
|
+
const response = await params.fetchPage(cursor);
|
|
21
|
+
items.push(...params.collectPageItems(response));
|
|
22
|
+
const nextCursor = response.response_metadata?.next_cursor?.trim() || void 0;
|
|
23
|
+
if (!nextCursor) return items;
|
|
24
|
+
if (seenCursors.has(nextCursor)) throw new Error(`Slack cursor pagination repeated a cursor after ${pageCount} pages`);
|
|
25
|
+
seenCursors.add(nextCursor);
|
|
26
|
+
cursor = nextCursor;
|
|
27
|
+
}
|
|
28
|
+
throw new Error(`Slack cursor pagination exceeded ${SLACK_CURSOR_PAGE_LIMIT} pages`);
|
|
29
|
+
}
|
|
30
|
+
export { collectSlackCursorPages as n, fetchSlackChannelListPage as r, SLACK_CONVERSATION_LIST_TYPES as t };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
2
|
import { s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
-
import { n as
|
|
3
|
+
import { n as collectSlackCursorPages, r as fetchSlackChannelListPage } from "./cursor-pages-DiOrzZtc.mjs";
|
|
4
|
+
import { t as createSlackLookupClient } from "./client-DQqLIemQ.mjs";
|
|
4
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
6
|
// extensions/slack/src/directory-live.ts
|
|
6
7
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
2
2
|
import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { Kt as captureSlackWorkspaceInstallation } from "./probe-ME1HsC0x.mjs";
|
|
4
4
|
import { t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { t as buildSlackLiteralText } from "./literal-text-
|
|
5
|
+
import { n as createSlackReadClient, o as createSlackWriteClient } from "./client-DQqLIemQ.mjs";
|
|
6
|
+
import { t as buildSlackLiteralText } from "./literal-text-CXYRhsDp.mjs";
|
|
7
7
|
import { n as getSlackRuntime } from "./runtime-C6HKn7Av.mjs";
|
|
8
8
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
9
9
|
import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Tt as escapeSlackMrkdwn, ht as SLACK_SECTION_TEXT_MAX } from "./probe-ME1HsC0x.mjs";
|
|
2
2
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
3
3
|
// extensions/slack/src/literal-text.ts
|
|
4
4
|
/** Native plain-text blocks plus a non-parsing accessibility fallback. */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { i as listSlackAccountIds } from "./accounts-EaPP0fFY.mjs";
|
|
2
2
|
import { t as inspectSlackAccount } from "./account-inspect-DgQgj0wk.mjs";
|
|
3
3
|
import { r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { t as SLACK_CONVERSATION_LIST_TYPES } from "./cursor-pages-DiOrzZtc.mjs";
|
|
5
|
+
import { createActionGate, stringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
5
6
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
6
7
|
import { Type } from "typebox";
|
|
7
8
|
// extensions/slack/src/message-actions.ts
|
|
@@ -33,7 +34,8 @@ function listSlackMessageActions(cfg, accountId) {
|
|
|
33
34
|
"list-pins"
|
|
34
35
|
]],
|
|
35
36
|
["memberInfo", ["member-info"]],
|
|
36
|
-
["emojiList", ["emoji-list"]]
|
|
37
|
+
["emojiList", ["emoji-list"]],
|
|
38
|
+
["channelInfo", ["channel-list"]]
|
|
37
39
|
]) if (gates.some((isEnabled) => isEnabled(gate, gate === "channels" ? false : void 0))) actions.push(...enabledActions);
|
|
38
40
|
return actions;
|
|
39
41
|
}
|
|
@@ -112,6 +114,20 @@ function describeSlackMessageTool({ cfg, accountId }) {
|
|
|
112
114
|
description: "Slack conversation-open: 1-8 other member IDs. One opens a DM; multiple open or reuse a group DM. Exclude the calling account. Use the returned target with action=\"send\". teamId defaults to the trusted current workspace for the selected account; detached Enterprise operations require it."
|
|
113
115
|
})) }
|
|
114
116
|
});
|
|
117
|
+
if (actions.includes("channel-list")) schema.push({
|
|
118
|
+
actions: ["channel-list"],
|
|
119
|
+
properties: { types: Type.Optional(Type.Array(stringEnum(SLACK_CONVERSATION_LIST_TYPES), {
|
|
120
|
+
minItems: 1,
|
|
121
|
+
uniqueItems: true,
|
|
122
|
+
description: "Slack channel-list conversation types. Default: [\"public_channel\",\"private_channel\"]; add \"im\" or \"mpim\" to list DMs. Archived conversations need includeArchived. Pass nextPageToken as pageToken until it is absent; a page may hold fewer results than limit. Read a result with action=\"read\" and its id as channelId."
|
|
123
|
+
})) }
|
|
124
|
+
});
|
|
125
|
+
const readAsActions = ["read", "channel-list"].filter((action) => actions.includes(action));
|
|
126
|
+
if (readAsActions.length > 0) schema.push({
|
|
127
|
+
actions: readAsActions,
|
|
128
|
+
visibility: "all-configured",
|
|
129
|
+
properties: { readAs: Type.Optional(stringEnum(["bot", "user"], { description: "Slack token for read and channel-list. Omit for the account default (the user token when configured, else the bot token). \"bot\" forces the bot token; \"user\" requires a configured user token." })) }
|
|
130
|
+
});
|
|
115
131
|
for (const [action, createProperties] of [
|
|
116
132
|
["download-file", createSlackFileActionSchema],
|
|
117
133
|
["send", createSlackSendActionSchema],
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
2
|
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, g as resolveSlackBotToken, h as resolveSlackAppToken, l as resolveSlackAccountDmPolicy, m as formatSlackBotTokenIdentityWarning, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
3
|
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Bt as allowListMatches, C as resolveSlackConversationBindingRouteAsync, D as truncateSlackText, Et as isSlackAnyNativeApprovalClientEnabled, G as decodeSlackApprovalAction, Ht as normalizeSlackSlug, I as isSlackApprovalActionId, L as isSlackCallbackActionId, Rt as isSlackPluginApprovalAuthorizedSender, Tt as escapeSlackMrkdwn, U as resolveSlackQuestionAction, Ut as resolveSlackAllowListMatch, V as decodeSlackQuestionAction, Vt as normalizeSlackAllowOwnerEntry, Wt as resolveSlackUserAllowListForTeam, Yt as registerSlackInstallationState, Zt as isSlackExecApprovalAuthorizedSender, b as resolveSlackAgentRoute, c as slackIngressIdentity, et as buildSlackCompleteBlocksFallbackText, g as formatSlackError, i as setSlackSessionStatus, l as buildSlackChannelIdCandidates, m as setSlackChannelPolicyBindings, o as createSlackIngressSubject, r as renameSlackSession, v as qualifySlackConversationId, x as normalizeSlackRouteBindingConfig, xt as SLACK_TEXT_LIMIT, y as qualifySlackRoutePeerId, z as isSlackQuestionActionId } from "./probe-ME1HsC0x.mjs";
|
|
5
|
+
import { n as collectSlackCursorPages } from "./cursor-pages-DiOrzZtc.mjs";
|
|
6
|
+
import { _ as resolveSlackMonitorDispatchers, a as createSlackWebClient, d as readLruMapEntry, f as writeLruMapEntry, g as resolveSlackLookupClientOptions, l as getOrCreateWeakOwnerMap, r as createSlackStartupAuthClient, s as getSlackListenerWriteClient, u as pruneExpiredMapEntries, v as resolveSlackWebClientOptions } from "./client-DQqLIemQ.mjs";
|
|
6
7
|
import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-C5vsCo3a.mjs";
|
|
7
|
-
import { S as hasSlackMessageTableBlock, f as readSlackMessages, v as isGovSlackClient, y as saveRemoteMedia } from "./actions-
|
|
8
|
-
import { f as requireSlackPostMessageTimestamp, p as buildSlackMessageIdentityPayload, r as setSlackDefaultSendIdentity } from "./send-
|
|
8
|
+
import { S as hasSlackMessageTableBlock, f as readSlackMessages, v as isGovSlackClient, y as saveRemoteMedia } from "./actions-DAWAKRJ9.mjs";
|
|
9
|
+
import { f as requireSlackPostMessageTimestamp, p as buildSlackMessageIdentityPayload, r as setSlackDefaultSendIdentity } from "./send-CNGjlL3z.mjs";
|
|
9
10
|
import { n as getSlackRuntime, t as getOptionalSlackRuntime } from "./runtime-C6HKn7Av.mjs";
|
|
10
11
|
import { t as normalizeSlackWebhookPath } from "./paths-CQZI_5WY.mjs";
|
|
11
|
-
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
12
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
13
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
14
|
-
import { n as runSlackApprovalMessageUpdate, t as hasSlackApprovalControl } from "./approval-message-updates-
|
|
12
|
+
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-B7_AZUCl.mjs";
|
|
13
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtkJuB1X.mjs";
|
|
14
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-Bqf-wJF9.mjs";
|
|
15
|
+
import { n as runSlackApprovalMessageUpdate, t as hasSlackApprovalControl } from "./approval-message-updates-DocYhToX.mjs";
|
|
15
16
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
16
17
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
17
18
|
import { asNonArrayRecord, asOptionalObjectRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -25,6 +26,7 @@ import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plu
|
|
|
25
26
|
import { normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
26
27
|
import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, formatAllowlistMatchMeta, mergeAllowlist, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
|
|
27
28
|
import { createStaleWhileRevalidateCache, pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
29
|
+
import { agentControlText } from "openclaw/plugin-sdk/interactive-runtime";
|
|
28
30
|
import { parseStrictFiniteNumber, resolvePromptHistoryLimit, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
29
31
|
import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
30
32
|
import { truncateUtf16Safe, withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
@@ -48,15 +50,13 @@ import { getConversationSessionAsync, getSessionEntryAsync, resolveStorePath } f
|
|
|
48
50
|
import { enqueueRoutedSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
49
51
|
import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
|
|
50
52
|
import { mutateConfigFile, readConfigFileSnapshotForWrite } from "openclaw/plugin-sdk/config-mutation";
|
|
51
|
-
import { agentControlText } from "openclaw/plugin-sdk/agent-control-runtime";
|
|
52
53
|
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
|
|
53
54
|
import { formatApprovalDecisionLabel } from "openclaw/plugin-sdk/approval-runtime";
|
|
54
55
|
import { buildCommandTextFromArgs, findCommandByNativeName, formatCommandArgMenuTitle, listNativeCommandSpecsForConfig, parseCommandArgs, prepareSkillCommandsForAgents, resolveCommandArgMenuAsync, resolveCommandAuthorizationAsync, resolveEffectiveAgentRuntime, resolveNativeCommandSessionTargets, resolveStoredModelOverrideAsync } from "openclaw/plugin-sdk/command-auth-native";
|
|
55
56
|
import { createChannelInteractiveDispatcher } from "openclaw/plugin-sdk/plugin-runtime";
|
|
56
57
|
import { reportChannelRoomJoin } from "openclaw/plugin-sdk/channel-join-intro-runtime";
|
|
57
58
|
import { captureSessionEntryCurrentCheckAsync } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
58
|
-
import { loadCommandArgMenuModelCatalog } from "openclaw/plugin-sdk/command-
|
|
59
|
-
import { mergeNativeCommandSpecs } from "openclaw/plugin-sdk/native-command-registry";
|
|
59
|
+
import { loadCommandArgMenuModelCatalog, mergeNativeCommandSpecs } from "openclaw/plugin-sdk/native-command-registry";
|
|
60
60
|
import { generateSecureToken } from "openclaw/plugin-sdk/secure-random-runtime";
|
|
61
61
|
import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
|
|
62
62
|
import { finished } from "node:stream/promises";
|
|
@@ -1631,11 +1631,19 @@ function extractSlackErrorCode(err) {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
return (typeof record.message === "string" ? record.message : "").match(/An API error occurred:\s*([a-z_][a-z0-9_]*)/i)?.[1];
|
|
1633
1633
|
}
|
|
1634
|
+
/**
|
|
1635
|
+
* Drops text Slack rejected from the session and from the SDK's private
|
|
1636
|
+
* buffer (@slack/web-api 7.16.0 retains it after a failed flush), so a later
|
|
1637
|
+
* append or stop cannot resend it. Leaves the stream open.
|
|
1638
|
+
*/
|
|
1639
|
+
function discardSlackStreamPendingText(session) {
|
|
1640
|
+
session.pendingText = "";
|
|
1641
|
+
session.streamer.buffer = "";
|
|
1642
|
+
}
|
|
1634
1643
|
function markSlackStreamFallbackDelivered(session) {
|
|
1635
1644
|
if (applySlackStreamStop(session)) return;
|
|
1636
1645
|
const nativeStreamWasStarted = session.delivered || Boolean(session.streamer.ts);
|
|
1637
|
-
session
|
|
1638
|
-
session.streamer.buffer = "";
|
|
1646
|
+
discardSlackStreamPendingText(session);
|
|
1639
1647
|
session.stopped = !nativeStreamWasStarted;
|
|
1640
1648
|
if (session.stopped) releaseSlackStream(session);
|
|
1641
1649
|
else stateBySession.get(session)?.sessions.add(session);
|
|
@@ -1829,14 +1837,12 @@ async function authorizeSlackSystemEventSender(params) {
|
|
|
1829
1837
|
channelType,
|
|
1830
1838
|
channelName
|
|
1831
1839
|
};
|
|
1832
|
-
if (
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
};
|
|
1839
|
-
}
|
|
1840
|
+
if (inferSlackChannelType(channelId) !== "im" && !parseSlackChannelType(resolvedTypeSource)) return {
|
|
1841
|
+
allowed: false,
|
|
1842
|
+
reason: "ambiguous-channel-type",
|
|
1843
|
+
channelType,
|
|
1844
|
+
channelName
|
|
1845
|
+
};
|
|
1840
1846
|
}
|
|
1841
1847
|
const senderInfo = params.retryNameLookup ? void 0 : await params.ctx.resolveUserName(senderId, params.eventScope);
|
|
1842
1848
|
const ingressChannelType = channelType ?? "channel";
|
|
@@ -2936,7 +2942,7 @@ async function handleSlackApprovalInteraction(params) {
|
|
|
2936
2942
|
channelId,
|
|
2937
2943
|
messageTs
|
|
2938
2944
|
}, async () => {
|
|
2939
|
-
const { readSlackMessages } = await import("./actions-
|
|
2945
|
+
const { readSlackMessages } = await import("./actions-DAWAKRJ9.mjs").then((n) => n.t);
|
|
2940
2946
|
const { messages } = await readSlackMessages(channelId, {
|
|
2941
2947
|
client: params.eventScope?.client ?? params.ctx.app.client,
|
|
2942
2948
|
messageId: messageTs,
|
|
@@ -4306,29 +4312,35 @@ async function resolveSlackCommandMenuModelContext(params) {
|
|
|
4306
4312
|
let provider;
|
|
4307
4313
|
let model;
|
|
4308
4314
|
if (entry?.modelOverrideSource === "auto" && normalizeOptionalString(entry.modelOverride)) {
|
|
4309
|
-
provider = defaultModel
|
|
4310
|
-
model = defaultModel
|
|
4315
|
+
provider = defaultModel?.provider;
|
|
4316
|
+
model = defaultModel?.model;
|
|
4311
4317
|
} else {
|
|
4312
4318
|
const override = await resolveStoredModelOverrideAsync({
|
|
4313
4319
|
sessionEntry: entry,
|
|
4314
4320
|
sessionKey: params.sessionKey,
|
|
4315
|
-
defaultProvider: defaultModel
|
|
4321
|
+
defaultProvider: defaultModel?.provider,
|
|
4316
4322
|
loadSessionEntry: (sessionKey) => getSessionEntryAsync({
|
|
4317
4323
|
agentId: params.agentId,
|
|
4318
4324
|
storePath,
|
|
4319
4325
|
sessionKey
|
|
4320
4326
|
})
|
|
4321
4327
|
});
|
|
4322
|
-
provider = override?.model ? override.provider || defaultModel
|
|
4328
|
+
provider = override?.model ? override.provider || defaultModel?.provider : normalizeOptionalString(entry?.providerOverride) ?? normalizeOptionalString(entry?.modelProvider);
|
|
4323
4329
|
model = override?.model ? override.model : normalizeOptionalString(entry?.modelOverride) ?? normalizeOptionalString(entry?.model);
|
|
4324
4330
|
}
|
|
4331
|
+
const runtimeProvider = provider ?? defaultModel?.provider;
|
|
4332
|
+
const runtimeModel = model ?? defaultModel?.model;
|
|
4333
|
+
if (!runtimeProvider || !runtimeModel) return {
|
|
4334
|
+
...provider ? { provider } : {},
|
|
4335
|
+
...model ? { model } : {}
|
|
4336
|
+
};
|
|
4325
4337
|
return {
|
|
4326
4338
|
...provider ? { provider } : {},
|
|
4327
4339
|
...model ? { model } : {},
|
|
4328
4340
|
agentRuntime: resolveEffectiveAgentRuntime({
|
|
4329
4341
|
cfg: params.cfg,
|
|
4330
|
-
provider:
|
|
4331
|
-
modelId:
|
|
4342
|
+
provider: runtimeProvider,
|
|
4343
|
+
modelId: runtimeModel,
|
|
4332
4344
|
agentId: params.agentId,
|
|
4333
4345
|
sessionKey: params.sessionKey,
|
|
4334
4346
|
sessionEntry: entry
|
|
@@ -4353,7 +4365,7 @@ const SLACK_COMMAND_ARG_BUTTON_VALUE_MAX = 2e3;
|
|
|
4353
4365
|
const SLACK_COMMAND_ARG_CONFIRM_TEXT_MAX = 300;
|
|
4354
4366
|
const SLACK_HEADER_TEXT_MAX = 150;
|
|
4355
4367
|
const SLACK_COMMAND_ARG_ACTION_BLOCKS_MAX = 47;
|
|
4356
|
-
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-
|
|
4368
|
+
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-ln-mu0Wb.mjs"));
|
|
4357
4369
|
const loadPluginCommandRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/plugin-command-runtime"));
|
|
4358
4370
|
const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
|
|
4359
4371
|
function buildSlackArgMenuConfirm(params) {
|
|
@@ -5609,7 +5621,7 @@ function createSlackThreadTsResolver(params) {
|
|
|
5609
5621
|
} };
|
|
5610
5622
|
}
|
|
5611
5623
|
// extensions/slack/src/monitor/message-handler.ts
|
|
5612
|
-
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-
|
|
5624
|
+
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-B4H65MB2.mjs"));
|
|
5613
5625
|
const RETRYABLE_FLUSH_MAX_ATTEMPTS = 3;
|
|
5614
5626
|
function shouldDebounceSlackMessage(message, cfg) {
|
|
5615
5627
|
const textForCommandDetection = stripSlackMentionsForCommandDetection(message.text ?? "");
|
|
@@ -6152,7 +6164,7 @@ function createSlackWorkspaceClientResolver(params) {
|
|
|
6152
6164
|
}
|
|
6153
6165
|
// extensions/slack/src/monitor/provider.ts
|
|
6154
6166
|
const getSlackBoltInterop = createLazyRuntimeSurface(() => import("@slack/bolt"), resolveSlackBoltInterop);
|
|
6155
|
-
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-
|
|
6167
|
+
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-D6xKiatj.mjs"));
|
|
6156
6168
|
function resolveSlackRuntimeIdentity(params) {
|
|
6157
6169
|
const botUserId = normalizeOptionalString(params.botUserId);
|
|
6158
6170
|
const botId = normalizeOptionalString(params.botId);
|
|
@@ -6632,4 +6644,4 @@ var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
|
6632
6644
|
isSlackChannelAllowedByPolicy: () => isSlackChannelAllowedByPolicy,
|
|
6633
6645
|
monitorSlackProvider: () => monitorSlackProvider
|
|
6634
6646
|
});
|
|
6635
|
-
export {
|
|
6647
|
+
export { SLACK_SOCKET_RECONNECT_POLICY as C, readSlackAssistantThreadContext as D, buildSlackAssistantThreadMetadata as E, stripSlackMentionsForCommandDetection as O, stopSlackStream as S, resolveSlackChatType as T, SlackStreamNotDeliveredError as _, createSlackResponseUrlBudget as a, markSlackStreamFallbackDelivered as b, registerSlackSessionRun as c, parseSlackMessageEvent as d, requireSlackMessageEvent as f, SlackStreamMessageTooLongError as g, resolveSlackEffectiveAllowFrom as h, SlackResponseAlreadyReportedError as i, resolveSlackThreadContext as l, resolveSlackCommandIngress as m, monitorSlackProvider as n, authorizeSlackDirectMessage as o, authorizeSlackBotRoomMessage as p, resolveSlackRoomContextHints as r, resolveSlackRoutingContext as s, monitor_exports as t, trackSlackDraftMessage as u, appendSlackStream as v, normalizeSlackChannelType as w, startSlackStream as x, discardSlackStreamPendingText as y };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { d as resolveSlackMarkdownOptions, f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
2
2
|
import { a as parseSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { B as resolveSlackQuestionActionIds, T as assertSlackDetachedTargetAllowed, mt as SLACK_PRESENTATION_CAPABILITIES, xt as SLACK_TEXT_LIMIT } from "./probe-ME1HsC0x.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-BXQwrMaA.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-CFd8xhhn.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-CNGjlL3z.mjs").then((n) => n.n));
|
|
49
49
|
function resolveSlackSendIdentity(identity) {
|
|
50
50
|
if (!identity) return;
|
|
51
51
|
const username = normalizeOptionalString(identity.name);
|