@openclaw/slack 2026.11.7 → 2026.11.10-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/README.md +16 -0
- package/dist/.setup/{account-configured-zcR9TJJN.mjs → account-configured-35y0-Hso.mjs} +1 -2
- package/dist/.setup/{account-inspect-BLVha-ov.mjs → account-inspect-DgQgj0wk.mjs} +3 -4
- package/dist/.setup/{accounts-CGJScKtk.mjs → accounts-EaPP0fFY.mjs} +6 -10
- package/dist/.setup/{action-runtime-D01wBhx5.mjs → action-runtime-Cs2IxOLc.mjs} +13 -12
- package/dist/.setup/action-runtime.runtime-me4Yd3j7.mjs +1 -0
- package/dist/.setup/{actions-D5S6D_BU.mjs → actions-BNOabmV6.mjs} +16 -24
- package/dist/.setup/{approval-handler.runtime-Buw5jh2Y.mjs → approval-handler.runtime-C2C-jNxi.mjs} +7 -8
- package/dist/.setup/{approval-message-updates-pmXcve5E.mjs → approval-message-updates-Bx2u_5-z.mjs} +2 -3
- package/dist/.setup/{channel-DSi3yBu5.mjs → channel-CSbCHg-I.mjs} +66 -53
- package/dist/.setup/{channel-meta-C443t-lI.mjs → channel-meta-C5vsCo3a.mjs} +1 -2
- package/dist/.setup/{channel-type-B5P3w9eA.mjs → channel-type-ZG0ErPTI.mjs} +5 -6
- package/dist/.setup/{channel.setup-Lq2OxKkF.mjs → channel.setup-DNnvYUKL.mjs} +10 -14
- package/dist/.setup/{config-schema-BWAaa5au.mjs → config-schema-DO2u-jsa.mjs} +5 -7
- package/dist/.setup/{cursor-pages-CATAzbTT.mjs → cursor-pages-jVn3Vkfi.mjs} +4 -8
- package/dist/.setup/{directory-config-D-hf9KGQ.mjs → directory-config-CGvKYg9F.mjs} +5 -6
- package/dist/.setup/{directory-live-onKAFI1E.mjs → directory-live-DNdw97LA.mjs} +4 -5
- package/dist/.setup/{doctor-contract-9-QJRCXk.mjs → doctor-contract-BB2KJ9Ni.mjs} +7 -13
- package/dist/.setup/fork-DTKBA8Fm.mjs +155 -0
- package/dist/.setup/literal-text-DdCRYzYh.mjs +24 -0
- package/dist/.setup/{message-tool-api-LGIgVXJf.mjs → message-tool-api-B38BpEaE.mjs} +5 -7
- package/dist/.setup/{monitor-CZGrHb5a.mjs → monitor-C4cpeg1H.mjs} +105 -148
- package/dist/.setup/{outbound-adapter-C-95EWl2.mjs → outbound-adapter-1JpFMcJD.mjs} +14 -11
- package/dist/.setup/{paths-B1u59oLK.mjs → paths-CQZI_5WY.mjs} +1 -2
- package/dist/.setup/{pipeline.runtime-B-EtO-8F.mjs → pipeline.runtime-ozrJpZ8k.mjs} +100 -102
- package/dist/.setup/{policy-DxhGRvc2.mjs → policy-klXrk5vE.mjs} +3 -5
- package/dist/.setup/{probe-DANukR3O.mjs → probe-BHqvMbno.mjs} +72 -75
- package/dist/.setup/{question-delivery-CWC7sRhH.mjs → question-delivery-BGwm5Zmr.mjs} +2 -3
- package/dist/.setup/{relay-source-BH-NPqBP.mjs → relay-source-DEZ7qM1i.mjs} +3 -4
- package/dist/.setup/{replies-B5e7p3dD.mjs → replies-BK3Ht8o-.mjs} +8 -10
- package/dist/.setup/{reply-blocks-BzsXUUUL.mjs → reply-blocks-CFy-O-2B.mjs} +4 -7
- package/dist/.setup/{resolve-channels-XDPgnesf.mjs → resolve-channels-CF2JME9q.mjs} +4 -5
- package/dist/.setup/{resolve-users-aDAv24U2.mjs → resolve-users-DDcCAjH1.mjs} +4 -5
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
- package/dist/.setup/{runtime-JSVZSWAj.mjs → runtime-C6HKn7Av.mjs} +1 -2
- package/dist/.setup/runtime-setter-api-DrXr965r.mjs +2 -0
- package/dist/.setup/{scopes-BocHwImV.mjs → scopes-DKl6yqIv.mjs} +3 -4
- package/dist/.setup/{secret-contract-uiQtoNlu.mjs → secret-contract-CqVqR7MP.mjs} +2 -3
- package/dist/.setup/{secret-contract-api-BlLz88mj.mjs → secret-contract-api-DaCXZ47j.mjs} +1 -1
- package/dist/.setup/{security-audit-DFGiFLqd.mjs → security-audit-C3hXCfDt.mjs} +2 -3
- package/dist/.setup/{send-yK6_-px6.mjs → send-kGJWQtLk.mjs} +20 -38
- package/dist/.setup/{send-results-BGxlroJ-.mjs → send-results-Bm6V1ekL.mjs} +1 -2
- package/dist/.setup/setup-plugin-api-UWUSCOAK.mjs +2 -0
- package/dist/.setup/{setup-surface-C0KRtyqa.mjs → setup-surface-CPFVFPFM.mjs} +6 -7
- package/dist/.setup/{slash-dispatch.runtime-CZuMRdRx.mjs → slash-dispatch.runtime-B2oWiis5.mjs} +1 -1
- package/dist/.setup/{target-parsing-Bx2UZniD.mjs → target-parsing-DwYAP3ts.mjs} +1 -2
- package/dist/.setup/{targets-D-ASeWHy.mjs → targets-eeOxA_b_.mjs} +2 -3
- package/dist/.setup/{thread-ts-Cvt7WD6B.mjs → thread-ts-47Au2-Yn.mjs} +1 -2
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/account-inspect-api.js +2 -3
- package/dist/api.js +16 -16
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-entry.js +1 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +2 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +1 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +10 -10
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +4 -5
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/zlib.d.ts +752 -0
- package/node_modules/@slack/bolt/node_modules/qs/.editorconfig +1 -1
- package/node_modules/@slack/bolt/node_modules/qs/CHANGELOG.md +87 -22
- package/node_modules/@slack/bolt/node_modules/qs/README.md +63 -10
- package/node_modules/@slack/bolt/node_modules/qs/dist/qs.js +17 -17
- package/node_modules/@slack/bolt/node_modules/qs/eslint.config.mjs +61 -50
- package/node_modules/@slack/bolt/node_modules/qs/lib/formats.js +7 -2
- package/node_modules/@slack/bolt/node_modules/qs/lib/parse.js +29 -10
- package/node_modules/@slack/bolt/node_modules/qs/lib/stringify.js +5 -3
- package/node_modules/@slack/bolt/node_modules/qs/lib/utils.js +28 -9
- package/node_modules/@slack/bolt/node_modules/qs/package.json +6 -6
- package/node_modules/@slack/bolt/node_modules/qs/test/parse.js +335 -2
- package/node_modules/@slack/bolt/node_modules/qs/test/stringify.js +222 -0
- package/node_modules/@slack/bolt/node_modules/qs/test/utils.js +61 -3
- package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts +14 -0
- package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/block-kit/blocks.d.ts +65 -1
- package/node_modules/@slack/types/dist/block-kit/blocks.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/events/index.d.ts +2 -2
- package/node_modules/@slack/types/dist/events/index.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/events/index.js.map +1 -1
- package/node_modules/@slack/types/dist/events/message.d.ts +4 -0
- package/node_modules/@slack/types/dist/events/message.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/events/user.d.ts +20 -0
- package/node_modules/@slack/types/dist/events/user.d.ts.map +1 -1
- package/node_modules/@slack/types/package.json +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.js +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
- package/node_modules/@slack/web-api/dist/file-upload.js +1 -1
- package/node_modules/@slack/web-api/dist/file-upload.js.map +1 -1
- package/node_modules/@slack/web-api/dist/methods.d.ts +18 -3
- package/node_modules/@slack/web-api/dist/methods.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/methods.js +16 -1
- package/node_modules/@slack/web-api/dist/methods.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/apps.d.ts +62 -0
- package/node_modules/@slack/web-api/dist/types/request/apps.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/canvas.d.ts +4 -0
- package/node_modules/@slack/web-api/dist/types/request/canvas.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/files.d.ts +5 -1
- package/node_modules/@slack/web-api/dist/types/request/files.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/index.d.ts +2 -2
- package/node_modules/@slack/web-api/dist/types/request/index.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts +35 -3
- package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/team.d.ts +6 -0
- package/node_modules/@slack/web-api/dist/types/request/team.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.d.ts +19 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.d.ts.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.js.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.d.ts +14 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.d.ts.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.js.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.d.ts +10 -0
- package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.d.ts.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.js.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/TeamInfoResponse.d.ts +1 -0
- package/node_modules/@slack/web-api/dist/types/response/TeamInfoResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/index.d.ts +3 -0
- package/node_modules/@slack/web-api/dist/types/response/index.d.ts.map +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +752 -0
- package/node_modules/@slack/web-api/package.json +3 -3
- package/node_modules/typebox/build/format/date_time.d.mts +2 -1
- package/node_modules/typebox/build/format/date_time.mjs +12 -3
- package/node_modules/typebox/package.json +1 -1
- package/openclaw.plugin.json +13 -8
- package/package.json +7 -7
- package/dist/.setup/action-runtime.runtime-VQGaR6g8.mjs +0 -1
- package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +0 -2
- package/dist/.setup/setup-plugin-api-Cfz58xoh.mjs +0 -2
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as isSlackPluginAccountConfigured } from "./account-configured-
|
|
3
|
-
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, m as formatSlackBotTokenIdentityWarning, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-
|
|
4
|
-
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
5
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
6
|
-
import { _ as createSlackProbeDispatcher, i as createSlackReadClient } from "./cursor-pages-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { r as isSlackPluginAccountConfigured } from "./account-configured-35y0-Hso.mjs";
|
|
3
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, m as formatSlackBotTokenIdentityWarning, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
4
|
+
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-DwYAP3ts.mjs";
|
|
5
|
+
import { t as slackContextTargetsMatch } from "./targets-eeOxA_b_.mjs";
|
|
6
|
+
import { _ as createSlackProbeDispatcher, i as createSlackReadClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
8
|
-
import { asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringifiedOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
|
+
import { asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringifiedOptionalString, normalizeTrimmedStringList, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { normalizeMessageChannel, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
10
10
|
import { defaultRuntime, logVerbose, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
11
11
|
import { FormatCapabilityProfile, chunkTextForOutbound, markdownToIR, renderMarkdownIRChunksWithinLimit, renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-chunking";
|
|
12
|
-
import { runChannelProbe, sliceUtf16Safe, truncateUtf16Safe, truncateUtf8Prefix } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
13
12
|
import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
|
|
14
13
|
import { buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
|
|
15
14
|
import { createNativeApprovalChannelRouteGatesAsync, doesApprovalRequestSelectChannelAccountAsync, resolveApprovalKind, resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -26,12 +25,13 @@ import { resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
|
26
25
|
import { isStringArray } from "openclaw/plugin-sdk/collection-input-runtime";
|
|
27
26
|
import { buildApprovalResolutionRef } from "openclaw/plugin-sdk/approval-reference-runtime";
|
|
28
27
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
28
|
+
import { runChannelProbe, sliceUtf16Safe, truncateUtf16Safe, truncateUtf8Prefix } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
29
29
|
import { readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
30
30
|
import { inspectRuntimeConversationBindingRoute, resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRouteAsync } from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
31
31
|
import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
|
|
32
32
|
import { resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
33
33
|
import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
34
|
-
|
|
34
|
+
// extensions/slack/src/action-threading.ts
|
|
35
35
|
const SLACK_PRIVATE_ACTION_DELIVERY_RESULT = Symbol("slack.action.delivery-result");
|
|
36
36
|
function resolveSlackAutoThreadId(params) {
|
|
37
37
|
const context = params.toolContext;
|
|
@@ -55,8 +55,7 @@ function resolveSlackThreadTsFromContext(explicitThreadTs, targetChannel, contex
|
|
|
55
55
|
if (isSingleUseReplyToMode(context?.replyToMode ?? "off") && !context?.hasRepliedRef) return;
|
|
56
56
|
return threadTs;
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
//#region extensions/slack/src/approval-plugin-policy.ts
|
|
58
|
+
// extensions/slack/src/approval-plugin-policy.ts
|
|
60
59
|
/** Returns undefined only when Slack plugin approvals retain legacy account authorization. */
|
|
61
60
|
function resolvePluginApprovalSlackApprovers(cfg, request) {
|
|
62
61
|
const policy = cfg.approvals?.plugin?.slack;
|
|
@@ -73,8 +72,7 @@ function resolvePluginApprovalSlackApprovers(cfg, request) {
|
|
|
73
72
|
}
|
|
74
73
|
return plugin?.approvers ?? policy.approvers;
|
|
75
74
|
}
|
|
76
|
-
|
|
77
|
-
//#region extensions/slack/src/exec-approvals.ts
|
|
75
|
+
// extensions/slack/src/exec-approvals.ts
|
|
78
76
|
function normalizeSlackUserLikeId(value) {
|
|
79
77
|
const upper = value.toUpperCase();
|
|
80
78
|
return /^[UW][A-Z0-9]+$/.test(upper) ? upper : void 0;
|
|
@@ -121,8 +119,7 @@ const isSlackExecApprovalClientEnabled = slackExecApprovalProfile.isClientEnable
|
|
|
121
119
|
const isSlackExecApprovalAuthorizedSender = slackExecApprovalProfile.isAuthorizedSender;
|
|
122
120
|
const resolveSlackExecApprovalTarget = slackExecApprovalProfile.resolveTarget;
|
|
123
121
|
const shouldSuppressLocalSlackExecApprovalPrompt = slackExecApprovalProfile.shouldSuppressLocalPrompt;
|
|
124
|
-
|
|
125
|
-
//#region extensions/slack/src/installation-identity-state.ts
|
|
122
|
+
// extensions/slack/src/installation-identity-state.ts
|
|
126
123
|
const slackInstallationStates = resolveGlobalMap(Symbol.for("openclaw.slack.installation-identities"), "close-and-restart");
|
|
127
124
|
function registerSlackInstallationState(accountId, kind, teamId) {
|
|
128
125
|
const normalizedAccountId = normalizeAccountId(accountId);
|
|
@@ -152,11 +149,21 @@ function getSlackInstallationTeamId(accountId) {
|
|
|
152
149
|
const state = slackInstallationStates.get(normalizeAccountId(accountId));
|
|
153
150
|
return state?.kind === "workspace" ? state.teamId : void 0;
|
|
154
151
|
}
|
|
152
|
+
/** Retain the authenticated monitor owner, not just its current installation label. */
|
|
153
|
+
function captureSlackWorkspaceInstallation(accountId) {
|
|
154
|
+
const key = normalizeAccountId(accountId);
|
|
155
|
+
const captured = slackInstallationStates.get(key);
|
|
156
|
+
if (captured?.kind !== "workspace") return null;
|
|
157
|
+
const teamId = captured.teamId;
|
|
158
|
+
return { assertCurrent: () => {
|
|
159
|
+
const current = slackInstallationStates.get(key);
|
|
160
|
+
if (current?.owner !== captured.owner || current.kind !== "workspace" || current.teamId !== teamId) throw new Error("The Slack workspace installation changed; send a new /fork request.");
|
|
161
|
+
} };
|
|
162
|
+
}
|
|
155
163
|
function isSlackWorkspaceInstallation(accountId) {
|
|
156
164
|
return getSlackInstallationKind(accountId) === "workspace";
|
|
157
165
|
}
|
|
158
|
-
|
|
159
|
-
//#region extensions/slack/src/monitor/allow-list.ts
|
|
166
|
+
// extensions/slack/src/monitor/allow-list.ts
|
|
160
167
|
const SLACK_SLUG_CACHE_MAX = 512;
|
|
161
168
|
const SLACK_STABLE_USER_ID_RE = /^[ubw][a-z0-9]+$/;
|
|
162
169
|
const slackSlugCache = /* @__PURE__ */ new Map();
|
|
@@ -253,8 +260,7 @@ function resolveSlackUserAllowListForTeam(params) {
|
|
|
253
260
|
}
|
|
254
261
|
});
|
|
255
262
|
}
|
|
256
|
-
|
|
257
|
-
//#region extensions/slack/src/approval-auth.ts
|
|
263
|
+
// extensions/slack/src/approval-auth.ts
|
|
258
264
|
function resolveSlackApprovalInputs(params) {
|
|
259
265
|
const account = resolveSlackAccount(params).config;
|
|
260
266
|
return {
|
|
@@ -321,8 +327,7 @@ function getSlackApprovalApproversForTeam(params) {
|
|
|
321
327
|
function resolveSlackApprovalTeamId(params) {
|
|
322
328
|
return getSlackInstallationTeamId(resolveSlackAccount(params).accountId) ?? resolveSlackApprovalOriginTeamId(params.request);
|
|
323
329
|
}
|
|
324
|
-
|
|
325
|
-
//#region extensions/slack/src/approval-native-gates.ts
|
|
330
|
+
// extensions/slack/src/approval-native-gates.ts
|
|
326
331
|
function isSlackPluginApprovalRequest(request) {
|
|
327
332
|
return resolveApprovalKind(request) === "plugin";
|
|
328
333
|
}
|
|
@@ -533,13 +538,11 @@ async function shouldHandleSlackNativeApprovalRequest(params) {
|
|
|
533
538
|
approvalKind: "exec"
|
|
534
539
|
});
|
|
535
540
|
}
|
|
536
|
-
|
|
537
|
-
//#region extensions/slack/src/monitor/mrkdwn.ts
|
|
541
|
+
// extensions/slack/src/monitor/mrkdwn.ts
|
|
538
542
|
function escapeSlackMrkdwn(value) {
|
|
539
543
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
540
544
|
}
|
|
541
|
-
|
|
542
|
-
//#region extensions/slack/src/format.ts
|
|
545
|
+
// extensions/slack/src/format.ts
|
|
543
546
|
const SLACK_ANGLE_TOKEN_RE = /<[^>\n]+>/g;
|
|
544
547
|
function isAllowedSlackAngleToken(token) {
|
|
545
548
|
const inner = token.slice(1, -1);
|
|
@@ -615,14 +618,11 @@ function isUnsafeSlackEmphasisBoundary(character) {
|
|
|
615
618
|
return SLACK_MRKDWN_SYMBOL_RE.test(character) || isSlackCjkPunctuation(character);
|
|
616
619
|
}
|
|
617
620
|
function makeSlackEmphasisStylesSafe(ir) {
|
|
618
|
-
|
|
621
|
+
ir.styles = ir.styles.filter((span) => {
|
|
619
622
|
if (span.style !== "italic" && span.style !== "bold") return true;
|
|
620
623
|
return !isUnsafeSlackEmphasisBoundary(getCodePointBefore(ir.text, span.start)) && !isUnsafeSlackEmphasisBoundary(getCodePointAt(ir.text, span.end));
|
|
621
624
|
});
|
|
622
|
-
return
|
|
623
|
-
...ir,
|
|
624
|
-
styles
|
|
625
|
-
};
|
|
625
|
+
return ir;
|
|
626
626
|
}
|
|
627
627
|
const SLACK_FORMAT_PROFILE = FormatCapabilityProfile.define({
|
|
628
628
|
mechanism: "markdown",
|
|
@@ -767,6 +767,7 @@ function protectSlackAssistantTranscriptRoleHeaders(text) {
|
|
|
767
767
|
}
|
|
768
768
|
function buildSlackRenderOptions({ enclosingStyle, mentions } = {}) {
|
|
769
769
|
return {
|
|
770
|
+
blockquotePrefix: "> ",
|
|
770
771
|
annotationMarkers: { assistant_transcript_role: {
|
|
771
772
|
open: "`",
|
|
772
773
|
close: "`",
|
|
@@ -804,7 +805,6 @@ function prepareSlackMarkdownIR(markdown, options) {
|
|
|
804
805
|
linkify: false,
|
|
805
806
|
autolink: false,
|
|
806
807
|
headingStyle: "rich",
|
|
807
|
-
blockquotePrefix: "> ",
|
|
808
808
|
tableMode: options.tableMode
|
|
809
809
|
}));
|
|
810
810
|
}
|
|
@@ -869,14 +869,12 @@ function markdownToSlackMrkdwnChunks(markdown, limit, options = {}) {
|
|
|
869
869
|
measureRendered: (rendered) => rendered.length
|
|
870
870
|
}).map(({ rendered }) => rendered.length > normalizedLimit ? protectSlackAssistantTranscriptRoleHeaders(rendered) : rendered);
|
|
871
871
|
}
|
|
872
|
-
|
|
873
|
-
//#region extensions/slack/src/limits.ts
|
|
872
|
+
// extensions/slack/src/limits.ts
|
|
874
873
|
const SLACK_TEXT_LIMIT = 8e3;
|
|
875
874
|
const SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT = 4e3;
|
|
876
875
|
const SLACK_EDIT_TEXT_MAX_BYTES = 4e3;
|
|
877
876
|
const SLACK_MESSAGE_TEXT_HARD_LIMIT = 4e4;
|
|
878
|
-
|
|
879
|
-
//#region extensions/slack/src/presentation-fallback.ts
|
|
877
|
+
// extensions/slack/src/presentation-fallback.ts
|
|
880
878
|
const SLACK_UNCOPYABLE_COMMAND_WARNING = "not copyable: contains backtick";
|
|
881
879
|
function escapeSlackPresentationFallbackBlock(block) {
|
|
882
880
|
if (block.type === "chart") return {
|
|
@@ -961,8 +959,7 @@ const SLACK_PRESENTATION_CAPABILITIES = {
|
|
|
961
959
|
}
|
|
962
960
|
}
|
|
963
961
|
};
|
|
964
|
-
|
|
965
|
-
//#region extensions/slack/src/rich-text.ts
|
|
962
|
+
// extensions/slack/src/rich-text.ts
|
|
966
963
|
const RICH_TEXT_CONTAINER_TYPES = /* @__PURE__ */ new Set([
|
|
967
964
|
"rich_text_section",
|
|
968
965
|
"rich_text_preformatted",
|
|
@@ -1009,8 +1006,7 @@ function renderSlackRichText(value, mode, separator = "") {
|
|
|
1009
1006
|
}
|
|
1010
1007
|
}).filter(Boolean).join(separator);
|
|
1011
1008
|
}
|
|
1012
|
-
|
|
1013
|
-
//#region extensions/slack/src/data-table.ts
|
|
1009
|
+
// extensions/slack/src/data-table.ts
|
|
1014
1010
|
const SLACK_DATA_TABLE_COLUMNS_MAX = 20;
|
|
1015
1011
|
const SLACK_DATA_TABLE_ROWS_MAX = 100;
|
|
1016
1012
|
const SLACK_DATA_TABLE_AGGREGATE_CELL_CHARACTERS_MAX = 1e4;
|
|
@@ -1150,8 +1146,7 @@ function renderSlackDataTableCompactPlainTextFallback(value) {
|
|
|
1150
1146
|
...table.rows.map((row) => row.map(escapeCompactFallbackCell).join(" "))
|
|
1151
1147
|
].join("\n"));
|
|
1152
1148
|
}
|
|
1153
|
-
|
|
1154
|
-
//#region extensions/slack/src/data-visualization.ts
|
|
1149
|
+
// extensions/slack/src/data-visualization.ts
|
|
1155
1150
|
const SLACK_CHART_TITLE_MAX = 50;
|
|
1156
1151
|
const SLACK_CHART_LABEL_MAX = 20;
|
|
1157
1152
|
const SLACK_CHART_AXIS_LABEL_MAX = 50;
|
|
@@ -1262,8 +1257,7 @@ function renderSlackDataVisualizationFallbackText(value, mrkdwnSafe = false) {
|
|
|
1262
1257
|
const title = typeof block.title === "string" ? block.title.trim() : "";
|
|
1263
1258
|
return title ? mrkdwnSafe ? escapeSlackMrkdwn(title) : title : void 0;
|
|
1264
1259
|
}
|
|
1265
|
-
|
|
1266
|
-
//#region extensions/slack/src/blocks-fallback.ts
|
|
1260
|
+
// extensions/slack/src/blocks-fallback.ts
|
|
1267
1261
|
const SLACK_SELECT_ELEMENT_TYPES = /* @__PURE__ */ new Set([
|
|
1268
1262
|
"static_select",
|
|
1269
1263
|
"multi_static_select",
|
|
@@ -1339,8 +1333,7 @@ function buildSlackBlocksFallbackText(blocks) {
|
|
|
1339
1333
|
function buildSlackCompleteBlocksFallbackText(blocks, options = {}) {
|
|
1340
1334
|
return blocks.map((block) => renderSlackBlockFallbackText(block, options)).filter(Boolean).join("\n\n").trim() || buildSlackBlocksFallbackText(blocks);
|
|
1341
1335
|
}
|
|
1342
|
-
|
|
1343
|
-
//#region extensions/slack/src/blocks-input.ts
|
|
1336
|
+
// extensions/slack/src/blocks-input.ts
|
|
1344
1337
|
const SLACK_MAX_BLOCKS = 50;
|
|
1345
1338
|
function parseBlocksJson(raw) {
|
|
1346
1339
|
try {
|
|
@@ -1364,8 +1357,7 @@ function parseSlackBlocksInput(raw) {
|
|
|
1364
1357
|
if (raw == null) return;
|
|
1365
1358
|
return validateSlackBlocksArray(typeof raw === "string" ? parseBlocksJson(raw) : raw);
|
|
1366
1359
|
}
|
|
1367
|
-
|
|
1368
|
-
//#region extensions/slack/src/approval-actions.ts
|
|
1360
|
+
// extensions/slack/src/approval-actions.ts
|
|
1369
1361
|
const SLACK_APPROVAL_VALUE_PREFIX = "openclaw:approval:v1:";
|
|
1370
1362
|
const SLACK_APPROVAL_HEADER_BLOCK_ID = "openclaw_approval_header";
|
|
1371
1363
|
function isApprovalDecision(value) {
|
|
@@ -1402,8 +1394,7 @@ function decodeSlackApprovalAction(value) {
|
|
|
1402
1394
|
return null;
|
|
1403
1395
|
}
|
|
1404
1396
|
}
|
|
1405
|
-
|
|
1406
|
-
//#region extensions/slack/src/question-actions.ts
|
|
1397
|
+
// extensions/slack/src/question-actions.ts
|
|
1407
1398
|
const SLACK_QUESTION_VALUE_PREFIX = "slq1:";
|
|
1408
1399
|
const QUESTION_RECORD_ID_PATTERN = /^ask_[a-f0-9]{32}$/u;
|
|
1409
1400
|
function encodeSlackQuestionAction(action) {
|
|
@@ -1434,8 +1425,7 @@ async function resolveSlackQuestionAction(params) {
|
|
|
1434
1425
|
}
|
|
1435
1426
|
await params.respond(result.status === "answered" ? "Answer submitted." : "This question was already answered.").catch(() => {});
|
|
1436
1427
|
}
|
|
1437
|
-
|
|
1438
|
-
//#region extensions/slack/src/reply-action-ids.ts
|
|
1428
|
+
// extensions/slack/src/reply-action-ids.ts
|
|
1439
1429
|
const SLACK_REPLY_BUTTON_ACTION_ID = "openclaw:reply_button";
|
|
1440
1430
|
const SLACK_REPLY_LINK_ACTION_ID = "openclaw:reply_link";
|
|
1441
1431
|
const SLACK_SESSION_LINK_ACTION_ID = "openclaw:session_link";
|
|
@@ -1469,8 +1459,7 @@ function resolveSlackQuestionActionIds(blocks, questionId) {
|
|
|
1469
1459
|
return (block.elements ?? []).flatMap((element) => element.action_id && (questionId ? isSlackQuestionActionForQuestion(element, questionId) : isSlackQuestionActionId(element.action_id)) ? [element.action_id] : []);
|
|
1470
1460
|
});
|
|
1471
1461
|
}
|
|
1472
|
-
|
|
1473
|
-
//#region extensions/slack/src/truncate.ts
|
|
1462
|
+
// extensions/slack/src/truncate.ts
|
|
1474
1463
|
function truncateSlackText(value, max, whitespace = "trim") {
|
|
1475
1464
|
const text = whitespace === "preserve" ? value : value.trim();
|
|
1476
1465
|
if (text.length <= max) return text;
|
|
@@ -1495,8 +1484,7 @@ function truncateSlackTextByUtf8Bytes(value, maxBytes) {
|
|
|
1495
1484
|
const prefix = truncateUtf8Prefix(trimmed, prefixBudget);
|
|
1496
1485
|
return maxBytes >= suffixBytes ? `${prefix}${suffix}` : prefix;
|
|
1497
1486
|
}
|
|
1498
|
-
|
|
1499
|
-
//#region extensions/slack/src/native-data-blocks.ts
|
|
1487
|
+
// extensions/slack/src/native-data-blocks.ts
|
|
1500
1488
|
const SLACK_MALFORMED_NATIVE_DATA_FALLBACK = "Slack could not render this chart or table data.";
|
|
1501
1489
|
const SLACK_RESPONSE_URL_BODY_LIMIT_BYTES = 16384;
|
|
1502
1490
|
const SLACK_RESPONSE_URL_BODY_TIMEOUT_MS = 3e4;
|
|
@@ -1599,14 +1587,16 @@ function appendSlackNativeDataFallbackText(text, blocks) {
|
|
|
1599
1587
|
function appendSlackNativeDataPlainTextFallback(text, blocks) {
|
|
1600
1588
|
return appendSlackBlockFallback(text.trim(), blocks, renderSlackNativeDataPlainTextBlock);
|
|
1601
1589
|
}
|
|
1602
|
-
|
|
1603
|
-
//#region extensions/slack/src/detached-target-admission.ts
|
|
1590
|
+
// extensions/slack/src/detached-target-admission.ts
|
|
1604
1591
|
function assertSlackDetachedTargetAllowed(accountId, teamId) {
|
|
1605
1592
|
const installationKind = getSlackInstallationKind(accountId);
|
|
1606
1593
|
if (installationKind && installationKind !== "workspace" && !teamId) throw new Error("unsupported_enterprise_slack_delivery: detached Slack operations require team:<team-id>:channel:<channel-id> or team:<team-id>:user:<user-id> until a workspace install is authenticated");
|
|
1607
1594
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1595
|
+
// extensions/slack/src/conversation-binding-route.ts
|
|
1596
|
+
const slackConversationBindings = {
|
|
1597
|
+
prepareFork: async (params) => (await import("./fork-DTKBA8Fm.mjs")).prepareSlackFork(params),
|
|
1598
|
+
isCurrentConversationBindingSupported: ({ accountId }) => isSlackWorkspaceInstallation(accountId)
|
|
1599
|
+
};
|
|
1610
1600
|
const slackRouteBindingConfigCache = /* @__PURE__ */ new WeakMap();
|
|
1611
1601
|
function normalizeSlackRouteBindingPeer(peer) {
|
|
1612
1602
|
const rawId = peer.id.trim();
|
|
@@ -1743,8 +1733,7 @@ function applySlackConfiguredBindingRoute(params, runtimeRoute) {
|
|
|
1743
1733
|
route: runtimeRoute.boundSessionKey ? runtimeRoute.route : configuredRoute?.route ?? runtimeRoute.route
|
|
1744
1734
|
};
|
|
1745
1735
|
}
|
|
1746
|
-
|
|
1747
|
-
//#region extensions/slack/src/monitor/workspace-routing.ts
|
|
1736
|
+
// extensions/slack/src/monitor/workspace-routing.ts
|
|
1748
1737
|
function resolveSlackAgentRoute(params) {
|
|
1749
1738
|
const route = resolveAgentRoute({
|
|
1750
1739
|
cfg: params.cfg,
|
|
@@ -1778,8 +1767,7 @@ function qualifySlackRoutePeerId(params) {
|
|
|
1778
1767
|
function qualifySlackConversationId(conversationId, eventScope) {
|
|
1779
1768
|
return eventScope ? `team:${encodeURIComponent(eventScope.teamId)}:${conversationId}` : conversationId;
|
|
1780
1769
|
}
|
|
1781
|
-
|
|
1782
|
-
//#region extensions/slack/src/errors.ts
|
|
1770
|
+
// extensions/slack/src/errors.ts
|
|
1783
1771
|
const NO_ERROR_DETAIL = "no error detail";
|
|
1784
1772
|
const MAX_ERROR_CAUSE_DEPTH = 32;
|
|
1785
1773
|
function getSlackWebApiErrorData(error) {
|
|
@@ -1787,6 +1775,21 @@ function getSlackWebApiErrorData(error) {
|
|
|
1787
1775
|
const data = error.data;
|
|
1788
1776
|
return data && typeof data === "object" ? data : void 0;
|
|
1789
1777
|
}
|
|
1778
|
+
function enrichSlackWebApiError(err) {
|
|
1779
|
+
if (!(err instanceof Error)) return err;
|
|
1780
|
+
const data = getSlackWebApiErrorData(err);
|
|
1781
|
+
const code = normalizeOptionalString(data?.error);
|
|
1782
|
+
if (!code) return err;
|
|
1783
|
+
const details = [];
|
|
1784
|
+
const needed = normalizeOptionalString(data?.needed);
|
|
1785
|
+
if (needed) details.push(`needed: ${needed}`);
|
|
1786
|
+
const scopes = normalizeTrimmedStringList(data?.response_metadata?.scopes);
|
|
1787
|
+
if (scopes.length) details.push(`granted: ${scopes.join(", ")}`);
|
|
1788
|
+
const acceptedScopes = normalizeTrimmedStringList(data?.response_metadata?.acceptedScopes);
|
|
1789
|
+
if (acceptedScopes.length) details.push(`accepted: ${acceptedScopes.join(", ")}`);
|
|
1790
|
+
const message = `${err.message || `An API error occurred: ${code}`}${details.length ? ` (${details.join("; ")})` : ""}`;
|
|
1791
|
+
return message === err.message ? err : new Error(message);
|
|
1792
|
+
}
|
|
1790
1793
|
function addStringDetail(details, label, value) {
|
|
1791
1794
|
if (typeof value !== "string") return;
|
|
1792
1795
|
const trimmed = redactSensitiveText(value.trim());
|
|
@@ -1886,8 +1889,7 @@ function formatSlackErrorWithCauses(error, fallback, seen) {
|
|
|
1886
1889
|
function formatSlackError(error, fallback = NO_ERROR_DETAIL) {
|
|
1887
1890
|
return formatSlackErrorWithCauses(error, fallback, /* @__PURE__ */ new Set());
|
|
1888
1891
|
}
|
|
1889
|
-
|
|
1890
|
-
//#region extensions/slack/src/channel-policy-state.ts
|
|
1892
|
+
// extensions/slack/src/channel-policy-state.ts
|
|
1891
1893
|
const slackChannelPolicyBindings = resolveGlobalMap(Symbol.for("openclaw.slack.channel-policy-bindings"), "close-and-restart");
|
|
1892
1894
|
function setSlackChannelPolicyBindings(accountId, bindings) {
|
|
1893
1895
|
slackChannelPolicyBindings.set(normalizeAccountId(accountId), new Map([...bindings].map(([key, id]) => [key, id.toUpperCase()])));
|
|
@@ -1897,8 +1899,7 @@ function getSlackChannelPolicyKeys(accountId, channelId) {
|
|
|
1897
1899
|
if (!id) return [];
|
|
1898
1900
|
return [...slackChannelPolicyBindings.get(normalizeAccountId(accountId)) ?? []].filter(([, resolvedId]) => resolvedId === id).map(([key]) => key);
|
|
1899
1901
|
}
|
|
1900
|
-
|
|
1901
|
-
//#region extensions/slack/src/group-policy.ts
|
|
1902
|
+
// extensions/slack/src/group-policy.ts
|
|
1902
1903
|
function hasPotentialSlackNamedPolicy(params) {
|
|
1903
1904
|
if (params.allowNameMatching !== true) return false;
|
|
1904
1905
|
return Object.entries(params.channels ?? {}).some(([key, entry]) => {
|
|
@@ -1959,8 +1960,7 @@ function resolveSlackGroupToolPolicy(params) {
|
|
|
1959
1960
|
senderE164: params.senderE164
|
|
1960
1961
|
});
|
|
1961
1962
|
}
|
|
1962
|
-
|
|
1963
|
-
//#region extensions/slack/src/monitor/ingress-identity.ts
|
|
1963
|
+
// extensions/slack/src/monitor/ingress-identity.ts
|
|
1964
1964
|
const SLACK_USER_NAME_KIND = "plugin:slack-user-name";
|
|
1965
1965
|
const SLACK_WORKSPACE_USER_ID_KIND = "plugin:slack-workspace-user-id";
|
|
1966
1966
|
function normalizeSlackUserId(raw) {
|
|
@@ -2057,8 +2057,7 @@ function createSlackIngressSubject(params) {
|
|
|
2057
2057
|
}
|
|
2058
2058
|
};
|
|
2059
2059
|
}
|
|
2060
|
-
|
|
2061
|
-
//#region extensions/slack/src/session-status.ts
|
|
2060
|
+
// extensions/slack/src/session-status.ts
|
|
2062
2061
|
const MISSING_STOP_SUBSCRIPTION = "missing_agent_session_stopped_event_subscription";
|
|
2063
2062
|
let warnedMissingStopSubscription = false;
|
|
2064
2063
|
async function setSlackSessionStatus(params) {
|
|
@@ -2099,8 +2098,7 @@ async function renameSlackSession(params) {
|
|
|
2099
2098
|
return false;
|
|
2100
2099
|
}
|
|
2101
2100
|
}
|
|
2102
|
-
|
|
2103
|
-
//#region extensions/slack/src/probe.ts
|
|
2101
|
+
// extensions/slack/src/probe.ts
|
|
2104
2102
|
var probe_exports = /* @__PURE__ */ __exportAll({ probeSlack: () => probeSlack });
|
|
2105
2103
|
async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
2106
2104
|
const dispatcher = createSlackProbeDispatcher(timeoutMs);
|
|
@@ -2160,5 +2158,4 @@ async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
|
2160
2158
|
await dispatcher.destroy().catch(() => void 0);
|
|
2161
2159
|
}
|
|
2162
2160
|
}
|
|
2163
|
-
|
|
2164
|
-
export { decodeSlackApprovalAction as $, resolveSlackExecApprovalTarget as $t, isSlackInvalidBlocksResponse as A, resolveSessionSlackOriginTarget as At, SLACK_REPLY_LINK_ACTION_ID as B, allowListMatches as Bt, SLACK_MALFORMED_NATIVE_DATA_FALLBACK as C, markdownToSlackMrkdwnChunks as Ct, createSlackNativeDataBaseTextConsumer as D, isSlackPluginApprovalRequest as Dt, buildSlackNativeDataAccessibilityText as E, isSlackAnyNativeApprovalClientEnabled as Et, truncateSlackText as F, shouldHandleSlackPluginViaForwardingSession as Ft, isSlackCallbackActionId as G, resolveSlackUserAllowed as Gt, SLACK_SELECT_ACTION_IDS as H, normalizeSlackSlug as Ht, truncateSlackTextByUtf8Bytes as I, slackTargetsMatch as It, resolveSlackQuestionActionIds as J, registerSlackInstallationState as Jt, isSlackQuestionActionForQuestion as K, getSlackInstallationKind as Kt, SLACK_BUTTON_ACTION_IDS as L, getSlackApprovalApproversForTeam as Lt, renderSlackNativeDataPlainTextBlock as M, resolveSlackFallbackOriginTarget as Mt, stripSlackNativeDataBlocks as N, resolveTurnSourceSlackOriginTarget as Nt, hasSlackNativeDataBlock as O, normalizeSlackForwardTarget as Ot, countSlackTextUtf8Bytes as P, shouldHandleSlackNativeApprovalRequest as Pt, SLACK_APPROVAL_HEADER_BLOCK_ID as Q, normalizeSlackApproverId as Qt, SLACK_QUESTION_FINALIZATION_BLOCKS as R, isSlackPluginApprovalAuthorizedSender as Rt, assertSlackDetachedTargetAllowed as S, chunkSlackMrkdwnText as St, appendSlackNativeDataPlainTextFallback as T, escapeSlackMrkdwn as Tt, SLACK_SESSION_LINK_ACTION_ID as U, resolveSlackAllowListMatch as Ut, SLACK_REPLY_SELECT_ACTION_ID as V, normalizeSlackAllowOwnerEntry as Vt, isSlackApprovalActionId as W, resolveSlackUserAllowListForTeam as Wt, encodeSlackQuestionAction as X, isSlackExecApprovalAuthorizedSender as Xt, decodeSlackQuestionAction as Y, getSlackExecApprovalApprovers as Yt, resolveSlackQuestionAction as Z, isSlackExecApprovalClientEnabled as Zt, qualifySlackRoutePeerId as _, renderSlackMessagePresentationFallbackText as _t, SLACK_USER_NAME_KIND as a, buildSlackCompleteBlocksFallbackText as at, resolveSlackConversationBindingRoute as b, SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT as bt, buildSlackChannelIdCandidates as c, hasSlackDataVisualizationBlock as ct, resolveSlackGroupRequireMention as d, countSlackDataTableBlocksCellCharacters as dt, shouldSuppressLocalSlackExecApprovalPrompt as en, encodeSlackApprovalAction as et, resolveSlackGroupToolPolicy as f, countSlackDataTableCellCharacters as ft, qualifySlackConversationId as g, renderSlackMessagePresentationChartFallbackText as gt, getSlackWebApiErrorData as h, SLACK_SECTION_TEXT_MAX as ht, setSlackSessionStatus as i, resolveSlackThreadTsFromContext as in, buildSlackBlocksFallbackText as it, isSlackNativeResponseUrlRejection as j, resolveSlackApproverDmTargets as jt, isSlackInvalidBlocksError as k, normalizeSlackOriginTarget as kt, buildSlackChannelPolicyScope as l, SLACK_DATA_TABLE_AGGREGATE_CELL_CHARACTERS_MAX as lt, formatSlackError as m, SLACK_PRESENTATION_CAPABILITIES as mt, probe_exports as n, SLACK_PRIVATE_ACTION_DELIVERY_RESULT as nn, parseSlackBlocksInput as nt, createSlackIngressSubject as o, renderSlackBlockFallbackText as ot, setSlackChannelPolicyBindings as p, SLACK_BUTTON_VALUE_MAX as pt, isSlackQuestionActionId as q, isSlackWorkspaceInstallation as qt, renameSlackSession as r, resolveSlackAutoThreadId as rn, validateSlackBlocksArray as rt, slackIngressIdentity as s, buildSlackDataVisualizationBlock as st, probeSlack as t, resolvePluginApprovalSlackApprovers as tn, SLACK_MAX_BLOCKS as tt, hasPotentialSlackNamedPolicy as u, buildSlackDataTableBlock as ut, resolveSlackAgentRoute as v, SLACK_EDIT_TEXT_MAX_BYTES as vt, appendSlackNativeDataFallbackText as w, normalizeSlackOutboundText as wt, resolveSlackConversationBindingRouteAsync as x, SLACK_TEXT_LIMIT as xt, normalizeSlackRouteBindingConfig as y, SLACK_MESSAGE_TEXT_HARD_LIMIT as yt, SLACK_REPLY_BUTTON_ACTION_ID as z, resolveSlackApprovalTeamId as zt };
|
|
2161
|
+
export { encodeSlackQuestionAction as $, isSlackExecApprovalAuthorizedSender as $t, createSlackNativeDataBaseTextConsumer as A, isSlackPluginApprovalRequest as At, SLACK_BUTTON_ACTION_IDS as B, getSlackApprovalApproversForTeam as Bt, resolveSlackConversationBindingRouteAsync as C, SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT as Ct, appendSlackNativeDataFallbackText as D, normalizeSlackOutboundText as Dt, SLACK_MALFORMED_NATIVE_DATA_FALLBACK as E, markdownToSlackMrkdwnChunks as Et, renderSlackNativeDataPlainTextBlock as F, resolveSlackFallbackOriginTarget as Ft, SLACK_SELECT_ACTION_IDS as G, normalizeSlackSlug as Gt, SLACK_REPLY_BUTTON_ACTION_ID as H, resolveSlackApprovalTeamId as Ht, stripSlackNativeDataBlocks as I, resolveTurnSourceSlackOriginTarget as It, isSlackCallbackActionId as J, resolveSlackUserAllowed as Jt, SLACK_SESSION_LINK_ACTION_ID as K, resolveSlackAllowListMatch as Kt, countSlackTextUtf8Bytes as L, shouldHandleSlackNativeApprovalRequest as Lt, isSlackInvalidBlocksError as M, normalizeSlackOriginTarget as Mt, isSlackInvalidBlocksResponse as N, resolveSessionSlackOriginTarget as Nt, appendSlackNativeDataPlainTextFallback as O, escapeSlackMrkdwn as Ot, isSlackNativeResponseUrlRejection as P, resolveSlackApproverDmTargets as Pt, decodeSlackQuestionAction as Q, getSlackExecApprovalApprovers as Qt, truncateSlackText as R, shouldHandleSlackPluginViaForwardingSession as Rt, resolveSlackConversationBindingRoute as S, SLACK_MESSAGE_TEXT_HARD_LIMIT as St, assertSlackDetachedTargetAllowed as T, chunkSlackMrkdwnText as Tt, SLACK_REPLY_LINK_ACTION_ID as U, allowListMatches as Ut, SLACK_QUESTION_FINALIZATION_BLOCKS as V, isSlackPluginApprovalAuthorizedSender as Vt, SLACK_REPLY_SELECT_ACTION_ID as W, normalizeSlackAllowOwnerEntry as Wt, isSlackQuestionActionId as X, getSlackInstallationKind as Xt, isSlackQuestionActionForQuestion as Y, captureSlackWorkspaceInstallation as Yt, resolveSlackQuestionActionIds as Z, registerSlackInstallationState as Zt, getSlackWebApiErrorData as _, SLACK_PRESENTATION_CAPABILITIES as _t, SLACK_USER_NAME_KIND as a, SLACK_PRIVATE_ACTION_DELIVERY_RESULT as an, parseSlackBlocksInput as at, resolveSlackAgentRoute as b, renderSlackMessagePresentationFallbackText as bt, slackIngressIdentity as c, buildSlackCompleteBlocksFallbackText as ct, hasPotentialSlackNamedPolicy as d, hasSlackDataVisualizationBlock as dt, isSlackExecApprovalClientEnabled as en, resolveSlackQuestionAction as et, resolveSlackGroupRequireMention as f, SLACK_DATA_TABLE_AGGREGATE_CELL_CHARACTERS_MAX as ft, formatSlackError as g, SLACK_BUTTON_VALUE_MAX as gt, enrichSlackWebApiError as h, countSlackDataTableCellCharacters as ht, setSlackSessionStatus as i, resolvePluginApprovalSlackApprovers as in, SLACK_MAX_BLOCKS as it, hasSlackNativeDataBlock as j, normalizeSlackForwardTarget as jt, buildSlackNativeDataAccessibilityText as k, isSlackAnyNativeApprovalClientEnabled as kt, buildSlackChannelIdCandidates as l, renderSlackBlockFallbackText as lt, setSlackChannelPolicyBindings as m, countSlackDataTableBlocksCellCharacters as mt, probe_exports as n, resolveSlackExecApprovalTarget as nn, decodeSlackApprovalAction as nt, createSlackIngressSubject as o, resolveSlackAutoThreadId as on, validateSlackBlocksArray as ot, resolveSlackGroupToolPolicy as p, buildSlackDataTableBlock as pt, isSlackApprovalActionId as q, resolveSlackUserAllowListForTeam as qt, renameSlackSession as r, shouldSuppressLocalSlackExecApprovalPrompt as rn, encodeSlackApprovalAction as rt, normalizeSlackStableEntry as s, resolveSlackThreadTsFromContext as sn, buildSlackBlocksFallbackText as st, probeSlack as t, normalizeSlackApproverId as tn, SLACK_APPROVAL_HEADER_BLOCK_ID as tt, buildSlackChannelPolicyScope as u, buildSlackDataVisualizationBlock as ut, qualifySlackConversationId as v, SLACK_SECTION_TEXT_MAX as vt, slackConversationBindings as w, SLACK_TEXT_LIMIT as wt, normalizeSlackRouteBindingConfig as x, SLACK_EDIT_TEXT_MAX_BYTES as xt, qualifySlackRoutePeerId as y, renderSlackMessagePresentationChartFallbackText as yt, truncateSlackTextByUtf8Bytes as z, slackTargetsMatch as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ot as escapeSlackMrkdwn, V as SLACK_QUESTION_FINALIZATION_BLOCKS, Y as isSlackQuestionActionForQuestion, Z as resolveSlackQuestionActionIds, ct as buildSlackCompleteBlocksFallbackText } from "./probe-BHqvMbno.mjs";
|
|
2
2
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
3
|
-
|
|
3
|
+
// extensions/slack/src/question-delivery.ts
|
|
4
4
|
function registerSlackQuestionDelivery(params) {
|
|
5
5
|
const blocks = params.result.meta?.[SLACK_QUESTION_FINALIZATION_BLOCKS];
|
|
6
6
|
if (!blocks || resolveSlackQuestionActionIds(blocks, params.questionId).length === 0) return;
|
|
@@ -35,5 +35,4 @@ function registerSlackQuestionDelivery(params) {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { registerSlackQuestionDelivery as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as SLACK_SOCKET_RECONNECT_POLICY, d as parseSlackMessageEvent, f as requireSlackMessageEvent } from "./monitor-
|
|
1
|
+
import { g as formatSlackError } from "./probe-BHqvMbno.mjs";
|
|
2
|
+
import { S as SLACK_SOCKET_RECONNECT_POLICY, d as parseSlackMessageEvent, f as requireSlackMessageEvent } from "./monitor-C4cpeg1H.mjs";
|
|
3
3
|
import { asOptionalRecord, normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { createNodeProxyAgent } from "openclaw/plugin-sdk/fetch-runtime";
|
|
6
6
|
import { isIP } from "node:net";
|
|
7
7
|
import { rawDataToString } from "openclaw/plugin-sdk/webhook-ingress";
|
|
8
8
|
import { WebSocket, startWebSocketKeepalive } from "openclaw/plugin-sdk/websocket-runtime";
|
|
9
|
-
|
|
9
|
+
// extensions/slack/src/monitor/relay-source.ts
|
|
10
10
|
const SLACK_RELAY_ROUTE_KINDS = /* @__PURE__ */ new Set([
|
|
11
11
|
"user_group",
|
|
12
12
|
"thread_affinity",
|
|
@@ -253,5 +253,4 @@ function formatRelayClose(code, reason) {
|
|
|
253
253
|
const text = reason.toString("utf8");
|
|
254
254
|
return text ? `Slack relay websocket closed (${code} ${text})` : `Slack relay websocket closed (${code})`;
|
|
255
255
|
}
|
|
256
|
-
//#endregion
|
|
257
256
|
export { SLACK_RELAY_MAX_PAYLOAD_BYTES, SlackRelayMalformedFrameError, buildRelayWebSocketOptions, buildRelayWebSocketUrl, monitorSlackRelaySource, parseRelayFrame, requireSlackMessageEvent };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as resolveSlackReplyThreadTs } from "./thread-ts-
|
|
3
|
-
import { a as resolveSlackReplyBlockResolution, n as iterateSlackReplyDeliveryMessages, t as hasSlackReplyStructuredContent } from "./reply-blocks-
|
|
4
|
-
import { g as chunkSlackTextAtHardLimit, h as buildSlackNativeDataDeliveryPlan, i as updateMessageSlack, t as sendMessageSlack } from "./send-
|
|
5
|
-
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./monitor-
|
|
6
|
-
import { t as registerSlackQuestionDelivery } from "./question-delivery-
|
|
1
|
+
import { Et as markdownToSlackMrkdwnChunks, N as isSlackInvalidBlocksResponse, P as isSlackNativeResponseUrlRejection, j as hasSlackNativeDataBlock, wt as SLACK_TEXT_LIMIT } from "./probe-BHqvMbno.mjs";
|
|
2
|
+
import { n as resolveSlackReplyThreadTs } from "./thread-ts-47Au2-Yn.mjs";
|
|
3
|
+
import { a as resolveSlackReplyBlockResolution, n as iterateSlackReplyDeliveryMessages, t as hasSlackReplyStructuredContent } from "./reply-blocks-CFy-O-2B.mjs";
|
|
4
|
+
import { g as chunkSlackTextAtHardLimit, h as buildSlackNativeDataDeliveryPlan, i as updateMessageSlack, t as sendMessageSlack } from "./send-kGJWQtLk.mjs";
|
|
5
|
+
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./monitor-C4cpeg1H.mjs";
|
|
6
|
+
import { t as registerSlackQuestionDelivery } from "./question-delivery-BGwm5Zmr.mjs";
|
|
7
7
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
8
8
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
9
9
|
import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -15,7 +15,7 @@ import { resolveOutboundMediaAccessForConfig } from "openclaw/plugin-sdk/outboun
|
|
|
15
15
|
import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
|
|
16
16
|
import { createAcceptedChannelDeliveryResult, createChannelPartialDeliveryError, getGroupThreadDeliverySession } from "openclaw/plugin-sdk/channel-inbound";
|
|
17
17
|
import { buildCanonicalSentMessageHookContext, createInternalHookEvent, fireAndForgetHook, toInternalMessageSentContext, toPluginMessageContext, toPluginMessageSentEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
|
|
18
|
-
|
|
18
|
+
// extensions/slack/src/message-sent-hook.ts
|
|
19
19
|
function emitSlackMessageSentHooks(params) {
|
|
20
20
|
const hookRunner = getGlobalHookRunner();
|
|
21
21
|
const enabled = hookRunner?.hasHooks("message_sent") ?? false;
|
|
@@ -36,8 +36,7 @@ function emitSlackMessageSentHooks(params) {
|
|
|
36
36
|
if (enabled) fireAndForgetHook(Promise.resolve(hookRunner.runMessageSent(toPluginMessageSentEvent(canonical), toPluginMessageContext(canonical))), "slack: message_sent plugin hook failed");
|
|
37
37
|
if (params.sessionKeyForInternalHooks) fireAndForgetHook(triggerInternalHook(createInternalHookEvent("message", "sent", params.sessionKeyForInternalHooks, toInternalMessageSentContext(canonical))), "slack: message:sent internal hook failed");
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
//#region extensions/slack/src/monitor/replies.ts
|
|
39
|
+
// extensions/slack/src/monitor/replies.ts
|
|
41
40
|
function compactSlackResponseUrlFallback(messages) {
|
|
42
41
|
if (messages.length <= 1) return [...messages];
|
|
43
42
|
if (messages.every((message) => !message.blocks?.length)) return chunkSlackTextAtHardLimit(messages.map((message) => message.text).join("")).map((text) => ({
|
|
@@ -439,5 +438,4 @@ async function deliverSlackSlashReplies(params) {
|
|
|
439
438
|
});
|
|
440
439
|
}
|
|
441
440
|
}
|
|
442
|
-
//#endregion
|
|
443
441
|
export { emitSlackMessageSentHooks as a, sanitizeSlackMonitorReplyPayload as i, deliverReplies as n, deliverSlackSlashReplies as r, createSlackReplyDeliveryPlan as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as encodeSlackQuestionAction, B as SLACK_BUTTON_ACTION_IDS, D as appendSlackNativeDataFallbackText, Et as markdownToSlackMrkdwnChunks, G as SLACK_SELECT_ACTION_IDS, Ot as escapeSlackMrkdwn, R as truncateSlackText, Tt as chunkSlackMrkdwnText, at as parseSlackBlocksInput, ct as buildSlackCompleteBlocksFallbackText, dt as hasSlackDataVisualizationBlock, ht as countSlackDataTableCellCharacters, j as hasSlackNativeDataBlock, k as buildSlackNativeDataAccessibilityText, lt as renderSlackBlockFallbackText, mt as countSlackDataTableBlocksCellCharacters, pt as buildSlackDataTableBlock, rt as encodeSlackApprovalAction, st as buildSlackBlocksFallbackText, ut as buildSlackDataVisualizationBlock, vt as SLACK_SECTION_TEXT_MAX, yt as renderSlackMessagePresentationChartFallbackText } from "./probe-BHqvMbno.mjs";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
4
4
|
import { legacyInteractiveReplyToPresentation, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
|
|
5
5
|
import { resolveAskUserQuestionOptionIndex, resolveAskUserQuestionOptionIndices, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
6
6
|
import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
7
|
-
|
|
7
|
+
// extensions/slack/src/authored-text.ts
|
|
8
8
|
function isSlackAuthoredTextRepresentedInFragments(plan, fragments) {
|
|
9
9
|
if (plan.length === 0) return false;
|
|
10
10
|
if (fragments.some((_, start) => plan.every((text, index) => text === fragments[start + index]))) return true;
|
|
@@ -30,8 +30,7 @@ function resolveSlackAuthoredTextPlacement(params) {
|
|
|
30
30
|
const fragments = (params.renderedTextFragments ?? params.interactive?.blocks.flatMap((block) => block.type === "text" ? [block.text] : []) ?? []).map((fragment) => fragment?.trim() ?? null).filter((fragment) => fragment !== "");
|
|
31
31
|
return isSlackAuthoredTextRepresentedInFragments((params.authoredChunks ?? [text]).map((fragment) => fragment.trim()).filter(Boolean), fragments) ? "blocks" : "outside-blocks";
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
//#region extensions/slack/src/blocks-render.ts
|
|
33
|
+
// extensions/slack/src/blocks-render.ts
|
|
35
34
|
const SLACK_BUTTON_URL_MAX = 3e3;
|
|
36
35
|
function buildSlackPlainText(text, maxLength) {
|
|
37
36
|
return {
|
|
@@ -285,8 +284,7 @@ function compileSlackPresentationBlocks(presentation, options, requireComplete)
|
|
|
285
284
|
}
|
|
286
285
|
return blocks;
|
|
287
286
|
}
|
|
288
|
-
|
|
289
|
-
//#region extensions/slack/src/reply-blocks.ts
|
|
287
|
+
// extensions/slack/src/reply-blocks.ts
|
|
290
288
|
function normalizeSlackReplyPayload(payload) {
|
|
291
289
|
const previousSlackData = asOptionalRecord(payload.channelData?.slack) ?? {};
|
|
292
290
|
const { authoredPresentationText: _authoredPresentationText, ...slackData } = previousSlackData;
|
|
@@ -642,5 +640,4 @@ function resolveSlackReplyBlocks(payload) {
|
|
|
642
640
|
const segments = compileSlackReplyBlockSegments(payload, readSlackChannelBlocks(payload), normalizeMessagePresentation(payload.presentation));
|
|
643
641
|
return segments.length === 1 && segments[0]?.kind === "blocks" ? segments[0].blocks : void 0;
|
|
644
642
|
}
|
|
645
|
-
//#endregion
|
|
646
643
|
export { resolveSlackReplyBlockResolution as a, resolveSlackReplyRenderPlan as c, resolveSlackAuthoredTextPlacement as d, prepareSlackReply as i, buildSlackInteractiveBlocks as l, iterateSlackReplyDeliveryMessages as n, resolveSlackReplyBlocks as o, normalizeSlackReplyPayload as r, resolveSlackReplyDeliveryMessages as s, hasSlackReplyStructuredContent as t, buildSlackPresentationBlocks as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-
|
|
3
|
-
import { n as fetchSlackChannelListPage, r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
|
+
import { n as fetchSlackChannelListPage, r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/slack/src/resolve-channels.ts
|
|
6
6
|
var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveSlackChannelAllowlist: () => resolveSlackChannelAllowlist });
|
|
7
7
|
function parseSlackChannelMention(raw) {
|
|
8
8
|
const trimmed = raw.trim();
|
|
@@ -64,5 +64,4 @@ async function resolveSlackChannelAllowlist(params) {
|
|
|
64
64
|
};
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
//#endregion
|
|
68
67
|
export { resolve_channels_exports as n, resolveSlackChannelAllowlist as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-
|
|
3
|
-
import { r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
|
+
import { r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/slack/src/resolve-users.ts
|
|
6
6
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveSlackUserAllowlist: () => resolveSlackUserAllowlist });
|
|
7
7
|
function parseSlackUserInput(raw) {
|
|
8
8
|
const trimmed = raw.trim();
|
|
@@ -73,5 +73,4 @@ async function resolveSlackUserAllowlist(params) {
|
|
|
73
73
|
return result;
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { resolve_users_exports as n, resolveSlackUserAllowlist as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,5 +24,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
-
//#endregion
|
|
28
27
|
export { __reExport as n, __exportAll as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
// extensions/slack/src/runtime.ts
|
|
3
3
|
const { setRuntime: setSlackRuntime, tryGetRuntime: getOptionalSlackRuntime, getRuntime: getSlackRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "slack",
|
|
5
5
|
errorMessage: "Slack runtime not initialized"
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { getSlackRuntime as n, setSlackRuntime as r, getOptionalSlackRuntime as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as createSlackReadClient } from "./cursor-pages-
|
|
1
|
+
import { g as formatSlackError } from "./probe-BHqvMbno.mjs";
|
|
2
|
+
import { i as createSlackReadClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
3
3
|
import { isRecord, normalizeOptionalString, normalizeTrimmedStringList, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/slack/src/scopes.ts
|
|
5
5
|
function collectScopes(value, into) {
|
|
6
6
|
if (Array.isArray(value) || typeof value === "string") {
|
|
7
7
|
for (const scope of normalizeTrimmedStringList(typeof value === "string" ? value.split(/[,\s]+/) : value)) into.push(scope);
|
|
@@ -59,5 +59,4 @@ async function fetchSlackScopes(token, timeoutMs) {
|
|
|
59
59
|
error: errors.length > 0 ? errors.join(" | ") : "no scopes returned"
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
//#endregion
|
|
63
62
|
export { fetchSlackScopes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-
|
|
1
|
+
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-35y0-Hso.mjs";
|
|
2
2
|
import { collectConditionalChannelFieldAssignments, collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, createChannelSecretContract, hasOwnProperty, isRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
3
|
-
|
|
3
|
+
// extensions/slack/src/secret-contract.ts
|
|
4
4
|
const channelSecrets = createChannelSecretContract({
|
|
5
5
|
channelKey: "slack",
|
|
6
6
|
account: [
|
|
@@ -63,5 +63,4 @@ const channelSecrets = createChannelSecretContract({
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
66
|
-
//#endregion
|
|
67
66
|
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|