@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
|
@@ -11,9 +11,9 @@ import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExis
|
|
|
11
11
|
import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
|
|
12
12
|
import { t as parseBooleanValue$1 } from "./boolean-B8-BqKGQ.js";
|
|
13
13
|
import { n as resolveCliName, r as isTruthyEnvValue, t as formatCliCommand } from "./command-format-DNXTZvyP.js";
|
|
14
|
-
import { a as
|
|
14
|
+
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-B3u53ZAu.js";
|
|
15
15
|
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-ltdk4YkX.js";
|
|
16
|
-
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-
|
|
16
|
+
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-BP564y6d.js";
|
|
17
17
|
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-CIaxLukF.js";
|
|
18
18
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Bxo4UHOL.js";
|
|
19
19
|
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BoN2ZP7O.js";
|
|
@@ -23,10 +23,10 @@ import { A as normalizeProviderId, C as buildAllowedModelSet, D as isCliProvider
|
|
|
23
23
|
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-Dgb9dAHW.js";
|
|
24
24
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DaNAekda.js";
|
|
25
25
|
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-iIguLnrh.js";
|
|
26
|
-
import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-
|
|
26
|
+
import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-HnqhrewN.js";
|
|
27
27
|
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-CAG6tF2v.js";
|
|
28
28
|
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverOpenClawPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-DIrjGjR5.js";
|
|
29
|
-
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
29
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-DAmaIuXa.js";
|
|
30
30
|
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-CshrABO7.js";
|
|
31
31
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-BoQgnc8X.js";
|
|
32
32
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-BTMDZjHT.js";
|
|
@@ -37,7 +37,7 @@ import { t as resolveIMessageAccount } from "./accounts-B3-U7ptq.js";
|
|
|
37
37
|
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BEAbheM8.js";
|
|
38
38
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-DDYvbmRV.js";
|
|
39
39
|
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-zWf2wdvF.js";
|
|
40
|
-
import { S as ensureOpenClawModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-
|
|
40
|
+
import { S as ensureOpenClawModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-DL65NdIM.js";
|
|
41
41
|
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-jp5l9qB5.js";
|
|
42
42
|
import { n as resolveMemorySearchConfig } from "./manager-DNkjmwyA.js";
|
|
43
43
|
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-CGIfNuKn.js";
|
|
@@ -51,7 +51,7 @@ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-CEsPCZvD.js";
|
|
|
51
51
|
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-6W8L59D5.js";
|
|
52
52
|
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-BbyNOSCl.js";
|
|
53
53
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-BlHX0H3E.js";
|
|
54
|
-
import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-
|
|
54
|
+
import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-CcRtHLpd.js";
|
|
55
55
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-DtI0mtzx.js";
|
|
56
56
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-Bup9wS1y.js";
|
|
57
57
|
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-C6rHJUyP.js";
|
|
@@ -61,7 +61,7 @@ import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadRec
|
|
|
61
61
|
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-DdINVChS.js";
|
|
62
62
|
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-C9IpwJ25.js";
|
|
63
63
|
import { t as makeProxyFetch } from "./proxy-CBJ1upuz.js";
|
|
64
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
64
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-BCd0AxfK.js";
|
|
65
65
|
import { t as getActiveWebListener } from "./active-listener-BPvnKAko.js";
|
|
66
66
|
import { createRequire } from "node:module";
|
|
67
67
|
import * as fs$2 from "node:fs/promises";
|
|
@@ -81,7 +81,7 @@ import { EdgeTTS } from "node-edge-tts";
|
|
|
81
81
|
import AjvPkg from "ajv";
|
|
82
82
|
import { createServer } from "node:http";
|
|
83
83
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
84
|
-
import WebSocket
|
|
84
|
+
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
85
85
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
86
86
|
import { createJiti } from "jiti";
|
|
87
87
|
import { Type } from "@sinclair/typebox";
|
|
@@ -5791,7 +5791,7 @@ var GatewayClient = class {
|
|
|
5791
5791
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
5792
5792
|
});
|
|
5793
5793
|
}
|
|
5794
|
-
this.ws = new WebSocket(url, wsOptions);
|
|
5794
|
+
this.ws = new WebSocket$1(url, wsOptions);
|
|
5795
5795
|
this.ws.on("open", () => {
|
|
5796
5796
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
5797
5797
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -6010,7 +6010,7 @@ var GatewayClient = class {
|
|
|
6010
6010
|
return null;
|
|
6011
6011
|
}
|
|
6012
6012
|
async request(method, params, opts) {
|
|
6013
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
6013
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
|
|
6014
6014
|
const id = randomUUID();
|
|
6015
6015
|
const frame = {
|
|
6016
6016
|
type: "req",
|
|
@@ -7274,7 +7274,7 @@ async function routeReply(params) {
|
|
|
7274
7274
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
7275
7275
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
7276
7276
|
try {
|
|
7277
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
7277
|
+
const { deliverOutboundPayloads } = await import("./deliver-BP564y6d.js").then((n) => n.n);
|
|
7278
7278
|
return {
|
|
7279
7279
|
ok: true,
|
|
7280
7280
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -41652,7 +41652,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
41652
41652
|
return;
|
|
41653
41653
|
}
|
|
41654
41654
|
try {
|
|
41655
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
41655
|
+
const { deliverOutboundPayloads } = await import("./deliver-BP564y6d.js").then((n) => n.n);
|
|
41656
41656
|
await deliverOutboundPayloads({
|
|
41657
41657
|
cfg: params.cfg,
|
|
41658
41658
|
channel,
|
|
@@ -45099,7 +45099,7 @@ async function describeStickerImage(params) {
|
|
|
45099
45099
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
45100
45100
|
try {
|
|
45101
45101
|
const buffer = await fs.readFile(imagePath);
|
|
45102
|
-
const { describeImageWithModel } = await import("./image-
|
|
45102
|
+
const { describeImageWithModel } = await import("./image-DL65NdIM.js").then((n) => n.n);
|
|
45103
45103
|
return (await describeImageWithModel({
|
|
45104
45104
|
buffer,
|
|
45105
45105
|
fileName: "sticker.webp",
|
|
@@ -47560,7 +47560,7 @@ async function preflightDiscordMessage(params) {
|
|
|
47560
47560
|
let preflightTranscript;
|
|
47561
47561
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
47562
47562
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
47563
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
47563
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-Dp9KYMCX.js");
|
|
47564
47564
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
47565
47565
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
47566
47566
|
ctx: {
|
|
@@ -51566,7 +51566,7 @@ function isVoiceChannelType(type) {
|
|
|
51566
51566
|
function createDefaultDeps() {
|
|
51567
51567
|
return {
|
|
51568
51568
|
sendMessageWhatsApp: async (...args) => {
|
|
51569
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
51569
|
+
const { sendMessageWhatsApp } = await import("./web-c0XVFCZq.js");
|
|
51570
51570
|
return await sendMessageWhatsApp(...args);
|
|
51571
51571
|
},
|
|
51572
51572
|
sendMessageTelegram: async (...args) => {
|
|
@@ -51578,7 +51578,7 @@ function createDefaultDeps() {
|
|
|
51578
51578
|
return await sendMessageDiscord(...args);
|
|
51579
51579
|
},
|
|
51580
51580
|
sendMessageSlack: async (...args) => {
|
|
51581
|
-
const { sendMessageSlack } = await import("./send-
|
|
51581
|
+
const { sendMessageSlack } = await import("./send-B3u53ZAu.js").then((n) => n.n);
|
|
51582
51582
|
return await sendMessageSlack(...args);
|
|
51583
51583
|
},
|
|
51584
51584
|
sendMessageSignal: async (...args) => {
|
|
@@ -54479,7 +54479,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
54479
54479
|
super(options);
|
|
54480
54480
|
}
|
|
54481
54481
|
createWebSocket(url) {
|
|
54482
|
-
return new WebSocket
|
|
54482
|
+
return new WebSocket(url, { agent });
|
|
54483
54483
|
}
|
|
54484
54484
|
}
|
|
54485
54485
|
return new ProxyGatewayPlugin();
|
|
@@ -59522,8 +59522,12 @@ function inferSlackChannelType(channelId) {
|
|
|
59522
59522
|
}
|
|
59523
59523
|
function normalizeSlackChannelType(channelType, channelId) {
|
|
59524
59524
|
const normalized = channelType?.trim().toLowerCase();
|
|
59525
|
-
|
|
59526
|
-
|
|
59525
|
+
const inferred = inferSlackChannelType(channelId);
|
|
59526
|
+
if (normalized === "im" || normalized === "mpim" || normalized === "channel" || normalized === "group") {
|
|
59527
|
+
if (inferred === "im" && normalized !== "im") return "im";
|
|
59528
|
+
return normalized;
|
|
59529
|
+
}
|
|
59530
|
+
return inferred ?? "channel";
|
|
59527
59531
|
}
|
|
59528
59532
|
function createSlackMonitorContext(params) {
|
|
59529
59533
|
const channelHistories = /* @__PURE__ */ new Map();
|
|
@@ -59791,7 +59795,7 @@ function migrateSlackChannelConfig(params) {
|
|
|
59791
59795
|
//#endregion
|
|
59792
59796
|
//#region src/slack/monitor/events/channels.ts
|
|
59793
59797
|
function registerSlackChannelEvents(params) {
|
|
59794
|
-
const { ctx } = params;
|
|
59798
|
+
const { ctx, trackEvent } = params;
|
|
59795
59799
|
const enqueueChannelSystemEvent = (params) => {
|
|
59796
59800
|
if (!ctx.isChannelAllowed({
|
|
59797
59801
|
channelId: params.channelId,
|
|
@@ -59814,6 +59818,7 @@ function registerSlackChannelEvents(params) {
|
|
|
59814
59818
|
ctx.app.event("channel_created", async ({ event, body }) => {
|
|
59815
59819
|
try {
|
|
59816
59820
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
59821
|
+
trackEvent?.();
|
|
59817
59822
|
const payload = event;
|
|
59818
59823
|
const channelId = payload.channel?.id;
|
|
59819
59824
|
const channelName = payload.channel?.name;
|
|
@@ -59829,6 +59834,7 @@ function registerSlackChannelEvents(params) {
|
|
|
59829
59834
|
ctx.app.event("channel_rename", async ({ event, body }) => {
|
|
59830
59835
|
try {
|
|
59831
59836
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
59837
|
+
trackEvent?.();
|
|
59832
59838
|
const payload = event;
|
|
59833
59839
|
const channelId = payload.channel?.id;
|
|
59834
59840
|
enqueueChannelSystemEvent({
|
|
@@ -59843,6 +59849,7 @@ function registerSlackChannelEvents(params) {
|
|
|
59843
59849
|
ctx.app.event("channel_id_changed", async ({ event, body }) => {
|
|
59844
59850
|
try {
|
|
59845
59851
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
59852
|
+
trackEvent?.();
|
|
59846
59853
|
const payload = event;
|
|
59847
59854
|
const oldChannelId = payload.old_channel_id;
|
|
59848
59855
|
const newChannelId = payload.new_channel_id;
|
|
@@ -60248,10 +60255,11 @@ function registerSlackInteractionEvents(params) {
|
|
|
60248
60255
|
//#endregion
|
|
60249
60256
|
//#region src/slack/monitor/events/members.ts
|
|
60250
60257
|
function registerSlackMemberEvents(params) {
|
|
60251
|
-
const { ctx } = params;
|
|
60258
|
+
const { ctx, trackEvent } = params;
|
|
60252
60259
|
const handleMemberChannelEvent = async (params) => {
|
|
60253
60260
|
try {
|
|
60254
60261
|
if (ctx.shouldDropMismatchedSlackEvent(params.body)) return;
|
|
60262
|
+
trackEvent?.();
|
|
60255
60263
|
const payload = params.event;
|
|
60256
60264
|
const channelId = payload.channel;
|
|
60257
60265
|
const channelInfo = channelId ? await ctx.resolveChannelName(channelId) : {};
|
|
@@ -60387,9 +60395,10 @@ function registerSlackMessageEvents(params) {
|
|
|
60387
60395
|
//#endregion
|
|
60388
60396
|
//#region src/slack/monitor/events/pins.ts
|
|
60389
60397
|
async function handleSlackPinEvent(params) {
|
|
60390
|
-
const { ctx, body, event, action, contextKeySuffix, errorLabel } = params;
|
|
60398
|
+
const { ctx, trackEvent, body, event, action, contextKeySuffix, errorLabel } = params;
|
|
60391
60399
|
try {
|
|
60392
60400
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
60401
|
+
trackEvent?.();
|
|
60393
60402
|
const payload = event;
|
|
60394
60403
|
const channelId = payload.channel_id;
|
|
60395
60404
|
const channelInfo = channelId ? await ctx.resolveChannelName(channelId) : {};
|
|
@@ -60418,10 +60427,11 @@ async function handleSlackPinEvent(params) {
|
|
|
60418
60427
|
}
|
|
60419
60428
|
}
|
|
60420
60429
|
function registerSlackPinEvents(params) {
|
|
60421
|
-
const { ctx } = params;
|
|
60430
|
+
const { ctx, trackEvent } = params;
|
|
60422
60431
|
ctx.app.event("pin_added", async ({ event, body }) => {
|
|
60423
60432
|
await handleSlackPinEvent({
|
|
60424
60433
|
ctx,
|
|
60434
|
+
trackEvent,
|
|
60425
60435
|
body,
|
|
60426
60436
|
event,
|
|
60427
60437
|
action: "pinned",
|
|
@@ -60432,6 +60442,7 @@ function registerSlackPinEvents(params) {
|
|
|
60432
60442
|
ctx.app.event("pin_removed", async ({ event, body }) => {
|
|
60433
60443
|
await handleSlackPinEvent({
|
|
60434
60444
|
ctx,
|
|
60445
|
+
trackEvent,
|
|
60435
60446
|
body,
|
|
60436
60447
|
event,
|
|
60437
60448
|
action: "unpinned",
|
|
@@ -60444,11 +60455,12 @@ function registerSlackPinEvents(params) {
|
|
|
60444
60455
|
//#endregion
|
|
60445
60456
|
//#region src/slack/monitor/events/reactions.ts
|
|
60446
60457
|
function registerSlackReactionEvents(params) {
|
|
60447
|
-
const { ctx } = params;
|
|
60458
|
+
const { ctx, trackEvent } = params;
|
|
60448
60459
|
const handleReactionEvent = async (event, action) => {
|
|
60449
60460
|
try {
|
|
60450
60461
|
const item = event.item;
|
|
60451
60462
|
if (!item || item.type !== "message") return;
|
|
60463
|
+
trackEvent?.();
|
|
60452
60464
|
const channelInfo = item.channel ? await ctx.resolveChannelName(item.channel) : {};
|
|
60453
60465
|
const channelType = channelInfo?.type;
|
|
60454
60466
|
if (!ctx.isChannelAllowed({
|
|
@@ -60492,10 +60504,22 @@ function registerSlackMonitorEvents(params) {
|
|
|
60492
60504
|
ctx: params.ctx,
|
|
60493
60505
|
handleSlackMessage: params.handleSlackMessage
|
|
60494
60506
|
});
|
|
60495
|
-
registerSlackReactionEvents({
|
|
60496
|
-
|
|
60497
|
-
|
|
60498
|
-
|
|
60507
|
+
registerSlackReactionEvents({
|
|
60508
|
+
ctx: params.ctx,
|
|
60509
|
+
trackEvent: params.trackEvent
|
|
60510
|
+
});
|
|
60511
|
+
registerSlackMemberEvents({
|
|
60512
|
+
ctx: params.ctx,
|
|
60513
|
+
trackEvent: params.trackEvent
|
|
60514
|
+
});
|
|
60515
|
+
registerSlackChannelEvents({
|
|
60516
|
+
ctx: params.ctx,
|
|
60517
|
+
trackEvent: params.trackEvent
|
|
60518
|
+
});
|
|
60519
|
+
registerSlackPinEvents({
|
|
60520
|
+
ctx: params.ctx,
|
|
60521
|
+
trackEvent: params.trackEvent
|
|
60522
|
+
});
|
|
60499
60523
|
registerSlackInteractionEvents({ ctx: params.ctx });
|
|
60500
60524
|
}
|
|
60501
60525
|
|
|
@@ -60668,7 +60692,7 @@ async function startSlackStream(params) {
|
|
|
60668
60692
|
stopped: false
|
|
60669
60693
|
};
|
|
60670
60694
|
if (text) {
|
|
60671
|
-
await streamer.append({ markdown_text: text });
|
|
60695
|
+
await streamer.append({ markdown_text: markdownToSlackMrkdwn(text) });
|
|
60672
60696
|
logVerbose(`slack-stream: appended initial text (${text.length} chars)`);
|
|
60673
60697
|
}
|
|
60674
60698
|
return session;
|
|
@@ -60683,7 +60707,7 @@ async function appendSlackStream(params) {
|
|
|
60683
60707
|
return;
|
|
60684
60708
|
}
|
|
60685
60709
|
if (!text) return;
|
|
60686
|
-
await session.streamer.append({ markdown_text: text });
|
|
60710
|
+
await session.streamer.append({ markdown_text: markdownToSlackMrkdwn(text) });
|
|
60687
60711
|
logVerbose(`slack-stream: appended ${text.length} chars`);
|
|
60688
60712
|
}
|
|
60689
60713
|
/**
|
|
@@ -60700,7 +60724,7 @@ async function stopSlackStream(params) {
|
|
|
60700
60724
|
}
|
|
60701
60725
|
session.stopped = true;
|
|
60702
60726
|
logVerbose(`slack-stream: stopping stream in ${session.channel} thread=${session.threadTs}${text ? ` (final text: ${text.length} chars)` : ""}`);
|
|
60703
|
-
await session.streamer.stop(text ? { markdown_text: text } : void 0);
|
|
60727
|
+
await session.streamer.stop(text ? { markdown_text: markdownToSlackMrkdwn(text) } : void 0);
|
|
60704
60728
|
logVerbose("slack-stream: stream stopped");
|
|
60705
60729
|
}
|
|
60706
60730
|
|
|
@@ -60719,12 +60743,21 @@ function resolveSlackThreadContext(params) {
|
|
|
60719
60743
|
messageThreadId: isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0
|
|
60720
60744
|
};
|
|
60721
60745
|
}
|
|
60746
|
+
/**
|
|
60747
|
+
* Resolves Slack thread targeting for replies and status indicators.
|
|
60748
|
+
*
|
|
60749
|
+
* @returns replyThreadTs - Thread timestamp for reply messages
|
|
60750
|
+
* @returns statusThreadTs - Thread timestamp for status indicators (typing, etc.)
|
|
60751
|
+
* @returns isThreadReply - true if this is a genuine user reply in a thread,
|
|
60752
|
+
* false if thread_ts comes from a bot status message
|
|
60753
|
+
*/
|
|
60722
60754
|
function resolveSlackThreadTargets(params) {
|
|
60723
|
-
const { incomingThreadTs, messageTs } = resolveSlackThreadContext(params);
|
|
60724
|
-
const replyThreadTs = incomingThreadTs
|
|
60755
|
+
const { incomingThreadTs, messageTs, isThreadReply } = resolveSlackThreadContext(params);
|
|
60756
|
+
const replyThreadTs = isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0;
|
|
60725
60757
|
return {
|
|
60726
60758
|
replyThreadTs,
|
|
60727
|
-
statusThreadTs: replyThreadTs ?? messageTs
|
|
60759
|
+
statusThreadTs: replyThreadTs ?? messageTs,
|
|
60760
|
+
isThreadReply
|
|
60728
60761
|
};
|
|
60729
60762
|
}
|
|
60730
60763
|
|
|
@@ -60764,12 +60797,13 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60764
60797
|
deliveryContext: {
|
|
60765
60798
|
channel: "slack",
|
|
60766
60799
|
to: `user:${message.user}`,
|
|
60767
|
-
accountId: route.accountId
|
|
60800
|
+
accountId: route.accountId,
|
|
60801
|
+
threadId: prepared.ctxPayload.MessageThreadId
|
|
60768
60802
|
},
|
|
60769
60803
|
ctx: prepared.ctxPayload
|
|
60770
60804
|
});
|
|
60771
60805
|
}
|
|
60772
|
-
const { statusThreadTs } = resolveSlackThreadTargets({
|
|
60806
|
+
const { statusThreadTs, isThreadReply } = resolveSlackThreadTargets({
|
|
60773
60807
|
message,
|
|
60774
60808
|
replyToMode: ctx.replyToMode
|
|
60775
60809
|
});
|
|
@@ -60781,7 +60815,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60781
60815
|
replyToMode: ctx.replyToMode,
|
|
60782
60816
|
incomingThreadTs,
|
|
60783
60817
|
messageTs,
|
|
60784
|
-
hasRepliedRef
|
|
60818
|
+
hasRepliedRef,
|
|
60819
|
+
isThreadReply
|
|
60785
60820
|
});
|
|
60786
60821
|
const typingTarget = statusThreadTs ? `${message.channel}/${statusThreadTs}` : message.channel;
|
|
60787
60822
|
const typingCallbacks = createTypingCallbacks({
|
|
@@ -60846,7 +60881,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60846
60881
|
accountId: account.accountId,
|
|
60847
60882
|
runtime,
|
|
60848
60883
|
textLimit: ctx.textLimit,
|
|
60849
|
-
replyThreadTs
|
|
60884
|
+
replyThreadTs,
|
|
60885
|
+
replyToMode: ctx.replyToMode
|
|
60850
60886
|
});
|
|
60851
60887
|
replyPlan.markSent();
|
|
60852
60888
|
};
|
|
@@ -60907,7 +60943,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60907
60943
|
token: ctx.botToken,
|
|
60908
60944
|
channel: draftChannelId,
|
|
60909
60945
|
ts: draftMessageId,
|
|
60910
|
-
text: finalText.trim()
|
|
60946
|
+
text: markdownToSlackMrkdwn(finalText.trim())
|
|
60911
60947
|
});
|
|
60912
60948
|
return;
|
|
60913
60949
|
} catch (err) {
|
|
@@ -60937,7 +60973,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60937
60973
|
accountId: account.accountId,
|
|
60938
60974
|
runtime,
|
|
60939
60975
|
textLimit: ctx.textLimit,
|
|
60940
|
-
replyThreadTs
|
|
60976
|
+
replyThreadTs,
|
|
60977
|
+
replyToMode: ctx.replyToMode
|
|
60941
60978
|
});
|
|
60942
60979
|
replyPlan.markSent();
|
|
60943
60980
|
},
|
|
@@ -60946,7 +60983,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
60946
60983
|
typingCallbacks.onIdle?.();
|
|
60947
60984
|
},
|
|
60948
60985
|
onReplyStart: typingCallbacks.onReplyStart,
|
|
60949
|
-
onIdle: typingCallbacks.onIdle
|
|
60986
|
+
onIdle: typingCallbacks.onIdle,
|
|
60987
|
+
onCleanup: typingCallbacks.onCleanup
|
|
60950
60988
|
});
|
|
60951
60989
|
const draftStream = createSlackDraftStream({
|
|
60952
60990
|
target: prepared.replyTarget,
|
|
@@ -61587,10 +61625,13 @@ async function prepareSlackMessage(params) {
|
|
|
61587
61625
|
const mergedMedia = [...media ?? [], ...attachmentContent?.media ?? []];
|
|
61588
61626
|
const effectiveDirectMedia = mergedMedia.length > 0 ? mergedMedia : null;
|
|
61589
61627
|
const mediaPlaceholder = effectiveDirectMedia ? effectiveDirectMedia.map((m) => m.placeholder).join(" ") : void 0;
|
|
61628
|
+
const fileOnlyFallback = !mediaPlaceholder && (message.files?.length ?? 0) > 0 ? message.files.slice(0, 5).map((f) => f.name ?? "file").join(", ") : void 0;
|
|
61629
|
+
const fileOnlyPlaceholder = fileOnlyFallback ? `[Slack file: ${fileOnlyFallback}]` : void 0;
|
|
61590
61630
|
const rawBody = [
|
|
61591
61631
|
(message.text ?? "").trim(),
|
|
61592
61632
|
attachmentContent?.text,
|
|
61593
|
-
mediaPlaceholder
|
|
61633
|
+
mediaPlaceholder,
|
|
61634
|
+
fileOnlyPlaceholder
|
|
61594
61635
|
].filter(Boolean).join("\n") || "";
|
|
61595
61636
|
if (!rawBody) return null;
|
|
61596
61637
|
const ackReaction = resolveAckReaction(cfg, route.agentId, {
|
|
@@ -61765,7 +61806,7 @@ async function prepareSlackMessage(params) {
|
|
|
61765
61806
|
ReplyToId: threadContext.replyToId,
|
|
61766
61807
|
MessageThreadId: threadContext.messageThreadId,
|
|
61767
61808
|
ParentSessionKey: threadKeys.parentSessionKey,
|
|
61768
|
-
ThreadStarterBody: threadStarterBody,
|
|
61809
|
+
ThreadStarterBody: !threadSessionPreviousTimestamp ? threadStarterBody : void 0,
|
|
61769
61810
|
ThreadHistoryBody: threadHistoryBody,
|
|
61770
61811
|
IsFirstThreadTurn: isThreadReply && threadTs && !threadSessionPreviousTimestamp ? true : void 0,
|
|
61771
61812
|
ThreadLabel: threadLabel,
|
|
@@ -61789,7 +61830,8 @@ async function prepareSlackMessage(params) {
|
|
|
61789
61830
|
sessionKey: route.mainSessionKey,
|
|
61790
61831
|
channel: "slack",
|
|
61791
61832
|
to: `user:${message.user}`,
|
|
61792
|
-
accountId: route.accountId
|
|
61833
|
+
accountId: route.accountId,
|
|
61834
|
+
threadId: threadContext.messageThreadId
|
|
61793
61835
|
} : void 0,
|
|
61794
61836
|
onRecordError: (err) => {
|
|
61795
61837
|
ctx.logger.warn({
|
|
@@ -61916,7 +61958,7 @@ function buildSeenMessageKey(channelId, ts) {
|
|
|
61916
61958
|
return `${channelId}:${ts}`;
|
|
61917
61959
|
}
|
|
61918
61960
|
function createSlackMessageHandler(params) {
|
|
61919
|
-
const { ctx, account } = params;
|
|
61961
|
+
const { ctx, account, trackEvent } = params;
|
|
61920
61962
|
const debounceMs = resolveInboundDebounceMs({
|
|
61921
61963
|
cfg: ctx.cfg,
|
|
61922
61964
|
channel: "slack"
|
|
@@ -62006,6 +62048,7 @@ function createSlackMessageHandler(params) {
|
|
|
62006
62048
|
if (seenMessageKey && wasSeen) {
|
|
62007
62049
|
if (opts.source !== "app_mention" || !consumeAppMentionRetryKey(seenMessageKey)) return;
|
|
62008
62050
|
}
|
|
62051
|
+
trackEvent?.();
|
|
62009
62052
|
const resolvedMessage = await threadTsResolver.resolve({
|
|
62010
62053
|
message,
|
|
62011
62054
|
source: opts.source
|
|
@@ -62479,7 +62522,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
62479
62522
|
});
|
|
62480
62523
|
const deliverSlashPayloads = async (replies) => {
|
|
62481
62524
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
62482
|
-
import("./replies-
|
|
62525
|
+
import("./replies-BCd0AxfK.js").then((n) => n.r),
|
|
62483
62526
|
import("./chunk-D5Env9VX.js").then((n) => n.s),
|
|
62484
62527
|
import("./markdown-tables-TvRIp_jr.js").then((n) => n.t)
|
|
62485
62528
|
]);
|
|
@@ -62659,6 +62702,73 @@ const slackBoltModule = SlackBolt;
|
|
|
62659
62702
|
const { App, HTTPReceiver } = (slackBoltModule.App ? slackBoltModule : slackBoltModule.default) ?? slackBoltModule;
|
|
62660
62703
|
const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
|
|
62661
62704
|
const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
|
|
62705
|
+
const SLACK_SOCKET_RECONNECT_POLICY = {
|
|
62706
|
+
initialMs: 2e3,
|
|
62707
|
+
maxMs: 3e4,
|
|
62708
|
+
factor: 1.8,
|
|
62709
|
+
jitter: .25,
|
|
62710
|
+
maxAttempts: 12
|
|
62711
|
+
};
|
|
62712
|
+
function getSocketEmitter(app) {
|
|
62713
|
+
const receiver = app.receiver;
|
|
62714
|
+
const client = receiver && typeof receiver === "object" ? receiver.client : void 0;
|
|
62715
|
+
if (!client || typeof client !== "object") return null;
|
|
62716
|
+
const on = client.on;
|
|
62717
|
+
const off = client.off;
|
|
62718
|
+
if (typeof on !== "function" || typeof off !== "function") return null;
|
|
62719
|
+
return {
|
|
62720
|
+
on: (event, listener) => on.call(client, event, listener),
|
|
62721
|
+
off: (event, listener) => off.call(client, event, listener)
|
|
62722
|
+
};
|
|
62723
|
+
}
|
|
62724
|
+
function waitForSlackSocketDisconnect(app, abortSignal) {
|
|
62725
|
+
return new Promise((resolve) => {
|
|
62726
|
+
const emitter = getSocketEmitter(app);
|
|
62727
|
+
if (!emitter) {
|
|
62728
|
+
abortSignal?.addEventListener("abort", () => resolve({ event: "disconnect" }), { once: true });
|
|
62729
|
+
return;
|
|
62730
|
+
}
|
|
62731
|
+
const disconnectListener = () => resolveOnce({ event: "disconnect" });
|
|
62732
|
+
const startFailListener = () => resolveOnce({ event: "unable_to_socket_mode_start" });
|
|
62733
|
+
const errorListener = (error) => resolveOnce({
|
|
62734
|
+
event: "error",
|
|
62735
|
+
error
|
|
62736
|
+
});
|
|
62737
|
+
const abortListener = () => resolveOnce({ event: "disconnect" });
|
|
62738
|
+
const cleanup = () => {
|
|
62739
|
+
emitter.off("disconnected", disconnectListener);
|
|
62740
|
+
emitter.off("unable_to_socket_mode_start", startFailListener);
|
|
62741
|
+
emitter.off("error", errorListener);
|
|
62742
|
+
abortSignal?.removeEventListener("abort", abortListener);
|
|
62743
|
+
};
|
|
62744
|
+
const resolveOnce = (value) => {
|
|
62745
|
+
cleanup();
|
|
62746
|
+
resolve(value);
|
|
62747
|
+
};
|
|
62748
|
+
emitter.on("disconnected", disconnectListener);
|
|
62749
|
+
emitter.on("unable_to_socket_mode_start", startFailListener);
|
|
62750
|
+
emitter.on("error", errorListener);
|
|
62751
|
+
abortSignal?.addEventListener("abort", abortListener, { once: true });
|
|
62752
|
+
});
|
|
62753
|
+
}
|
|
62754
|
+
/**
|
|
62755
|
+
* Detect non-recoverable Slack API / auth errors that should NOT be retried.
|
|
62756
|
+
* These indicate permanent credential problems (revoked bot, deactivated account, etc.)
|
|
62757
|
+
* and retrying will never succeed — continuing to retry blocks the entire gateway.
|
|
62758
|
+
*/
|
|
62759
|
+
function isNonRecoverableSlackAuthError(error) {
|
|
62760
|
+
const msg = error instanceof Error ? error.message : typeof error === "string" ? error : "";
|
|
62761
|
+
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);
|
|
62762
|
+
}
|
|
62763
|
+
function formatUnknownError(error) {
|
|
62764
|
+
if (error instanceof Error) return error.message;
|
|
62765
|
+
if (typeof error === "string") return error;
|
|
62766
|
+
try {
|
|
62767
|
+
return JSON.stringify(error);
|
|
62768
|
+
} catch {
|
|
62769
|
+
return "unknown error";
|
|
62770
|
+
}
|
|
62771
|
+
}
|
|
62662
62772
|
function parseApiAppIdFromAppToken(raw) {
|
|
62663
62773
|
const token = raw?.trim();
|
|
62664
62774
|
if (!token) return;
|
|
@@ -62782,13 +62892,21 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
62782
62892
|
mediaMaxBytes,
|
|
62783
62893
|
removeAckAfterReply
|
|
62784
62894
|
});
|
|
62895
|
+
const trackEvent = opts.setStatus ? () => {
|
|
62896
|
+
opts.setStatus({
|
|
62897
|
+
lastEventAt: Date.now(),
|
|
62898
|
+
lastInboundAt: Date.now()
|
|
62899
|
+
});
|
|
62900
|
+
} : void 0;
|
|
62785
62901
|
registerSlackMonitorEvents({
|
|
62786
62902
|
ctx,
|
|
62787
62903
|
account,
|
|
62788
62904
|
handleSlackMessage: createSlackMessageHandler({
|
|
62789
62905
|
ctx,
|
|
62790
|
-
account
|
|
62791
|
-
|
|
62906
|
+
account,
|
|
62907
|
+
trackEvent
|
|
62908
|
+
}),
|
|
62909
|
+
trackEvent
|
|
62792
62910
|
});
|
|
62793
62911
|
await registerSlackMonitorSlashCommands({
|
|
62794
62912
|
ctx,
|
|
@@ -62877,13 +62995,52 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
62877
62995
|
opts.abortSignal?.addEventListener("abort", stopOnAbort, { once: true });
|
|
62878
62996
|
try {
|
|
62879
62997
|
if (slackMode === "socket") {
|
|
62880
|
-
|
|
62881
|
-
|
|
62882
|
-
|
|
62883
|
-
|
|
62884
|
-
|
|
62885
|
-
|
|
62886
|
-
|
|
62998
|
+
let reconnectAttempts = 0;
|
|
62999
|
+
while (!opts.abortSignal?.aborted) {
|
|
63000
|
+
try {
|
|
63001
|
+
await app.start();
|
|
63002
|
+
reconnectAttempts = 0;
|
|
63003
|
+
runtime.log?.("slack socket mode connected");
|
|
63004
|
+
} catch (err) {
|
|
63005
|
+
if (isNonRecoverableSlackAuthError(err)) {
|
|
63006
|
+
runtime.error?.(`slack socket mode failed to start due to non-recoverable auth error — skipping channel (${formatUnknownError(err)})`);
|
|
63007
|
+
throw err;
|
|
63008
|
+
}
|
|
63009
|
+
reconnectAttempts += 1;
|
|
63010
|
+
if (SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 && reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts) throw err;
|
|
63011
|
+
const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);
|
|
63012
|
+
runtime.error?.(`slack socket mode failed to start. retry ${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts || "∞"} in ${Math.round(delayMs / 1e3)}s (${formatUnknownError(err)})`);
|
|
63013
|
+
try {
|
|
63014
|
+
await sleepWithAbort(delayMs, opts.abortSignal);
|
|
63015
|
+
} catch {
|
|
63016
|
+
break;
|
|
63017
|
+
}
|
|
63018
|
+
continue;
|
|
63019
|
+
}
|
|
63020
|
+
if (opts.abortSignal?.aborted) break;
|
|
63021
|
+
const disconnect = await waitForSlackSocketDisconnect(app, opts.abortSignal);
|
|
63022
|
+
if (opts.abortSignal?.aborted) break;
|
|
63023
|
+
if (disconnect.error && isNonRecoverableSlackAuthError(disconnect.error)) {
|
|
63024
|
+
runtime.error?.(`slack socket mode disconnected due to non-recoverable auth error — skipping channel (${formatUnknownError(disconnect.error)})`);
|
|
63025
|
+
throw disconnect.error instanceof Error ? disconnect.error : new Error(formatUnknownError(disconnect.error));
|
|
63026
|
+
}
|
|
63027
|
+
reconnectAttempts += 1;
|
|
63028
|
+
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}`);
|
|
63029
|
+
const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);
|
|
63030
|
+
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)})` : ""}`);
|
|
63031
|
+
await app.stop().catch(() => void 0);
|
|
63032
|
+
try {
|
|
63033
|
+
await sleepWithAbort(delayMs, opts.abortSignal);
|
|
63034
|
+
} catch {
|
|
63035
|
+
break;
|
|
63036
|
+
}
|
|
63037
|
+
}
|
|
63038
|
+
} else {
|
|
63039
|
+
runtime.log?.(`slack http mode listening at ${slackWebhookPath}`);
|
|
63040
|
+
if (!opts.abortSignal?.aborted) await new Promise((resolve) => {
|
|
63041
|
+
opts.abortSignal?.addEventListener("abort", () => resolve(), { once: true });
|
|
63042
|
+
});
|
|
63043
|
+
}
|
|
62887
63044
|
} finally {
|
|
62888
63045
|
opts.abortSignal?.removeEventListener("abort", stopOnAbort);
|
|
62889
63046
|
unregisterHttpHandler?.();
|
|
@@ -64752,7 +64909,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
64752
64909
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
64753
64910
|
let preflightTranscript;
|
|
64754
64911
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
64755
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
64912
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-Dp9KYMCX.js");
|
|
64756
64913
|
preflightTranscript = await transcribeFirstAudio({
|
|
64757
64914
|
ctx: {
|
|
64758
64915
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -66909,7 +67066,7 @@ function loadWebLoginQr() {
|
|
|
66909
67066
|
return webLoginQrPromise;
|
|
66910
67067
|
}
|
|
66911
67068
|
function loadWebChannel() {
|
|
66912
|
-
webChannelPromise ??= import("./web-
|
|
67069
|
+
webChannelPromise ??= import("./web-c0XVFCZq.js");
|
|
66913
67070
|
return webChannelPromise;
|
|
66914
67071
|
}
|
|
66915
67072
|
function loadWhatsAppActions() {
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
|
2
2
|
import { M as getActivePluginRegistry, o as createSubsystemLogger } from "./entry.js";
|
|
3
3
|
import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-CRYIvJeA.js";
|
|
4
4
|
import { i as loadConfig } from "./config-BIssvwa3.js";
|
|
5
|
-
import { g as loadOpenClawPlugins } from "./subagent-registry-
|
|
5
|
+
import { g as loadOpenClawPlugins } from "./subagent-registry-CEyaZMV5.js";
|
|
6
6
|
|
|
7
7
|
//#region src/cli/plugin-registry.ts
|
|
8
8
|
var plugin_registry_exports = /* @__PURE__ */ __exportAll({ ensurePluginRegistryLoaded: () => ensurePluginRegistryLoaded });
|