@openclaw/slack 2026.5.16-beta.2 → 2026.5.16-beta.4
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/{action-runtime-p39JLqwf.js → action-runtime-0RLkDKyA.js} +1 -1
- package/dist/action-runtime.runtime-DpzOXqtk.js +2 -0
- package/dist/{actions-BCRbHv1Q.js → actions-Chs6DbrP.js} +1 -1
- package/dist/{actions.runtime-CpywQR3D.js → actions.runtime-BsbIDsmT.js} +1 -1
- package/dist/api.js +5 -5
- package/dist/{approval-handler.runtime-DXrdRbkT.js → approval-handler.runtime-BmCbRrbT.js} +1 -1
- package/dist/{channel-CVSopl66.js → channel-DUS8ZO45.js} +16 -12
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-DknBgufI.js → channel.setup-qGOC05UK.js} +2 -2
- package/dist/inbound-contract-test-api.js +2 -2
- package/dist/{monitor-CdVxsuHi.js → monitor-BhEzWuv0.js} +3 -3
- package/dist/{outbound-adapter-CHm6e-0Q.js → outbound-adapter-BoDXPksS.js} +1 -1
- package/dist/outbound-payload-test-api.js +1 -1
- package/dist/{outbound-payload.test-harness-C0CW7_CE.js → outbound-payload.test-harness-C7Izm95Q.js} +1 -1
- package/dist/{pipeline.runtime-CakcaQh9.js → pipeline.runtime-Bq754VH8.js} +41 -26
- package/dist/{prepare-DSRUr44d.js → prepare-BcznR9ok.js} +136 -24
- package/dist/{prepare.test-helpers-CU1qB54Q.js → prepare.test-helpers-D807wdul.js} +1 -1
- package/dist/{provider-bKg1hkf5.js → provider-BFnE2bgI.js} +118 -4
- package/dist/{replies-Fg1T3ZzU.js → replies-2ve_YcHy.js} +8 -5
- package/dist/{room-context-Cd8jFpS-.js → room-context-BI26wVBb.js} +83 -2
- package/dist/runtime-api.js +5 -5
- package/dist/{send-CxXFbqN1.js → send-C5PzphgC.js} +5 -0
- package/dist/send.runtime-Bgf0P22e.js +2 -0
- package/dist/send.runtime-DsEXD6MR.js +2 -0
- package/dist/{setup-core-B7pou7oe.js → setup-core-az0LCrNr.js} +21 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-D6LLzeRz.js → setup-surface-Cdq_mfjx.js} +2 -2
- package/dist/{shared-7Vi9j4aV.js → shared-BuNoOmas.js} +6 -2
- package/dist/{slash-dispatch.runtime-Cg7uU92H.js → slash-dispatch.runtime-CcbE1HtP.js} +1 -1
- package/dist/test-api.js +6 -6
- package/package.json +4 -4
- package/dist/action-runtime.runtime-BzrPV3EA.js +0 -2
- package/dist/send.runtime-BHCPpSj_.js +0 -2
- package/dist/send.runtime-CDG5AgU3.js +0 -2
|
@@ -28,7 +28,7 @@ function sameSlackChannelTarget(targetChannel, currentChannelId) {
|
|
|
28
28
|
let slackActionsRuntimePromise;
|
|
29
29
|
let slackAccountsRuntimePromise;
|
|
30
30
|
function loadSlackActionsRuntime() {
|
|
31
|
-
slackActionsRuntimePromise ??= import("./actions.runtime-
|
|
31
|
+
slackActionsRuntimePromise ??= import("./actions.runtime-BsbIDsmT.js");
|
|
32
32
|
return slackActionsRuntimePromise;
|
|
33
33
|
}
|
|
34
34
|
function loadSlackAccountsRuntime() {
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
|
2
2
|
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-yk5K3wQU.js";
|
|
3
3
|
import { a as validateSlackBlocksArray, o as SLACK_TEXT_LIMIT, s as truncateSlackText } from "./thread-ts-As_dcNbD.js";
|
|
4
4
|
import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-C_IaJbi5.js";
|
|
5
|
-
import { c as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-
|
|
5
|
+
import { c as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-C5PzphgC.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
8
8
|
import { logVerbose, logVerbose as logVerbose$1 } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-
|
|
1
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-Chs6DbrP.js";
|
|
2
2
|
export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, sendSlackMessage, unpinSlackMessage };
|
package/dist/api.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resol
|
|
|
2
2
|
import { t as inspectSlackAccount } from "./account-inspect-BJyQLSkN.js";
|
|
3
3
|
import { i as resolveSlackChannelId, n as normalizeSlackMessagingTarget, r as parseSlackTarget, t as looksLikeSlackTargetId } from "./target-parsing-CQmv-iSm.js";
|
|
4
4
|
import "./targets-B1tYCAr6.js";
|
|
5
|
-
import { i as resolveSlackChannelType, n as buildSlackThreadingToolContext, o as resolveSlackAutoThreadId, r as __resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-
|
|
5
|
+
import { i as resolveSlackChannelType, n as buildSlackThreadingToolContext, o as resolveSlackAutoThreadId, r as __resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-DUS8ZO45.js";
|
|
6
6
|
import { n as resolveSlackGroupRequireMention, r as resolveSlackGroupToolPolicy } from "./reply-blocks-BFaJ_ejG.js";
|
|
7
7
|
import { n as buildSlackPresentationBlocks, t as buildSlackInteractiveBlocks } from "./blocks-render-BAVfd6r0.js";
|
|
8
8
|
import { a as validateSlackBlocksArray, i as parseSlackBlocksInput, r as SLACK_MAX_BLOCKS } from "./thread-ts-As_dcNbD.js";
|
|
@@ -10,12 +10,12 @@ import { n as extractSlackToolSend, r as listSlackMessageActions } from "./messa
|
|
|
10
10
|
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-BSg5hXhj.js";
|
|
11
11
|
import { a as getSlackWriteClient, c as resolveSlackWebClientOptions, i as createSlackWriteClient, l as resolveSlackWriteClientOptions, n as createSlackTokenCacheKey, o as SLACK_DEFAULT_RETRY_OPTIONS, r as createSlackWebClient, s as SLACK_WRITE_RETRY_OPTIONS, t as clearSlackWriteClientCacheForTest } from "./client-C_IaJbi5.js";
|
|
12
12
|
import { a as normalizeSlackSlug, i as normalizeSlackAllowOwnerEntry, n as normalizeAllowList, o as resolveSlackAllowListMatch, r as normalizeAllowListLower, s as resolveSlackUserAllowed, t as allowListMatches } from "./allow-list-nwXs_eCP.js";
|
|
13
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
14
|
-
import { a as recordSlackThreadParticipation, n as clearSlackThreadParticipationCache, r as hasSlackThreadParticipation } from "./send-
|
|
15
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-
|
|
13
|
+
import { t as slackSetupPlugin } from "./channel.setup-qGOC05UK.js";
|
|
14
|
+
import { a as recordSlackThreadParticipation, n as clearSlackThreadParticipationCache, r as hasSlackThreadParticipation } from "./send-C5PzphgC.js";
|
|
15
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-Chs6DbrP.js";
|
|
16
16
|
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-CMvFiswf.js";
|
|
17
17
|
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-D2cWOLZV.js";
|
|
18
18
|
import { t as probeSlack } from "./probe-FL4sUJsH.js";
|
|
19
19
|
import { t as collectSlackSecurityAuditFindings } from "./security-audit-BJzADAw3.js";
|
|
20
|
-
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-
|
|
20
|
+
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-BFnE2bgI.js";
|
|
21
21
|
export { SLACK_DEFAULT_RETRY_OPTIONS, SLACK_MAX_BLOCKS, SLACK_WRITE_RETRY_OPTIONS, __resetSlackChannelTypeCacheForTest, allowListMatches, buildSlackInteractiveBlocks, buildSlackPresentationBlocks, buildSlackThreadingToolContext, clearSlackThreadParticipationCache, clearSlackWriteClientCacheForTest, collectSlackSecurityAuditFindings, compileSlackInteractiveReplies, createSlackTokenCacheKey, createSlackWebClient, createSlackWriteClient, deleteSlackMessage, downloadSlackFile, editSlackMessage, extractSlackToolSend, getSlackMemberInfo, getSlackWriteClient, handleSlackHttpRequest, hasSlackThreadParticipation, inspectSlackAccount, isSlackInteractiveRepliesEnabled, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig, listSlackEmojis, listSlackMessageActions, listSlackPins, listSlackReactions, looksLikeSlackTargetId, mergeSlackAccountConfig, normalizeAllowList, normalizeAllowListLower, normalizeSlackAllowOwnerEntry, normalizeSlackMessagingTarget, normalizeSlackSlug, normalizeSlackWebhookPath, parseSlackBlocksInput, parseSlackOptionsLine, parseSlackTarget, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, recordSlackThreadParticipation, registerSlackHttpHandler, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAllowListMatch, resolveSlackAutoThreadId, resolveSlackChannelId, resolveSlackChannelType, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackReplyToMode, resolveSlackRuntimeGroupPolicy, resolveSlackUserAllowed, resolveSlackWebClientOptions, resolveSlackWriteClientOptions, sendSlackMessage, slackPlugin, slackSetupPlugin, unpinSlackMessage, validateSlackBlocksArray };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as normalizeSlackApproverId, s as isSlackExecApprovalClientEnabled, t as resolveSlackReplyBlocks, u as shouldHandleSlackExecApprovalRequest } from "./reply-blocks-BFaJ_ejG.js";
|
|
2
2
|
import { s as truncateSlackText } from "./thread-ts-As_dcNbD.js";
|
|
3
|
-
import { t as sendMessageSlack } from "./send-
|
|
3
|
+
import { t as sendMessageSlack } from "./send-C5PzphgC.js";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
6
6
|
import { logError } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -9,8 +9,8 @@ import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveRepl
|
|
|
9
9
|
import { d as PAIRING_APPROVED_MESSAGE, m as resolveConfiguredFromRequiredCredentialStatuses, p as projectCredentialSnapshotFields, r as createSlackWebClient, u as DEFAULT_ACCOUNT_ID } from "./client-C_IaJbi5.js";
|
|
10
10
|
import { r as normalizeAllowListLower } from "./allow-list-nwXs_eCP.js";
|
|
11
11
|
import { t as getOptionalSlackRuntime } from "./runtime-DQxkf7k2.js";
|
|
12
|
-
import { i as slackSecurityAdapter, n as isSlackPluginAccountConfigured, r as slackConfigAdapter, t as createSlackPluginBase } from "./shared-
|
|
13
|
-
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-
|
|
12
|
+
import { i as slackSecurityAdapter, n as isSlackPluginAccountConfigured, r as slackConfigAdapter, t as createSlackPluginBase } from "./shared-BuNoOmas.js";
|
|
13
|
+
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-az0LCrNr.js";
|
|
14
14
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
15
15
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
16
16
|
import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing";
|
|
@@ -173,7 +173,7 @@ const slackApprovalCapability = createApproverRestrictedNativeApprovalCapability
|
|
|
173
173
|
accountId,
|
|
174
174
|
request
|
|
175
175
|
}),
|
|
176
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
176
|
+
load: async () => (await import("./approval-handler.runtime-BmCbRrbT.js")).slackApprovalNativeRuntime
|
|
177
177
|
})
|
|
178
178
|
});
|
|
179
179
|
splitChannelApprovalCapability(slackApprovalCapability);
|
|
@@ -340,7 +340,7 @@ async function handleSlackMessageAction(params) {
|
|
|
340
340
|
//#region extensions/slack/src/channel-actions.ts
|
|
341
341
|
let slackActionRuntimePromise$1;
|
|
342
342
|
async function loadSlackActionRuntime$1() {
|
|
343
|
-
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-
|
|
343
|
+
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-DpzOXqtk.js");
|
|
344
344
|
return await slackActionRuntimePromise$1;
|
|
345
345
|
}
|
|
346
346
|
function resolveSlackActionContext(params) {
|
|
@@ -449,11 +449,15 @@ function buildSlackThreadingToolContext(params) {
|
|
|
449
449
|
cfg: params.cfg,
|
|
450
450
|
accountId: params.accountId
|
|
451
451
|
}), params.context.ChatType);
|
|
452
|
-
const
|
|
453
|
-
const
|
|
452
|
+
const messageThreadTs = normalizeSlackThreadTsCandidate(params.context.MessageThreadId);
|
|
453
|
+
const transportThreadTs = normalizeSlackThreadTsCandidate(params.context.TransportThreadId);
|
|
454
|
+
const replyToThreadTs = normalizeSlackThreadTsCandidate(params.context.ReplyToId);
|
|
455
|
+
const currentMessageTs = normalizeSlackThreadTsCandidate(params.context.CurrentMessageId);
|
|
456
|
+
const currentThreadTs = messageThreadTs ?? transportThreadTs ?? replyToThreadTs;
|
|
457
|
+
const effectiveReplyToMode = messageThreadTs != null || transportThreadTs != null || replyToThreadTs != null && currentMessageTs != null && replyToThreadTs !== currentMessageTs ? "all" : configuredReplyToMode;
|
|
454
458
|
return {
|
|
455
459
|
currentChannelId: params.context.To?.startsWith("channel:") ? params.context.To.slice(8) : normalizeOptionalString(params.context.NativeChannelId),
|
|
456
|
-
currentThreadTs
|
|
460
|
+
currentThreadTs,
|
|
457
461
|
replyToMode: effectiveReplyToMode,
|
|
458
462
|
hasRepliedRef: params.hasRepliedRef
|
|
459
463
|
};
|
|
@@ -464,9 +468,9 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
|
|
|
464
468
|
const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
|
|
465
469
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
|
|
466
470
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
|
|
467
|
-
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-
|
|
471
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-Cdq_mfjx.js"));
|
|
468
472
|
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-Bvg_ZzqZ.js"));
|
|
469
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
473
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-BoDXPksS.js").then((n) => n.t));
|
|
470
474
|
async function resolveSlackHandleAction() {
|
|
471
475
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
472
476
|
}
|
|
@@ -490,11 +494,11 @@ const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./d
|
|
|
490
494
|
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-B_eKaOkE.js").then((n) => n.n));
|
|
491
495
|
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-BzBAJwvq.js").then((n) => n.n));
|
|
492
496
|
async function loadSlackActionRuntime() {
|
|
493
|
-
slackActionRuntimePromise ??= import("./action-runtime.runtime-
|
|
497
|
+
slackActionRuntimePromise ??= import("./action-runtime.runtime-DpzOXqtk.js");
|
|
494
498
|
return await slackActionRuntimePromise;
|
|
495
499
|
}
|
|
496
500
|
async function loadSlackSendRuntime() {
|
|
497
|
-
slackSendRuntimePromise ??= import("./send.runtime-
|
|
501
|
+
slackSendRuntimePromise ??= import("./send.runtime-Bgf0P22e.js");
|
|
498
502
|
return await slackSendRuntimePromise;
|
|
499
503
|
}
|
|
500
504
|
async function loadSlackProbeModule() {
|
|
@@ -502,7 +506,7 @@ async function loadSlackProbeModule() {
|
|
|
502
506
|
return await slackProbeModulePromise;
|
|
503
507
|
}
|
|
504
508
|
async function loadSlackMonitorModule() {
|
|
505
|
-
slackMonitorModulePromise ??= import("./monitor-
|
|
509
|
+
slackMonitorModulePromise ??= import("./monitor-BhEzWuv0.js").then((n) => n.t);
|
|
506
510
|
return await slackMonitorModulePromise;
|
|
507
511
|
}
|
|
508
512
|
async function loadSlackDirectoryLiveModule() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-DUS8ZO45.js";
|
|
2
2
|
export { slackPlugin };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-yk5K3wQU.js";
|
|
2
|
-
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-
|
|
2
|
+
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-az0LCrNr.js";
|
|
3
3
|
import { t as SlackChannelConfigSchema } from "./config-schema-CNRousxw.js";
|
|
4
4
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
5
5
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
6
6
|
//#region extensions/slack/src/channel.setup.ts
|
|
7
|
-
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-
|
|
7
|
+
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-Cdq_mfjx.js")).slackSetupWizard }));
|
|
8
8
|
const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
|
|
9
9
|
sectionKey: SLACK_CHANNEL,
|
|
10
10
|
listAccountIds: listSlackAccountIds,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as prepareSlackMessage } from "./prepare-
|
|
2
|
-
import { t as createInboundSlackTestContext } from "./prepare.test-helpers-
|
|
1
|
+
import { t as prepareSlackMessage } from "./prepare-BcznR9ok.js";
|
|
2
|
+
import { t as createInboundSlackTestContext } from "./prepare.test-helpers-D807wdul.js";
|
|
3
3
|
export { createInboundSlackTestContext, prepareSlackMessage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as monitorSlackProvider } from "./provider-
|
|
4
|
-
import { o as resolveSlackThreadTs } from "./replies-
|
|
2
|
+
import { h as isSlackChannelAllowedByPolicy, k as buildSlackSlashCommandMatcher } from "./room-context-BI26wVBb.js";
|
|
3
|
+
import { t as monitorSlackProvider } from "./provider-BFnE2bgI.js";
|
|
4
|
+
import { o as resolveSlackThreadTs } from "./replies-2ve_YcHy.js";
|
|
5
5
|
//#region extensions/slack/src/monitor.ts
|
|
6
6
|
var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
|
|
@@ -12,7 +12,7 @@ var outbound_adapter_exports = /* @__PURE__ */ __exportAll({ slackOutbound: () =
|
|
|
12
12
|
const SLACK_MAX_BLOCKS = 50;
|
|
13
13
|
let slackSendRuntimePromise;
|
|
14
14
|
async function loadSlackSendRuntime() {
|
|
15
|
-
slackSendRuntimePromise ??= import("./send.runtime-
|
|
15
|
+
slackSendRuntimePromise ??= import("./send.runtime-Bgf0P22e.js");
|
|
16
16
|
return await slackSendRuntimePromise;
|
|
17
17
|
}
|
|
18
18
|
function resolveRenderedInteractiveBlocks(interactive, previousBlocks) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createSlackOutboundPayloadHarness } from "./outbound-payload.test-harness-
|
|
1
|
+
import { t as createSlackOutboundPayloadHarness } from "./outbound-payload.test-harness-C7Izm95Q.js";
|
|
2
2
|
export { createSlackOutboundPayloadHarness };
|
package/dist/{outbound-payload.test-harness-C0CW7_CE.js → outbound-payload.test-harness-C7Izm95Q.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as slackOutbound } from "./outbound-adapter-
|
|
1
|
+
import { n as slackOutbound } from "./outbound-adapter-BoDXPksS.js";
|
|
2
2
|
import { primeChannelOutboundSendMock } from "openclaw/plugin-sdk/channel-contract-testing";
|
|
3
3
|
//#region node_modules/tinyrainbow/dist/index.js
|
|
4
4
|
var b = {
|
|
@@ -2,13 +2,13 @@ import { o as SLACK_TEXT_LIMIT, s as truncateSlackText } from "./thread-ts-As_dc
|
|
|
2
2
|
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BSg5hXhj.js";
|
|
3
3
|
import { i as normalizeSlackAllowOwnerEntry } from "./allow-list-nwXs_eCP.js";
|
|
4
4
|
import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode, t as mapStreamingModeToSlackLegacyDraftStreamMode } from "./streaming-compat-eu5Rj5gj.js";
|
|
5
|
-
import { a as recordSlackThreadParticipation, s as normalizeSlackOutboundText, t as sendMessageSlack } from "./send-
|
|
6
|
-
import { b as buildSlackEditTextPayload, f as removeSlackReaction, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage } from "./actions-
|
|
5
|
+
import { a as recordSlackThreadParticipation, s as normalizeSlackOutboundText, t as sendMessageSlack } from "./send-C5PzphgC.js";
|
|
6
|
+
import { b as buildSlackEditTextPayload, f as removeSlackReaction, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage } from "./actions-Chs6DbrP.js";
|
|
7
7
|
import { t as formatSlackError } from "./errors-C_sW0Zgl.js";
|
|
8
|
-
import {
|
|
9
|
-
import { r as escapeSlackMrkdwn } from "./provider-
|
|
10
|
-
import { n as resolveSlackThreadTargets, t as prepareSlackMessage } from "./prepare-
|
|
11
|
-
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
8
|
+
import { D as updateLastRoute, E as resolveStorePath, a as recordInboundSession } from "./room-context-BI26wVBb.js";
|
|
9
|
+
import { r as escapeSlackMrkdwn } from "./provider-BFnE2bgI.js";
|
|
10
|
+
import { n as resolveSlackThreadTargets, t as prepareSlackMessage } from "./prepare-BcznR9ok.js";
|
|
11
|
+
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, t as createSlackReplyDeliveryPlan } from "./replies-2ve_YcHy.js";
|
|
12
12
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
13
|
import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
14
14
|
import { createChannelMessageReplyPipeline, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-message";
|
|
@@ -68,6 +68,7 @@ function createSlackDraftStream(params) {
|
|
|
68
68
|
accountId: params.accountId,
|
|
69
69
|
threadTs: params.resolveThreadTs?.(),
|
|
70
70
|
identity: params.identity,
|
|
71
|
+
...params.metadata ? { metadata: params.metadata } : {},
|
|
71
72
|
...blocks ? { blocks } : {}
|
|
72
73
|
});
|
|
73
74
|
streamChannelId = sent.channelId || streamChannelId;
|
|
@@ -317,7 +318,7 @@ async function appendSlackStream(params) {
|
|
|
317
318
|
* All other errors propagate unchanged.
|
|
318
319
|
*/
|
|
319
320
|
async function stopSlackStream(params) {
|
|
320
|
-
const { session, text } = params;
|
|
321
|
+
const { session, text, metadata } = params;
|
|
321
322
|
if (session.stopped) {
|
|
322
323
|
logVerbose("slack-stream: stream already stopped, ignoring duplicate stop");
|
|
323
324
|
return;
|
|
@@ -326,7 +327,10 @@ async function stopSlackStream(params) {
|
|
|
326
327
|
if (text) session.pendingText += text;
|
|
327
328
|
logVerbose(`slack-stream: stopping stream in ${session.channel} thread=${session.threadTs}${text ? ` (final text: ${text.length} chars)` : ""}`);
|
|
328
329
|
try {
|
|
329
|
-
await session.streamer.stop(
|
|
330
|
+
await session.streamer.stop({
|
|
331
|
+
...text ? { markdown_text: text } : {},
|
|
332
|
+
...metadata ? { metadata } : {}
|
|
333
|
+
});
|
|
330
334
|
session.delivered = true;
|
|
331
335
|
session.pendingText = "";
|
|
332
336
|
} catch (err) {
|
|
@@ -523,7 +527,7 @@ function resolveSlackStreamingThreadHint(params) {
|
|
|
523
527
|
}
|
|
524
528
|
const SLACK_STREAM_RECIPIENT_TEAM_CACHE_MAX = 2e3;
|
|
525
529
|
const slackStreamRecipientTeamCache = /* @__PURE__ */ new Map();
|
|
526
|
-
function
|
|
530
|
+
function buildSlackEventDeliveryKey(params) {
|
|
527
531
|
const reply = resolveSendableOutboundReplyParts(params.payload, { text: params.textOverride });
|
|
528
532
|
const slackBlocks = readSlackReplyBlocks(params.payload);
|
|
529
533
|
if (!reply.hasContent && !slackBlocks?.length) return null;
|
|
@@ -555,15 +559,15 @@ function rememberSlackStreamRecipientTeam(params) {
|
|
|
555
559
|
if (oldest) slackStreamRecipientTeamCache.delete(oldest);
|
|
556
560
|
}
|
|
557
561
|
}
|
|
558
|
-
function
|
|
562
|
+
function createSlackEventDeliveryTracker() {
|
|
559
563
|
const deliveredKeys = /* @__PURE__ */ new Set();
|
|
560
564
|
return {
|
|
561
565
|
hasDelivered(params) {
|
|
562
|
-
const key =
|
|
566
|
+
const key = buildSlackEventDeliveryKey(params);
|
|
563
567
|
return key ? deliveredKeys.has(key) : false;
|
|
564
568
|
},
|
|
565
569
|
markDelivered(params) {
|
|
566
|
-
const key =
|
|
570
|
+
const key = buildSlackEventDeliveryKey(params);
|
|
567
571
|
if (key) deliveredKeys.add(key);
|
|
568
572
|
}
|
|
569
573
|
};
|
|
@@ -627,15 +631,20 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
627
631
|
channel: "slack",
|
|
628
632
|
to: `user:${message.user}`,
|
|
629
633
|
accountId: route.accountId,
|
|
630
|
-
threadId: prepared.ctxPayload.MessageThreadId
|
|
634
|
+
threadId: prepared.ctxPayload.MessageThreadId ?? prepared.ctxPayload.TransportThreadId
|
|
631
635
|
},
|
|
632
636
|
ctx: prepared.ctxPayload
|
|
633
637
|
});
|
|
634
638
|
}
|
|
635
|
-
const
|
|
639
|
+
const threadTargets = resolveSlackThreadTargets({
|
|
636
640
|
message,
|
|
637
641
|
replyToMode: prepared.replyToMode
|
|
638
642
|
});
|
|
643
|
+
const forcedReplyThreadTs = prepared.forcedReplyThreadTs;
|
|
644
|
+
const slackMessageMetadata = prepared.slackMessageMetadata;
|
|
645
|
+
const statusThreadTs = forcedReplyThreadTs ?? threadTargets.statusThreadTs;
|
|
646
|
+
const isThreadReply = threadTargets.isThreadReply;
|
|
647
|
+
const replyDeliveryMode = forcedReplyThreadTs ? "off" : prepared.replyToMode;
|
|
639
648
|
const sourceReplyDeliveryMode = resolveChannelMessageSourceReplyDeliveryMode({
|
|
640
649
|
cfg,
|
|
641
650
|
ctx: prepared.ctxPayload
|
|
@@ -688,11 +697,11 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
688
697
|
if (statusReactionsEnabled) statusReactions.setQueued();
|
|
689
698
|
const hasRepliedRef = { value: false };
|
|
690
699
|
const replyPlan = createSlackReplyDeliveryPlan({
|
|
691
|
-
replyToMode:
|
|
692
|
-
incomingThreadTs,
|
|
700
|
+
replyToMode: replyDeliveryMode,
|
|
701
|
+
incomingThreadTs: forcedReplyThreadTs ?? incomingThreadTs,
|
|
693
702
|
messageTs,
|
|
694
703
|
hasRepliedRef,
|
|
695
|
-
isThreadReply
|
|
704
|
+
isThreadReply: Boolean(forcedReplyThreadTs) || isThreadReply
|
|
696
705
|
});
|
|
697
706
|
const typingTarget = statusThreadTs ? `${message.channel}/${statusThreadTs}` : message.channel;
|
|
698
707
|
const typingReaction = ctx.typingReaction;
|
|
@@ -755,8 +764,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
755
764
|
streaming: account.config.streaming,
|
|
756
765
|
nativeStreaming: resolveChannelStreamingNativeTransport(account.config)
|
|
757
766
|
});
|
|
758
|
-
const streamThreadHint = resolveSlackStreamingThreadHint({
|
|
759
|
-
replyToMode:
|
|
767
|
+
const streamThreadHint = forcedReplyThreadTs ?? resolveSlackStreamingThreadHint({
|
|
768
|
+
replyToMode: replyDeliveryMode,
|
|
760
769
|
incomingThreadTs,
|
|
761
770
|
messageTs,
|
|
762
771
|
isThreadReply
|
|
@@ -784,7 +793,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
784
793
|
let usedReplyThreadTs;
|
|
785
794
|
let usedBlockReplyThreadTs;
|
|
786
795
|
let observedReplyDelivery = false;
|
|
787
|
-
const deliveryTracker =
|
|
796
|
+
const deliveryTracker = createSlackEventDeliveryTracker();
|
|
788
797
|
const resolveDeliveryThreadTs = (params) => {
|
|
789
798
|
const plannedThreadTs = params.forcedThreadTs ? void 0 : replyPlan.nextThreadTs();
|
|
790
799
|
return params.forcedThreadTs ?? plannedThreadTs ?? (params.kind === "block" ? usedBlockReplyThreadTs : void 0);
|
|
@@ -807,8 +816,9 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
807
816
|
runtime,
|
|
808
817
|
textLimit: ctx.textLimit,
|
|
809
818
|
replyThreadTs: session.threadTs,
|
|
810
|
-
replyToMode:
|
|
811
|
-
...slackIdentity ? { identity: slackIdentity } : {}
|
|
819
|
+
replyToMode: replyDeliveryMode,
|
|
820
|
+
...slackIdentity ? { identity: slackIdentity } : {},
|
|
821
|
+
...slackMessageMetadata ? { metadata: slackMessageMetadata } : {}
|
|
812
822
|
});
|
|
813
823
|
markSlackStreamFallbackDelivered(session);
|
|
814
824
|
observedReplyDelivery = true;
|
|
@@ -839,12 +849,13 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
839
849
|
runtime,
|
|
840
850
|
textLimit: ctx.textLimit,
|
|
841
851
|
replyThreadTs,
|
|
842
|
-
replyToMode:
|
|
843
|
-
...slackIdentity ? { identity: slackIdentity } : {}
|
|
852
|
+
replyToMode: replyDeliveryMode,
|
|
853
|
+
...slackIdentity ? { identity: slackIdentity } : {},
|
|
854
|
+
...slackMessageMetadata ? { metadata: slackMessageMetadata } : {}
|
|
844
855
|
});
|
|
845
856
|
observedReplyDelivery = true;
|
|
846
857
|
const deliveredThreadTs = resolveDeliveredSlackReplyThreadTs({
|
|
847
|
-
replyToMode:
|
|
858
|
+
replyToMode: replyDeliveryMode,
|
|
848
859
|
payloadReplyToId: params.payload.replyToId,
|
|
849
860
|
replyThreadTs
|
|
850
861
|
});
|
|
@@ -1078,6 +1089,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1078
1089
|
token: ctx.botToken,
|
|
1079
1090
|
accountId: account.accountId,
|
|
1080
1091
|
identity: slackIdentity,
|
|
1092
|
+
...slackMessageMetadata ? { metadata: slackMessageMetadata } : {},
|
|
1081
1093
|
maxChars: Math.min(ctx.textLimit, SLACK_TEXT_LIMIT),
|
|
1082
1094
|
resolveThreadTs: () => {
|
|
1083
1095
|
const ts = replyPlan.peekThreadTs();
|
|
@@ -1323,7 +1335,10 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1323
1335
|
let streamFallbackDelivered = false;
|
|
1324
1336
|
const finalStream = streamSession;
|
|
1325
1337
|
if (finalStream && !finalStream.stopped) try {
|
|
1326
|
-
await stopSlackStream({
|
|
1338
|
+
await stopSlackStream({
|
|
1339
|
+
session: finalStream,
|
|
1340
|
+
...slackMessageMetadata ? { metadata: slackMessageMetadata } : {}
|
|
1341
|
+
});
|
|
1327
1342
|
} catch (err) {
|
|
1328
1343
|
if (err instanceof SlackStreamNotDeliveredError) streamFallbackDelivered = await deliverPendingStreamFallback(finalStream, err);
|
|
1329
1344
|
else runtime.error?.(danger(`slack-stream: failed to stop stream: ${formatSlackError(err)}`));
|