@openclaw/slack 2026.5.14-beta.1 → 2026.5.16-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{action-runtime-gtC-RM3r.js → action-runtime-p39JLqwf.js} +4 -4
- package/dist/action-runtime.runtime-BzrPV3EA.js +2 -0
- package/dist/{media-B-nNpS2G.js → actions-BCRbHv1Q.js} +309 -3
- package/dist/{actions.runtime-DD6hfFCA.js → actions.runtime-CpywQR3D.js} +1 -1
- package/dist/api.js +16 -16
- package/dist/{approval-handler.runtime-DeYBuIaU.js → approval-handler.runtime-DXrdRbkT.js} +3 -4
- package/dist/{blocks-render-BdLueE_v.js → blocks-render-BAVfd6r0.js} +1 -1
- package/dist/{channel-CC04F-xs.js → channel-CVSopl66.js} +23 -27
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-jzYjY634.js → channel.setup-DknBgufI.js} +3 -3
- package/dist/{client-8r7r7aZ3.js → client-C_IaJbi5.js} +20 -1
- package/dist/{config-schema-Bueih4yH.js → config-schema-CNRousxw.js} +1 -1
- package/dist/contract-api.js +4 -4
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CuaWaGnM.js → directory-live-CZPzpQZF.js} +1 -1
- package/dist/{doctor-contract-DCkS8eNN.js → doctor-contract-B8QIWMs1.js} +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/http-routes-api.js +1 -1
- package/dist/inbound-contract-test-api.js +2 -2
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-B_bKUmP0.js → message-tool-api-C7gc7goF.js} +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-B3QB1ysK.js → monitor-CdVxsuHi.js} +3 -3
- package/dist/{outbound-adapter-DsAvCwpZ.js → outbound-adapter-CHm6e-0Q.js} +4 -5
- package/dist/outbound-payload-test-api.js +1 -1
- package/dist/{outbound-payload.test-harness-DM9ZdY2f.js → outbound-payload.test-harness-C0CW7_CE.js} +2 -2
- package/dist/{pipeline.runtime-D-YJZZaI.js → pipeline.runtime-CakcaQh9.js} +119 -143
- package/dist/{plugin-routes-Dt_jh9W8.js → plugin-routes-CRnfsTTX.js} +1 -1
- package/dist/{prepare-CXI8nHbJ.js → prepare-DSRUr44d.js} +223 -85
- package/dist/{prepare.test-helpers-BhFHtbz3.js → prepare.test-helpers-CU1qB54Q.js} +1 -1
- package/dist/{probe-D1wYA05H.js → probe-FL4sUJsH.js} +2 -2
- package/dist/{provider-Ut7IF0Mn.js → provider-bKg1hkf5.js} +158 -24
- package/dist/{replies-CzfjCaLG.js → replies-Fg1T3ZzU.js} +4 -4
- package/dist/reply-blocks-BFaJ_ejG.js +134 -0
- package/dist/{resolve-channels-BiVxSLVm.js → resolve-channels-B_eKaOkE.js} +2 -2
- package/dist/{resolve-users-CcpSlYw-.js → resolve-users-BzBAJwvq.js} +2 -2
- package/dist/{room-context-D0hGOp8m.js → room-context-Cd8jFpS-.js} +2 -2
- package/dist/{runtime-api-D8wiG9BS.js → runtime-api-B5HGOzX3.js} +2 -2
- package/dist/runtime-api.js +12 -12
- package/dist/runtime-setter-api.js +1 -1
- package/dist/{scopes-BTkB8PPE.js → scopes-Bvg_ZzqZ.js} +2 -2
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-ioky2Xpy.js → send-CxXFbqN1.js} +5 -6
- package/dist/send.runtime-BHCPpSj_.js +2 -0
- package/dist/send.runtime-CDG5AgU3.js +2 -0
- package/dist/{setup-core-DgLJ7dQY.js → setup-core-B7pou7oe.js} +23 -22
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-B6w9gtds.js → setup-surface-D6LLzeRz.js} +16 -15
- package/dist/{shared-CSiHkaVO.js → shared-7Vi9j4aV.js} +7 -7
- package/dist/{slash-dispatch.runtime-DNr1EDON.js → slash-dispatch.runtime-Cg7uU92H.js} +1 -1
- package/dist/test-api.js +7 -7
- package/dist/thread-ts-As_dcNbD.js +52 -0
- package/package.json +5 -5
- package/dist/action-runtime.runtime-DbVd7_Na.js +0 -2
- package/dist/actions-Cqyj7oRr.js +0 -309
- package/dist/approval-auth-D3xf0sS6.js +0 -28
- package/dist/blocks-input-BJZ8vv03.js +0 -29
- package/dist/channel-api-BfBK89IN.js +0 -20
- package/dist/exec-approvals-BLn4Zx7V.js +0 -58
- package/dist/group-policy-utF2iWnE.js +0 -41
- package/dist/mrkdwn-18IzcEAY.js +0 -6
- package/dist/reply-blocks-DWoZrUll.js +0 -14
- package/dist/send.runtime-5Kl3Wzbf.js +0 -2
- package/dist/send.runtime-DoifekaA.js +0 -2
- package/dist/thread-ts-o-QBwB3k.js +0 -24
- /package/dist/{accounts.runtime-CkfFIisb.js → accounts.runtime-BhbEu1ZK.js} +0 -0
- /package/dist/{allow-list-T7ZDpUsF.js → allow-list-nwXs_eCP.js} +0 -0
- /package/dist/{config-api-B48Z4H47.js → config-api-CmgE_ORg.js} +0 -0
- /package/dist/{directory-config-BKKNBkCq.js → directory-config-CMvFiswf.js} +0 -0
- /package/dist/{errors-BrtayXHa.js → errors-C_sW0Zgl.js} +0 -0
- /package/dist/{interactive-replies-CawNPL-h.js → interactive-replies-BSg5hXhj.js} +0 -0
- /package/dist/{magic-string.es-BLAi6qQC.js → magic-string.es-9lw4MGoF.js} +0 -0
- /package/dist/{registry-BdfKYina.js → registry-D2cWOLZV.js} +0 -0
- /package/dist/{resolve-allowlist-common-rhfyDyWi.js → resolve-allowlist-common-DLub2I2i.js} +0 -0
- /package/dist/{runtime--VlVtTPu.js → runtime-DQxkf7k2.js} +0 -0
- /package/dist/{secret-contract-BurGIyhv.js → secret-contract-0TL3L5Kb.js} +0 -0
- /package/dist/{security-audit-DvOpSaZM.js → security-audit-BJzADAw3.js} +0 -0
- /package/dist/{slash-commands.runtime-DRkNgIQ2.js → slash-commands.runtime-bcDwsGnu.js} +0 -0
- /package/dist/{slash-plugin-commands.runtime-Dj5h8hmv.js → slash-plugin-commands.runtime-DBHGUSj2.js} +0 -0
- /package/dist/{slash-skill-commands.runtime-B-_KAk0C.js → slash-skill-commands.runtime-rrY2hXvN.js} +0 -0
- /package/dist/{streaming-compat-C6rySwiD.js → streaming-compat-eu5Rj5gj.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode } from "./streaming-compat-
|
|
1
|
+
import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode } from "./streaming-compat-eu5Rj5gj.js";
|
|
2
2
|
import { asObjectRecord, hasLegacyAccountStreamingAliases, hasLegacyStreamingAliases, normalizeLegacyChannelAliases } from "openclaw/plugin-sdk/runtime-doctor";
|
|
3
3
|
//#region extensions/slack/src/doctor-contract.ts
|
|
4
4
|
function hasLegacySlackStreamingAliases(value) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-B8QIWMs1.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/http-routes-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-
|
|
1
|
+
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-CRnfsTTX.js";
|
|
2
2
|
export { registerSlackPluginHttpRoutes };
|
|
@@ -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-DSRUr44d.js";
|
|
2
|
+
import { t as createInboundSlackTestContext } from "./prepare.test-helpers-CU1qB54Q.js";
|
|
3
3
|
export { createInboundSlackTestContext, prepareSlackMessage };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
1
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BSg5hXhj.js";
|
|
2
2
|
export { compileSlackInteractiveReplies, isSlackInteractiveRepliesEnabled };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveSlackAccount, t as listEnabledSlackAccounts } from "./accounts-yk5K3wQU.js";
|
|
2
|
-
import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-
|
|
2
|
+
import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-BSg5hXhj.js";
|
|
3
3
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
4
4
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
5
5
|
import { Type } from "typebox";
|
package/dist/message-tool-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as describeSlackMessageTool } from "./message-tool-api-
|
|
1
|
+
import { t as describeSlackMessageTool } from "./message-tool-api-C7gc7goF.js";
|
|
2
2
|
export { describeSlackMessageTool as describeMessageTool };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
-
import { D as buildSlackSlashCommandMatcher, p as isSlackChannelAllowedByPolicy } from "./room-context-
|
|
3
|
-
import { t as monitorSlackProvider } from "./provider-
|
|
4
|
-
import { o as resolveSlackThreadTs } from "./replies-
|
|
2
|
+
import { D as buildSlackSlashCommandMatcher, p as isSlackChannelAllowedByPolicy } from "./room-context-Cd8jFpS-.js";
|
|
3
|
+
import { t as monitorSlackProvider } from "./provider-bKg1hkf5.js";
|
|
4
|
+
import { o as resolveSlackThreadTs } from "./replies-Fg1T3ZzU.js";
|
|
5
5
|
//#region extensions/slack/src/monitor.ts
|
|
6
6
|
var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
-
import { n as buildSlackPresentationBlocks, r as resolveSlackInteractiveBlockOffsets, t as buildSlackInteractiveBlocks } from "./blocks-render-
|
|
3
|
-
import { n as resolveSlackThreadTsValue,
|
|
4
|
-
import { t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
5
|
-
import { n as parseSlackBlocksInput } from "./blocks-input-BJZ8vv03.js";
|
|
2
|
+
import { n as buildSlackPresentationBlocks, r as resolveSlackInteractiveBlockOffsets, t as buildSlackInteractiveBlocks } from "./blocks-render-BAVfd6r0.js";
|
|
3
|
+
import { i as parseSlackBlocksInput, n as resolveSlackThreadTsValue, o as SLACK_TEXT_LIMIT } from "./thread-ts-As_dcNbD.js";
|
|
4
|
+
import { t as compileSlackInteractiveReplies } from "./interactive-replies-BSg5hXhj.js";
|
|
6
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
6
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
8
7
|
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
|
@@ -13,7 +12,7 @@ var outbound_adapter_exports = /* @__PURE__ */ __exportAll({ slackOutbound: () =
|
|
|
13
12
|
const SLACK_MAX_BLOCKS = 50;
|
|
14
13
|
let slackSendRuntimePromise;
|
|
15
14
|
async function loadSlackSendRuntime() {
|
|
16
|
-
slackSendRuntimePromise ??= import("./send.runtime-
|
|
15
|
+
slackSendRuntimePromise ??= import("./send.runtime-CDG5AgU3.js");
|
|
17
16
|
return await slackSendRuntimePromise;
|
|
18
17
|
}
|
|
19
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-C0CW7_CE.js";
|
|
2
2
|
export { createSlackOutboundPayloadHarness };
|
package/dist/{outbound-payload.test-harness-DM9ZdY2f.js → outbound-payload.test-harness-C0CW7_CE.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as slackOutbound } from "./outbound-adapter-
|
|
1
|
+
import { n as slackOutbound } from "./outbound-adapter-CHm6e-0Q.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 = {
|
|
@@ -10147,7 +10147,7 @@ function memo(fn) {
|
|
|
10147
10147
|
};
|
|
10148
10148
|
}
|
|
10149
10149
|
async function saveInlineSnapshots(environment, snapshots) {
|
|
10150
|
-
const MagicString = (await import("./magic-string.es-
|
|
10150
|
+
const MagicString = (await import("./magic-string.es-9lw4MGoF.js")).default;
|
|
10151
10151
|
const files = new Set(snapshots.map((i) => i.file));
|
|
10152
10152
|
await Promise.all(Array.from(files).map(async (file) => {
|
|
10153
10153
|
const snaps = snapshots.filter((i) => i.file === file);
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
3
|
-
import { i as normalizeSlackAllowOwnerEntry } from "./allow-list-
|
|
4
|
-
import "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import { n as
|
|
12
|
-
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, t as createSlackReplyDeliveryPlan } from "./replies-CzfjCaLG.js";
|
|
1
|
+
import { o as SLACK_TEXT_LIMIT, s as truncateSlackText } from "./thread-ts-As_dcNbD.js";
|
|
2
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BSg5hXhj.js";
|
|
3
|
+
import { i as normalizeSlackAllowOwnerEntry } from "./allow-list-nwXs_eCP.js";
|
|
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-CxXFbqN1.js";
|
|
6
|
+
import { b as buildSlackEditTextPayload, f as removeSlackReaction, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage } from "./actions-BCRbHv1Q.js";
|
|
7
|
+
import { t as formatSlackError } from "./errors-C_sW0Zgl.js";
|
|
8
|
+
import { T as updateLastRoute, a as recordInboundSession, w as resolveStorePath } from "./room-context-Cd8jFpS-.js";
|
|
9
|
+
import { r as escapeSlackMrkdwn } from "./provider-bKg1hkf5.js";
|
|
10
|
+
import { n as resolveSlackThreadTargets, t as prepareSlackMessage } from "./prepare-DSRUr44d.js";
|
|
11
|
+
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, t as createSlackReplyDeliveryPlan } from "./replies-Fg1T3ZzU.js";
|
|
13
12
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
13
|
import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
15
14
|
import { createChannelMessageReplyPipeline, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-message";
|
|
@@ -17,12 +16,11 @@ import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, c
|
|
|
17
16
|
import { danger, logVerbose, shouldLogVerbose, sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
18
17
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
19
18
|
import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
20
|
-
import { clearHistoryEntriesIfEnabled } from "openclaw/plugin-sdk/reply-history";
|
|
21
19
|
import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
|
|
22
20
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
23
21
|
import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
24
22
|
import { DEFAULT_TIMING, createStatusReactionController, logAckFailure, logTypingFailure, removeAckReactionAfterReply } from "openclaw/plugin-sdk/channel-feedback";
|
|
25
|
-
import { hasVisibleInboundReplyDispatch,
|
|
23
|
+
import { hasVisibleInboundReplyDispatch, runPreparedInboundReplyTurn } from "openclaw/plugin-sdk/inbound-reply-dispatch";
|
|
26
24
|
import { resolveAgentOutboundIdentity } from "openclaw/plugin-sdk/outbound-runtime";
|
|
27
25
|
import { createDraftStreamLoop } from "openclaw/plugin-sdk/channel-lifecycle";
|
|
28
26
|
import { createReplyDispatcherWithTyping, dispatchInboundMessage, settleReplyDispatcher } from "openclaw/plugin-sdk/reply-runtime";
|
|
@@ -988,6 +986,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
988
986
|
});
|
|
989
987
|
}
|
|
990
988
|
};
|
|
989
|
+
let draftPreviewCommitted = false;
|
|
991
990
|
const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping({
|
|
992
991
|
...replyPipeline,
|
|
993
992
|
humanDelay: resolveHumanDelayConfig(cfg, route.agentId),
|
|
@@ -1006,7 +1005,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1006
1005
|
kind: info.kind,
|
|
1007
1006
|
payload,
|
|
1008
1007
|
adapter: defineFinalizableLivePreviewAdapter({
|
|
1009
|
-
draft: draftStream ? {
|
|
1008
|
+
draft: draftStream && !draftPreviewCommitted ? {
|
|
1010
1009
|
flush: draftStream.flush,
|
|
1011
1010
|
clear: draftStream.clear,
|
|
1012
1011
|
discardPending: draftStream.discardPending,
|
|
@@ -1046,6 +1045,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1046
1045
|
});
|
|
1047
1046
|
},
|
|
1048
1047
|
onPreviewFinalized: (_preview) => {
|
|
1048
|
+
draftPreviewCommitted = true;
|
|
1049
1049
|
const finalThreadTs = usedReplyThreadTs ?? statusThreadTs;
|
|
1050
1050
|
observedReplyDelivery = true;
|
|
1051
1051
|
replyPlan.markSent();
|
|
@@ -1200,127 +1200,113 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1200
1200
|
let counts = {};
|
|
1201
1201
|
let dispatchSettledBeforeStart = false;
|
|
1202
1202
|
try {
|
|
1203
|
-
const turnResult = await
|
|
1203
|
+
const turnResult = await runPreparedInboundReplyTurn({
|
|
1204
1204
|
channel: "slack",
|
|
1205
1205
|
accountId: route.accountId,
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1206
|
+
routeSessionKey: route.sessionKey,
|
|
1207
|
+
storePath: prepared.turn.storePath,
|
|
1208
|
+
ctxPayload: prepared.ctxPayload,
|
|
1209
|
+
recordInboundSession,
|
|
1210
|
+
record: prepared.turn.record,
|
|
1211
|
+
history: prepared.turn.history,
|
|
1212
|
+
botLoopProtection: resolveSlackBotLoopProtection(prepared),
|
|
1213
|
+
onPreDispatchFailure: async () => {
|
|
1214
|
+
dispatchSettledBeforeStart = true;
|
|
1215
|
+
await settleReplyDispatcher({
|
|
1216
|
+
dispatcher,
|
|
1217
|
+
onSettled: () => markDispatchIdle()
|
|
1218
|
+
});
|
|
1219
|
+
},
|
|
1220
|
+
runDispatch: () => dispatchInboundMessage({
|
|
1221
|
+
ctx: prepared.ctxPayload,
|
|
1222
|
+
cfg,
|
|
1223
|
+
dispatcher,
|
|
1224
|
+
replyOptions: {
|
|
1225
|
+
...replyOptions,
|
|
1226
|
+
skillFilter: prepared.channelConfig?.skills,
|
|
1227
|
+
sourceReplyDeliveryMode,
|
|
1228
|
+
hasRepliedRef,
|
|
1229
|
+
disableBlockStreaming,
|
|
1230
|
+
onModelSelected,
|
|
1231
|
+
suppressDefaultToolProgressMessages: suppressDefaultToolProgressMessages ? true : void 0,
|
|
1232
|
+
onPartialReply: useStreaming ? void 0 : !previewStreamingEnabled ? void 0 : async (payload) => {
|
|
1233
|
+
updateDraftFromPartial(payload.text);
|
|
1231
1234
|
},
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
onPatchSummary: async (payload) => {
|
|
1308
|
-
if (payload.phase !== "end") return;
|
|
1309
|
-
await pushPreviewToolProgress(buildChannelProgressDraftLine({
|
|
1310
|
-
event: "patch",
|
|
1311
|
-
phase: payload.phase,
|
|
1312
|
-
title: payload.title,
|
|
1313
|
-
name: payload.name,
|
|
1314
|
-
added: payload.added,
|
|
1315
|
-
modified: payload.modified,
|
|
1316
|
-
deleted: payload.deleted,
|
|
1317
|
-
summary: payload.summary
|
|
1318
|
-
}));
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
})
|
|
1322
|
-
})
|
|
1323
|
-
}
|
|
1235
|
+
onAssistantMessageStart: onDraftBoundary,
|
|
1236
|
+
onReasoningEnd: onDraftBoundary,
|
|
1237
|
+
onReasoningStream: statusReactionsEnabled ? async () => {
|
|
1238
|
+
await statusReactions.setThinking();
|
|
1239
|
+
} : void 0,
|
|
1240
|
+
onToolStart: async (payload) => {
|
|
1241
|
+
if (statusReactionsEnabled) await statusReactions.setTool(payload.name);
|
|
1242
|
+
await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(account.config, {
|
|
1243
|
+
event: "tool",
|
|
1244
|
+
name: payload.name,
|
|
1245
|
+
phase: payload.phase,
|
|
1246
|
+
args: payload.args
|
|
1247
|
+
}, payload.detailMode ? { detailMode: payload.detailMode } : void 0), { toolName: payload.name });
|
|
1248
|
+
},
|
|
1249
|
+
onItemEvent: async (payload) => {
|
|
1250
|
+
await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(account.config, {
|
|
1251
|
+
event: "item",
|
|
1252
|
+
itemId: payload.itemId,
|
|
1253
|
+
itemKind: payload.kind,
|
|
1254
|
+
title: payload.title,
|
|
1255
|
+
name: payload.name,
|
|
1256
|
+
phase: payload.phase,
|
|
1257
|
+
status: payload.status,
|
|
1258
|
+
summary: payload.summary,
|
|
1259
|
+
progressText: payload.progressText,
|
|
1260
|
+
meta: payload.meta
|
|
1261
|
+
}));
|
|
1262
|
+
},
|
|
1263
|
+
onPlanUpdate: async (payload) => {
|
|
1264
|
+
if (payload.phase !== "update") return;
|
|
1265
|
+
await pushPreviewToolProgress(buildChannelProgressDraftLine({
|
|
1266
|
+
event: "plan",
|
|
1267
|
+
phase: payload.phase,
|
|
1268
|
+
title: payload.title,
|
|
1269
|
+
explanation: payload.explanation,
|
|
1270
|
+
steps: payload.steps
|
|
1271
|
+
}));
|
|
1272
|
+
},
|
|
1273
|
+
onApprovalEvent: async (payload) => {
|
|
1274
|
+
if (payload.phase !== "requested") return;
|
|
1275
|
+
await pushPreviewToolProgress(buildChannelProgressDraftLine({
|
|
1276
|
+
event: "approval",
|
|
1277
|
+
phase: payload.phase,
|
|
1278
|
+
title: payload.title,
|
|
1279
|
+
command: payload.command,
|
|
1280
|
+
reason: payload.reason,
|
|
1281
|
+
message: payload.message
|
|
1282
|
+
}));
|
|
1283
|
+
},
|
|
1284
|
+
onCommandOutput: async (payload) => {
|
|
1285
|
+
if (payload.phase !== "end") return;
|
|
1286
|
+
await pushPreviewToolProgress(buildChannelProgressDraftLine({
|
|
1287
|
+
event: "command-output",
|
|
1288
|
+
phase: payload.phase,
|
|
1289
|
+
title: payload.title,
|
|
1290
|
+
name: payload.name,
|
|
1291
|
+
status: payload.status,
|
|
1292
|
+
exitCode: payload.exitCode
|
|
1293
|
+
}));
|
|
1294
|
+
},
|
|
1295
|
+
onPatchSummary: async (payload) => {
|
|
1296
|
+
if (payload.phase !== "end") return;
|
|
1297
|
+
await pushPreviewToolProgress(buildChannelProgressDraftLine({
|
|
1298
|
+
event: "patch",
|
|
1299
|
+
phase: payload.phase,
|
|
1300
|
+
title: payload.title,
|
|
1301
|
+
name: payload.name,
|
|
1302
|
+
added: payload.added,
|
|
1303
|
+
modified: payload.modified,
|
|
1304
|
+
deleted: payload.deleted,
|
|
1305
|
+
summary: payload.summary
|
|
1306
|
+
}));
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
})
|
|
1324
1310
|
});
|
|
1325
1311
|
if (turnResult.dispatched) {
|
|
1326
1312
|
const result = turnResult.dispatchResult;
|
|
@@ -1368,11 +1354,6 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1368
1354
|
if (anyReplyDelivered && participationThreadTs) recordSlackThreadParticipation(account.accountId, message.channel, participationThreadTs, { agentId: route.agentId });
|
|
1369
1355
|
if (!anyReplyDelivered) {
|
|
1370
1356
|
await draftStream?.clear();
|
|
1371
|
-
if (prepared.isRoomish && prepared.requireMention) clearHistoryEntriesIfEnabled({
|
|
1372
|
-
historyMap: ctx.channelHistories,
|
|
1373
|
-
historyKey: prepared.historyKey,
|
|
1374
|
-
limit: ctx.historyLimit
|
|
1375
|
-
});
|
|
1376
1357
|
return;
|
|
1377
1358
|
}
|
|
1378
1359
|
if (shouldLogVerbose()) {
|
|
@@ -1396,11 +1377,6 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1396
1377
|
});
|
|
1397
1378
|
}
|
|
1398
1379
|
});
|
|
1399
|
-
if (prepared.isRoomish && prepared.requireMention) clearHistoryEntriesIfEnabled({
|
|
1400
|
-
historyMap: ctx.channelHistories,
|
|
1401
|
-
historyKey: prepared.historyKey,
|
|
1402
|
-
limit: ctx.historyLimit
|
|
1403
|
-
});
|
|
1404
1380
|
}
|
|
1405
1381
|
//#endregion
|
|
1406
1382
|
export { dispatchPreparedSlackMessage, prepareSlackMessage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as listSlackAccountIds, r as mergeSlackAccountConfig } from "./accounts-yk5K3wQU.js";
|
|
2
|
-
import { r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-
|
|
2
|
+
import { r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-D2cWOLZV.js";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
//#region extensions/slack/src/http/plugin-routes.ts
|
|
5
5
|
function registerSlackPluginHttpRoutes(api) {
|