@symerian/symi 2.1.9 → 2.1.10
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/{accounts-tNElYrCH.js → accounts-CRksecBH.js} +14 -14
- package/dist/{accounts-qtxJ-6em.js → accounts-K_r7OhcD.js} +1 -1
- package/dist/{accounts-CWktKM8a.js → accounts-q7Sc1Tpi.js} +1 -1
- package/dist/{active-listener-C9r8ZB9m.js → active-listener-DXU1iEiq.js} +1 -1
- package/dist/{agent-scope-BxoUQqgM.js → agent-scope-BkCGKhZd.js} +3 -3
- package/dist/{audio-preflight-BZIRAXlv.js → audio-preflight-BbZjr38h.js} +29 -29
- package/dist/{bindings-B7Ke6LJi.js → bindings-Bv-cp2U5.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +53 -53
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +53 -53
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-CsM_hJ_s.js → channel-activity-IwGy5fjY.js} +1 -1
- package/dist/{chrome-791kNCCB.js → chrome-B4c8SEkN.js} +13 -13
- package/dist/{chunk-BW5f05BR.js → chunk-CxYL-OXO.js} +1 -1
- package/dist/{command-format-BaxDnULz.js → command-format-HKbBegfJ.js} +1 -1
- package/dist/{commands-registry-BCRa0DAp.js → commands-registry-BqkqVEHA.js} +4 -4
- package/dist/{config-CfZ-oKwR.js → config-BrAFSU6Z.js} +17 -17
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/js/models.js +1 -1
- package/dist/{deliver-CrlXl9KD.js → deliver-CfiME1St.js} +20 -20
- package/dist/{diagnostic-CI0kRQkt.js → diagnostic-CINBNBQX.js} +1 -1
- package/dist/{frontmatter-C_bv_0P8.js → frontmatter-wVHII0KO.js} +4 -4
- package/dist/{gemini-auth-DzFcFvHV.js → gemini-auth-BwRMlWJH.js} +1 -1
- package/dist/{github-copilot-token-C_qUP7p5.js → github-copilot-token-DJqsJ2-r.js} +7 -7
- package/dist/{image-ycxQmhff.js → image-DEVMOUEF.js} +4 -4
- package/dist/{image-ops-CvJzsyvE.js → image-ops-Lmflb2E9.js} +1 -1
- package/dist/{ir-DccrnjsE.js → ir-CuuCOLHL.js} +4 -4
- package/dist/llm-slug-generator.js +53 -53
- package/dist/{local-roots-DMwIh5cS.js → local-roots-C0y1zqg5.js} +5 -5
- package/dist/{login-DMnQmqbM.js → login-C-iEZ7-d.js} +7 -7
- package/dist/{login-qr-Dbb1xG4s.js → login-qr-Z0tp3m4b.js} +12 -12
- package/dist/{manager-M83fJMDC.js → manager-BlH-kIAA.js} +13 -13
- package/dist/{manifest-registry-D0IQ3WuX.js → manifest-registry-DetgyAnG.js} +19 -19
- package/dist/{markdown-tables-iMQQZu4Q.js → markdown-tables-C4L0emuC.js} +1 -1
- package/dist/{message-channel-Dz5lr5b0.js → message-channel-Bzd90Fg1.js} +1 -1
- package/dist/{model-auth-64S8o7s-.js → model-auth-DbMOVgB3.js} +9 -9
- package/dist/{outbound-DEjQvzWk.js → outbound-CsCk7-X6.js} +7 -7
- package/dist/{outbound-attachment-DjNDa3zn.js → outbound-attachment-DTzYlChD.js} +2 -2
- package/dist/{paths-DLyHUt31.js → paths-Cb87-LzP.js} +1 -1
- package/dist/{paths-Cce4PUkG.js → paths-CySxpNhH.js} +5 -5
- package/dist/{pi-auth-json-wQxiCgzR.js → pi-auth-json-Cog6KWQ0.js} +8 -8
- package/dist/{pi-embedded-helpers-DoTustDz.js → pi-embedded-helpers-DwUUGl8K.js} +52 -52
- package/dist/{pi-embedded-AKhKHxb6.js → pi-embedded-l6fnSeuU.js} +160 -160
- package/dist/{plugins-DQYI3Fr-.js → plugins-D1_FhsCG.js} +9 -9
- package/dist/{pw-ai-DIVguI36.js → pw-ai-BIGSU-k2.js} +11 -11
- package/dist/{qmd-manager-QHUP-_em.js → qmd-manager-jPsEJprD.js} +7 -7
- package/dist/{registry-CK4e9hn8.js → registry-Cgbuhd6U.js} +19 -19
- package/dist/{replies-Cj2HD2yn.js → replies-CjfQWlpL.js} +3 -3
- package/dist/{reply-prefix-XlyuyChD.js → reply-prefix-NvPdveXK.js} +1 -1
- package/dist/{resolve-route-CZ-1eqw0.js → resolve-route-BoOTtfRC.js} +4 -4
- package/dist/{retry-Cly39XZB.js → retry-CZ13t_sq.js} +1 -1
- package/dist/{runner-Cw5KZrjx.js → runner-Dl0eiBve.js} +9 -9
- package/dist/{send-BxrNk2KH.js → send-3jM0m9vc.js} +7 -7
- package/dist/{send-QC5kvnW3.js → send-BDVMssZq.js} +6 -6
- package/dist/{send-D0WfDllx.js → send-CQxYqAP8.js} +10 -10
- package/dist/{send-Ct3wqNP6.js → send-DJ537kMF.js} +6 -6
- package/dist/{send-G-E0gOCC.js → send-DZCl3x0a.js} +18 -18
- package/dist/{session-BK0E3EZe.js → session-BgWKJ33t.js} +8 -8
- package/dist/{skill-commands-DCDG7ki5.js → skill-commands-BtMC57oh.js} +9 -9
- package/dist/{skills-BFekKL7i.js → skills-8Qi9zQz0.js} +21 -21
- package/dist/{sqlite-DRbx2dhW.js → sqlite-ReocE89T.js} +4 -4
- package/dist/{store-C0wvOkae.js → store-CsOqrZPF.js} +2 -2
- package/dist/{subsystem-Bs9YvKLa.js → subsystem-LRKKAgQx.js} +1 -1
- package/dist/{tables-DuZspiBu.js → tables-Du3x5E08.js} +1 -1
- package/dist/{target-errors-Be1SwYlW.js → target-errors-DUTv7Hgk.js} +2 -2
- package/dist/{thinking-CdlENGRW.js → thinking-DwjHOBvM.js} +5 -5
- package/dist/{tokens-H1H1LiSQ.js → tokens-CXvgek4j.js} +1 -1
- package/dist/{tool-images-DXB7tqWi.js → tool-images-DA9V4mO7.js} +2 -2
- package/dist/{tool-loop-detection-Cs8_HCsx.js → tool-loop-detection-43NkVgks.js} +3 -3
- package/dist/{web-Kz-ZuUjq.js → web-Cbjmu3ex.js} +57 -57
- package/dist/{whatsapp-actions-CHVuR8Yp.js → whatsapp-actions-CmlTTSUG.js} +23 -23
- package/dist/{workspace-wAaHI8-5.js → workspace-CFIJ53-f.js} +6 -6
- package/package.json +1 -1
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-
|
|
2
|
+
import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CySxpNhH.js";
|
|
3
3
|
import { _ as isCronSessionKey, b as resolveThreadParentSessionKey, c as normalizeMainKey, d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, g as isAcpSessionKey, h as getSubagentDepth, l as resolveAgentIdFromSessionKey, o as classifySessionKeyShape, p as normalizeAccountId$2, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, u as resolveThreadSessionKeys, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BCzIW1Y2.js";
|
|
4
|
-
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-
|
|
5
|
-
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-
|
|
6
|
-
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
7
|
-
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-
|
|
8
|
-
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
9
|
-
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-
|
|
10
|
-
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-
|
|
4
|
+
import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-Cgbuhd6U.js";
|
|
5
|
+
import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-BkCGKhZd.js";
|
|
6
|
+
import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-LRKKAgQx.js";
|
|
7
|
+
import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-CFIJ53-f.js";
|
|
8
|
+
import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-CXvgek4j.js";
|
|
9
|
+
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-D1_FhsCG.js";
|
|
10
|
+
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-CRksecBH.js";
|
|
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
|
-
import { n as resolveCliName, r as isTruthyEnvValue, t as formatCliCommand } from "./command-format-
|
|
14
|
-
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-
|
|
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-
|
|
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-
|
|
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-
|
|
13
|
+
import { n as resolveCliName, r as isTruthyEnvValue, t as formatCliCommand } from "./command-format-HKbBegfJ.js";
|
|
14
|
+
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-DJ537kMF.js";
|
|
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-CQxYqAP8.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-CfiME1St.js";
|
|
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-CINBNBQX.js";
|
|
18
18
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Bxo4UHOL.js";
|
|
19
|
-
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-
|
|
20
|
-
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-
|
|
21
|
-
import { d as detectMime, f as extensionForMime, g as isGifMedia, h as isAudioFileName, i as getImageMetadata, m as imageMimeFromFormat, s as resizeToJpeg, x as mediaKindFromMime, y as MAX_IMAGE_BYTES } from "./image-ops-
|
|
22
|
-
import { A as normalizeProviderId, C as buildAllowedModelSet, D as isCliProvider, E as findNormalizedProviderValue, F as resolveSubagentSpawnModelSelection, G as DEFAULT_MODEL, H as OLLAMA_NATIVE_BASE_URL, I as resolveThinkingDefault, J as normalizeSecretInput, K as DEFAULT_PROVIDER, M as resolveConfiguredModelRef, N as resolveDefaultModelForAgent, O as modelKey, P as resolveModelRefFromString, T as buildModelAliasIndex, U as createOllamaStreamFn, W as DEFAULT_CONTEXT_TOKENS, Y as getShellPathFromLoginShell, Z as resolveShellEnvFallbackTimeoutMs, _ as ensureAuthProfileStore, a as resolveEnvApiKey, b as withFileLock, c as resolveAuthProfileOrder, d as markAuthProfileFailure, f as markAuthProfileUsed, g as markAuthProfileGood, h as listProfilesForProvider, i as resolveApiKeyForProvider, k as normalizeModelRef$2, l as getSoonestCooldownExpiry, m as dedupeProfileIds, n as getCustomProviderApiKey, o as resolveModelAuthMode, p as resolveApiKeyForProfile, q as resolveAuthProfileDisplayLabel, r as requireApiKey, t as getApiKeyForModel, u as isProfileInCooldown, v as resolveAuthStorePathForDisplay, w as buildConfiguredAllowlistKeys, y as resolveSymiAgentDir } from "./model-auth-
|
|
23
|
-
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-
|
|
19
|
+
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-q7Sc1Tpi.js";
|
|
20
|
+
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-DZCl3x0a.js";
|
|
21
|
+
import { d as detectMime, f as extensionForMime, g as isGifMedia, h as isAudioFileName, i as getImageMetadata, m as imageMimeFromFormat, s as resizeToJpeg, x as mediaKindFromMime, y as MAX_IMAGE_BYTES } from "./image-ops-Lmflb2E9.js";
|
|
22
|
+
import { A as normalizeProviderId, C as buildAllowedModelSet, D as isCliProvider, E as findNormalizedProviderValue, F as resolveSubagentSpawnModelSelection, G as DEFAULT_MODEL, H as OLLAMA_NATIVE_BASE_URL, I as resolveThinkingDefault, J as normalizeSecretInput, K as DEFAULT_PROVIDER, M as resolveConfiguredModelRef, N as resolveDefaultModelForAgent, O as modelKey, P as resolveModelRefFromString, T as buildModelAliasIndex, U as createOllamaStreamFn, W as DEFAULT_CONTEXT_TOKENS, Y as getShellPathFromLoginShell, Z as resolveShellEnvFallbackTimeoutMs, _ as ensureAuthProfileStore, a as resolveEnvApiKey, b as withFileLock, c as resolveAuthProfileOrder, d as markAuthProfileFailure, f as markAuthProfileUsed, g as markAuthProfileGood, h as listProfilesForProvider, i as resolveApiKeyForProvider, k as normalizeModelRef$2, l as getSoonestCooldownExpiry, m as dedupeProfileIds, n as getCustomProviderApiKey, o as resolveModelAuthMode, p as resolveApiKeyForProfile, q as resolveAuthProfileDisplayLabel, r as requireApiKey, t as getApiKeyForModel, u as isProfileInCooldown, v as resolveAuthStorePathForDisplay, w as buildConfiguredAllowlistKeys, y as resolveSymiAgentDir } from "./model-auth-DbMOVgB3.js";
|
|
23
|
+
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-DJqsJ2-r.js";
|
|
24
24
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DaNAekda.js";
|
|
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-
|
|
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-
|
|
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-
|
|
28
|
-
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-
|
|
29
|
-
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
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-
|
|
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-Bzd90Fg1.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-DwUUGl8K.js";
|
|
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-BrAFSU6Z.js";
|
|
28
|
+
import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-DetgyAnG.js";
|
|
29
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-B4c8SEkN.js";
|
|
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-8Qi9zQz0.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";
|
|
33
|
-
import { n as getMediaDir, r as saveMediaBuffer } from "./store-
|
|
34
|
-
import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-
|
|
33
|
+
import { n as getMediaDir, r as saveMediaBuffer } from "./store-CsOqrZPF.js";
|
|
34
|
+
import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-DwjHOBvM.js";
|
|
35
35
|
import { n as resolveConversationLabel } from "./conversation-label-DXUkoKcB.js";
|
|
36
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
37
|
-
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
36
|
+
import { t as resolveIMessageAccount } from "./accounts-K_r7OhcD.js";
|
|
37
|
+
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-Cb87-LzP.js";
|
|
38
38
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-DDYvbmRV.js";
|
|
39
|
-
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-
|
|
40
|
-
import { S as ensureSymiModelsJson, _ 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-
|
|
41
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
42
|
-
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-
|
|
43
|
-
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-
|
|
44
|
-
import { n as retryAsync } from "./retry-
|
|
45
|
-
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-
|
|
46
|
-
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-
|
|
47
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
39
|
+
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-DA9V4mO7.js";
|
|
40
|
+
import { S as ensureSymiModelsJson, _ 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-DEVMOUEF.js";
|
|
41
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-NvPdveXK.js";
|
|
42
|
+
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-BlH-kIAA.js";
|
|
43
|
+
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-ReocE89T.js";
|
|
44
|
+
import { n as retryAsync } from "./retry-CZ13t_sq.js";
|
|
45
|
+
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-DUTv7Hgk.js";
|
|
46
|
+
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-CxYL-OXO.js";
|
|
47
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-C4L0emuC.js";
|
|
48
48
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-DL3f_O53.js";
|
|
49
|
-
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
50
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-
|
|
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-
|
|
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-
|
|
49
|
+
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-C0y1zqg5.js";
|
|
50
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-CuuCOLHL.js";
|
|
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-BqkqVEHA.js";
|
|
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-BtMC57oh.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-Dl0eiBve.js";
|
|
55
55
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-Bso4i15F.js";
|
|
56
56
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-Bup9wS1y.js";
|
|
57
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
57
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-IwGy5fjY.js";
|
|
58
58
|
import { n as normalizePollInput } from "./polls-CCuCaqgv.js";
|
|
59
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
60
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
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-
|
|
62
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
59
|
+
import { t as convertMarkdownTables } from "./tables-Du3x5E08.js";
|
|
60
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-BDVMssZq.js";
|
|
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-3jM0m9vc.js";
|
|
62
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-BoOTtfRC.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-
|
|
65
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
64
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CjfQWlpL.js";
|
|
65
|
+
import { t as getActiveWebListener } from "./active-listener-DXU1iEiq.js";
|
|
66
66
|
import { createRequire } from "node:module";
|
|
67
|
-
import * as fs$
|
|
67
|
+
import * as fs$1 from "node:fs/promises";
|
|
68
68
|
import fs from "node:fs/promises";
|
|
69
69
|
import os, { homedir } from "node:os";
|
|
70
70
|
import * as path$1 from "node:path";
|
|
71
71
|
import path from "node:path";
|
|
72
|
-
import
|
|
73
|
-
import
|
|
72
|
+
import fsSync, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
73
|
+
import json5 from "json5";
|
|
74
74
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
75
75
|
import { inspect, promisify } from "node:util";
|
|
76
76
|
import { fileURLToPath } from "node:url";
|
|
@@ -3144,7 +3144,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
3144
3144
|
const workspaceDir = params.workspaceDir?.trim();
|
|
3145
3145
|
if (workspaceDir) {
|
|
3146
3146
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
3147
|
-
if (
|
|
3147
|
+
if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
|
|
3148
3148
|
}
|
|
3149
3149
|
const packageRoot = await resolveSymiPackageRoot({
|
|
3150
3150
|
cwd: params.cwd,
|
|
@@ -3153,7 +3153,7 @@ async function resolveSymiDocsPath(params) {
|
|
|
3153
3153
|
});
|
|
3154
3154
|
if (!packageRoot) return null;
|
|
3155
3155
|
const packageDocs = path.join(packageRoot, "docs");
|
|
3156
|
-
return
|
|
3156
|
+
return fsSync.existsSync(packageDocs) ? packageDocs : null;
|
|
3157
3157
|
}
|
|
3158
3158
|
|
|
3159
3159
|
//#endregion
|
|
@@ -3462,7 +3462,7 @@ async function getMemorySearchManager(params) {
|
|
|
3462
3462
|
if (cached) return { manager: cached };
|
|
3463
3463
|
}
|
|
3464
3464
|
try {
|
|
3465
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
3465
|
+
const { QmdMemoryManager } = await import("./qmd-manager-jPsEJprD.js");
|
|
3466
3466
|
const primary = await QmdMemoryManager.create({
|
|
3467
3467
|
cfg: params.cfg,
|
|
3468
3468
|
agentId: params.agentId,
|
|
@@ -3474,7 +3474,7 @@ async function getMemorySearchManager(params) {
|
|
|
3474
3474
|
const wrapper = new FallbackMemoryManager({
|
|
3475
3475
|
primary,
|
|
3476
3476
|
fallbackFactory: async () => {
|
|
3477
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
3477
|
+
const { MemoryIndexManager } = await import("./manager-BlH-kIAA.js").then((n) => n.t);
|
|
3478
3478
|
return await MemoryIndexManager.get(params);
|
|
3479
3479
|
}
|
|
3480
3480
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -3487,7 +3487,7 @@ async function getMemorySearchManager(params) {
|
|
|
3487
3487
|
}
|
|
3488
3488
|
}
|
|
3489
3489
|
try {
|
|
3490
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
3490
|
+
const { MemoryIndexManager } = await import("./manager-BlH-kIAA.js").then((n) => n.t);
|
|
3491
3491
|
return { manager: await MemoryIndexManager.get(params) };
|
|
3492
3492
|
} catch (err) {
|
|
3493
3493
|
return {
|
|
@@ -4175,7 +4175,7 @@ function resolveDefaultIdentityPath() {
|
|
|
4175
4175
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
4176
4176
|
}
|
|
4177
4177
|
function ensureDir$2(filePath) {
|
|
4178
|
-
|
|
4178
|
+
fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
4179
4179
|
}
|
|
4180
4180
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
4181
4181
|
function base64UrlEncode(buf) {
|
|
@@ -4211,8 +4211,8 @@ function generateIdentity() {
|
|
|
4211
4211
|
}
|
|
4212
4212
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
4213
4213
|
try {
|
|
4214
|
-
if (
|
|
4215
|
-
const raw =
|
|
4214
|
+
if (fsSync.existsSync(filePath)) {
|
|
4215
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
4216
4216
|
const parsed = JSON.parse(raw);
|
|
4217
4217
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
4218
4218
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -4221,9 +4221,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
4221
4221
|
...parsed,
|
|
4222
4222
|
deviceId: derivedId
|
|
4223
4223
|
};
|
|
4224
|
-
|
|
4224
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
4225
4225
|
try {
|
|
4226
|
-
|
|
4226
|
+
fsSync.chmodSync(filePath, 384);
|
|
4227
4227
|
} catch {}
|
|
4228
4228
|
return {
|
|
4229
4229
|
deviceId: derivedId,
|
|
@@ -4248,9 +4248,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
4248
4248
|
privateKeyPem: identity.privateKeyPem,
|
|
4249
4249
|
createdAtMs: Date.now()
|
|
4250
4250
|
};
|
|
4251
|
-
|
|
4251
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
4252
4252
|
try {
|
|
4253
|
-
|
|
4253
|
+
fsSync.chmodSync(filePath, 384);
|
|
4254
4254
|
} catch {}
|
|
4255
4255
|
return identity;
|
|
4256
4256
|
}
|
|
@@ -4400,8 +4400,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
4400
4400
|
}
|
|
4401
4401
|
function readStore(filePath) {
|
|
4402
4402
|
try {
|
|
4403
|
-
if (!
|
|
4404
|
-
const raw =
|
|
4403
|
+
if (!fsSync.existsSync(filePath)) return null;
|
|
4404
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
4405
4405
|
const parsed = JSON.parse(raw);
|
|
4406
4406
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
4407
4407
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -4411,10 +4411,10 @@ function readStore(filePath) {
|
|
|
4411
4411
|
}
|
|
4412
4412
|
}
|
|
4413
4413
|
function writeStore(filePath, store) {
|
|
4414
|
-
|
|
4415
|
-
|
|
4414
|
+
fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
4415
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
4416
4416
|
try {
|
|
4417
|
-
|
|
4417
|
+
fsSync.chmodSync(filePath, 384);
|
|
4418
4418
|
} catch {}
|
|
4419
4419
|
}
|
|
4420
4420
|
function loadDeviceAuthToken(params) {
|
|
@@ -7201,7 +7201,7 @@ async function routeReply(params) {
|
|
|
7201
7201
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
7202
7202
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
7203
7203
|
try {
|
|
7204
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
7204
|
+
const { deliverOutboundPayloads } = await import("./deliver-CfiME1St.js").then((n) => n.n);
|
|
7205
7205
|
return {
|
|
7206
7206
|
ok: true,
|
|
7207
7207
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -7597,8 +7597,8 @@ function normalizeSessionKey(value) {
|
|
|
7597
7597
|
}
|
|
7598
7598
|
function readSessionStore(storePath) {
|
|
7599
7599
|
try {
|
|
7600
|
-
const raw =
|
|
7601
|
-
const parsed =
|
|
7600
|
+
const raw = fsSync.readFileSync(storePath, "utf-8");
|
|
7601
|
+
const parsed = json5.parse(raw);
|
|
7602
7602
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
7603
7603
|
} catch {}
|
|
7604
7604
|
return {};
|
|
@@ -12656,7 +12656,7 @@ async function createModelSelectionState(params) {
|
|
|
12656
12656
|
}
|
|
12657
12657
|
}
|
|
12658
12658
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
12659
|
-
const { ensureAuthProfileStore } = await import("./model-auth-
|
|
12659
|
+
const { ensureAuthProfileStore } = await import("./model-auth-DbMOVgB3.js").then((n) => n.s);
|
|
12660
12660
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
12661
12661
|
const providerKey = normalizeProviderId(provider);
|
|
12662
12662
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -15029,8 +15029,8 @@ const DEFAULT_SAFE_BINS = [
|
|
|
15029
15029
|
];
|
|
15030
15030
|
function isExecutableFile(filePath) {
|
|
15031
15031
|
try {
|
|
15032
|
-
if (!
|
|
15033
|
-
if (process.platform !== "win32")
|
|
15032
|
+
if (!fsSync.statSync(filePath).isFile()) return false;
|
|
15033
|
+
if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
|
|
15034
15034
|
return true;
|
|
15035
15035
|
} catch {
|
|
15036
15036
|
return false;
|
|
@@ -15068,7 +15068,7 @@ function normalizeMatchTarget(value) {
|
|
|
15068
15068
|
}
|
|
15069
15069
|
function tryRealpath(value) {
|
|
15070
15070
|
try {
|
|
15071
|
-
return
|
|
15071
|
+
return fsSync.realpathSync(value);
|
|
15072
15072
|
} catch {
|
|
15073
15073
|
return null;
|
|
15074
15074
|
}
|
|
@@ -16300,7 +16300,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
16300
16300
|
}
|
|
16301
16301
|
function ensureDir$1(filePath) {
|
|
16302
16302
|
const dir = path.dirname(filePath);
|
|
16303
|
-
|
|
16303
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
16304
16304
|
}
|
|
16305
16305
|
function coerceAllowlistEntries(allowlist) {
|
|
16306
16306
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -16370,11 +16370,11 @@ function generateToken() {
|
|
|
16370
16370
|
function loadExecApprovals() {
|
|
16371
16371
|
const filePath = resolveExecApprovalsPath();
|
|
16372
16372
|
try {
|
|
16373
|
-
if (!
|
|
16373
|
+
if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
|
|
16374
16374
|
version: 1,
|
|
16375
16375
|
agents: {}
|
|
16376
16376
|
});
|
|
16377
|
-
const raw =
|
|
16377
|
+
const raw = fsSync.readFileSync(filePath, "utf8");
|
|
16378
16378
|
const parsed = JSON.parse(raw);
|
|
16379
16379
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
16380
16380
|
version: 1,
|
|
@@ -16391,9 +16391,9 @@ function loadExecApprovals() {
|
|
|
16391
16391
|
function saveExecApprovals(file) {
|
|
16392
16392
|
const filePath = resolveExecApprovalsPath();
|
|
16393
16393
|
ensureDir$1(filePath);
|
|
16394
|
-
|
|
16394
|
+
fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
16395
16395
|
try {
|
|
16396
|
-
|
|
16396
|
+
fsSync.chmodSync(filePath, 384);
|
|
16397
16397
|
} catch {}
|
|
16398
16398
|
}
|
|
16399
16399
|
function ensureExecApprovals() {
|
|
@@ -16714,7 +16714,7 @@ function resolvePowerShellPath() {
|
|
|
16714
16714
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
16715
16715
|
if (systemRoot) {
|
|
16716
16716
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
16717
|
-
if (
|
|
16717
|
+
if (fsSync.existsSync(candidate)) return candidate;
|
|
16718
16718
|
}
|
|
16719
16719
|
return "powershell.exe";
|
|
16720
16720
|
}
|
|
@@ -16752,7 +16752,7 @@ function resolveShellFromPath(name) {
|
|
|
16752
16752
|
for (const entry of entries) {
|
|
16753
16753
|
const candidate = path.join(entry, name);
|
|
16754
16754
|
try {
|
|
16755
|
-
|
|
16755
|
+
fsSync.accessSync(candidate, fsSync.constants.X_OK);
|
|
16756
16756
|
return candidate;
|
|
16757
16757
|
} catch {}
|
|
16758
16758
|
}
|
|
@@ -19864,7 +19864,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
19864
19864
|
function hasGitMarker(repoRoot) {
|
|
19865
19865
|
const gitPath = path.join(repoRoot, ".git");
|
|
19866
19866
|
try {
|
|
19867
|
-
const stat =
|
|
19867
|
+
const stat = fsSync.statSync(gitPath);
|
|
19868
19868
|
return stat.isDirectory() || stat.isFile();
|
|
19869
19869
|
} catch {
|
|
19870
19870
|
return false;
|
|
@@ -19876,10 +19876,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
19876
19876
|
function resolveGitDirFromMarker(repoRoot) {
|
|
19877
19877
|
const gitPath = path.join(repoRoot, ".git");
|
|
19878
19878
|
try {
|
|
19879
|
-
const stat =
|
|
19879
|
+
const stat = fsSync.statSync(gitPath);
|
|
19880
19880
|
if (stat.isDirectory()) return gitPath;
|
|
19881
19881
|
if (!stat.isFile()) return null;
|
|
19882
|
-
const match =
|
|
19882
|
+
const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
19883
19883
|
if (!match?.[1]) return null;
|
|
19884
19884
|
return path.resolve(repoRoot, match[1].trim());
|
|
19885
19885
|
} catch {
|
|
@@ -19946,7 +19946,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
19946
19946
|
cachedCommit = null;
|
|
19947
19947
|
return cachedCommit;
|
|
19948
19948
|
}
|
|
19949
|
-
const head =
|
|
19949
|
+
const head = fsSync.readFileSync(headPath, "utf-8").trim();
|
|
19950
19950
|
if (!head) {
|
|
19951
19951
|
cachedCommit = null;
|
|
19952
19952
|
return cachedCommit;
|
|
@@ -19954,7 +19954,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
19954
19954
|
if (head.startsWith("ref:")) {
|
|
19955
19955
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
19956
19956
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
19957
|
-
cachedCommit = formatCommit(
|
|
19957
|
+
cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
|
|
19958
19958
|
return cachedCommit;
|
|
19959
19959
|
}
|
|
19960
19960
|
cachedCommit = formatCommit(head);
|
|
@@ -20158,9 +20158,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
20158
20158
|
} catch {
|
|
20159
20159
|
return;
|
|
20160
20160
|
}
|
|
20161
|
-
if (!
|
|
20161
|
+
if (!fsSync.existsSync(logPath)) return;
|
|
20162
20162
|
try {
|
|
20163
|
-
const lines =
|
|
20163
|
+
const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
|
|
20164
20164
|
let input = 0;
|
|
20165
20165
|
let output = 0;
|
|
20166
20166
|
let promptTokens = 0;
|
|
@@ -21400,7 +21400,7 @@ function resolveRepoRoot(params) {
|
|
|
21400
21400
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
21401
21401
|
if (configured) try {
|
|
21402
21402
|
const resolved = path.resolve(configured);
|
|
21403
|
-
if (
|
|
21403
|
+
if (fsSync.statSync(resolved).isDirectory()) return resolved;
|
|
21404
21404
|
} catch {}
|
|
21405
21405
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
21406
21406
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -22243,7 +22243,7 @@ async function buildContextReply(params) {
|
|
|
22243
22243
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
22244
22244
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
22245
22245
|
function loadTemplate(fileName) {
|
|
22246
|
-
return
|
|
22246
|
+
return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
22247
22247
|
}
|
|
22248
22248
|
function generateHtml(sessionData) {
|
|
22249
22249
|
const template = loadTemplate("template.html");
|
|
@@ -22317,7 +22317,7 @@ async function buildExportSessionReply(params) {
|
|
|
22317
22317
|
} catch (err) {
|
|
22318
22318
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
22319
22319
|
}
|
|
22320
|
-
if (!
|
|
22320
|
+
if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
22321
22321
|
const sessionManager = SessionManager.open(sessionFile);
|
|
22322
22322
|
const entries = sessionManager.getEntries();
|
|
22323
22323
|
const header = sessionManager.getHeader();
|
|
@@ -22338,8 +22338,8 @@ async function buildExportSessionReply(params) {
|
|
|
22338
22338
|
const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
22339
22339
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
22340
22340
|
const outputDir = path.dirname(outputPath);
|
|
22341
|
-
if (!
|
|
22342
|
-
|
|
22341
|
+
if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
|
|
22342
|
+
fsSync.writeFileSync(outputPath, html, "utf-8");
|
|
22343
22343
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
22344
22344
|
return { text: [
|
|
22345
22345
|
"✅ Session exported!",
|
|
@@ -22453,8 +22453,8 @@ function resolveZaiApiKey() {
|
|
|
22453
22453
|
}
|
|
22454
22454
|
try {
|
|
22455
22455
|
const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
|
|
22456
|
-
if (!
|
|
22457
|
-
const data = JSON.parse(
|
|
22456
|
+
if (!fsSync.existsSync(authPath)) return;
|
|
22457
|
+
const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
|
|
22458
22458
|
return data["z-ai"]?.access || data.zai?.access;
|
|
22459
22459
|
} catch {
|
|
22460
22460
|
return;
|
|
@@ -24019,7 +24019,7 @@ function shouldPersistAnyBindingState() {
|
|
|
24019
24019
|
}
|
|
24020
24020
|
function shouldPersistBindingMutations() {
|
|
24021
24021
|
if (shouldPersistAnyBindingState()) return true;
|
|
24022
|
-
return
|
|
24022
|
+
return fsSync.existsSync(resolveThreadBindingsPath());
|
|
24023
24023
|
}
|
|
24024
24024
|
function saveBindingsToDisk(params = {}) {
|
|
24025
24025
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -25007,7 +25007,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
25007
25007
|
totals.totalCost += costTotal;
|
|
25008
25008
|
};
|
|
25009
25009
|
async function* readJsonlRecords(filePath) {
|
|
25010
|
-
const fileStream =
|
|
25010
|
+
const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
|
|
25011
25011
|
const rl = readline.createInterface({
|
|
25012
25012
|
input: fileStream,
|
|
25013
25013
|
crlfDelay: Infinity
|
|
@@ -25079,10 +25079,10 @@ async function loadCostUsageSummary(params) {
|
|
|
25079
25079
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
25080
25080
|
const totals = emptyTotals();
|
|
25081
25081
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
25082
|
-
const entries = await
|
|
25082
|
+
const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
25083
25083
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
25084
25084
|
const filePath = path.join(sessionsDir, entry.name);
|
|
25085
|
-
const stats = await
|
|
25085
|
+
const stats = await fsSync.promises.stat(filePath).catch(() => null);
|
|
25086
25086
|
if (!stats) return null;
|
|
25087
25087
|
if (stats.mtimeMs < sinceTime) return null;
|
|
25088
25088
|
return filePath;
|
|
@@ -25115,7 +25115,7 @@ async function loadCostUsageSummary(params) {
|
|
|
25115
25115
|
}
|
|
25116
25116
|
async function loadSessionCostSummary(params) {
|
|
25117
25117
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
25118
|
-
if (!sessionFile || !
|
|
25118
|
+
if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
|
|
25119
25119
|
const totals = emptyTotals();
|
|
25120
25120
|
let firstActivity;
|
|
25121
25121
|
let lastActivity;
|
|
@@ -29321,7 +29321,7 @@ function asBoolean(value) {
|
|
|
29321
29321
|
}
|
|
29322
29322
|
function resolveTempPathParts(opts) {
|
|
29323
29323
|
const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
|
|
29324
|
-
if (!opts.tmpDir)
|
|
29324
|
+
if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
|
|
29325
29325
|
recursive: true,
|
|
29326
29326
|
mode: 448
|
|
29327
29327
|
});
|
|
@@ -29387,7 +29387,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
29387
29387
|
if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
|
|
29388
29388
|
const body = res.body;
|
|
29389
29389
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
29390
|
-
const fileHandle = await fs$
|
|
29390
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
29391
29391
|
let bytes = 0;
|
|
29392
29392
|
let thrown;
|
|
29393
29393
|
try {
|
|
@@ -29406,7 +29406,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
29406
29406
|
await fileHandle.close();
|
|
29407
29407
|
}
|
|
29408
29408
|
if (thrown) {
|
|
29409
|
-
await fs$
|
|
29409
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
29410
29410
|
throw thrown;
|
|
29411
29411
|
}
|
|
29412
29412
|
return {
|
|
@@ -29416,7 +29416,7 @@ async function writeUrlToFile(filePath, url) {
|
|
|
29416
29416
|
}
|
|
29417
29417
|
async function writeBase64ToFile(filePath, base64) {
|
|
29418
29418
|
const buf = Buffer.from(base64, "base64");
|
|
29419
|
-
await fs$
|
|
29419
|
+
await fs$1.writeFile(filePath, buf);
|
|
29420
29420
|
return {
|
|
29421
29421
|
path: filePath,
|
|
29422
29422
|
bytes: buf.length
|
|
@@ -34781,7 +34781,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
34781
34781
|
const root = resolveStateDir();
|
|
34782
34782
|
const agentsDir = path.join(root, "agents");
|
|
34783
34783
|
try {
|
|
34784
|
-
return
|
|
34784
|
+
return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
34785
34785
|
} catch {
|
|
34786
34786
|
return [];
|
|
34787
34787
|
}
|
|
@@ -39816,7 +39816,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
39816
39816
|
if (corruptedSessionId) {
|
|
39817
39817
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
39818
39818
|
try {
|
|
39819
|
-
|
|
39819
|
+
fsSync.unlinkSync(transcriptPath);
|
|
39820
39820
|
} catch {}
|
|
39821
39821
|
}
|
|
39822
39822
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -40521,9 +40521,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
|
|
|
40521
40521
|
* Returns messages from the last N lines (default 100).
|
|
40522
40522
|
*/
|
|
40523
40523
|
function readSessionMessages(sessionFile, maxLines = 100) {
|
|
40524
|
-
if (!
|
|
40524
|
+
if (!fsSync.existsSync(sessionFile)) return [];
|
|
40525
40525
|
try {
|
|
40526
|
-
const recentLines =
|
|
40526
|
+
const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
|
|
40527
40527
|
const messages = [];
|
|
40528
40528
|
for (const line of recentLines) try {
|
|
40529
40529
|
const entry = JSON.parse(line);
|
|
@@ -40564,8 +40564,8 @@ const MAX_CONTEXT_CHARS = 3e3;
|
|
|
40564
40564
|
async function readPostCompactionContext(workspaceDir) {
|
|
40565
40565
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
40566
40566
|
try {
|
|
40567
|
-
if (!
|
|
40568
|
-
const sections = extractSections(await
|
|
40567
|
+
if (!fsSync.existsSync(agentsPath)) return null;
|
|
40568
|
+
const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
40569
40569
|
if (sections.length === 0) return null;
|
|
40570
40570
|
const combined = sections.join("\n\n");
|
|
40571
40571
|
return "[Post-compaction context refresh]\n\nSession was just compacted. The conversation summary above is a hint, NOT a substitute for your startup sequence. Execute your Session Startup sequence now — read the required files before responding to the user.\n\nCritical rules from AGENTS.md:\n\n" + (combined.length > MAX_CONTEXT_CHARS ? combined.slice(0, MAX_CONTEXT_CHARS) + "\n...[truncated]..." : combined);
|
|
@@ -40769,7 +40769,7 @@ async function runReplyAgent(params) {
|
|
|
40769
40769
|
if (resolved) transcriptCandidates.add(resolved);
|
|
40770
40770
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
40771
40771
|
for (const candidate of transcriptCandidates) try {
|
|
40772
|
-
|
|
40772
|
+
fsSync.unlinkSync(candidate);
|
|
40773
40773
|
} catch {}
|
|
40774
40774
|
}
|
|
40775
40775
|
return true;
|
|
@@ -41657,7 +41657,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
41657
41657
|
return;
|
|
41658
41658
|
}
|
|
41659
41659
|
try {
|
|
41660
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
41660
|
+
const { deliverOutboundPayloads } = await import("./deliver-CfiME1St.js").then((n) => n.n);
|
|
41661
41661
|
await deliverOutboundPayloads({
|
|
41662
41662
|
cfg: params.cfg,
|
|
41663
41663
|
channel,
|
|
@@ -41683,7 +41683,7 @@ function forkSessionFromParent(params) {
|
|
|
41683
41683
|
agentId: params.agentId,
|
|
41684
41684
|
sessionsDir: params.sessionsDir
|
|
41685
41685
|
});
|
|
41686
|
-
if (!parentSessionFile || !
|
|
41686
|
+
if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
|
|
41687
41687
|
try {
|
|
41688
41688
|
const manager = SessionManager.open(parentSessionFile);
|
|
41689
41689
|
const leafId = manager.getLeafId();
|
|
@@ -41707,7 +41707,7 @@ function forkSessionFromParent(params) {
|
|
|
41707
41707
|
cwd: manager.getCwd(),
|
|
41708
41708
|
parentSession: parentSessionFile
|
|
41709
41709
|
};
|
|
41710
|
-
|
|
41710
|
+
fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
41711
41711
|
return {
|
|
41712
41712
|
sessionId,
|
|
41713
41713
|
sessionFile
|
|
@@ -45103,7 +45103,7 @@ async function describeStickerImage(params) {
|
|
|
45103
45103
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
45104
45104
|
try {
|
|
45105
45105
|
const buffer = await fs.readFile(imagePath);
|
|
45106
|
-
const { describeImageWithModel } = await import("./image-
|
|
45106
|
+
const { describeImageWithModel } = await import("./image-DEVMOUEF.js").then((n) => n.n);
|
|
45107
45107
|
return (await describeImageWithModel({
|
|
45108
45108
|
buffer,
|
|
45109
45109
|
fileName: "sticker.webp",
|
|
@@ -45526,7 +45526,7 @@ function createWhatsAppLoginTool() {
|
|
|
45526
45526
|
force: Type.Optional(Type.Boolean())
|
|
45527
45527
|
}),
|
|
45528
45528
|
execute: async (_toolCallId, args) => {
|
|
45529
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
45529
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-Z0tp3m4b.js");
|
|
45530
45530
|
if ((args?.action ?? "start") === "wait") {
|
|
45531
45531
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
45532
45532
|
return {
|
|
@@ -45808,7 +45808,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
45808
45808
|
}
|
|
45809
45809
|
async function checkReadableFile(pathname) {
|
|
45810
45810
|
try {
|
|
45811
|
-
await fs.access(pathname,
|
|
45811
|
+
await fs.access(pathname, fsSync.constants.R_OK);
|
|
45812
45812
|
return { exists: true };
|
|
45813
45813
|
} catch (err) {
|
|
45814
45814
|
const code = err.code;
|
|
@@ -45867,7 +45867,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
45867
45867
|
}
|
|
45868
45868
|
let dirReadable = null;
|
|
45869
45869
|
try {
|
|
45870
|
-
await fs.access(memoryDir,
|
|
45870
|
+
await fs.access(memoryDir, fsSync.constants.R_OK);
|
|
45871
45871
|
dirReadable = true;
|
|
45872
45872
|
} catch (err) {
|
|
45873
45873
|
const code = err.code;
|
|
@@ -47765,7 +47765,7 @@ async function preflightDiscordMessage(params) {
|
|
|
47765
47765
|
let preflightTranscript;
|
|
47766
47766
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
47767
47767
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
47768
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
47768
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-BbZjr38h.js");
|
|
47769
47769
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
47770
47770
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
47771
47771
|
ctx: {
|
|
@@ -48728,7 +48728,7 @@ function identityHasValues(identity) {
|
|
|
48728
48728
|
}
|
|
48729
48729
|
function loadIdentityFromFile(identityPath) {
|
|
48730
48730
|
try {
|
|
48731
|
-
const parsed = parseIdentityMarkdown(
|
|
48731
|
+
const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
|
|
48732
48732
|
if (!identityHasValues(parsed)) return null;
|
|
48733
48733
|
return parsed;
|
|
48734
48734
|
} catch {
|
|
@@ -48767,7 +48767,7 @@ function isDataAvatar(value) {
|
|
|
48767
48767
|
}
|
|
48768
48768
|
function resolveExistingPath(value) {
|
|
48769
48769
|
try {
|
|
48770
|
-
return
|
|
48770
|
+
return fsSync.realpathSync(value);
|
|
48771
48771
|
} catch {
|
|
48772
48772
|
return path.resolve(value);
|
|
48773
48773
|
}
|
|
@@ -48791,7 +48791,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
48791
48791
|
reason: "unsupported_extension"
|
|
48792
48792
|
};
|
|
48793
48793
|
try {
|
|
48794
|
-
if (!
|
|
48794
|
+
if (!fsSync.statSync(realPath).isFile()) return {
|
|
48795
48795
|
ok: false,
|
|
48796
48796
|
reason: "missing"
|
|
48797
48797
|
};
|
|
@@ -49654,7 +49654,7 @@ function sanitizeRecentModels(models, limit) {
|
|
|
49654
49654
|
}
|
|
49655
49655
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
49656
49656
|
try {
|
|
49657
|
-
const raw = await
|
|
49657
|
+
const raw = await fsSync.promises.readFile(filePath, "utf-8");
|
|
49658
49658
|
return {
|
|
49659
49659
|
value: JSON.parse(raw),
|
|
49660
49660
|
exists: true
|
|
@@ -49672,14 +49672,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
|
|
|
49672
49672
|
}
|
|
49673
49673
|
async function writeJsonFileAtomically(filePath, value) {
|
|
49674
49674
|
const dir = path.dirname(filePath);
|
|
49675
|
-
await
|
|
49675
|
+
await fsSync.promises.mkdir(dir, {
|
|
49676
49676
|
recursive: true,
|
|
49677
49677
|
mode: 448
|
|
49678
49678
|
});
|
|
49679
49679
|
const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
|
|
49680
|
-
await
|
|
49681
|
-
await
|
|
49682
|
-
await
|
|
49680
|
+
await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
|
|
49681
|
+
await fsSync.promises.chmod(tmp, 384);
|
|
49682
|
+
await fsSync.promises.rename(tmp, filePath);
|
|
49683
49683
|
}
|
|
49684
49684
|
async function readPreferencesStore(filePath) {
|
|
49685
49685
|
const { value } = await readJsonFileWithFallback(filePath, {
|
|
@@ -51771,27 +51771,27 @@ function isVoiceChannelType(type) {
|
|
|
51771
51771
|
function createDefaultDeps() {
|
|
51772
51772
|
return {
|
|
51773
51773
|
sendMessageWhatsApp: async (...args) => {
|
|
51774
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
51774
|
+
const { sendMessageWhatsApp } = await import("./web-Cbjmu3ex.js");
|
|
51775
51775
|
return await sendMessageWhatsApp(...args);
|
|
51776
51776
|
},
|
|
51777
51777
|
sendMessageTelegram: async (...args) => {
|
|
51778
|
-
const { sendMessageTelegram } = await import("./send-
|
|
51778
|
+
const { sendMessageTelegram } = await import("./send-DZCl3x0a.js").then((n) => n.l);
|
|
51779
51779
|
return await sendMessageTelegram(...args);
|
|
51780
51780
|
},
|
|
51781
51781
|
sendMessageDiscord: async (...args) => {
|
|
51782
|
-
const { sendMessageDiscord } = await import("./send-
|
|
51782
|
+
const { sendMessageDiscord } = await import("./send-CQxYqAP8.js").then((n) => n.t);
|
|
51783
51783
|
return await sendMessageDiscord(...args);
|
|
51784
51784
|
},
|
|
51785
51785
|
sendMessageSlack: async (...args) => {
|
|
51786
|
-
const { sendMessageSlack } = await import("./send-
|
|
51786
|
+
const { sendMessageSlack } = await import("./send-DJ537kMF.js").then((n) => n.n);
|
|
51787
51787
|
return await sendMessageSlack(...args);
|
|
51788
51788
|
},
|
|
51789
51789
|
sendMessageSignal: async (...args) => {
|
|
51790
|
-
const { sendMessageSignal } = await import("./send-
|
|
51790
|
+
const { sendMessageSignal } = await import("./send-BDVMssZq.js").then((n) => n.i);
|
|
51791
51791
|
return await sendMessageSignal(...args);
|
|
51792
51792
|
},
|
|
51793
51793
|
sendMessageIMessage: async (...args) => {
|
|
51794
|
-
const { sendMessageIMessage } = await import("./send-
|
|
51794
|
+
const { sendMessageIMessage } = await import("./send-3jM0m9vc.js").then((n) => n.n);
|
|
51795
51795
|
return await sendMessageIMessage(...args);
|
|
51796
51796
|
}
|
|
51797
51797
|
};
|
|
@@ -56672,7 +56672,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
56672
56672
|
function readFileIfExists(filePath) {
|
|
56673
56673
|
if (!filePath) return;
|
|
56674
56674
|
try {
|
|
56675
|
-
return
|
|
56675
|
+
return fsSync.readFileSync(filePath, "utf-8").trim();
|
|
56676
56676
|
} catch {
|
|
56677
56677
|
return;
|
|
56678
56678
|
}
|
|
@@ -57233,7 +57233,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
57233
57233
|
prefix: "line-media",
|
|
57234
57234
|
extension: getExtensionForContentType(contentType)
|
|
57235
57235
|
});
|
|
57236
|
-
await
|
|
57236
|
+
await fsSync.promises.writeFile(filePath, buffer);
|
|
57237
57237
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
57238
57238
|
return {
|
|
57239
57239
|
path: filePath,
|
|
@@ -62220,7 +62220,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
62220
62220
|
}
|
|
62221
62221
|
let commandsRegistry;
|
|
62222
62222
|
async function getCommandsRegistry() {
|
|
62223
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
62223
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-BqkqVEHA.js").then((n) => n.n);
|
|
62224
62224
|
return commandsRegistry;
|
|
62225
62225
|
}
|
|
62226
62226
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -62562,11 +62562,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
62562
62562
|
const channelName = channelInfo?.name;
|
|
62563
62563
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
62564
62564
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
62565
|
-
import("./resolve-route-
|
|
62565
|
+
import("./resolve-route-BoOTtfRC.js").then((n) => n.r),
|
|
62566
62566
|
import("./inbound-context-BlHX0H3E.js").then((n) => n.n),
|
|
62567
62567
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
62568
62568
|
]);
|
|
62569
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-DXUkoKcB.js").then((n) => n.t), import("./reply-prefix-
|
|
62569
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-DXUkoKcB.js").then((n) => n.t), import("./reply-prefix-NvPdveXK.js").then((n) => n.n)]);
|
|
62570
62570
|
const route = resolveAgentRoute({
|
|
62571
62571
|
cfg,
|
|
62572
62572
|
channel: "slack",
|
|
@@ -62623,9 +62623,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
62623
62623
|
});
|
|
62624
62624
|
const deliverSlashPayloads = async (replies) => {
|
|
62625
62625
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
62626
|
-
import("./replies-
|
|
62627
|
-
import("./chunk-
|
|
62628
|
-
import("./markdown-tables-
|
|
62626
|
+
import("./replies-CjfQWlpL.js").then((n) => n.r),
|
|
62627
|
+
import("./chunk-CxYL-OXO.js").then((n) => n.s),
|
|
62628
|
+
import("./markdown-tables-C4L0emuC.js").then((n) => n.t)
|
|
62629
62629
|
]);
|
|
62630
62630
|
await deliverSlackSlashReplies({
|
|
62631
62631
|
replies,
|
|
@@ -62678,7 +62678,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
62678
62678
|
let nativeCommands = [];
|
|
62679
62679
|
if (nativeEnabled) {
|
|
62680
62680
|
reg = await getCommandsRegistry();
|
|
62681
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
62681
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-BtMC57oh.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
62682
62682
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
62683
62683
|
skillCommands,
|
|
62684
62684
|
provider: "slack"
|
|
@@ -64896,7 +64896,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
64896
64896
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
64897
64897
|
let preflightTranscript;
|
|
64898
64898
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
64899
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
64899
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-BbZjr38h.js");
|
|
64900
64900
|
preflightTranscript = await transcribeFirstAudio({
|
|
64901
64901
|
ctx: {
|
|
64902
64902
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -67041,23 +67041,23 @@ let webLoginQrPromise = null;
|
|
|
67041
67041
|
let webChannelPromise = null;
|
|
67042
67042
|
let whatsappActionsPromise = null;
|
|
67043
67043
|
function loadWebOutbound() {
|
|
67044
|
-
webOutboundPromise ??= import("./outbound-
|
|
67044
|
+
webOutboundPromise ??= import("./outbound-CsCk7-X6.js").then((n) => n.t);
|
|
67045
67045
|
return webOutboundPromise;
|
|
67046
67046
|
}
|
|
67047
67047
|
function loadWebLogin() {
|
|
67048
|
-
webLoginPromise ??= import("./login-
|
|
67048
|
+
webLoginPromise ??= import("./login-C-iEZ7-d.js").then((n) => n.n);
|
|
67049
67049
|
return webLoginPromise;
|
|
67050
67050
|
}
|
|
67051
67051
|
function loadWebLoginQr() {
|
|
67052
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
67052
|
+
webLoginQrPromise ??= import("./login-qr-Z0tp3m4b.js");
|
|
67053
67053
|
return webLoginQrPromise;
|
|
67054
67054
|
}
|
|
67055
67055
|
function loadWebChannel() {
|
|
67056
|
-
webChannelPromise ??= import("./web-
|
|
67056
|
+
webChannelPromise ??= import("./web-Cbjmu3ex.js");
|
|
67057
67057
|
return webChannelPromise;
|
|
67058
67058
|
}
|
|
67059
67059
|
function loadWhatsAppActions() {
|
|
67060
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
67060
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-CmlTTSUG.js");
|
|
67061
67061
|
return whatsappActionsPromise;
|
|
67062
67062
|
}
|
|
67063
67063
|
function createPluginRuntime() {
|
|
@@ -67278,7 +67278,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
67278
67278
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
67279
67279
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
67280
67280
|
const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
67281
|
-
for (const candidate of orderedCandidates) if (
|
|
67281
|
+
for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
|
|
67282
67282
|
const parent = path.dirname(cursor);
|
|
67283
67283
|
if (parent === cursor) break;
|
|
67284
67284
|
cursor = parent;
|
|
@@ -68336,7 +68336,7 @@ async function recordLoopOutcome(args) {
|
|
|
68336
68336
|
if (!args.ctx?.sessionKey) return;
|
|
68337
68337
|
try {
|
|
68338
68338
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bxo4UHOL.js").then((n) => n.n);
|
|
68339
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
68339
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-43NkVgks.js");
|
|
68340
68340
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
68341
68341
|
sessionKey: args.ctx.sessionKey,
|
|
68342
68342
|
sessionId: args.ctx?.agentId
|
|
@@ -68357,8 +68357,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
68357
68357
|
const params = args.params;
|
|
68358
68358
|
if (args.ctx?.sessionKey) {
|
|
68359
68359
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bxo4UHOL.js").then((n) => n.n);
|
|
68360
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
68361
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
68360
|
+
const { logToolLoopAction } = await import("./diagnostic-CINBNBQX.js").then((n) => n.n);
|
|
68361
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-43NkVgks.js");
|
|
68362
68362
|
const sessionState = getDiagnosticSessionState({
|
|
68363
68363
|
sessionKey: args.ctx.sessionKey,
|
|
68364
68364
|
sessionId: args.ctx?.agentId
|
|
@@ -70887,8 +70887,8 @@ async function readWorkspaceContextForSummary() {
|
|
|
70887
70887
|
const workspaceDir = process.cwd();
|
|
70888
70888
|
const agentsPath = path.join(workspaceDir, "AGENTS.md");
|
|
70889
70889
|
try {
|
|
70890
|
-
if (!
|
|
70891
|
-
const sections = extractSections(await
|
|
70890
|
+
if (!fsSync.existsSync(agentsPath)) return "";
|
|
70891
|
+
const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
|
|
70892
70892
|
if (sections.length === 0) return "";
|
|
70893
70893
|
const combined = sections.join("\n\n");
|
|
70894
70894
|
return `\n\n<workspace-critical-rules>\n${combined.length > MAX_SUMMARY_CONTEXT_CHARS ? combined.slice(0, MAX_SUMMARY_CONTEXT_CHARS) + "\n...[truncated]..." : combined}\n</workspace-critical-rules>`;
|
|
@@ -72219,7 +72219,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
72219
72219
|
if (!apiKeyInfo.apiKey) {
|
|
72220
72220
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
72221
72221
|
} else if (model.provider === "github-copilot") {
|
|
72222
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
72222
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-DJqsJ2-r.js").then((n) => n.n);
|
|
72223
72223
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
72224
72224
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
72225
72225
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -73443,11 +73443,11 @@ function appendRawStream(payload) {
|
|
|
73443
73443
|
if (!rawStreamReady) {
|
|
73444
73444
|
rawStreamReady = true;
|
|
73445
73445
|
try {
|
|
73446
|
-
|
|
73446
|
+
fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
73447
73447
|
} catch {}
|
|
73448
73448
|
}
|
|
73449
73449
|
try {
|
|
73450
|
-
|
|
73450
|
+
fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
73451
73451
|
} catch {}
|
|
73452
73452
|
}
|
|
73453
73453
|
|
|
@@ -76922,7 +76922,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
76922
76922
|
return;
|
|
76923
76923
|
}
|
|
76924
76924
|
if (model.provider === "github-copilot") {
|
|
76925
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
76925
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-DJqsJ2-r.js").then((n) => n.n);
|
|
76926
76926
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
76927
76927
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
76928
76928
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|