@lawpath-tech/openclaw 2026.2.21-31 → 2026.2.21-33
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/{agents-BP8GDc9z.js → agents-B1Ai7rsS.js} +4 -4
- package/dist/{agents.config-Bz7K-hIv.js → agents.config-CxHnl-lL.js} +1 -1
- package/dist/{agents.config-BelTNn6K.js → agents.config-DX3tDviB.js} +1 -1
- package/dist/{audio-preflight-DP74Yvkp.js → audio-preflight-Dp9KYMCX.js} +4 -4
- package/dist/{auth-choice-D1nW1tnt.js → auth-choice-CW81kzG9.js} +1 -1
- package/dist/{auth-choice-CBUsciQJ.js → auth-choice-DKrgElus.js} +1 -1
- package/dist/{banner-C18cJKYR.js → banner-B3qK6V55.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +8 -8
- package/dist/bundled/session-memory/handler.js +8 -8
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-DUJnpe5D.js → channel-options-CvSrxm2D.js} +1 -1
- package/dist/{channel-options-Dh4UX17R.js → channel-options-UCu5_Nv-.js} +1 -1
- package/dist/{channel-web-wLJAIBDS.js → channel-web-BUJggj7Y.js} +1 -1
- package/dist/{channels-cli-B3GeraPZ.js → channels-cli-B5TJMyaR.js} +6 -6
- package/dist/{channels-cli-7lL-U0bT.js → channels-cli-CGweC0NS.js} +6 -6
- package/dist/{chrome-BukFhWVN.js → chrome-DAmaIuXa.js} +7 -7
- package/dist/{cli-BdmFE8Ie.js → cli-B1suYn5Q.js} +3 -3
- package/dist/{cli-C9y6JSoj.js → cli-BFVjC6gz.js} +3 -3
- package/dist/{command-registry-D-PJPg1t.js → command-registry-C3Cb6_lT.js} +9 -9
- package/dist/{completion-cli-CA5pvA6W.js → completion-cli-CiR_bu8-.js} +1 -1
- package/dist/{completion-cli-zfVgI7-n.js → completion-cli-D-U8-xK-.js} +2 -2
- package/dist/{config-cli-BPrhK0hV.js → config-cli-BOhut0nG.js} +1 -1
- package/dist/{config-cli-CgMtqspq.js → config-cli-CsmTCdxD.js} +1 -1
- package/dist/{configure-yDD4TKIJ.js → configure-B7NUZjG2.js} +3 -3
- package/dist/{configure-P0T5xCKn.js → configure-BWfLMNPf.js} +3 -3
- package/dist/{deliver-BLmoUvp-.js → deliver-BP564y6d.js} +1 -1
- package/dist/{doctor-completion-wNJ24zG1.js → doctor-completion-CRCM30Gd.js} +1 -1
- package/dist/{doctor-completion-QnB3fOSm.js → doctor-completion-GAbf1D6s.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +3 -3
- package/dist/{gateway-cli-jzI2iY9a.js → gateway-cli-DGPCB6rN.js} +10 -10
- package/dist/{gateway-cli-abohiHMm.js → gateway-cli-QMubBYii.js} +10 -10
- package/dist/{health-ChDsDryb.js → health-CwpYY0fN.js} +1 -1
- package/dist/{health-BJ6SHHDr.js → health-DR30gLMN.js} +1 -1
- package/dist/{hooks-cli-BmuxgZBH.js → hooks-cli-DNwlE26g.js} +4 -4
- package/dist/{hooks-cli-DuRDIltL.js → hooks-cli-DlkiBMJi.js} +4 -4
- package/dist/{image-hH4ugSJI.js → image-DL65NdIM.js} +1 -1
- package/dist/index.js +8 -8
- package/dist/llm-slug-generator.js +8 -8
- package/dist/{models-BpqbY6s6.js → models-DVkqCyTw.js} +2 -2
- package/dist/{models-cli-COanmcGm.js → models-cli-BEkmRLcC.js} +4 -4
- package/dist/{models-cli-DqWWTCao.js → models-cli-DVKgOKux.js} +5 -5
- package/dist/{onboard-wCY6TSre.js → onboard-BS7ZSQTR.js} +2 -2
- package/dist/{onboard-UEtBiCoJ.js → onboard-D9z9OO_A.js} +2 -2
- package/dist/{onboard-channels-BJ-tZka8.js → onboard-channels-CUuKFX-y.js} +1 -1
- package/dist/{onboard-channels-CPma01ab.js → onboard-channels-SRbD8DVG.js} +1 -1
- package/dist/{onboarding-Dp6k5p-a.js → onboarding-CQRQ7bCq.js} +3 -3
- package/dist/{onboarding-Di4SkJUj.js → onboarding-DVBEYCod.js} +3 -3
- package/dist/{onboarding.finalize-G-q87JA2.js → onboarding.finalize-BRewG-HX.js} +7 -7
- package/dist/{onboarding.finalize-DshqLGqp.js → onboarding.finalize-CTF-nyL8.js} +8 -8
- package/dist/{pi-embedded-C7TfFIPO.js → pi-embedded-BqyWOcTK.js} +200 -43
- package/dist/{pi-embedded-helpers-DR_3fJko.js → pi-embedded-helpers-HnqhrewN.js} +4 -4
- package/dist/{pi-embedded-BAqpVR_m.js → pi-embedded-rXq7jDOy.js} +214 -57
- package/dist/{plugin-registry-CFiYBSX2.js → plugin-registry-Bp0OjK16.js} +1 -1
- package/dist/{plugin-registry-BdQI8-bG.js → plugin-registry-Ca9kiZbZ.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-BjU_kuyW.js → agent-scope-KjIvGpFh.js} +19 -19
- package/dist/plugin-sdk/{channel-web-DtyyUoWA.js → channel-web-i7Q0e2xL.js} +1 -1
- package/dist/plugin-sdk/index.js +4 -4
- package/dist/plugin-sdk/{manager-BBcNMx7F.js → manager-DeHKg0Ym.js} +28 -28
- package/dist/plugin-sdk/memory-host-search.js +4 -4
- package/dist/plugin-sdk/{qmd-manager-B5NFEjJd.js → qmd-manager-Ci6Ood2P.js} +2 -2
- package/dist/plugin-sdk/{replies-OoosoUz9.js → replies-CvKNemz4.js} +5 -4
- package/dist/plugin-sdk/{reply-C_4ajFUt.js → reply-CrBuiTf0.js} +200 -43
- package/dist/plugin-sdk/{send-C9Q83PfF.js → send-DzgvnkSq.js} +20 -1
- package/dist/plugin-sdk/slack/monitor/events/channels.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/members.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/pins.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/reactions.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/message-handler.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/provider.d.ts +6 -0
- package/dist/plugin-sdk/slack/monitor/replies.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/types.d.ts +4 -0
- package/dist/plugin-sdk/slack/threading.d.ts +9 -0
- package/dist/plugin-sdk/{sqlite-CH_AglGD.js → sqlite-CcSeRdqy.js} +15 -15
- package/dist/plugin-sdk/{web-BlY2wNrk.js → web-DXbKqGiu.js} +4 -4
- package/dist/{plugins-cli-CmrER-zr.js → plugins-cli-B54I3YDp.js} +4 -4
- package/dist/{plugins-cli-B03aSLgf.js → plugins-cli-DQqPpkDg.js} +4 -4
- package/dist/{program-Djk08-l7.js → program-CiVPUyGe.js} +9 -9
- package/dist/{program-context-DlRS1tcr.js → program-context-B8jVIvqn.js} +17 -17
- package/dist/{prompt-select-styled-CMszn2hx.js → prompt-select-styled-DP6ORKEH.js} +4 -4
- package/dist/{prompt-select-styled-JkMJPt68.js → prompt-select-styled-XJNDuVI-.js} +4 -4
- package/dist/{provider-auth-helpers-36LOZ6SL.js → provider-auth-helpers-BvdnFgmZ.js} +1 -1
- package/dist/{provider-auth-helpers-ZV7-WRyR.js → provider-auth-helpers-GlPRMdgU.js} +1 -1
- package/dist/{push-apns-Cm-ZTdUp.js → push-apns-4PMWZHdd.js} +1 -1
- package/dist/{push-apns-TUUEPpx1.js → push-apns-BLl8QvkS.js} +1 -1
- package/dist/{pw-ai-Dp9c5KD_.js → pw-ai-BLLeU82T.js} +1 -1
- package/dist/{register.agent-DsFrb0R7.js → register.agent-DMDB7XFY.js} +8 -8
- package/dist/{register.agent-7Pku8mId.js → register.agent-O8MfanIY.js} +7 -7
- package/dist/{register.configure-BMfcA9Sh.js → register.configure-BnK5Jcux.js} +8 -8
- package/dist/{register.configure-CJ6IYgGS.js → register.configure-z-iZ8GQq.js} +8 -8
- package/dist/{register.maintenance-DfoSO5fo.js → register.maintenance-BnFA8dD9.js} +9 -9
- package/dist/{register.maintenance-BFSQHBgH.js → register.maintenance-DSLAHGdZ.js} +10 -10
- package/dist/{register.message-BTCpZ8RW.js → register.message-BEBbZm3E.js} +4 -4
- package/dist/{register.message-C-5P7V4g.js → register.message-Diwl2TLo.js} +4 -4
- package/dist/{register.onboard-CVXaGmEF.js → register.onboard-Bc4G3TMS.js} +6 -6
- package/dist/{register.onboard-CTO-qkWZ.js → register.onboard-gF_aeZ9o.js} +6 -6
- package/dist/{register.setup-Dg1Ud7ox.js → register.setup-B4r3oTHQ.js} +6 -6
- package/dist/{register.setup-BzaCK19n.js → register.setup-CdWPBfRb.js} +6 -6
- package/dist/{register.status-health-sessions-IymXWaoK.js → register.status-health-sessions-gEelqg9y.js} +5 -5
- package/dist/{register.status-health-sessions-DjwY1WQe.js → register.status-health-sessions-gHKOUBxw.js} +5 -5
- package/dist/{register.subclis-Bw1N3fIn.js → register.subclis-DflQa27k.js} +9 -9
- package/dist/{replies-MVPArv-r.js → replies-9ipbTXMP.js} +5 -4
- package/dist/{replies-DtFxhHfI.js → replies-BCd0AxfK.js} +5 -4
- package/dist/{replies-DKKNtkun.js → replies-BdkHHO5V.js} +5 -4
- package/dist/{replies-DhmTgroV.js → replies-CSjH2EQ6.js} +5 -4
- package/dist/{reply-pTxrsMtG.js → reply-CM9fxt2r.js} +200 -43
- package/dist/{run-main-DnYUey0K.js → run-main-3miuYYBs.js} +16 -16
- package/dist/{runner-CLY-9j7g.js → runner-CcRtHLpd.js} +1 -1
- package/dist/{send-CTGeWUSD.js → send-B3u53ZAu.js} +20 -1
- package/dist/{send-Cr8R-bMi.js → send-CAuzoyQe.js} +20 -1
- package/dist/{send-D_FU_HIa.js → send-D6r6s6Nf.js} +20 -1
- package/dist/{send-CKGUBMnM.js → send-DUc9Jw32.js} +20 -1
- package/dist/{server-node-events-Dhbdspn_.js → server-node-events-BcfA38Ht.js} +4 -4
- package/dist/{server-node-events-DQYNf8b_.js → server-node-events-DzAfZuLY.js} +4 -4
- package/dist/{session-dirs-CFHymbM9.js → session-dirs-BdEl6HTu.js} +1 -1
- package/dist/{session-dirs-DoK1aPxY.js → session-dirs-BeIjLerM.js} +1 -1
- package/dist/{status-D32_SxwC.js → status-B0MQkmRx.js} +2 -2
- package/dist/{status-CFnZ8E56.js → status-CgApQy5C.js} +1 -1
- package/dist/{status-C-PQHlxh.js → status-DpOLEQn-.js} +1 -1
- package/dist/{status-KRRAxPjg.js → status-dZ2UgRzN.js} +2 -2
- package/dist/{subagent-registry-DkjybHrK.js → subagent-registry-CEyaZMV5.js} +200 -43
- package/dist/{update-cli-DXd4fNuS.js → update-cli-COdYp-Y5.js} +10 -10
- package/dist/{update-cli-DMrRvy-m.js → update-cli-Y2wT8mXS.js} +9 -9
- package/dist/{web-Dsgry4ji.js → web-CQ4AF_Y7.js} +3 -3
- package/dist/{web-CCqlC0N_.js → web-Cp6O0VTJ.js} +4 -4
- package/dist/{web-IfDcZx01.js → web-D8FEwRAX.js} +3 -3
- package/dist/{web-DCNwbuhj.js → web-c0XVFCZq.js} +8 -8
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPref
|
|
|
12
12
|
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-BgM-QbXO.js";
|
|
13
13
|
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-D4K8e4M8.js";
|
|
14
14
|
import { t as normalizeChatType } from "./chat-type-DFDuk3FY.js";
|
|
15
|
-
import { a as
|
|
15
|
+
import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, r as markdownToSlackMrkdwn, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-CAuzoyQe.js";
|
|
16
16
|
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-DiOHgW-b.js";
|
|
17
17
|
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-CmINfgCV.js";
|
|
18
18
|
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-CeiiR6NB.js";
|
|
@@ -59,7 +59,7 @@ import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadRec
|
|
|
59
59
|
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-NqRPdXc2.js";
|
|
60
60
|
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-Cdun2M0_.js";
|
|
61
61
|
import { t as makeProxyFetch } from "./proxy-BaSHbVlA.js";
|
|
62
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
62
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CSjH2EQ6.js";
|
|
63
63
|
import { t as getActiveWebListener } from "./active-listener-8RKyzi6S.js";
|
|
64
64
|
import { createRequire } from "node:module";
|
|
65
65
|
import * as path$1 from "node:path";
|
|
@@ -51564,7 +51564,7 @@ function isVoiceChannelType(type) {
|
|
|
51564
51564
|
function createDefaultDeps() {
|
|
51565
51565
|
return {
|
|
51566
51566
|
sendMessageWhatsApp: async (...args) => {
|
|
51567
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
51567
|
+
const { sendMessageWhatsApp } = await import("./web-CQ4AF_Y7.js");
|
|
51568
51568
|
return await sendMessageWhatsApp(...args);
|
|
51569
51569
|
},
|
|
51570
51570
|
sendMessageTelegram: async (...args) => {
|
|
@@ -51576,7 +51576,7 @@ function createDefaultDeps() {
|
|
|
51576
51576
|
return await sendMessageDiscord(...args);
|
|
51577
51577
|
},
|
|
51578
51578
|
sendMessageSlack: async (...args) => {
|
|
51579
|
-
const { sendMessageSlack } = await import("./send-
|
|
51579
|
+
const { sendMessageSlack } = await import("./send-CAuzoyQe.js").then((n) => n.n);
|
|
51580
51580
|
return await sendMessageSlack(...args);
|
|
51581
51581
|
},
|
|
51582
51582
|
sendMessageSignal: async (...args) => {
|
|
@@ -59520,8 +59520,12 @@ function inferSlackChannelType(channelId) {
|
|
|
59520
59520
|
}
|
|
59521
59521
|
function normalizeSlackChannelType(channelType, channelId) {
|
|
59522
59522
|
const normalized = channelType?.trim().toLowerCase();
|
|
59523
|
-
|
|
59524
|
-
|
|
59523
|
+
const inferred = inferSlackChannelType(channelId);
|
|
59524
|
+
if (normalized === "im" || normalized === "mpim" || normalized === "channel" || normalized === "group") {
|
|
59525
|
+
if (inferred === "im" && normalized !== "im") return "im";
|
|
59526
|
+
return normalized;
|
|
59527
|
+
}
|
|
59528
|
+
return inferred ?? "channel";
|
|
59525
59529
|
}
|
|
59526
59530
|
function createSlackMonitorContext(params) {
|
|
59527
59531
|
const channelHistories = /* @__PURE__ */ new Map();
|
|
@@ -59789,7 +59793,7 @@ function migrateSlackChannelConfig(params) {
|
|
|
59789
59793
|
//#endregion
|
|
59790
59794
|
//#region src/slack/monitor/events/channels.ts
|
|
59791
59795
|
function registerSlackChannelEvents(params) {
|
|
59792
|
-
const { ctx } = params;
|
|
59796
|
+
const { ctx, trackEvent } = params;
|
|
59793
59797
|
const enqueueChannelSystemEvent = (params) => {
|
|
59794
59798
|
if (!ctx.isChannelAllowed({
|
|
59795
59799
|
channelId: params.channelId,
|
|
@@ -59812,6 +59816,7 @@ function registerSlackChannelEvents(params) {
|
|
|
59812
59816
|
ctx.app.event("channel_created", async ({ event, body }) => {
|
|
59813
59817
|
try {
|
|
59814
59818
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
59819
|
+
trackEvent?.();
|
|
59815
59820
|
const payload = event;
|
|
59816
59821
|
const channelId = payload.channel?.id;
|
|
59817
59822
|
const channelName = payload.channel?.name;
|
|
@@ -59827,6 +59832,7 @@ function registerSlackChannelEvents(params) {
|
|
|
59827
59832
|
ctx.app.event("channel_rename", async ({ event, body }) => {
|
|
59828
59833
|
try {
|
|
59829
59834
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
59835
|
+
trackEvent?.();
|
|
59830
59836
|
const payload = event;
|
|
59831
59837
|
const channelId = payload.channel?.id;
|
|
59832
59838
|
enqueueChannelSystemEvent({
|
|
@@ -59841,6 +59847,7 @@ function registerSlackChannelEvents(params) {
|
|
|
59841
59847
|
ctx.app.event("channel_id_changed", async ({ event, body }) => {
|
|
59842
59848
|
try {
|
|
59843
59849
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
59850
|
+
trackEvent?.();
|
|
59844
59851
|
const payload = event;
|
|
59845
59852
|
const oldChannelId = payload.old_channel_id;
|
|
59846
59853
|
const newChannelId = payload.new_channel_id;
|
|
@@ -60246,10 +60253,11 @@ function registerSlackInteractionEvents(params) {
|
|
|
60246
60253
|
//#endregion
|
|
60247
60254
|
//#region src/slack/monitor/events/members.ts
|
|
60248
60255
|
function registerSlackMemberEvents(params) {
|
|
60249
|
-
const { ctx } = params;
|
|
60256
|
+
const { ctx, trackEvent } = params;
|
|
60250
60257
|
const handleMemberChannelEvent = async (params) => {
|
|
60251
60258
|
try {
|
|
60252
60259
|
if (ctx.shouldDropMismatchedSlackEvent(params.body)) return;
|
|
60260
|
+
trackEvent?.();
|
|
60253
60261
|
const payload = params.event;
|
|
60254
60262
|
const channelId = payload.channel;
|
|
60255
60263
|
const channelInfo = channelId ? await ctx.resolveChannelName(channelId) : {};
|
|
@@ -60385,9 +60393,10 @@ function registerSlackMessageEvents(params) {
|
|
|
60385
60393
|
//#endregion
|
|
60386
60394
|
//#region src/slack/monitor/events/pins.ts
|
|
60387
60395
|
async function handleSlackPinEvent(params) {
|
|
60388
|
-
const { ctx, body, event, action, contextKeySuffix, errorLabel } = params;
|
|
60396
|
+
const { ctx, trackEvent, body, event, action, contextKeySuffix, errorLabel } = params;
|
|
60389
60397
|
try {
|
|
60390
60398
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
60399
|
+
trackEvent?.();
|
|
60391
60400
|
const payload = event;
|
|
60392
60401
|
const channelId = payload.channel_id;
|
|
60393
60402
|
const channelInfo = channelId ? await ctx.resolveChannelName(channelId) : {};
|
|
@@ -60416,10 +60425,11 @@ async function handleSlackPinEvent(params) {
|
|
|
60416
60425
|
}
|
|
60417
60426
|
}
|
|
60418
60427
|
function registerSlackPinEvents(params) {
|
|
60419
|
-
const { ctx } = params;
|
|
60428
|
+
const { ctx, trackEvent } = params;
|
|
60420
60429
|
ctx.app.event("pin_added", async ({ event, body }) => {
|
|
60421
60430
|
await handleSlackPinEvent({
|
|
60422
60431
|
ctx,
|
|
60432
|
+
trackEvent,
|
|
60423
60433
|
body,
|
|
60424
60434
|
event,
|
|
60425
60435
|
action: "pinned",
|
|
@@ -60430,6 +60440,7 @@ function registerSlackPinEvents(params) {
|
|
|
60430
60440
|
ctx.app.event("pin_removed", async ({ event, body }) => {
|
|
60431
60441
|
await handleSlackPinEvent({
|
|
60432
60442
|
ctx,
|
|
60443
|
+
trackEvent,
|
|
60433
60444
|
body,
|
|
60434
60445
|
event,
|
|
60435
60446
|
action: "unpinned",
|
|
@@ -60442,11 +60453,12 @@ function registerSlackPinEvents(params) {
|
|
|
60442
60453
|
//#endregion
|
|
60443
60454
|
//#region src/slack/monitor/events/reactions.ts
|
|
60444
60455
|
function registerSlackReactionEvents(params) {
|
|
60445
|
-
const { ctx } = params;
|
|
60456
|
+
const { ctx, trackEvent } = params;
|
|
60446
60457
|
const handleReactionEvent = async (event, action) => {
|
|
60447
60458
|
try {
|
|
60448
60459
|
const item = event.item;
|
|
60449
60460
|
if (!item || item.type !== "message") return;
|
|
60461
|
+
trackEvent?.();
|
|
60450
60462
|
const channelInfo = item.channel ? await ctx.resolveChannelName(item.channel) : {};
|
|
60451
60463
|
const channelType = channelInfo?.type;
|
|
60452
60464
|
if (!ctx.isChannelAllowed({
|
|
@@ -60490,10 +60502,22 @@ function registerSlackMonitorEvents(params) {
|
|
|
60490
60502
|
ctx: params.ctx,
|
|
60491
60503
|
handleSlackMessage: params.handleSlackMessage
|
|
60492
60504
|
});
|
|
60493
|
-
registerSlackReactionEvents({
|
|
60494
|
-
|
|
60495
|
-
|
|
60496
|
-
|
|
60505
|
+
registerSlackReactionEvents({
|
|
60506
|
+
ctx: params.ctx,
|
|
60507
|
+
trackEvent: params.trackEvent
|
|
60508
|
+
});
|
|
60509
|
+
registerSlackMemberEvents({
|
|
60510
|
+
ctx: params.ctx,
|
|
60511
|
+
trackEvent: params.trackEvent
|
|
60512
|
+
});
|
|
60513
|
+
registerSlackChannelEvents({
|
|
60514
|
+
ctx: params.ctx,
|
|
60515
|
+
trackEvent: params.trackEvent
|
|
60516
|
+
});
|
|
60517
|
+
registerSlackPinEvents({
|
|
60518
|
+
ctx: params.ctx,
|
|
60519
|
+
trackEvent: params.trackEvent
|
|
60520
|
+
});
|
|
60497
60521
|
registerSlackInteractionEvents({ ctx: params.ctx });
|
|
60498
60522
|
}
|
|
60499
60523
|
|
|
@@ -60666,7 +60690,7 @@ async function startSlackStream(params) {
|
|
|
60666
60690
|
stopped: false
|
|
60667
60691
|
};
|
|
60668
60692
|
if (text) {
|
|
60669
|
-
await streamer.append({ markdown_text: text });
|
|
60693
|
+
await streamer.append({ markdown_text: markdownToSlackMrkdwn(text) });
|
|
60670
60694
|
logVerbose(`slack-stream: appended initial text (${text.length} chars)`);
|
|
60671
60695
|
}
|
|
60672
60696
|
return session;
|
|
@@ -60681,7 +60705,7 @@ async function appendSlackStream(params) {
|
|
|
60681
60705
|
return;
|
|
60682
60706
|
}
|
|
60683
60707
|
if (!text) return;
|
|
60684
|
-
await session.streamer.append({ markdown_text: text });
|
|
60708
|
+
await session.streamer.append({ markdown_text: markdownToSlackMrkdwn(text) });
|
|
60685
60709
|
logVerbose(`slack-stream: appended ${text.length} chars`);
|
|
60686
60710
|
}
|
|
60687
60711
|
/**
|
|
@@ -60698,7 +60722,7 @@ async function stopSlackStream(params) {
|
|
|
60698
60722
|
}
|
|
60699
60723
|
session.stopped = true;
|
|
60700
60724
|
logVerbose(`slack-stream: stopping stream in ${session.channel} thread=${session.threadTs}${text ? ` (final text: ${text.length} chars)` : ""}`);
|
|
60701
|
-
await session.streamer.stop(text ? { markdown_text: text } : void 0);
|
|
60725
|
+
await session.streamer.stop(text ? { markdown_text: markdownToSlackMrkdwn(text) } : void 0);
|
|
60702
60726
|
logVerbose("slack-stream: stream stopped");
|
|
60703
60727
|
}
|
|
60704
60728
|
|
|
@@ -60717,12 +60741,21 @@ function resolveSlackThreadContext(params) {
|
|
|
60717
60741
|
messageThreadId: isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0
|
|
60718
60742
|
};
|
|
60719
60743
|
}
|
|
60744
|
+
/**
|
|
60745
|
+
* Resolves Slack thread targeting for replies and status indicators.
|
|
60746
|
+
*
|
|
60747
|
+
* @returns replyThreadTs - Thread timestamp for reply messages
|
|
60748
|
+
* @returns statusThreadTs - Thread timestamp for status indicators (typing, etc.)
|
|
60749
|
+
* @returns isThreadReply - true if this is a genuine user reply in a thread,
|
|
60750
|
+
* false if thread_ts comes from a bot status message
|
|
60751
|
+
*/
|
|
60720
60752
|
function resolveSlackThreadTargets(params) {
|
|
60721
|
-
const { incomingThreadTs, messageTs } = resolveSlackThreadContext(params);
|
|
60722
|
-
const replyThreadTs = incomingThreadTs
|
|
60753
|
+
const { incomingThreadTs, messageTs, isThreadReply } = resolveSlackThreadContext(params);
|
|
60754
|
+
const replyThreadTs = isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0;
|
|
60723
60755
|
return {
|
|
60724
60756
|
replyThreadTs,
|
|
60725
|
-
statusThreadTs: replyThreadTs ?? messageTs
|
|
60757
|
+
statusThreadTs: replyThreadTs ?? messageTs,
|
|
60758
|
+
isThreadReply
|
|
60726
60759
|
};
|
|
60727
60760
|
}
|
|
60728
60761
|
|
|
@@ -60762,12 +60795,13 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60762
60795
|
deliveryContext: {
|
|
60763
60796
|
channel: "slack",
|
|
60764
60797
|
to: `user:${message.user}`,
|
|
60765
|
-
accountId: route.accountId
|
|
60798
|
+
accountId: route.accountId,
|
|
60799
|
+
threadId: prepared.ctxPayload.MessageThreadId
|
|
60766
60800
|
},
|
|
60767
60801
|
ctx: prepared.ctxPayload
|
|
60768
60802
|
});
|
|
60769
60803
|
}
|
|
60770
|
-
const { statusThreadTs } = resolveSlackThreadTargets({
|
|
60804
|
+
const { statusThreadTs, isThreadReply } = resolveSlackThreadTargets({
|
|
60771
60805
|
message,
|
|
60772
60806
|
replyToMode: ctx.replyToMode
|
|
60773
60807
|
});
|
|
@@ -60779,7 +60813,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60779
60813
|
replyToMode: ctx.replyToMode,
|
|
60780
60814
|
incomingThreadTs,
|
|
60781
60815
|
messageTs,
|
|
60782
|
-
hasRepliedRef
|
|
60816
|
+
hasRepliedRef,
|
|
60817
|
+
isThreadReply
|
|
60783
60818
|
});
|
|
60784
60819
|
const typingTarget = statusThreadTs ? `${message.channel}/${statusThreadTs}` : message.channel;
|
|
60785
60820
|
const typingCallbacks = createTypingCallbacks({
|
|
@@ -60844,7 +60879,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60844
60879
|
accountId: account.accountId,
|
|
60845
60880
|
runtime,
|
|
60846
60881
|
textLimit: ctx.textLimit,
|
|
60847
|
-
replyThreadTs
|
|
60882
|
+
replyThreadTs,
|
|
60883
|
+
replyToMode: ctx.replyToMode
|
|
60848
60884
|
});
|
|
60849
60885
|
replyPlan.markSent();
|
|
60850
60886
|
};
|
|
@@ -60905,7 +60941,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60905
60941
|
token: ctx.botToken,
|
|
60906
60942
|
channel: draftChannelId,
|
|
60907
60943
|
ts: draftMessageId,
|
|
60908
|
-
text: finalText.trim()
|
|
60944
|
+
text: markdownToSlackMrkdwn(finalText.trim())
|
|
60909
60945
|
});
|
|
60910
60946
|
return;
|
|
60911
60947
|
} catch (err) {
|
|
@@ -60935,7 +60971,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60935
60971
|
accountId: account.accountId,
|
|
60936
60972
|
runtime,
|
|
60937
60973
|
textLimit: ctx.textLimit,
|
|
60938
|
-
replyThreadTs
|
|
60974
|
+
replyThreadTs,
|
|
60975
|
+
replyToMode: ctx.replyToMode
|
|
60939
60976
|
});
|
|
60940
60977
|
replyPlan.markSent();
|
|
60941
60978
|
},
|
|
@@ -60944,7 +60981,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60944
60981
|
typingCallbacks.onIdle?.();
|
|
60945
60982
|
},
|
|
60946
60983
|
onReplyStart: typingCallbacks.onReplyStart,
|
|
60947
|
-
onIdle: typingCallbacks.onIdle
|
|
60984
|
+
onIdle: typingCallbacks.onIdle,
|
|
60985
|
+
onCleanup: typingCallbacks.onCleanup
|
|
60948
60986
|
});
|
|
60949
60987
|
const draftStream = createSlackDraftStream({
|
|
60950
60988
|
target: prepared.replyTarget,
|
|
@@ -61585,10 +61623,13 @@ async function prepareSlackMessage(params) {
|
|
|
61585
61623
|
const mergedMedia = [...media ?? [], ...attachmentContent?.media ?? []];
|
|
61586
61624
|
const effectiveDirectMedia = mergedMedia.length > 0 ? mergedMedia : null;
|
|
61587
61625
|
const mediaPlaceholder = effectiveDirectMedia ? effectiveDirectMedia.map((m) => m.placeholder).join(" ") : void 0;
|
|
61626
|
+
const fileOnlyFallback = !mediaPlaceholder && (message.files?.length ?? 0) > 0 ? message.files.slice(0, 5).map((f) => f.name ?? "file").join(", ") : void 0;
|
|
61627
|
+
const fileOnlyPlaceholder = fileOnlyFallback ? `[Slack file: ${fileOnlyFallback}]` : void 0;
|
|
61588
61628
|
const rawBody = [
|
|
61589
61629
|
(message.text ?? "").trim(),
|
|
61590
61630
|
attachmentContent?.text,
|
|
61591
|
-
mediaPlaceholder
|
|
61631
|
+
mediaPlaceholder,
|
|
61632
|
+
fileOnlyPlaceholder
|
|
61592
61633
|
].filter(Boolean).join("\n") || "";
|
|
61593
61634
|
if (!rawBody) return null;
|
|
61594
61635
|
const ackReaction = resolveAckReaction(cfg, route.agentId, {
|
|
@@ -61763,7 +61804,7 @@ async function prepareSlackMessage(params) {
|
|
|
61763
61804
|
ReplyToId: threadContext.replyToId,
|
|
61764
61805
|
MessageThreadId: threadContext.messageThreadId,
|
|
61765
61806
|
ParentSessionKey: threadKeys.parentSessionKey,
|
|
61766
|
-
ThreadStarterBody: threadStarterBody,
|
|
61807
|
+
ThreadStarterBody: !threadSessionPreviousTimestamp ? threadStarterBody : void 0,
|
|
61767
61808
|
ThreadHistoryBody: threadHistoryBody,
|
|
61768
61809
|
IsFirstThreadTurn: isThreadReply && threadTs && !threadSessionPreviousTimestamp ? true : void 0,
|
|
61769
61810
|
ThreadLabel: threadLabel,
|
|
@@ -61787,7 +61828,8 @@ async function prepareSlackMessage(params) {
|
|
|
61787
61828
|
sessionKey: route.mainSessionKey,
|
|
61788
61829
|
channel: "slack",
|
|
61789
61830
|
to: `user:${message.user}`,
|
|
61790
|
-
accountId: route.accountId
|
|
61831
|
+
accountId: route.accountId,
|
|
61832
|
+
threadId: threadContext.messageThreadId
|
|
61791
61833
|
} : void 0,
|
|
61792
61834
|
onRecordError: (err) => {
|
|
61793
61835
|
ctx.logger.warn({
|
|
@@ -61914,7 +61956,7 @@ function buildSeenMessageKey(channelId, ts) {
|
|
|
61914
61956
|
return `${channelId}:${ts}`;
|
|
61915
61957
|
}
|
|
61916
61958
|
function createSlackMessageHandler(params) {
|
|
61917
|
-
const { ctx, account } = params;
|
|
61959
|
+
const { ctx, account, trackEvent } = params;
|
|
61918
61960
|
const debounceMs = resolveInboundDebounceMs({
|
|
61919
61961
|
cfg: ctx.cfg,
|
|
61920
61962
|
channel: "slack"
|
|
@@ -62004,6 +62046,7 @@ function createSlackMessageHandler(params) {
|
|
|
62004
62046
|
if (seenMessageKey && wasSeen) {
|
|
62005
62047
|
if (opts.source !== "app_mention" || !consumeAppMentionRetryKey(seenMessageKey)) return;
|
|
62006
62048
|
}
|
|
62049
|
+
trackEvent?.();
|
|
62007
62050
|
const resolvedMessage = await threadTsResolver.resolve({
|
|
62008
62051
|
message,
|
|
62009
62052
|
source: opts.source
|
|
@@ -62477,7 +62520,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
62477
62520
|
});
|
|
62478
62521
|
const deliverSlashPayloads = async (replies) => {
|
|
62479
62522
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
62480
|
-
import("./replies-
|
|
62523
|
+
import("./replies-CSjH2EQ6.js").then((n) => n.r),
|
|
62481
62524
|
import("./chunk-3g44i8OM.js").then((n) => n.s),
|
|
62482
62525
|
import("./markdown-tables-CkdFpHu3.js").then((n) => n.t)
|
|
62483
62526
|
]);
|
|
@@ -62657,6 +62700,73 @@ const slackBoltModule = SlackBolt;
|
|
|
62657
62700
|
const { App, HTTPReceiver } = (slackBoltModule.App ? slackBoltModule : slackBoltModule.default) ?? slackBoltModule;
|
|
62658
62701
|
const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
|
|
62659
62702
|
const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
|
|
62703
|
+
const SLACK_SOCKET_RECONNECT_POLICY = {
|
|
62704
|
+
initialMs: 2e3,
|
|
62705
|
+
maxMs: 3e4,
|
|
62706
|
+
factor: 1.8,
|
|
62707
|
+
jitter: .25,
|
|
62708
|
+
maxAttempts: 12
|
|
62709
|
+
};
|
|
62710
|
+
function getSocketEmitter(app) {
|
|
62711
|
+
const receiver = app.receiver;
|
|
62712
|
+
const client = receiver && typeof receiver === "object" ? receiver.client : void 0;
|
|
62713
|
+
if (!client || typeof client !== "object") return null;
|
|
62714
|
+
const on = client.on;
|
|
62715
|
+
const off = client.off;
|
|
62716
|
+
if (typeof on !== "function" || typeof off !== "function") return null;
|
|
62717
|
+
return {
|
|
62718
|
+
on: (event, listener) => on.call(client, event, listener),
|
|
62719
|
+
off: (event, listener) => off.call(client, event, listener)
|
|
62720
|
+
};
|
|
62721
|
+
}
|
|
62722
|
+
function waitForSlackSocketDisconnect(app, abortSignal) {
|
|
62723
|
+
return new Promise((resolve) => {
|
|
62724
|
+
const emitter = getSocketEmitter(app);
|
|
62725
|
+
if (!emitter) {
|
|
62726
|
+
abortSignal?.addEventListener("abort", () => resolve({ event: "disconnect" }), { once: true });
|
|
62727
|
+
return;
|
|
62728
|
+
}
|
|
62729
|
+
const disconnectListener = () => resolveOnce({ event: "disconnect" });
|
|
62730
|
+
const startFailListener = () => resolveOnce({ event: "unable_to_socket_mode_start" });
|
|
62731
|
+
const errorListener = (error) => resolveOnce({
|
|
62732
|
+
event: "error",
|
|
62733
|
+
error
|
|
62734
|
+
});
|
|
62735
|
+
const abortListener = () => resolveOnce({ event: "disconnect" });
|
|
62736
|
+
const cleanup = () => {
|
|
62737
|
+
emitter.off("disconnected", disconnectListener);
|
|
62738
|
+
emitter.off("unable_to_socket_mode_start", startFailListener);
|
|
62739
|
+
emitter.off("error", errorListener);
|
|
62740
|
+
abortSignal?.removeEventListener("abort", abortListener);
|
|
62741
|
+
};
|
|
62742
|
+
const resolveOnce = (value) => {
|
|
62743
|
+
cleanup();
|
|
62744
|
+
resolve(value);
|
|
62745
|
+
};
|
|
62746
|
+
emitter.on("disconnected", disconnectListener);
|
|
62747
|
+
emitter.on("unable_to_socket_mode_start", startFailListener);
|
|
62748
|
+
emitter.on("error", errorListener);
|
|
62749
|
+
abortSignal?.addEventListener("abort", abortListener, { once: true });
|
|
62750
|
+
});
|
|
62751
|
+
}
|
|
62752
|
+
/**
|
|
62753
|
+
* Detect non-recoverable Slack API / auth errors that should NOT be retried.
|
|
62754
|
+
* These indicate permanent credential problems (revoked bot, deactivated account, etc.)
|
|
62755
|
+
* and retrying will never succeed — continuing to retry blocks the entire gateway.
|
|
62756
|
+
*/
|
|
62757
|
+
function isNonRecoverableSlackAuthError(error) {
|
|
62758
|
+
const msg = error instanceof Error ? error.message : typeof error === "string" ? error : "";
|
|
62759
|
+
return /account_inactive|invalid_auth|token_revoked|token_expired|not_authed|org_login_required|team_access_not_granted|missing_scope|cannot_find_service|invalid_token/i.test(msg);
|
|
62760
|
+
}
|
|
62761
|
+
function formatUnknownError(error) {
|
|
62762
|
+
if (error instanceof Error) return error.message;
|
|
62763
|
+
if (typeof error === "string") return error;
|
|
62764
|
+
try {
|
|
62765
|
+
return JSON.stringify(error);
|
|
62766
|
+
} catch {
|
|
62767
|
+
return "unknown error";
|
|
62768
|
+
}
|
|
62769
|
+
}
|
|
62660
62770
|
function parseApiAppIdFromAppToken(raw) {
|
|
62661
62771
|
const token = raw?.trim();
|
|
62662
62772
|
if (!token) return;
|
|
@@ -62780,13 +62890,21 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
62780
62890
|
mediaMaxBytes,
|
|
62781
62891
|
removeAckAfterReply
|
|
62782
62892
|
});
|
|
62893
|
+
const trackEvent = opts.setStatus ? () => {
|
|
62894
|
+
opts.setStatus({
|
|
62895
|
+
lastEventAt: Date.now(),
|
|
62896
|
+
lastInboundAt: Date.now()
|
|
62897
|
+
});
|
|
62898
|
+
} : void 0;
|
|
62783
62899
|
registerSlackMonitorEvents({
|
|
62784
62900
|
ctx,
|
|
62785
62901
|
account,
|
|
62786
62902
|
handleSlackMessage: createSlackMessageHandler({
|
|
62787
62903
|
ctx,
|
|
62788
|
-
account
|
|
62789
|
-
|
|
62904
|
+
account,
|
|
62905
|
+
trackEvent
|
|
62906
|
+
}),
|
|
62907
|
+
trackEvent
|
|
62790
62908
|
});
|
|
62791
62909
|
await registerSlackMonitorSlashCommands({
|
|
62792
62910
|
ctx,
|
|
@@ -62875,13 +62993,52 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
62875
62993
|
opts.abortSignal?.addEventListener("abort", stopOnAbort, { once: true });
|
|
62876
62994
|
try {
|
|
62877
62995
|
if (slackMode === "socket") {
|
|
62878
|
-
|
|
62879
|
-
|
|
62880
|
-
|
|
62881
|
-
|
|
62882
|
-
|
|
62883
|
-
|
|
62884
|
-
|
|
62996
|
+
let reconnectAttempts = 0;
|
|
62997
|
+
while (!opts.abortSignal?.aborted) {
|
|
62998
|
+
try {
|
|
62999
|
+
await app.start();
|
|
63000
|
+
reconnectAttempts = 0;
|
|
63001
|
+
runtime.log?.("slack socket mode connected");
|
|
63002
|
+
} catch (err) {
|
|
63003
|
+
if (isNonRecoverableSlackAuthError(err)) {
|
|
63004
|
+
runtime.error?.(`slack socket mode failed to start due to non-recoverable auth error — skipping channel (${formatUnknownError(err)})`);
|
|
63005
|
+
throw err;
|
|
63006
|
+
}
|
|
63007
|
+
reconnectAttempts += 1;
|
|
63008
|
+
if (SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 && reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts) throw err;
|
|
63009
|
+
const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);
|
|
63010
|
+
runtime.error?.(`slack socket mode failed to start. retry ${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts || "∞"} in ${Math.round(delayMs / 1e3)}s (${formatUnknownError(err)})`);
|
|
63011
|
+
try {
|
|
63012
|
+
await sleepWithAbort(delayMs, opts.abortSignal);
|
|
63013
|
+
} catch {
|
|
63014
|
+
break;
|
|
63015
|
+
}
|
|
63016
|
+
continue;
|
|
63017
|
+
}
|
|
63018
|
+
if (opts.abortSignal?.aborted) break;
|
|
63019
|
+
const disconnect = await waitForSlackSocketDisconnect(app, opts.abortSignal);
|
|
63020
|
+
if (opts.abortSignal?.aborted) break;
|
|
63021
|
+
if (disconnect.error && isNonRecoverableSlackAuthError(disconnect.error)) {
|
|
63022
|
+
runtime.error?.(`slack socket mode disconnected due to non-recoverable auth error — skipping channel (${formatUnknownError(disconnect.error)})`);
|
|
63023
|
+
throw disconnect.error instanceof Error ? disconnect.error : new Error(formatUnknownError(disconnect.error));
|
|
63024
|
+
}
|
|
63025
|
+
reconnectAttempts += 1;
|
|
63026
|
+
if (SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 && reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts) throw new Error(`Slack socket mode reconnect max attempts reached (${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts}) after ${disconnect.event}`);
|
|
63027
|
+
const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);
|
|
63028
|
+
runtime.error?.(`slack socket disconnected (${disconnect.event}). retry ${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts || "∞"} in ${Math.round(delayMs / 1e3)}s${disconnect.error ? ` (${formatUnknownError(disconnect.error)})` : ""}`);
|
|
63029
|
+
await app.stop().catch(() => void 0);
|
|
63030
|
+
try {
|
|
63031
|
+
await sleepWithAbort(delayMs, opts.abortSignal);
|
|
63032
|
+
} catch {
|
|
63033
|
+
break;
|
|
63034
|
+
}
|
|
63035
|
+
}
|
|
63036
|
+
} else {
|
|
63037
|
+
runtime.log?.(`slack http mode listening at ${slackWebhookPath}`);
|
|
63038
|
+
if (!opts.abortSignal?.aborted) await new Promise((resolve) => {
|
|
63039
|
+
opts.abortSignal?.addEventListener("abort", () => resolve(), { once: true });
|
|
63040
|
+
});
|
|
63041
|
+
}
|
|
62885
63042
|
} finally {
|
|
62886
63043
|
opts.abortSignal?.removeEventListener("abort", stopOnAbort);
|
|
62887
63044
|
unregisterHttpHandler?.();
|
|
@@ -66907,7 +67064,7 @@ function loadWebLoginQr() {
|
|
|
66907
67064
|
return webLoginQrPromise;
|
|
66908
67065
|
}
|
|
66909
67066
|
function loadWebChannel() {
|
|
66910
|
-
webChannelPromise ??= import("./web-
|
|
67067
|
+
webChannelPromise ??= import("./web-CQ4AF_Y7.js");
|
|
66911
67068
|
return webChannelPromise;
|
|
66912
67069
|
}
|
|
66913
67070
|
function loadWhatsAppActions() {
|
|
@@ -12,7 +12,7 @@ import { c as SafeOpenError, i as getImageMetadata, l as openFileWithinRoot, n a
|
|
|
12
12
|
import { S as isPidAlive, x as resolveProcessScopedMap } from "./model-auth-CZJx4V2b.js";
|
|
13
13
|
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-iIguLnrh.js";
|
|
14
14
|
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-CAG6tF2v.js";
|
|
15
|
-
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_OPENCLAW_BROWSER_ENABLED, N as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveOpenClawUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchOpenClawChrome, j as DEFAULT_OPENCLAW_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopOpenClawChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
15
|
+
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_OPENCLAW_BROWSER_ENABLED, N as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveOpenClawUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchOpenClawChrome, j as DEFAULT_OPENCLAW_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopOpenClawChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-DAmaIuXa.js";
|
|
16
16
|
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-CshrABO7.js";
|
|
17
17
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-BoQgnc8X.js";
|
|
18
18
|
import { t as SsrFBlockedError } from "./ssrf-BTMDZjHT.js";
|
|
@@ -933,7 +933,7 @@ function isModuleNotFoundError(err) {
|
|
|
933
933
|
}
|
|
934
934
|
async function loadPwAiModule(mode) {
|
|
935
935
|
try {
|
|
936
|
-
return await import("./pw-ai-
|
|
936
|
+
return await import("./pw-ai-BLLeU82T.js");
|
|
937
937
|
} catch (err) {
|
|
938
938
|
if (mode === "soft") return null;
|
|
939
939
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -3473,11 +3473,11 @@ function createProfileContext(opts, profile) {
|
|
|
3473
3473
|
const userDataDir = resolveOpenClawUserDataDir(profile.name);
|
|
3474
3474
|
const profileState = getProfileState();
|
|
3475
3475
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3476
|
-
await (await import("./pw-ai-
|
|
3476
|
+
await (await import("./pw-ai-BLLeU82T.js")).closePlaywrightBrowserConnection();
|
|
3477
3477
|
} catch {}
|
|
3478
3478
|
if (profileState.running) await stopRunningBrowser();
|
|
3479
3479
|
try {
|
|
3480
|
-
await (await import("./pw-ai-
|
|
3480
|
+
await (await import("./pw-ai-BLLeU82T.js")).closePlaywrightBrowserConnection();
|
|
3481
3481
|
} catch {}
|
|
3482
3482
|
if (!fs$1.existsSync(userDataDir)) return {
|
|
3483
3483
|
moved: false,
|