@openclaw/slack 2026.12.2 → 2026.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{action-runtime-zVonj7Ub.mjs → action-runtime-C8vLAMyA.mjs} +5 -5
- package/dist/.setup/action-runtime.runtime-CWs0HGWm.mjs +1 -0
- package/dist/.setup/{actions-0x2TsQH6.mjs → actions-CksDNaJc.mjs} +2 -2
- package/dist/.setup/{approval-handler.runtime-BBYoz7El.mjs → approval-handler.runtime-By7ZcwKy.mjs} +4 -4
- package/dist/.setup/{approval-message-updates-BrGg-eis.mjs → approval-message-updates-Bvb-w8o8.mjs} +1 -1
- package/dist/.setup/{channel-C6-Cp-Fz.mjs → channel-CiXXbib3.mjs} +12 -12
- package/dist/.setup/{channel-type-BQCZqcgg.mjs → channel-type-CTVl0TdD.mjs} +1 -1
- package/dist/.setup/{fork-CiiHD26T.mjs → fork-DwlUFICN.mjs} +2 -2
- package/dist/.setup/{literal-text-DXy7nGRR.mjs → literal-text-CQvFhkYM.mjs} +1 -1
- package/dist/.setup/{monitor-D5erEc0i.mjs → monitor-BD6xsScp.mjs} +226 -122
- package/dist/.setup/{outbound-adapter-BmJCT3Qj.mjs → outbound-adapter-BCGNbLS6.mjs} +4 -4
- package/dist/.setup/{pipeline.runtime-C51V3mhq.mjs → pipeline.runtime-CCIbWV9-.mjs} +30 -19
- package/dist/.setup/{policy-l2IjJV43.mjs → policy-D4y4THHg.mjs} +1 -1
- package/dist/.setup/{probe-DKu67cjh.mjs → probe-D_7fKdOR.mjs} +29 -2
- package/dist/.setup/{question-delivery-BRQza6lN.mjs → question-delivery-B3JBKMFu.mjs} +1 -1
- package/dist/.setup/{relay-source-D2WA09C-.mjs → relay-source-Dbd9_Akf.mjs} +2 -2
- package/dist/.setup/{replies-kwdtXt3e.mjs → replies-k6w-hgrk.mjs} +5 -5
- package/dist/.setup/{reply-blocks-Cf8e9Sau.mjs → reply-blocks-BkEYrZHF.mjs} +1 -1
- package/dist/.setup/{scopes-bvZxH5i3.mjs → scopes-Bm1U-ScW.mjs} +1 -1
- package/dist/.setup/{send-DJpeS70B.mjs → send-DfKHJ6Us.mjs} +2 -2
- package/dist/.setup/slash-dispatch.runtime-B5sH4PI-.mjs +7 -0
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/api.js +6 -6
- package/dist/channel-plugin-api.js +1 -1
- package/dist/runtime-api.js +5 -5
- package/package.json +4 -4
- package/dist/.setup/action-runtime.runtime-YBV3dNF-.mjs +0 -1
- package/dist/.setup/slash-dispatch.runtime-CMQgSmJc.mjs +0 -8
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { i as __exportAll } from "./doctor-contract-CcNdculn.mjs";
|
|
2
2
|
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, g as resolveSlackBotToken, h as resolveSlackAppToken, l as resolveSlackAccountDmPolicy, m as formatSlackBotTokenIdentityWarning, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode, s as resolveSlackAccount } from "./accounts-Dsl3wabY.mjs";
|
|
3
3
|
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
4
|
-
import { Bt as
|
|
4
|
+
import { $t as isSlackExecApprovalAuthorizedSender, Bt as isSlackPluginApprovalAuthorizedSender, C as normalizeSlackRouteBindingConfig, Ct as SLACK_TEXT_LIMIT, Dt as escapeSlackMrkdwn, G as resolveSlackQuestionAction, Gt as resolveSlackAllowListMatch, Ht as allowListMatches, Kt as resolveSlackUserAllowListForTeam, Ot as isSlackAnyNativeApprovalClientEnabled, R as isSlackApprovalActionId, S as resolveSlackAgentRoute, T as resolveSlackConversationBindingRouteAsync, U as decodeSlackQuestionAction, Ut as normalizeSlackAllowOwnerEntry, V as isSlackQuestionActionId, Wt as normalizeSlackSlug, Zt as registerSlackInstallationState, b as qualifySlackConversationId, c as slackIngressIdentity, g as setSlackChannelPolicyBindings, i as setSlackSessionStatus, k as truncateSlackText, l as buildSlackChannelIdCandidates, m as mergeSlackBoundChannelEntries, nt as buildSlackCompleteBlocksFallbackText, o as createSlackIngressSubject, q as decodeSlackApprovalAction, r as renameSlackSession, v as formatSlackError, x as qualifySlackRoutePeerId, z as isSlackCallbackActionId } from "./probe-D_7fKdOR.mjs";
|
|
5
5
|
import { n as collectSlackCursorPages } from "./cursor-pages-DiOrzZtc.mjs";
|
|
6
6
|
import { _ as resolveSlackMonitorDispatchers, a as createSlackWebClient, d as readLruMapEntry, f as writeLruMapEntry, g as resolveSlackLookupClientOptions, l as getOrCreateWeakOwnerMap, r as createSlackStartupAuthClient, s as getSlackListenerWriteClient, u as pruneExpiredMapEntries, v as resolveSlackWebClientOptions } from "./client-DQqLIemQ.mjs";
|
|
7
7
|
import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-C5vsCo3a.mjs";
|
|
8
|
-
import { C as hasSlackTableBlock, E as resolveSlackMessageText$1, S as hasSlackMessageTableBlock, T as resolveSlackBlocksText, f as readSlackMessages, v as isGovSlackClient, w as isSlackUnfurlAttachment, x as formatSlackFileReferenceList, y as saveRemoteMedia } from "./actions-
|
|
9
|
-
import { f as requireSlackPostMessageTimestamp, p as buildSlackMessageIdentityPayload, r as setSlackDefaultSendIdentity } from "./send-
|
|
8
|
+
import { C as hasSlackTableBlock, E as resolveSlackMessageText$1, S as hasSlackMessageTableBlock, T as resolveSlackBlocksText, f as readSlackMessages, v as isGovSlackClient, w as isSlackUnfurlAttachment, x as formatSlackFileReferenceList, y as saveRemoteMedia } from "./actions-CksDNaJc.mjs";
|
|
9
|
+
import { f as requireSlackPostMessageTimestamp, p as buildSlackMessageIdentityPayload, r as setSlackDefaultSendIdentity } from "./send-DfKHJ6Us.mjs";
|
|
10
10
|
import { n as getSlackRuntime, t as getOptionalSlackRuntime } from "./runtime-C6HKn7Av.mjs";
|
|
11
11
|
import { t as normalizeSlackWebhookPath } from "./paths-CQZI_5WY.mjs";
|
|
12
|
-
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
12
|
+
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-D4y4THHg.mjs";
|
|
13
13
|
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-BoQiIEny.mjs";
|
|
14
14
|
import { t as resolveSlackUserAllowlist } from "./resolve-users-PpJHZiBC.mjs";
|
|
15
|
-
import { n as runSlackApprovalMessageUpdate, t as hasSlackApprovalControl } from "./approval-message-updates-
|
|
15
|
+
import { n as runSlackApprovalMessageUpdate, t as hasSlackApprovalControl } from "./approval-message-updates-Bvb-w8o8.mjs";
|
|
16
16
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
17
17
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
18
18
|
import { asNonArrayRecord, asOptionalObjectRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeUniqueTrimmedStringList, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -943,27 +943,20 @@ async function resolveWorkspacePolicy(ctx, resolveToken) {
|
|
|
943
943
|
token: resolveToken,
|
|
944
944
|
entries
|
|
945
945
|
});
|
|
946
|
-
const nextChannels = { ...channelsConfig };
|
|
947
946
|
const mapping = [];
|
|
948
947
|
const unresolved = [];
|
|
949
948
|
for (const entry of resolved) {
|
|
950
|
-
|
|
951
|
-
if (!source) continue;
|
|
949
|
+
if (!channelsConfig?.[entry.input]) continue;
|
|
952
950
|
if (!entry.resolved || !entry.id) {
|
|
953
951
|
unresolved.push(entry.input);
|
|
954
952
|
continue;
|
|
955
953
|
}
|
|
956
954
|
const resolvedLabel = formatSlackChannelResolved(entry);
|
|
957
955
|
if (resolvedLabel) mapping.push(resolvedLabel);
|
|
958
|
-
const existing = nextChannels[entry.id] ?? {};
|
|
959
|
-
nextChannels[entry.id] = {
|
|
960
|
-
...source,
|
|
961
|
-
...existing
|
|
962
|
-
};
|
|
963
956
|
channelBindings.set(entry.input, entry.id);
|
|
964
957
|
}
|
|
965
|
-
channelsConfig =
|
|
966
|
-
ctx.channelsConfig =
|
|
958
|
+
channelsConfig = mergeSlackBoundChannelEntries(channelsConfig, channelBindings);
|
|
959
|
+
ctx.channelsConfig = channelsConfig;
|
|
967
960
|
summarizeMapping("slack channels", mapping, unresolved, runtime);
|
|
968
961
|
}
|
|
969
962
|
} catch (err) {
|
|
@@ -2678,6 +2671,60 @@ async function dispatchSlackPluginInteractiveHandler(params) {
|
|
|
2678
2671
|
}
|
|
2679
2672
|
});
|
|
2680
2673
|
}
|
|
2674
|
+
// extensions/slack/src/monitor/events/interactions.agent-button.ts
|
|
2675
|
+
/**
|
|
2676
|
+
* Delivers an agent-authored button tap that no plugin handled as the tapper's reply in
|
|
2677
|
+
* that conversation. Slack's message owner admits it as their typed text would be,
|
|
2678
|
+
* addressed to the bot. `onAdmitted` runs once the owner has admitted the tap, before
|
|
2679
|
+
* the turn starts.
|
|
2680
|
+
*
|
|
2681
|
+
* Resolves true when the message owner refused the tap without telling the tapper, and
|
|
2682
|
+
* undefined when the tap could not be delivered.
|
|
2683
|
+
*/
|
|
2684
|
+
async function deliverSlackAgentButtonTap(params) {
|
|
2685
|
+
const { ctx, eventScope, parsed } = params.action;
|
|
2686
|
+
if (!parsed.channelId) return;
|
|
2687
|
+
const repliesThread = ((params.auth.channelType === "channel" || params.auth.channelType === "group" ? resolveSlackChannelConfig({
|
|
2688
|
+
teamId: eventScope?.teamId ?? ctx.teamId,
|
|
2689
|
+
allowUnscoped: ctx.installationIdentity?.kind !== "enterprise",
|
|
2690
|
+
channelId: parsed.channelId,
|
|
2691
|
+
channelName: params.auth.channelName,
|
|
2692
|
+
channels: ctx.channelsConfig,
|
|
2693
|
+
channelKeys: ctx.channelsConfigKeys,
|
|
2694
|
+
defaultRequireMention: ctx.defaultRequireMention,
|
|
2695
|
+
allowNameMatching: ctx.allowNameMatching
|
|
2696
|
+
})?.replyToMode : void 0) ?? resolveSlackReplyToMode(resolveSlackAccount({
|
|
2697
|
+
cfg: ctx.cfg,
|
|
2698
|
+
accountId: ctx.accountId
|
|
2699
|
+
}), resolveSlackChatType(params.auth.channelType ?? "channel"))) !== "off" || params.auth.channelType === "im" && !eventScope && await ctx.isSlackAgentView();
|
|
2700
|
+
const threadTs = parsed.threadTs ?? (repliesThread ? parsed.messageTs : void 0);
|
|
2701
|
+
try {
|
|
2702
|
+
return await params.handleSlackMessage({
|
|
2703
|
+
type: "message",
|
|
2704
|
+
channel: parsed.channelId,
|
|
2705
|
+
user: parsed.userId,
|
|
2706
|
+
text: params.text,
|
|
2707
|
+
ts: normalizeOptionalString(parsed.typedActionWithText.action_ts),
|
|
2708
|
+
...threadTs ? { thread_ts: threadTs } : {}
|
|
2709
|
+
}, {
|
|
2710
|
+
source: "block_action",
|
|
2711
|
+
wasMentioned: true,
|
|
2712
|
+
senderAuthentication: params.senderAuthentication,
|
|
2713
|
+
eventScope,
|
|
2714
|
+
awaitDispatch: true,
|
|
2715
|
+
turnAdoptionLifecycle: {
|
|
2716
|
+
admission: "exclusive",
|
|
2717
|
+
onAdopted: () => {},
|
|
2718
|
+
onDeferred: () => {},
|
|
2719
|
+
onAbandoned: () => {},
|
|
2720
|
+
onSessionRouted: params.onAdmitted
|
|
2721
|
+
}
|
|
2722
|
+
});
|
|
2723
|
+
} catch (error) {
|
|
2724
|
+
ctx.runtime.error?.(`slack:interaction agent button failed: ${formatErrorMessage(error)}`);
|
|
2725
|
+
return;
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2681
2728
|
// extensions/slack/src/monitor/events/interactions.approval-sender.ts
|
|
2682
2729
|
function resolveSlackPluginApprovalSender(params) {
|
|
2683
2730
|
const senderId = formatSlackTarget({
|
|
@@ -2884,10 +2931,8 @@ async function authorizeSlackBlockAction(params) {
|
|
|
2884
2931
|
expectedSenderId: params.parsed.userId,
|
|
2885
2932
|
interactiveEvent: true
|
|
2886
2933
|
});
|
|
2887
|
-
if (auth.allowed)
|
|
2888
|
-
|
|
2889
|
-
await respondEphemeral(params.respond, "You are not authorized to use this control.");
|
|
2890
|
-
return { allowed: false };
|
|
2934
|
+
if (!auth.allowed) params.ctx.runtime.log?.(`slack:interaction drop action=${params.parsed.actionId} user=${params.parsed.userId} channel=${params.parsed.channelId ?? "unknown"} reason=${auth.reason ?? "unauthorized"}`);
|
|
2935
|
+
return auth;
|
|
2891
2936
|
}
|
|
2892
2937
|
async function handleSlackPluginBindingApproval(params) {
|
|
2893
2938
|
const pluginBindingApproval = parsePluginBindingApprovalCustomId(params.pluginInteractionData);
|
|
@@ -2942,7 +2987,7 @@ async function handleSlackApprovalInteraction(params) {
|
|
|
2942
2987
|
channelId,
|
|
2943
2988
|
messageTs
|
|
2944
2989
|
}, async () => {
|
|
2945
|
-
const { readSlackMessages } = await import("./actions-
|
|
2990
|
+
const { readSlackMessages } = await import("./actions-CksDNaJc.mjs").then((n) => n.t);
|
|
2946
2991
|
const { messages } = await readSlackMessages(channelId, {
|
|
2947
2992
|
client: params.eventScope?.client ?? params.ctx.app.client,
|
|
2948
2993
|
messageId: messageTs,
|
|
@@ -3141,7 +3186,10 @@ function registerSlackBlockActionHandler(params) {
|
|
|
3141
3186
|
await respondEphemeral(respond, "This question action is invalid or expired.");
|
|
3142
3187
|
return;
|
|
3143
3188
|
}
|
|
3144
|
-
if (!(await authorizeSlackBlockAction(actionContext)).allowed)
|
|
3189
|
+
if (!(await authorizeSlackBlockAction(actionContext)).allowed) {
|
|
3190
|
+
await respondEphemeral(respond, "You are not authorized to use this control.");
|
|
3191
|
+
return;
|
|
3192
|
+
}
|
|
3145
3193
|
await resolveSlackQuestionAction({
|
|
3146
3194
|
action: question,
|
|
3147
3195
|
cfg: runtimeContext.cfg,
|
|
@@ -3161,8 +3209,30 @@ function registerSlackBlockActionHandler(params) {
|
|
|
3161
3209
|
pluginInteractionData
|
|
3162
3210
|
})) return;
|
|
3163
3211
|
}
|
|
3212
|
+
const agentText = agentControlText(pluginInteractionData);
|
|
3213
|
+
const runAgentTap = async (auth, text) => {
|
|
3214
|
+
const refusedSilently = await deliverSlackAgentButtonTap({
|
|
3215
|
+
action: actionContext,
|
|
3216
|
+
auth,
|
|
3217
|
+
text,
|
|
3218
|
+
senderAuthentication: resolveSlackSenderAuthentication(args.context),
|
|
3219
|
+
handleSlackMessage: params.handleSlackMessage,
|
|
3220
|
+
onAdmitted: async () => {
|
|
3221
|
+
if (runtimeContext.isRuntimePolicyCurrent()) await updateSlackLegacyBlockAction(actionContext);
|
|
3222
|
+
}
|
|
3223
|
+
});
|
|
3224
|
+
if (refusedSilently === void 0) await respondEphemeral(respond, "This button didn't reach the agent. Try again.");
|
|
3225
|
+
else if (refusedSilently) await respondEphemeral(respond, "You are not authorized to use this control.");
|
|
3226
|
+
};
|
|
3164
3227
|
const auth = await authorizeSlackBlockAction(actionContext);
|
|
3165
|
-
if (!auth.allowed)
|
|
3228
|
+
if (!auth.allowed) {
|
|
3229
|
+
if (agentText !== void 0) {
|
|
3230
|
+
await runAgentTap(auth, agentText);
|
|
3231
|
+
return;
|
|
3232
|
+
}
|
|
3233
|
+
await respondEphemeral(respond, "You are not authorized to use this control.");
|
|
3234
|
+
return;
|
|
3235
|
+
}
|
|
3166
3236
|
const route = await captureSlackInteractionEventRoute(await runtimeContext.resolveSlackSystemEventRoute({
|
|
3167
3237
|
channelId: parsed.channelId,
|
|
3168
3238
|
channelType: auth.channelType,
|
|
@@ -3234,6 +3304,10 @@ function registerSlackBlockActionHandler(params) {
|
|
|
3234
3304
|
});
|
|
3235
3305
|
if (pluginResult.matched && pluginResult.handled) return;
|
|
3236
3306
|
}
|
|
3307
|
+
if (agentText !== void 0) {
|
|
3308
|
+
await runAgentTap(auth, agentText);
|
|
3309
|
+
return;
|
|
3310
|
+
}
|
|
3237
3311
|
if (!route || !runtimeContext.isRuntimePolicyCurrent()) return;
|
|
3238
3312
|
const teamId = args.context.teamId;
|
|
3239
3313
|
const targetKind = auth.channelType === "im" ? "user" : "channel";
|
|
@@ -3257,16 +3331,15 @@ function registerSlackBlockActionHandler(params) {
|
|
|
3257
3331
|
threadTs: parsed.threadTs
|
|
3258
3332
|
};
|
|
3259
3333
|
runtimeContext.runtime.log?.(`slack:interaction action=${parsed.actionId} type=${parsed.actionSummary.actionType ?? "unknown"} user=${parsed.userId} channel=${parsed.channelId}`);
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
contextKey: contextParts.join(":"),
|
|
3334
|
+
if (await enqueueSlackInteractionEvent(eventPayload, route, {
|
|
3335
|
+
contextKey: [
|
|
3336
|
+
"slack:interaction",
|
|
3337
|
+
teamId,
|
|
3338
|
+
parsed.channelId,
|
|
3339
|
+
parsed.messageTs,
|
|
3340
|
+
parsed.actionId,
|
|
3341
|
+
normalizeOptionalString(parsed.typedActionWithText.action_ts) ?? parsed.typedBody.trigger_id
|
|
3342
|
+
].filter(Boolean).join(":"),
|
|
3270
3343
|
deliveryContext: {
|
|
3271
3344
|
channel: "slack",
|
|
3272
3345
|
to: deferredTarget?.target,
|
|
@@ -3723,25 +3796,32 @@ function isLaterSlackMessage(candidate, current) {
|
|
|
3723
3796
|
}
|
|
3724
3797
|
/** Keeps a live preview attached to its actual place in the Slack conversation. */
|
|
3725
3798
|
function trackSlackDraftMessage(conversation) {
|
|
3726
|
-
const
|
|
3799
|
+
const keys = [conversationKey(conversation)];
|
|
3800
|
+
if (conversation.deliveryThreadTs && conversation.deliveryThreadTs !== conversation.threadTs) keys.push(conversationKey({
|
|
3801
|
+
...conversation,
|
|
3802
|
+
threadTs: conversation.deliveryThreadTs
|
|
3803
|
+
}));
|
|
3727
3804
|
const activeDraft = {
|
|
3728
3805
|
messageTs: conversation.messageTs,
|
|
3729
3806
|
onInterveningMessage: conversation.onInterveningMessage
|
|
3730
3807
|
};
|
|
3731
|
-
const
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
currentDrafts?.delete(activeDraft);
|
|
3737
|
-
if (currentDrafts?.size === 0) activeDraftsByConversation.delete(key);
|
|
3738
|
-
};
|
|
3808
|
+
for (const key of keys) {
|
|
3809
|
+
const drafts = activeDraftsByConversation.get(key) ?? /* @__PURE__ */ new Set();
|
|
3810
|
+
drafts.add(activeDraft);
|
|
3811
|
+
activeDraftsByConversation.set(key, drafts);
|
|
3812
|
+
}
|
|
3739
3813
|
return {
|
|
3740
3814
|
setMessageTs: (messageTs) => {
|
|
3741
3815
|
activeDraft.messageTs = messageTs;
|
|
3742
3816
|
if (activeDraft.latestHumanMessageTs && isLaterSlackMessage(activeDraft.latestHumanMessageTs, messageTs)) activeDraft.onInterveningMessage();
|
|
3743
3817
|
},
|
|
3744
|
-
stop
|
|
3818
|
+
stop() {
|
|
3819
|
+
for (const key of keys) {
|
|
3820
|
+
const drafts = activeDraftsByConversation.get(key);
|
|
3821
|
+
drafts?.delete(activeDraft);
|
|
3822
|
+
if (drafts?.size === 0) activeDraftsByConversation.delete(key);
|
|
3823
|
+
}
|
|
3824
|
+
}
|
|
3745
3825
|
};
|
|
3746
3826
|
}
|
|
3747
3827
|
/** A later human message means subsequent assistant output belongs below it. */
|
|
@@ -4178,7 +4258,7 @@ function addressKey(address) {
|
|
|
4178
4258
|
]);
|
|
4179
4259
|
}
|
|
4180
4260
|
/** Registers the exact publisher before status/output; the dispatch owner must release it. */
|
|
4181
|
-
function registerSlackSessionRun(ctx, address, route) {
|
|
4261
|
+
function registerSlackSessionRun(ctx, address, route, explicitlyAddressed = false) {
|
|
4182
4262
|
if (!address.threadTs) return () => {};
|
|
4183
4263
|
const byAddress = runs.get(ctx.app) ?? /* @__PURE__ */ new Map();
|
|
4184
4264
|
runs.set(ctx.app, byAddress);
|
|
@@ -4187,6 +4267,7 @@ function registerSlackSessionRun(ctx, address, route) {
|
|
|
4187
4267
|
byAddress.set(key, targets);
|
|
4188
4268
|
const target = {
|
|
4189
4269
|
route,
|
|
4270
|
+
explicitlyAddressed,
|
|
4190
4271
|
isActive: () => targets.has(target)
|
|
4191
4272
|
};
|
|
4192
4273
|
targets.add(target);
|
|
@@ -4195,6 +4276,10 @@ function registerSlackSessionRun(ctx, address, route) {
|
|
|
4195
4276
|
if (targets.size === 0 && byAddress.get(key) === targets) byAddress.delete(key);
|
|
4196
4277
|
};
|
|
4197
4278
|
}
|
|
4279
|
+
function hasAddressedSlackSessionRun(ctx, address) {
|
|
4280
|
+
for (const target of runs.get(ctx.app)?.get(addressKey(address)) ?? []) if (target.explicitlyAddressed) return true;
|
|
4281
|
+
return false;
|
|
4282
|
+
}
|
|
4198
4283
|
function getSlackSessionRuns(ctx, address) {
|
|
4199
4284
|
const targets = [...runs.get(ctx.app)?.get(addressKey(address)) ?? []];
|
|
4200
4285
|
return [...new Map(targets.map((target) => [target.route.sessionKey, target])).values()].map((target) => ({
|
|
@@ -4567,7 +4652,7 @@ const SLACK_COMMAND_ARG_BUTTON_VALUE_MAX = 2e3;
|
|
|
4567
4652
|
const SLACK_COMMAND_ARG_CONFIRM_TEXT_MAX = 300;
|
|
4568
4653
|
const SLACK_HEADER_TEXT_MAX = 150;
|
|
4569
4654
|
const SLACK_COMMAND_ARG_ACTION_BLOCKS_MAX = 47;
|
|
4570
|
-
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-
|
|
4655
|
+
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-B5sH4PI-.mjs"));
|
|
4571
4656
|
const loadPluginCommandRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/plugin-command-runtime"));
|
|
4572
4657
|
const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
|
|
4573
4658
|
function buildSlackArgMenuConfirm(params) {
|
|
@@ -4802,7 +4887,7 @@ function createSlackCommandHandler(params) {
|
|
|
4802
4887
|
allowNameMatching: ctx.allowNameMatching
|
|
4803
4888
|
});
|
|
4804
4889
|
const senderName = (await ctx.resolveUserName(command.user_id, eventScope))?.name ?? command.user_name ?? command.user_id;
|
|
4805
|
-
const
|
|
4890
|
+
const slashIngressParams = {
|
|
4806
4891
|
ctx,
|
|
4807
4892
|
teamId: eventScope?.teamId ?? ctx.teamId,
|
|
4808
4893
|
senderId: command.user_id,
|
|
@@ -4817,14 +4902,13 @@ function createSlackCommandHandler(params) {
|
|
|
4817
4902
|
hasControlCommand: false,
|
|
4818
4903
|
eventKind: "slash-command",
|
|
4819
4904
|
modeWhenAccessGroupsOff: "configured"
|
|
4820
|
-
}
|
|
4821
|
-
const
|
|
4822
|
-
if (isRoomish &&
|
|
4905
|
+
};
|
|
4906
|
+
const slashGate = await resolveSlackCommandIngress(slashIngressParams);
|
|
4907
|
+
if (isRoomish && slashGate.senderAccess.gate?.allowed === false) {
|
|
4823
4908
|
await respondEphemeral("You are not authorized to use this command here.");
|
|
4824
4909
|
return false;
|
|
4825
4910
|
}
|
|
4826
|
-
|
|
4827
|
-
if (isRoomish && ctx.useAccessGroups && !commandAuthorized) {
|
|
4911
|
+
if (isRoomish && ctx.useAccessGroups && !slashGate.commandAccess.authorized) {
|
|
4828
4912
|
await respondEphemeral("You are not authorized to use this command.");
|
|
4829
4913
|
return false;
|
|
4830
4914
|
}
|
|
@@ -4834,18 +4918,15 @@ function createSlackCommandHandler(params) {
|
|
|
4834
4918
|
id: isDirectMessage ? command.user_id : command.channel_id
|
|
4835
4919
|
});
|
|
4836
4920
|
const routingTeamId = (eventScope?.teamId ?? ctx.teamId) || void 0;
|
|
4837
|
-
let resolvedSlashRoute;
|
|
4838
4921
|
const sessionTarget = { isCurrent: p.isSessionTargetCurrent };
|
|
4839
4922
|
const resolveSlashRoute = async () => {
|
|
4840
|
-
if (resolvedSlashRoute) return resolvedSlashRoute;
|
|
4841
4923
|
if (p.threadTs) {
|
|
4842
4924
|
if (p.sessionTarget) {
|
|
4843
|
-
resolvedSlashRoute = p.sessionTarget;
|
|
4844
4925
|
const current = await captureSlackSessionTargetGuard(ctx, p.sessionTarget, p.isSessionTargetCurrent);
|
|
4845
4926
|
sessionTarget.isCurrent = current.isCurrent;
|
|
4846
4927
|
sessionTarget.source = current.source;
|
|
4847
4928
|
releaseSessionTarget = current.release;
|
|
4848
|
-
return
|
|
4929
|
+
return p.sessionTarget;
|
|
4849
4930
|
}
|
|
4850
4931
|
const routing = await resolveSlackSessionEventRoutingContext({
|
|
4851
4932
|
intent: "stop",
|
|
@@ -4862,14 +4943,13 @@ function createSlackCommandHandler(params) {
|
|
|
4862
4943
|
channelConfig,
|
|
4863
4944
|
eventScope
|
|
4864
4945
|
});
|
|
4865
|
-
resolvedSlashRoute = routing.route;
|
|
4866
4946
|
sessionTarget.isCurrent = routing.isCurrentSession;
|
|
4867
4947
|
sessionTarget.source = routing.sessionSource;
|
|
4868
4948
|
releaseSessionTarget = routing.release;
|
|
4869
|
-
return
|
|
4949
|
+
return routing.route;
|
|
4870
4950
|
}
|
|
4871
4951
|
const { resolveAgentRoute } = await loadSlashDispatchRuntime();
|
|
4872
|
-
|
|
4952
|
+
return resolveAgentRoute({
|
|
4873
4953
|
cfg,
|
|
4874
4954
|
channel: "slack",
|
|
4875
4955
|
accountId: account.accountId,
|
|
@@ -4879,11 +4959,38 @@ function createSlackCommandHandler(params) {
|
|
|
4879
4959
|
id: routeTarget.peerId
|
|
4880
4960
|
}
|
|
4881
4961
|
});
|
|
4882
|
-
return resolvedSlashRoute;
|
|
4883
4962
|
};
|
|
4963
|
+
const route = await resolveSlashRoute();
|
|
4964
|
+
const slashUserTarget = resolveSlackDeferredActionTarget({
|
|
4965
|
+
eventScope,
|
|
4966
|
+
kind: "user",
|
|
4967
|
+
id: command.user_id
|
|
4968
|
+
});
|
|
4969
|
+
const { sessionKey, commandTargetSessionKey } = resolveNativeCommandSessionTargets({
|
|
4970
|
+
agentId: route.agentId,
|
|
4971
|
+
sessionPrefix: slashCommand.sessionPrefix,
|
|
4972
|
+
userId: slashUserTarget.peerId,
|
|
4973
|
+
targetSessionKey: route.sessionKey,
|
|
4974
|
+
sessionKeyCase: "lowercase"
|
|
4975
|
+
});
|
|
4976
|
+
const messageId = p.eventTs ?? command.trigger_id;
|
|
4977
|
+
const slashIngress = await resolveSlackCommandIngress({
|
|
4978
|
+
...slashIngressParams,
|
|
4979
|
+
contextBinding: {
|
|
4980
|
+
agentId: route.agentId,
|
|
4981
|
+
sessionKey,
|
|
4982
|
+
messageId,
|
|
4983
|
+
inboundEventKind: "user_request"
|
|
4984
|
+
}
|
|
4985
|
+
});
|
|
4986
|
+
const commandAuthorized = slashIngress.commandAccess.authorized;
|
|
4987
|
+
if (slashIngress.ingress.admission !== "dispatch") {
|
|
4988
|
+
await respondEphemeral("You are not authorized to use this command.");
|
|
4989
|
+
return false;
|
|
4990
|
+
}
|
|
4884
4991
|
if (commandDefinition) {
|
|
4885
4992
|
const menuNeedsModelContext = !(commandArgs?.raw && !commandArgs.values) && commandDefinition.args?.some((arg) => typeof arg.choices === "function" && commandArgs?.values?.[arg.name] == null);
|
|
4886
|
-
const menuRoute = menuNeedsModelContext || commandDefinition.key === "verbose" ?
|
|
4993
|
+
const menuRoute = menuNeedsModelContext || commandDefinition.key === "verbose" ? route : void 0;
|
|
4887
4994
|
const menuModelContext = menuNeedsModelContext && menuRoute ? await resolveSlackCommandMenuModelContext({
|
|
4888
4995
|
cfg,
|
|
4889
4996
|
agentId: menuRoute.agentId,
|
|
@@ -4902,7 +5009,6 @@ function createSlackCommandHandler(params) {
|
|
|
4902
5009
|
catalog: menuModelCatalog
|
|
4903
5010
|
});
|
|
4904
5011
|
if (menu) {
|
|
4905
|
-
const route = menuRoute ?? await resolveSlashRoute();
|
|
4906
5012
|
const commandLabel = commandDefinition.nativeName ?? commandDefinition.key;
|
|
4907
5013
|
const title = formatCommandArgMenuTitle({
|
|
4908
5014
|
command: commandDefinition,
|
|
@@ -4947,69 +5053,65 @@ function createSlackCommandHandler(params) {
|
|
|
4947
5053
|
}
|
|
4948
5054
|
const channelName = channelInfo?.name;
|
|
4949
5055
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
4950
|
-
const { deliverSlackSlashReplies, dispatchChannelInboundTurn,
|
|
4951
|
-
const route = await resolveSlashRoute();
|
|
5056
|
+
const { buildChannelInboundEventContext, deliverSlackSlashReplies, dispatchChannelInboundTurn, isChannelPartialDeliveryError, resolveChunkMode, resolveMarkdownTableMode, sanitizeSlackMonitorReplyPayload } = await loadSlashDispatchRuntime();
|
|
4952
5057
|
const { channelMetadata, groupSystemPrompt } = resolveSlackRoomContextHints({
|
|
4953
5058
|
isRoomish,
|
|
4954
5059
|
channelInfo,
|
|
4955
5060
|
channelConfig
|
|
4956
5061
|
});
|
|
4957
|
-
const slashUserTarget = resolveSlackDeferredActionTarget({
|
|
4958
|
-
eventScope,
|
|
4959
|
-
kind: "user",
|
|
4960
|
-
id: command.user_id
|
|
4961
|
-
});
|
|
4962
|
-
const { sessionKey, commandTargetSessionKey } = resolveNativeCommandSessionTargets({
|
|
4963
|
-
agentId: route.agentId,
|
|
4964
|
-
sessionPrefix: slashCommand.sessionPrefix,
|
|
4965
|
-
userId: slashUserTarget.peerId,
|
|
4966
|
-
targetSessionKey: route.sessionKey,
|
|
4967
|
-
sessionKeyCase: "lowercase"
|
|
4968
|
-
});
|
|
4969
5062
|
const slashReplyTarget = resolveSlackDeferredActionTarget({
|
|
4970
5063
|
eventScope,
|
|
4971
5064
|
kind: !slashCommand.ephemeral && isRoomish ? "channel" : "user",
|
|
4972
5065
|
id: !slashCommand.ephemeral && isRoomish ? command.channel_id : command.user_id
|
|
4973
5066
|
}).target;
|
|
4974
5067
|
const from = isDirectMessage ? `slack:${routeTarget.peerId}` : isRoom ? `slack:channel:${routeTarget.peerId}` : `slack:group:${routeTarget.peerId}`;
|
|
4975
|
-
const ctxPayload =
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
5068
|
+
const ctxPayload = (ctx.buildContext ?? buildChannelInboundEventContext)({
|
|
5069
|
+
channelIngress: slashIngress,
|
|
5070
|
+
channel: "slack",
|
|
5071
|
+
accountId: route.accountId,
|
|
5072
|
+
messageId,
|
|
5073
|
+
timestamp: Date.now(),
|
|
5074
|
+
from,
|
|
5075
|
+
sender: {
|
|
5076
|
+
id: command.user_id,
|
|
5077
|
+
name: senderName
|
|
5078
|
+
},
|
|
5079
|
+
conversation: {
|
|
5080
|
+
kind: chatType,
|
|
5081
|
+
id: command.channel_id,
|
|
5082
|
+
spaceId: routingTeamId,
|
|
5083
|
+
threadId: p.threadTs
|
|
5084
|
+
},
|
|
5085
|
+
route: {
|
|
5086
|
+
agentId: route.agentId,
|
|
5087
|
+
accountId: route.accountId,
|
|
5088
|
+
routeSessionKey: commandTargetSessionKey,
|
|
5089
|
+
dispatchSessionKey: sessionKey
|
|
5090
|
+
},
|
|
5091
|
+
reply: {
|
|
5092
|
+
to: `slash:${slashUserTarget.peerId}`,
|
|
5093
|
+
originatingTo: p.threadTs ? resolveSlackDeferredActionTarget({
|
|
5094
|
+
eventScope,
|
|
5095
|
+
kind: "channel",
|
|
5096
|
+
id: command.channel_id
|
|
5097
|
+
}).target : slashReplyTarget
|
|
5098
|
+
},
|
|
5099
|
+
message: {
|
|
5100
|
+
body: prompt,
|
|
5101
|
+
bodyForAgent: prompt,
|
|
5102
|
+
rawBody: prompt,
|
|
5103
|
+
commandBody: prompt
|
|
5104
|
+
},
|
|
5105
|
+
access: { commands: { authorized: commandAuthorized } },
|
|
5106
|
+
extra: {
|
|
5107
|
+
CommandArgs: commandArgs,
|
|
4987
5108
|
GroupSubject: isRoomish ? roomLabel : void 0,
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
SenderName: senderName,
|
|
4995
|
-
SenderId: command.user_id,
|
|
4996
|
-
Provider: "slack",
|
|
4997
|
-
Surface: "slack",
|
|
4998
|
-
WasMentioned: true,
|
|
4999
|
-
MessageSid: p.eventTs ?? command.trigger_id,
|
|
5000
|
-
MessageThreadId: p.threadTs,
|
|
5001
|
-
Timestamp: Date.now(),
|
|
5002
|
-
SessionKey: sessionKey,
|
|
5003
|
-
CommandTargetSessionKey: commandTargetSessionKey,
|
|
5004
|
-
AccountId: route.accountId,
|
|
5005
|
-
CommandSource: "native",
|
|
5006
|
-
CommandAuthorized: commandAuthorized,
|
|
5007
|
-
OriginatingChannel: "slack",
|
|
5008
|
-
OriginatingTo: p.threadTs ? resolveSlackDeferredActionTarget({
|
|
5009
|
-
eventScope,
|
|
5010
|
-
kind: "channel",
|
|
5011
|
-
id: command.channel_id
|
|
5012
|
-
}).target : slashReplyTarget
|
|
5109
|
+
GroupSystemPrompt: groupSystemPrompt,
|
|
5110
|
+
ChannelPromptContext: channelMetadata ? [channelMetadata] : void 0,
|
|
5111
|
+
WasMentioned: true,
|
|
5112
|
+
CommandTargetSessionKey: commandTargetSessionKey,
|
|
5113
|
+
CommandSource: "native"
|
|
5114
|
+
}
|
|
5013
5115
|
});
|
|
5014
5116
|
const messageSentHookTarget = ctxPayload.OriginatingTo ?? ctxPayload.To ?? slashReplyTarget;
|
|
5015
5117
|
const deliverSlashPayloads = async (replies, onReplySettled) => {
|
|
@@ -5486,6 +5588,7 @@ function registerSlackCommonEvents(params) {
|
|
|
5486
5588
|
});
|
|
5487
5589
|
registerSlackInteractionEvents({
|
|
5488
5590
|
ctx,
|
|
5591
|
+
handleSlackMessage: params.handleSlackMessage,
|
|
5489
5592
|
trackEvent
|
|
5490
5593
|
});
|
|
5491
5594
|
}
|
|
@@ -5823,7 +5926,7 @@ function createSlackThreadTsResolver(params) {
|
|
|
5823
5926
|
} };
|
|
5824
5927
|
}
|
|
5825
5928
|
// extensions/slack/src/monitor/message-handler.ts
|
|
5826
|
-
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-
|
|
5929
|
+
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-CCIbWV9-.mjs"));
|
|
5827
5930
|
const RETRYABLE_FLUSH_MAX_ATTEMPTS = 3;
|
|
5828
5931
|
function shouldDebounceSlackMessage(message, cfg) {
|
|
5829
5932
|
const textForCommandDetection = stripSlackMentionsForCommandDetection(message.text ?? "");
|
|
@@ -5843,7 +5946,7 @@ function createSlackMessageHandler(params) {
|
|
|
5843
5946
|
serializeImmediate: true,
|
|
5844
5947
|
resolveDebounceMs: (entry) => entry.debounceMs,
|
|
5845
5948
|
buildKey: (entry) => buildSlackDebounceKey(entry.message, ctx.accountId, entry.opts.eventScope?.teamId),
|
|
5846
|
-
shouldDebounce: (entry) => !entry.retry && !entry.opts.eventScope && shouldDebounceSlackMessage(entry.message, ctx.cfg),
|
|
5949
|
+
shouldDebounce: (entry) => !entry.retry && !entry.opts.eventScope && entry.opts.source !== "block_action" && shouldDebounceSlackMessage(entry.message, ctx.cfg),
|
|
5847
5950
|
onFlush: (entries, createFlush) => createFlush({
|
|
5848
5951
|
lifecycle: { abortSignal: AbortSignal.any([params.abortSignal, ...entries.map((entry) => entry.opts.turnAdoptionLifecycle?.abortSignal)].filter((signal) => signal !== void 0)) },
|
|
5849
5952
|
dispatch: async (admissionLifecycle) => {
|
|
@@ -5853,7 +5956,7 @@ function createSlackMessageHandler(params) {
|
|
|
5853
5956
|
try {
|
|
5854
5957
|
const runtimeContext = admittedContext ??= await ctx.readRuntimeContext();
|
|
5855
5958
|
admissionLifecycle.abortSignal.throwIfAborted();
|
|
5856
|
-
await (async () => {
|
|
5959
|
+
const refusedSilently = await (async () => {
|
|
5857
5960
|
const flushedEntry = entries.at(-1);
|
|
5858
5961
|
if (flushedEntry) {
|
|
5859
5962
|
const teamId = flushedEntry.opts.eventScope?.teamId;
|
|
@@ -5925,7 +6028,7 @@ function createSlackMessageHandler(params) {
|
|
|
5925
6028
|
const last = latestSurviving;
|
|
5926
6029
|
if (!last) {
|
|
5927
6030
|
releaseClaims();
|
|
5928
|
-
return;
|
|
6031
|
+
return false;
|
|
5929
6032
|
}
|
|
5930
6033
|
const combinedText = surviving.length === 1 ? last.message.text ?? "" : surviving.map((entry) => entry.message.text ?? "").filter(Boolean).join("\n");
|
|
5931
6034
|
const combinedMentioned = surviving.some((entry) => Boolean(entry.opts.wasMentioned));
|
|
@@ -5963,10 +6066,10 @@ function createSlackMessageHandler(params) {
|
|
|
5963
6066
|
if (!prepared) {
|
|
5964
6067
|
if (visibleDrop) {
|
|
5965
6068
|
await commitClaims();
|
|
5966
|
-
return;
|
|
6069
|
+
return false;
|
|
5967
6070
|
}
|
|
5968
6071
|
releaseClaims();
|
|
5969
|
-
return;
|
|
6072
|
+
return true;
|
|
5970
6073
|
}
|
|
5971
6074
|
await turnAdoptionLifecycle?.onSessionRouted?.(prepared.route.sessionKey);
|
|
5972
6075
|
const deferredHeartbeatIntervals = [turnAdoptionLifecycle?.deferredHeartbeatIntervalMs, admissionLifecycle.deferredHeartbeatIntervalMs].filter((interval) => interval !== void 0 && Number.isFinite(interval) && interval > 0);
|
|
@@ -6015,12 +6118,13 @@ function createSlackMessageHandler(params) {
|
|
|
6015
6118
|
await dispatchPreparedSlackMessage(prepared);
|
|
6016
6119
|
if (!turnAdoptionLifecycle && !settlementHandedOff) await commitClaims();
|
|
6017
6120
|
else if (!settlementHandedOff) releaseClaims();
|
|
6121
|
+
return false;
|
|
6018
6122
|
} catch (error) {
|
|
6019
6123
|
releaseClaims(error);
|
|
6020
6124
|
throw error;
|
|
6021
6125
|
}
|
|
6022
6126
|
})();
|
|
6023
|
-
for (const completion of completions) completion.resolve();
|
|
6127
|
+
for (const completion of completions) completion.resolve(refusedSilently);
|
|
6024
6128
|
} catch (error) {
|
|
6025
6129
|
const runtimeContext = admittedContext;
|
|
6026
6130
|
if (runtimeContext && (retry?.attempt ?? 0) < RETRYABLE_FLUSH_MAX_ATTEMPTS && error instanceof SlackMessageDispatchRetryError && !entries.some((entry) => entry.opts.eventScope || entry.opts.dispatchCompletion)) {
|
|
@@ -6067,7 +6171,7 @@ function createSlackMessageHandler(params) {
|
|
|
6067
6171
|
cfg: readConfig(),
|
|
6068
6172
|
channel: "slack"
|
|
6069
6173
|
});
|
|
6070
|
-
const canDebounce = !opts.eventScope && debounceMs > 0 && shouldDebounceSlackMessage(resolvedMessage, ctx.cfg);
|
|
6174
|
+
const canDebounce = !opts.eventScope && opts.source !== "block_action" && debounceMs > 0 && shouldDebounceSlackMessage(resolvedMessage, ctx.cfg);
|
|
6071
6175
|
if (!canDebounce && conversationKey) {
|
|
6072
6176
|
const pendingKeys = pendingTopLevelDebounceKeys.get(conversationKey);
|
|
6073
6177
|
if (pendingKeys && pendingKeys.size > 0) {
|
|
@@ -6095,7 +6199,7 @@ function createSlackMessageHandler(params) {
|
|
|
6095
6199
|
return dispatchCompletion;
|
|
6096
6200
|
}
|
|
6097
6201
|
return async (message, opts) => {
|
|
6098
|
-
await (await enqueueSlackMessage(message, opts))?.promise;
|
|
6202
|
+
return await (await enqueueSlackMessage(message, opts))?.promise ?? false;
|
|
6099
6203
|
};
|
|
6100
6204
|
}
|
|
6101
6205
|
// extensions/slack/src/monitor/presence-monitor.ts
|
|
@@ -6366,7 +6470,7 @@ function createSlackWorkspaceClientResolver(params) {
|
|
|
6366
6470
|
}
|
|
6367
6471
|
// extensions/slack/src/monitor/provider.ts
|
|
6368
6472
|
const getSlackBoltInterop = createLazyRuntimeSurface(() => import("@slack/bolt"), resolveSlackBoltInterop);
|
|
6369
|
-
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-
|
|
6473
|
+
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-Dbd9_Akf.mjs"));
|
|
6370
6474
|
function resolveSlackRuntimeIdentity(params) {
|
|
6371
6475
|
const botUserId = normalizeOptionalString(params.botUserId);
|
|
6372
6476
|
const botId = normalizeOptionalString(params.botId);
|
|
@@ -6846,4 +6950,4 @@ var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
|
6846
6950
|
isSlackChannelAllowedByPolicy: () => isSlackChannelAllowedByPolicy,
|
|
6847
6951
|
monitorSlackProvider: () => monitorSlackProvider
|
|
6848
6952
|
});
|
|
6849
|
-
export {
|
|
6953
|
+
export { resolveSlackChatType as A, appendSlackStream as C, stopSlackStream as D, startSlackStream as E, readSlackAssistantThreadContext as M, stripSlackMentionsForCommandDetection as N, SLACK_SOCKET_RECONNECT_POLICY as O, SlackStreamNotDeliveredError as S, markSlackStreamFallbackDelivered as T, requireSlackMessageEvent as _, createSlackResponseUrlBudget as a, resolveSlackEffectiveAllowFrom as b, hasAddressedSlackSessionRun as c, resolveSlackChannelHistory as d, resolveSlackThreadHistory as f, parseSlackMessageEvent as g, trackSlackDraftMessage as h, SlackResponseAlreadyReportedError as i, buildSlackAssistantThreadMetadata as j, normalizeSlackChannelType as k, registerSlackSessionRun as l, resolveSlackTimestampMs as m, monitorSlackProvider as n, authorizeSlackDirectMessage as o, resolveSlackThreadStarter as p, resolveSlackRoomContextHints as r, resolveSlackRoutingContext as s, monitor_exports as t, resolveSlackThreadContext as u, authorizeSlackBotRoomMessage as v, discardSlackStreamPendingText as w, SlackStreamMessageTooLongError as x, resolveSlackCommandIngress as y };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { d as resolveSlackMarkdownOptions, f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-Dsl3wabY.mjs";
|
|
2
2
|
import { a as parseSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { Ct as SLACK_TEXT_LIMIT, D as assertSlackDetachedTargetAllowed, H as resolveSlackQuestionActionIds, gt as SLACK_PRESENTATION_CAPABILITIES } from "./probe-D_7fKdOR.mjs";
|
|
4
4
|
import { r as resolveSlackThreadTsValue } from "./thread-ts-47Au2-Yn.mjs";
|
|
5
|
-
import { a as resolveSlackReplyBlockResolution, d as resolveSlackAuthoredTextPlacement, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-
|
|
5
|
+
import { a as resolveSlackReplyBlockResolution, d as resolveSlackAuthoredTextPlacement, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-BkEYrZHF.mjs";
|
|
6
6
|
import { t as mergeSlackSendResults } from "./send-results-Bm6V1ekL.mjs";
|
|
7
|
-
import { t as registerSlackQuestionDelivery } from "./question-delivery-
|
|
7
|
+
import { t as registerSlackQuestionDelivery } from "./question-delivery-B3JBKMFu.mjs";
|
|
8
8
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
10
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -45,7 +45,7 @@ function readSlackRenderedPresentation(slackData) {
|
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
48
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-DfKHJ6Us.mjs").then((n) => n.n));
|
|
49
49
|
function resolveSlackSendIdentity(identity) {
|
|
50
50
|
if (!identity) return;
|
|
51
51
|
const username = normalizeOptionalString(identity.name);
|