@symerian/symi 2.4.4 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agents-D0WIqYlR.js → agents-BEPfMqrg.js} +4 -4
- package/dist/{agents.config-DijsN6pE.js → agents.config-D60gMagv.js} +1 -1
- package/dist/{agents.config-BJhlUUzn.js → agents.config-DPv-AmZD.js} +1 -1
- package/dist/{audio-preflight-C40mKAp7.js → audio-preflight-CPBOQV4I.js} +4 -4
- package/dist/{audio-preflight-O3ASWbaG.js → audio-preflight-D02HwB-I.js} +4 -4
- package/dist/{auth-choice-CBrZeM8N.js → auth-choice-BeHaRQfM.js} +1 -1
- package/dist/{auth-choice-CzrXJoq0.js → auth-choice-CTeG2A5P.js} +1 -1
- package/dist/{banner-DBCyc2l3.js → banner-DihS8WHF.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +6 -6
- package/dist/bundled/session-memory/handler.js +6 -6
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-CcNcqLfp.js → channel-options-BJphNYiq.js} +1 -1
- package/dist/{channel-options-D4b4yiR3.js → channel-options-D2Zf6a2L.js} +1 -1
- package/dist/{channel-web-BxgOSVS3.js → channel-web-BnZ6c0_u.js} +1 -1
- package/dist/{channels-cli-CH8FgCHM.js → channels-cli-CF9LDCSC.js} +4 -4
- package/dist/{channels-cli-DahG1tUQ.js → channels-cli-COMko9mZ.js} +4 -4
- package/dist/{chrome-CDJYxX5a.js → chrome-D2SKJnR7.js} +7 -7
- package/dist/{chrome-BFekevcE.js → chrome-EyvdASWt.js} +7 -7
- package/dist/{cli-xjbQGnY4.js → cli-DXpAHJS4.js} +1 -1
- package/dist/{cli-BG5jr57F.js → cli-DYNTJxmZ.js} +1 -1
- package/dist/{command-registry-jAjzb3Ub.js → command-registry-X_FmrHib.js} +9 -9
- package/dist/{completion-cli-C5YhoKGC.js → completion-cli-D1aObtjM.js} +1 -1
- package/dist/{completion-cli-zIGxgk1g.js → completion-cli-Dhj0jCR_.js} +2 -2
- package/dist/{config-cli-3hyKITmM.js → config-cli-BDpBT1b-.js} +1 -1
- package/dist/{config-cli-CPhmjH-O.js → config-cli-BrmaXVj4.js} +1 -1
- package/dist/{configure-C39-I7AH.js → configure-CkCFJCKp.js} +3 -3
- package/dist/{configure-S9KIFkj-.js → configure-oMqP6jIk.js} +3 -3
- package/dist/{deliver-BH0l3UKW.js → deliver-C-37cZUe.js} +1 -1
- package/dist/{deliver-CvCK5Mm9.js → deliver-D1ZN6-fl.js} +1 -1
- package/dist/{doctor-completion-DMcB-j3Q.js → doctor-completion-vhqAoURB.js} +1 -1
- package/dist/{doctor-completion-DjNFcAWO.js → doctor-completion-wGoyzRH8.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{gateway-cli-CptbhYJ1.js → gateway-cli-BBPEwiAc.js} +9 -9
- package/dist/{gateway-cli-Bwd_To8f.js → gateway-cli-uDuGdJsH.js} +9 -9
- package/dist/{glass-ui-ws-B4jT1ok5.js → glass-ui-ws-DiqQflvy.js} +7 -7
- package/dist/{glass-ui-ws-B8ap5D2v.js → glass-ui-ws-TCkne4L4.js} +7 -7
- package/dist/{health-DhqSQMPI.js → health-1KsVR3eN.js} +1 -1
- package/dist/{health-DCb7BG-3.js → health-CPYlV7Zg.js} +1 -1
- package/dist/{hooks-cli-D5W9ERxc.js → hooks-cli-CL266d2E.js} +2 -2
- package/dist/{hooks-cli-DK2j2rIy.js → hooks-cli-PKy2h3eb.js} +2 -2
- package/dist/{image-B0wGflxA.js → image-Cp3JDEBB.js} +1 -1
- package/dist/{image-CHzdaNJ4.js → image-DcpMiprB.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/llm-slug-generator.js +6 -6
- package/dist/{models-Bh86hVEJ.js → models-BsS_l1gY.js} +2 -2
- package/dist/{models-cli-DNLCTKv1.js → models-cli-CmR7k-2e.js} +2 -2
- package/dist/{models-cli-DLEKxIbC.js → models-cli-CvxkLybz.js} +3 -3
- package/dist/{onboard-CYMyc_UX.js → onboard-Bgo_BcMo.js} +2 -2
- package/dist/{onboard-ey37IWby.js → onboard-D2GpwLzg.js} +2 -2
- package/dist/{onboard-channels-Dj_lMj0q.js → onboard-channels-3WFDi7Ts.js} +1 -1
- package/dist/{onboard-channels-BmoLkeU6.js → onboard-channels-BNTeFCna.js} +1 -1
- package/dist/{onboarding-Dm9fej7n.js → onboarding-BUumoJYB.js} +3 -3
- package/dist/{onboarding-DLyAGYc6.js → onboarding-CbkyewZp.js} +3 -3
- package/dist/{onboarding.finalize-CEBQJBqF.js → onboarding.finalize-B2_mgA4K.js} +6 -6
- package/dist/{onboarding.finalize-csPp9wn_.js → onboarding.finalize-sESCY9Iq.js} +5 -5
- package/dist/{pi-embedded-Lrmi4POJ.js → pi-embedded-BIIdwXKr.js} +316 -85
- package/dist/{pi-embedded-BUYWm5p1.js → pi-embedded-BOF7XlCO.js} +316 -85
- package/dist/{pi-embedded-helpers-lgx_U5KS.js → pi-embedded-helpers-B8kqLWns.js} +4 -4
- package/dist/{pi-embedded-helpers-DLFjnVBb.js → pi-embedded-helpers-ag2bosuj.js} +4 -4
- package/dist/{plugin-registry-D1vzxXON.js → plugin-registry-BDfC2z-e.js} +1 -1
- package/dist/{plugin-registry-ChH5CJIw.js → plugin-registry-IXa-nyg0.js} +1 -1
- package/dist/plugin-sdk/agents/output-normalizer.d.ts +69 -0
- package/dist/plugin-sdk/{channel-web-DOZ-G9xX.js → channel-web-HznAZS1r.js} +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{reply-BIMkrLWh.js → reply-DpnW-aMb.js} +302 -71
- package/dist/plugin-sdk/{web-BsZ7_Dy0.js → web-CGNEXRkp.js} +2 -2
- package/dist/{plugins-cli-CCMRc0SH.js → plugins-cli-DAxj0T7n.js} +2 -2
- package/dist/{plugins-cli-0PARfFDh.js → plugins-cli-DsYvb9az.js} +2 -2
- package/dist/{program-CTvCt90X.js → program-C_UFd0ph.js} +7 -7
- package/dist/{program-context-LQmFqAP2.js → program-context-C-1s9IMf.js} +17 -17
- package/dist/{prompt-select-styled-M1mZT6zR.js → prompt-select-styled-CYRG7OzR.js} +4 -4
- package/dist/{prompt-select-styled-Dk4KU3bk.js → prompt-select-styled-uEjL8GAK.js} +4 -4
- package/dist/{provider-auth-helpers-DM1hfi20.js → provider-auth-helpers-CJUiVhCt.js} +1 -1
- package/dist/{provider-auth-helpers-CXq_C8eC.js → provider-auth-helpers-CpOR6tLS.js} +1 -1
- package/dist/{push-apns-7t_aUx_g.js → push-apns-21LKYvkS.js} +1 -1
- package/dist/{push-apns-D-D1fcAb.js → push-apns-Ciljlk7J.js} +1 -1
- package/dist/{pw-ai-De-KR9_s.js → pw-ai-1htA-NnS.js} +1 -1
- package/dist/{pw-ai-BnAKvSuw.js → pw-ai-Ch7liUOW.js} +1 -1
- package/dist/{register.agent-nABNjBav.js → register.agent-BSv7WO-U.js} +6 -6
- package/dist/{register.agent-CWwXTRwB.js → register.agent-stsk6Gip.js} +5 -5
- package/dist/{register.configure-FljQTqAv.js → register.configure-C8oDtnaI.js} +6 -6
- package/dist/{register.configure-CV6utD3b.js → register.configure-DNQTd6SJ.js} +6 -6
- package/dist/{register.maintenance-BxRP1viU.js → register.maintenance-B3f3jkUo.js} +7 -7
- package/dist/{register.maintenance-CAACXueD.js → register.maintenance-dTI3y4Eh.js} +8 -8
- package/dist/{register.message-uz5SnsUO.js → register.message-Cbb4nH_0.js} +2 -2
- package/dist/{register.message-D_Cc5Hcu.js → register.message-K9BDeFyy.js} +2 -2
- package/dist/{register.onboard-BGsi8HVc.js → register.onboard-BBfmwa3j.js} +4 -4
- package/dist/{register.onboard-C8C1xEuj.js → register.onboard-Djz7Di9K.js} +4 -4
- package/dist/{register.setup-CbPytgHL.js → register.setup-B6hkCLH0.js} +4 -4
- package/dist/{register.setup-CyxXsD-4.js → register.setup-Dmu1jt3n.js} +4 -4
- package/dist/{register.status-health-sessions-DW422lcn.js → register.status-health-sessions-CvwhBkbb.js} +3 -3
- package/dist/{register.status-health-sessions-B_BYvadL.js → register.status-health-sessions-DaSrMm3l.js} +3 -3
- package/dist/{register.subclis-DAEtHKAL.js → register.subclis-Dv1WM9Kj.js} +9 -9
- package/dist/{reply-BWno_mxL.js → reply-BvVsPU7v.js} +303 -72
- package/dist/{run-main-GCA3ZWtS.js → run-main-55CDVAv6.js} +14 -14
- package/dist/{runner-DUBExAb5.js → runner-BcQ0sF9T.js} +1 -1
- package/dist/{runner-odEv83vv.js → runner-D0QUGA_X.js} +1 -1
- package/dist/{server-methods-C0qS1GBg.js → server-methods-Bf8SpXoW.js} +7 -7
- package/dist/{server-methods-BgZzcT_t.js → server-methods-CDDLS3ke.js} +7 -7
- package/dist/{server-node-events-BqTGMdx6.js → server-node-events-B9iZK3qE.js} +2 -2
- package/dist/{server-node-events-CCfQHLwH.js → server-node-events-Dx0L419d.js} +2 -2
- package/dist/{status-uaQ9lnOb.js → status-5XgxbiNb.js} +1 -1
- package/dist/{status-C0ghzWRG.js → status-C-kU0UFm.js} +1 -1
- package/dist/{status-BzeN5Od7.js → status-C-vthqzQ.js} +2 -2
- package/dist/{status-C_eTc_yp.js → status-DEymUALi.js} +2 -2
- package/dist/{subagent-registry-CtKDHowr.js → subagent-registry-CZah-77E.js} +303 -72
- package/dist/{update-cli-B2AkRDy-.js → update-cli-B21iNb0v.js} +7 -7
- package/dist/{update-cli-CYjjpmcv.js → update-cli-BSk-OFnI.js} +8 -8
- package/dist/{update-runner-C71_pwI8.js → update-runner-B5bKK21U.js} +1 -1
- package/dist/{update-runner-Co1TMSnd.js → update-runner-DPwXk0QQ.js} +1 -1
- package/dist/{web-DyULVUaV.js → web-CB23XCVF.js} +2 -2
- package/dist/{web-YnBBOOGf.js → web-DSgWG_2m.js} +6 -6
- package/dist/{web-DOlZ2V8e.js → web-DVvZ_mDC.js} +6 -6
- package/dist/{web-x4zdMRTu.js → web-mkZpWfVs.js} +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExis
|
|
|
14
14
|
import { t as normalizeChatType } from "./chat-type-DFDuk3FY.js";
|
|
15
15
|
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-D-hWrHoH.js";
|
|
16
16
|
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-C1IYd3g7.js";
|
|
17
|
-
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-
|
|
17
|
+
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-C-37cZUe.js";
|
|
18
18
|
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-D0xmLpej.js";
|
|
19
19
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-C1vRJs5w.js";
|
|
20
20
|
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-8zZqL37v.js";
|
|
@@ -22,10 +22,10 @@ import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normali
|
|
|
22
22
|
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-ByaQt43P.js";
|
|
23
23
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-j5tVLINv.js";
|
|
24
24
|
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-BQINJQIT.js";
|
|
25
|
-
import { $ as mergeDeliveryContext, 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, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as updateSessionStoreEntry, Jt as ensureSessionHeader, K as updateLastRoute, 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 deliveryContextKey, 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 resolveCacheTtlMs$1, Xt as resolveBootstrapTotalMaxChars, Y as isCacheEnabled, Yt as resolveBootstrapMaxChars, Z as deliveryContextFromSession, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as DEFAULT_RESET_TRIGGERS, a as isMessagingToolDuplicateNormalized, at as countToolResults, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as applyInputProvenanceToUserMessage, d as isAntigravityClaude, dt as resolveSessionKey, et as normalizeDeliveryContext, f as isGoogleModelApi, ft as evaluateSessionFreshness, g as formatBillingErrorMessage, gt as resolveThreadFlag, h as formatAssistantErrorText, ht as resolveSessionResetType, it as capArrayByJsonBytes, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as hasInterSessionUserProvenance, m as classifyFailoverReason, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nt as normalizeAccountId$3, o as normalizeTextForComparison, ot as extractToolCallNames, p as BILLING_ERROR_USER_MESSAGE, pt as resolveChannelResetConfig, q as updateSessionStore, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as archiveSessionTranscripts, s as sanitizeSessionMessagesImages, st as INPUT_PROVENANCE_KIND_VALUES, t as validateAnthropicTurns, tt as normalizeSessionDeliveryFields, u as downgradeOpenAIReasoningBlocks, ut as normalizeInputProvenance, v as getApiErrorPayloadFingerprint, vt as resolveFreshSessionTotalTokens, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, yt as canonicalizeMainSessionAlias, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-
|
|
25
|
+
import { $ as mergeDeliveryContext, 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, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as updateSessionStoreEntry, Jt as ensureSessionHeader, K as updateLastRoute, 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 deliveryContextKey, 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 resolveCacheTtlMs$1, Xt as resolveBootstrapTotalMaxChars, Y as isCacheEnabled, Yt as resolveBootstrapMaxChars, Z as deliveryContextFromSession, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as DEFAULT_RESET_TRIGGERS, a as isMessagingToolDuplicateNormalized, at as countToolResults, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as applyInputProvenanceToUserMessage, d as isAntigravityClaude, dt as resolveSessionKey, et as normalizeDeliveryContext, f as isGoogleModelApi, ft as evaluateSessionFreshness, g as formatBillingErrorMessage, gt as resolveThreadFlag, h as formatAssistantErrorText, ht as resolveSessionResetType, it as capArrayByJsonBytes, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as hasInterSessionUserProvenance, m as classifyFailoverReason, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nt as normalizeAccountId$3, o as normalizeTextForComparison, ot as extractToolCallNames, p as BILLING_ERROR_USER_MESSAGE, pt as resolveChannelResetConfig, q as updateSessionStore, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as archiveSessionTranscripts, s as sanitizeSessionMessagesImages, st as INPUT_PROVENANCE_KIND_VALUES, t as validateAnthropicTurns, tt as normalizeSessionDeliveryFields, u as downgradeOpenAIReasoningBlocks, ut as normalizeInputProvenance, v as getApiErrorPayloadFingerprint, vt as resolveFreshSessionTotalTokens, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, yt as canonicalizeMainSessionAlias, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-B8kqLWns.js";
|
|
26
26
|
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-BmV60pPT.js";
|
|
27
27
|
import { c as normalizePluginsConfig, f as isPathInsideWithRealpath, i as safeStatSync, l as resolveEnableState, n as discoverSymiPlugins, p as isDangerousHostEnvVarName, r as isPathInside, s as applyTestPluginDefaults, t as loadPluginManifestRegistry, u as resolveMemorySlotDecision } from "./manifest-registry-D-mTF1cj.js";
|
|
28
|
-
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
28
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-D2SKJnR7.js";
|
|
29
29
|
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-BNpGMnp-.js";
|
|
30
30
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-CPfngF0S.js";
|
|
31
31
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-CxfFyMRZ.js";
|
|
@@ -36,7 +36,7 @@ import { t as resolveIMessageAccount } from "./accounts-DImOt9jX.js";
|
|
|
36
36
|
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DkMamAQ-.js";
|
|
37
37
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-C8Tqw4td.js";
|
|
38
38
|
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-ChC2CXaN.js";
|
|
39
|
-
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-
|
|
39
|
+
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-DcpMiprB.js";
|
|
40
40
|
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-jpn5vRTY.js";
|
|
41
41
|
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-BNh23mUR.js";
|
|
42
42
|
import { n as retryAsync } from "./retry-QGp0jvVi.js";
|
|
@@ -49,7 +49,7 @@ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-F0moAwIl.js";
|
|
|
49
49
|
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-C_aYUwpl.js";
|
|
50
50
|
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-DklY7Cj7.js";
|
|
51
51
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-QOi5vzUt.js";
|
|
52
|
-
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-
|
|
52
|
+
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-BcQ0sF9T.js";
|
|
53
53
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-DtLn7YU3.js";
|
|
54
54
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-DtXYsHEc.js";
|
|
55
55
|
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D9q-fIPB.js";
|
|
@@ -73,13 +73,13 @@ import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
|
73
73
|
import { inspect, promisify } from "node:util";
|
|
74
74
|
import { fileURLToPath } from "node:url";
|
|
75
75
|
import crypto, { X509Certificate, createHash, createHmac, randomBytes, randomUUID } from "node:crypto";
|
|
76
|
-
import { complete, completeSimple, streamSimple } from "@mariozechner/pi-ai";
|
|
76
|
+
import { complete, completeSimple, createAssistantMessageEventStream, streamSimple } from "@mariozechner/pi-ai";
|
|
77
77
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
78
78
|
import { EdgeTTS } from "node-edge-tts";
|
|
79
79
|
import AjvPkg from "ajv";
|
|
80
80
|
import { createServer } from "node:http";
|
|
81
81
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
82
|
-
import WebSocket
|
|
82
|
+
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
83
83
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
84
84
|
import { createJiti } from "jiti";
|
|
85
85
|
import { Type } from "@sinclair/typebox";
|
|
@@ -5714,7 +5714,7 @@ var GatewayClient = class {
|
|
|
5714
5714
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
5715
5715
|
});
|
|
5716
5716
|
}
|
|
5717
|
-
this.ws = new WebSocket(url, wsOptions);
|
|
5717
|
+
this.ws = new WebSocket$1(url, wsOptions);
|
|
5718
5718
|
this.ws.on("open", () => {
|
|
5719
5719
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
5720
5720
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -5933,7 +5933,7 @@ var GatewayClient = class {
|
|
|
5933
5933
|
return null;
|
|
5934
5934
|
}
|
|
5935
5935
|
async request(method, params, opts) {
|
|
5936
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
5936
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
|
|
5937
5937
|
const id = randomUUID();
|
|
5938
5938
|
const frame = {
|
|
5939
5939
|
type: "req",
|
|
@@ -7199,7 +7199,7 @@ async function routeReply(params) {
|
|
|
7199
7199
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
7200
7200
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
7201
7201
|
try {
|
|
7202
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
7202
|
+
const { deliverOutboundPayloads } = await import("./deliver-C-37cZUe.js").then((n) => n.n);
|
|
7203
7203
|
return {
|
|
7204
7204
|
ok: true,
|
|
7205
7205
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -41673,7 +41673,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
41673
41673
|
return;
|
|
41674
41674
|
}
|
|
41675
41675
|
try {
|
|
41676
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
41676
|
+
const { deliverOutboundPayloads } = await import("./deliver-C-37cZUe.js").then((n) => n.n);
|
|
41677
41677
|
await deliverOutboundPayloads({
|
|
41678
41678
|
cfg: params.cfg,
|
|
41679
41679
|
channel,
|
|
@@ -45119,7 +45119,7 @@ async function describeStickerImage(params) {
|
|
|
45119
45119
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
45120
45120
|
try {
|
|
45121
45121
|
const buffer = await fs$1.readFile(imagePath);
|
|
45122
|
-
const { describeImageWithModel } = await import("./image-
|
|
45122
|
+
const { describeImageWithModel } = await import("./image-DcpMiprB.js").then((n) => n.n);
|
|
45123
45123
|
return (await describeImageWithModel({
|
|
45124
45124
|
buffer,
|
|
45125
45125
|
fileName: "sticker.webp",
|
|
@@ -47781,7 +47781,7 @@ async function preflightDiscordMessage(params) {
|
|
|
47781
47781
|
let preflightTranscript;
|
|
47782
47782
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
47783
47783
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
47784
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
47784
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CPBOQV4I.js");
|
|
47785
47785
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
47786
47786
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
47787
47787
|
ctx: {
|
|
@@ -52275,6 +52275,199 @@ function createCacheTrace(params) {
|
|
|
52275
52275
|
};
|
|
52276
52276
|
}
|
|
52277
52277
|
|
|
52278
|
+
//#endregion
|
|
52279
|
+
//#region src/agents/model-token-filter.ts
|
|
52280
|
+
/**
|
|
52281
|
+
* Strips model-specific control tokens from streamed text.
|
|
52282
|
+
*
|
|
52283
|
+
* Used both server-side (in the streaming pipeline) and by the Glass UI
|
|
52284
|
+
* (as a defense-in-depth fallback). The patterns here cover tokens known
|
|
52285
|
+
* to leak from Gemma 4 / vLLM; Claude output is left untouched.
|
|
52286
|
+
*/
|
|
52287
|
+
const GEMMA_TOKEN_PATTERNS = [
|
|
52288
|
+
/<\|channel>\w*/g,
|
|
52289
|
+
/<channel\|>/g,
|
|
52290
|
+
/<start_of_turn>(?:model|user)?/g,
|
|
52291
|
+
/<end_of_turn>/g,
|
|
52292
|
+
/<\|(?:fim_prefix|fim_suffix|fim_middle)\|>/g,
|
|
52293
|
+
/^\s*<bos>\s*/gm,
|
|
52294
|
+
/<\|[^|>]{0,30}\|>/g,
|
|
52295
|
+
/<\|[^>]{0,30}>/g
|
|
52296
|
+
];
|
|
52297
|
+
/**
|
|
52298
|
+
* Aggressively strip all fragments of model control token corruption from
|
|
52299
|
+
* tool arguments. This catches cases where the model produces raw garbage
|
|
52300
|
+
* like `<|<|"|<|<|\'` that doesn't match any known token template.
|
|
52301
|
+
*/
|
|
52302
|
+
const AGGRESSIVE_TOKEN_FRAGMENTS = [/<\|/g, /\|>/g];
|
|
52303
|
+
const GEMMA_MODEL_HINTS$1 = ["gemma", "redsand/"];
|
|
52304
|
+
function isGemmaModel$1(modelId) {
|
|
52305
|
+
const lower = modelId.toLowerCase();
|
|
52306
|
+
return GEMMA_MODEL_HINTS$1.some((hint) => lower.includes(hint));
|
|
52307
|
+
}
|
|
52308
|
+
/**
|
|
52309
|
+
* Strip known control tokens from text. Only applies to Gemma-family models;
|
|
52310
|
+
* other models pass through unchanged.
|
|
52311
|
+
*/
|
|
52312
|
+
/**
|
|
52313
|
+
* Strip known control tokens from text. Only applies to Gemma-family models;
|
|
52314
|
+
* other models pass through unchanged. Used for streamed text output.
|
|
52315
|
+
*/
|
|
52316
|
+
function stripModelTokens(text, modelId) {
|
|
52317
|
+
if (!text || !isGemmaModel$1(modelId)) return text;
|
|
52318
|
+
let result = text;
|
|
52319
|
+
for (const re of GEMMA_TOKEN_PATTERNS) {
|
|
52320
|
+
re.lastIndex = 0;
|
|
52321
|
+
result = result.replace(re, "");
|
|
52322
|
+
}
|
|
52323
|
+
return result;
|
|
52324
|
+
}
|
|
52325
|
+
/**
|
|
52326
|
+
* Aggressively strip ALL token-like fragments from a string. Used for tool
|
|
52327
|
+
* call arguments where any `<|` corruption causes downstream failures.
|
|
52328
|
+
* More aggressive than `stripModelTokens` — removes bare `<|` and `|>` fragments
|
|
52329
|
+
* that don't match any known token template.
|
|
52330
|
+
*/
|
|
52331
|
+
function stripModelTokensAggressive(text, modelId) {
|
|
52332
|
+
if (!text || !isGemmaModel$1(modelId)) return text;
|
|
52333
|
+
let result = stripModelTokens(text, modelId);
|
|
52334
|
+
for (const re of AGGRESSIVE_TOKEN_FRAGMENTS) {
|
|
52335
|
+
re.lastIndex = 0;
|
|
52336
|
+
result = result.replace(re, "");
|
|
52337
|
+
}
|
|
52338
|
+
return result;
|
|
52339
|
+
}
|
|
52340
|
+
|
|
52341
|
+
//#endregion
|
|
52342
|
+
//#region src/agents/output-normalizer.ts
|
|
52343
|
+
const MONOLOGUE_REGEX_PATTERNS = [
|
|
52344
|
+
/\n*I have addressed the request fully\.?\s*(?:\n[\s\S]*)?$/,
|
|
52345
|
+
/\n*I[''\u2019]ve reviewed my response[\s\S]*$/,
|
|
52346
|
+
/\n*\*?\*?Verification:?\*?\*?\s*\n[\s\S]*?(?:Everything is correct|All requirements met)\.?\s*\u2705?\s*$/,
|
|
52347
|
+
/\n*\d+\.\s*\*?\*?Requirements:?\*?\*?[\s\S]*?\d+\.\s*\*?\*?Verification:?\*?\*?[\s\S]*$/
|
|
52348
|
+
];
|
|
52349
|
+
const SELF_REF_OPENERS = [
|
|
52350
|
+
"i have addressed",
|
|
52351
|
+
"i've reviewed",
|
|
52352
|
+
"i‘ve reviewed",
|
|
52353
|
+
"i’ve reviewed",
|
|
52354
|
+
"status check",
|
|
52355
|
+
"address requirements",
|
|
52356
|
+
"verification:",
|
|
52357
|
+
"requirements:"
|
|
52358
|
+
];
|
|
52359
|
+
const ASSESSMENT_KEYWORDS = [
|
|
52360
|
+
"requirements",
|
|
52361
|
+
"verification",
|
|
52362
|
+
"correct",
|
|
52363
|
+
"addressed",
|
|
52364
|
+
"fulfilled",
|
|
52365
|
+
"confirmed",
|
|
52366
|
+
"passed"
|
|
52367
|
+
];
|
|
52368
|
+
/**
|
|
52369
|
+
* Layer 2: Structural monologue detection.
|
|
52370
|
+
* Detects a trailing block that:
|
|
52371
|
+
* 1. Starts after a double newline
|
|
52372
|
+
* 2. Opens with a self-referential phrase
|
|
52373
|
+
* 3. Contains a numbered list with assessment keywords
|
|
52374
|
+
* 4. Sits at the end of the text
|
|
52375
|
+
*/
|
|
52376
|
+
function detectMonologueStructural(text) {
|
|
52377
|
+
let searchFrom = Math.floor(text.length * .15);
|
|
52378
|
+
while (searchFrom < text.length) {
|
|
52379
|
+
const breakPos = text.indexOf("\n\n", searchFrom);
|
|
52380
|
+
if (breakPos < 0) return null;
|
|
52381
|
+
const trailingBlock = text.slice(breakPos).toLowerCase();
|
|
52382
|
+
if (!SELF_REF_OPENERS.some((opener) => trailingBlock.includes(opener))) {
|
|
52383
|
+
searchFrom = breakPos + 2;
|
|
52384
|
+
continue;
|
|
52385
|
+
}
|
|
52386
|
+
const hasNumberedList = /\d+\.\s/.test(trailingBlock);
|
|
52387
|
+
const hasBoldHeaders = /\*\*\w/.test(trailingBlock);
|
|
52388
|
+
if (!hasNumberedList && !hasBoldHeaders) {
|
|
52389
|
+
searchFrom = breakPos + 2;
|
|
52390
|
+
continue;
|
|
52391
|
+
}
|
|
52392
|
+
if (ASSESSMENT_KEYWORDS.filter((kw) => trailingBlock.includes(kw)).length < 2) {
|
|
52393
|
+
searchFrom = breakPos + 2;
|
|
52394
|
+
continue;
|
|
52395
|
+
}
|
|
52396
|
+
return breakPos;
|
|
52397
|
+
}
|
|
52398
|
+
return null;
|
|
52399
|
+
}
|
|
52400
|
+
/**
|
|
52401
|
+
* Strip monologue from final text using the hierarchy:
|
|
52402
|
+
* Layer 2 (structural) first, Layer 3 (regex) as fallback.
|
|
52403
|
+
* Layer 1 (prompt tuning) happens before the model produces output.
|
|
52404
|
+
*/
|
|
52405
|
+
function stripMonologue(text) {
|
|
52406
|
+
const structuralCut = detectMonologueStructural(text);
|
|
52407
|
+
if (structuralCut !== null) {
|
|
52408
|
+
const cleaned = text.slice(0, structuralCut).trim();
|
|
52409
|
+
if (cleaned) return cleaned;
|
|
52410
|
+
}
|
|
52411
|
+
for (const pattern of MONOLOGUE_REGEX_PATTERNS) {
|
|
52412
|
+
const result = text.replace(pattern, "");
|
|
52413
|
+
if (result !== text && result.trim()) return result.trim();
|
|
52414
|
+
}
|
|
52415
|
+
return text;
|
|
52416
|
+
}
|
|
52417
|
+
const DEFAULT_REPETITION_MIN_BLOCK = 150;
|
|
52418
|
+
function detectRepetition(text, minBlock) {
|
|
52419
|
+
if (text.length < minBlock * 2.5) return false;
|
|
52420
|
+
const sampleStart = Math.floor(text.length * .25);
|
|
52421
|
+
const sample = text.slice(sampleStart, sampleStart + minBlock);
|
|
52422
|
+
const searchStart = sampleStart + minBlock;
|
|
52423
|
+
return text.indexOf(sample, searchStart) >= 0;
|
|
52424
|
+
}
|
|
52425
|
+
function sanitizeArgs(args, modelId) {
|
|
52426
|
+
const result = {};
|
|
52427
|
+
for (const [key, value] of Object.entries(args)) if (typeof value === "string") result[key] = stripModelTokensAggressive(value, modelId);
|
|
52428
|
+
else if (Array.isArray(value)) result[key] = value.map((item) => typeof item === "string" ? stripModelTokensAggressive(item, modelId) : item && typeof item === "object" ? sanitizeArgs(item, modelId) : item);
|
|
52429
|
+
else if (value && typeof value === "object") result[key] = sanitizeArgs(value, modelId);
|
|
52430
|
+
else result[key] = value;
|
|
52431
|
+
return result;
|
|
52432
|
+
}
|
|
52433
|
+
/**
|
|
52434
|
+
* Create an output normalizer configured for the given model profile.
|
|
52435
|
+
*
|
|
52436
|
+
* For Claude: passthrough (no stripping, no monologue, no aggressive cleaning).
|
|
52437
|
+
* For Gemma/vLLM: full normalization pipeline.
|
|
52438
|
+
* For unknown: conservative defaults.
|
|
52439
|
+
*/
|
|
52440
|
+
function createOutputNormalizer(profile, modelId) {
|
|
52441
|
+
const isGemma = isGemmaModel$1(modelId);
|
|
52442
|
+
const shouldStrip = isGemma || profile.filters.stripPatterns.length > 0;
|
|
52443
|
+
const shouldSuppressMonologue = profile.filters.suppressMonologue;
|
|
52444
|
+
let accumulated = "";
|
|
52445
|
+
return {
|
|
52446
|
+
normalizeTextDelta(delta) {
|
|
52447
|
+
const text = shouldStrip ? stripModelTokens(delta, modelId) : delta;
|
|
52448
|
+
accumulated += text;
|
|
52449
|
+
if (detectRepetition(accumulated, DEFAULT_REPETITION_MIN_BLOCK)) return {
|
|
52450
|
+
text,
|
|
52451
|
+
abort: { reason: "repetition-detected" }
|
|
52452
|
+
};
|
|
52453
|
+
return { text };
|
|
52454
|
+
},
|
|
52455
|
+
normalizeToolArgs(args) {
|
|
52456
|
+
if (!isGemma) return args;
|
|
52457
|
+
return sanitizeArgs(args, modelId);
|
|
52458
|
+
},
|
|
52459
|
+
normalizeFinalText(text) {
|
|
52460
|
+
let result = text;
|
|
52461
|
+
if (shouldStrip) result = stripModelTokens(result, modelId);
|
|
52462
|
+
if (shouldSuppressMonologue) result = stripMonologue(result);
|
|
52463
|
+
return result.trim();
|
|
52464
|
+
},
|
|
52465
|
+
reset() {
|
|
52466
|
+
accumulated = "";
|
|
52467
|
+
}
|
|
52468
|
+
};
|
|
52469
|
+
}
|
|
52470
|
+
|
|
52278
52471
|
//#endregion
|
|
52279
52472
|
//#region src/agents/model-aware-stream.ts
|
|
52280
52473
|
/**
|
|
@@ -52286,6 +52479,7 @@ function createCacheTrace(params) {
|
|
|
52286
52479
|
*/
|
|
52287
52480
|
function createModelAwareStreamFn(opts) {
|
|
52288
52481
|
const underlying = opts.baseStreamFn ?? streamSimple;
|
|
52482
|
+
const fullModelId = opts.provider ? `${opts.provider}/${opts.modelId}` : opts.modelId;
|
|
52289
52483
|
const mergedParams = {
|
|
52290
52484
|
...opts.profile.params,
|
|
52291
52485
|
...opts.configExtraParams,
|
|
@@ -52322,9 +52516,11 @@ function createModelAwareStreamFn(opts) {
|
|
|
52322
52516
|
}
|
|
52323
52517
|
callerOnPayload?.(payload);
|
|
52324
52518
|
};
|
|
52519
|
+
const normalizer = createOutputNormalizer(opts.profile, fullModelId);
|
|
52325
52520
|
return (model, context, options) => {
|
|
52326
52521
|
const callerOnPayload = options?.onPayload;
|
|
52327
|
-
|
|
52522
|
+
normalizer.reset();
|
|
52523
|
+
const streamOrPromise = underlying(model, context, {
|
|
52328
52524
|
...nativeOpts,
|
|
52329
52525
|
...options,
|
|
52330
52526
|
onPayload: (payload) => onPayloadHook(payload, callerOnPayload),
|
|
@@ -52333,8 +52529,106 @@ function createModelAwareStreamFn(opts) {
|
|
|
52333
52529
|
...options?.headers
|
|
52334
52530
|
} } : {}
|
|
52335
52531
|
});
|
|
52532
|
+
if (streamOrPromise instanceof Promise) return streamOrPromise.then((s) => wrapStreamWithNormalizer(s, normalizer));
|
|
52533
|
+
return wrapStreamWithNormalizer(streamOrPromise, normalizer);
|
|
52336
52534
|
};
|
|
52337
52535
|
}
|
|
52536
|
+
/**
|
|
52537
|
+
* Wrap an AssistantMessageEventStream to intercept and normalize events:
|
|
52538
|
+
* - text_delta: strip tokens, detect repetition
|
|
52539
|
+
* - toolcall_end: sanitize tool call arguments
|
|
52540
|
+
* - done: normalize final message text
|
|
52541
|
+
*/
|
|
52542
|
+
function wrapStreamWithNormalizer(rawStream, normalizer) {
|
|
52543
|
+
const normalized = createAssistantMessageEventStream();
|
|
52544
|
+
(async () => {
|
|
52545
|
+
try {
|
|
52546
|
+
for await (const event of rawStream) {
|
|
52547
|
+
const processed = normalizeEvent(event, normalizer);
|
|
52548
|
+
if (processed.abort) {
|
|
52549
|
+
normalized.push({
|
|
52550
|
+
type: "error",
|
|
52551
|
+
reason: "aborted",
|
|
52552
|
+
errorMessage: `output-normalizer: ${processed.abort.reason}`,
|
|
52553
|
+
usage: {
|
|
52554
|
+
input: 0,
|
|
52555
|
+
output: 0
|
|
52556
|
+
}
|
|
52557
|
+
});
|
|
52558
|
+
break;
|
|
52559
|
+
}
|
|
52560
|
+
normalized.push(processed.event);
|
|
52561
|
+
}
|
|
52562
|
+
} catch (err) {
|
|
52563
|
+
normalized.push({
|
|
52564
|
+
type: "error",
|
|
52565
|
+
reason: "error",
|
|
52566
|
+
errorMessage: err instanceof Error ? err.message : String(err),
|
|
52567
|
+
usage: {
|
|
52568
|
+
input: 0,
|
|
52569
|
+
output: 0
|
|
52570
|
+
}
|
|
52571
|
+
});
|
|
52572
|
+
}
|
|
52573
|
+
})();
|
|
52574
|
+
return normalized;
|
|
52575
|
+
}
|
|
52576
|
+
function normalizeEvent(event, normalizer) {
|
|
52577
|
+
if (event.type === "text_delta") {
|
|
52578
|
+
const result = normalizer.normalizeTextDelta(event.delta);
|
|
52579
|
+
if (result.abort) return {
|
|
52580
|
+
event,
|
|
52581
|
+
abort: result.abort
|
|
52582
|
+
};
|
|
52583
|
+
if (result.text !== event.delta) return { event: {
|
|
52584
|
+
...event,
|
|
52585
|
+
delta: result.text
|
|
52586
|
+
} };
|
|
52587
|
+
return { event };
|
|
52588
|
+
}
|
|
52589
|
+
if (event.type === "toolcall_end" && event.toolCall) {
|
|
52590
|
+
const tc = event.toolCall;
|
|
52591
|
+
if (tc.arguments && typeof tc.arguments === "object") {
|
|
52592
|
+
const cleanedArgs = normalizer.normalizeToolArgs(tc.arguments);
|
|
52593
|
+
return { event: {
|
|
52594
|
+
...event,
|
|
52595
|
+
toolCall: {
|
|
52596
|
+
...tc,
|
|
52597
|
+
arguments: cleanedArgs
|
|
52598
|
+
}
|
|
52599
|
+
} };
|
|
52600
|
+
}
|
|
52601
|
+
return { event };
|
|
52602
|
+
}
|
|
52603
|
+
if (event.type === "done" && event.message) {
|
|
52604
|
+
const msg = event.message;
|
|
52605
|
+
if (Array.isArray(msg.content)) {
|
|
52606
|
+
let changed = false;
|
|
52607
|
+
const normalizedContent = msg.content.map((block) => {
|
|
52608
|
+
if (block.type === "text" && "text" in block) {
|
|
52609
|
+
const cleaned = normalizer.normalizeFinalText(block.text);
|
|
52610
|
+
if (cleaned !== block.text) {
|
|
52611
|
+
changed = true;
|
|
52612
|
+
return {
|
|
52613
|
+
...block,
|
|
52614
|
+
text: cleaned
|
|
52615
|
+
};
|
|
52616
|
+
}
|
|
52617
|
+
}
|
|
52618
|
+
return block;
|
|
52619
|
+
});
|
|
52620
|
+
if (changed) return { event: {
|
|
52621
|
+
...event,
|
|
52622
|
+
message: {
|
|
52623
|
+
...msg,
|
|
52624
|
+
content: normalizedContent
|
|
52625
|
+
}
|
|
52626
|
+
} };
|
|
52627
|
+
}
|
|
52628
|
+
return { event };
|
|
52629
|
+
}
|
|
52630
|
+
return { event };
|
|
52631
|
+
}
|
|
52338
52632
|
/** Detect vLLM/Gemma providers by model hints or baseUrl patterns. */
|
|
52339
52633
|
function isVllmProvider(provider, modelId, config) {
|
|
52340
52634
|
const lower = `${provider}/${modelId}`.toLowerCase();
|
|
@@ -55396,7 +55690,7 @@ function resolveSymipulseMs(opts) {
|
|
|
55396
55690
|
|
|
55397
55691
|
//#endregion
|
|
55398
55692
|
//#region src/agents/transcript-policy.ts
|
|
55399
|
-
const GEMMA_MODEL_HINTS
|
|
55693
|
+
const GEMMA_MODEL_HINTS = ["gemma", "redsand/"];
|
|
55400
55694
|
const MISTRAL_MODEL_HINTS = [
|
|
55401
55695
|
"mistral",
|
|
55402
55696
|
"mixtral",
|
|
@@ -55425,11 +55719,11 @@ function isAnthropicApi(modelApi, provider) {
|
|
|
55425
55719
|
if (modelApi === "anthropic-messages") return true;
|
|
55426
55720
|
return normalizeProviderId(provider ?? "") === "anthropic";
|
|
55427
55721
|
}
|
|
55428
|
-
function isGemmaModel
|
|
55722
|
+
function isGemmaModel(params) {
|
|
55429
55723
|
if (normalizeProviderId(params.provider ?? "") === "redsand") return true;
|
|
55430
55724
|
const modelId = (params.modelId ?? "").toLowerCase();
|
|
55431
55725
|
if (!modelId) return false;
|
|
55432
|
-
return GEMMA_MODEL_HINTS
|
|
55726
|
+
return GEMMA_MODEL_HINTS.some((hint) => modelId.includes(hint));
|
|
55433
55727
|
}
|
|
55434
55728
|
function isMistralModel(params) {
|
|
55435
55729
|
if (normalizeProviderId(params.provider ?? "") === "mistral") return true;
|
|
@@ -55447,7 +55741,7 @@ function resolveTranscriptPolicy(params) {
|
|
|
55447
55741
|
provider,
|
|
55448
55742
|
modelId
|
|
55449
55743
|
});
|
|
55450
|
-
const isGemma = isGemmaModel
|
|
55744
|
+
const isGemma = isGemmaModel({
|
|
55451
55745
|
provider,
|
|
55452
55746
|
modelId
|
|
55453
55747
|
});
|
|
@@ -59905,7 +60199,7 @@ async function runAgentTurn(params) {
|
|
|
59905
60199
|
function createDefaultDeps() {
|
|
59906
60200
|
return {
|
|
59907
60201
|
sendMessageWhatsApp: async (...args) => {
|
|
59908
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
60202
|
+
const { sendMessageWhatsApp } = await import("./web-DVvZ_mDC.js");
|
|
59909
60203
|
return await sendMessageWhatsApp(...args);
|
|
59910
60204
|
},
|
|
59911
60205
|
sendMessageTelegram: async (...args) => {
|
|
@@ -62810,7 +63104,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
62810
63104
|
super(options);
|
|
62811
63105
|
}
|
|
62812
63106
|
createWebSocket(url) {
|
|
62813
|
-
return new WebSocket
|
|
63107
|
+
return new WebSocket(url, { agent });
|
|
62814
63108
|
}
|
|
62815
63109
|
}
|
|
62816
63110
|
return new ProxyGatewayPlugin();
|
|
@@ -73028,7 +73322,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
73028
73322
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
73029
73323
|
let preflightTranscript;
|
|
73030
73324
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
73031
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
73325
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CPBOQV4I.js");
|
|
73032
73326
|
preflightTranscript = await transcribeFirstAudio({
|
|
73033
73327
|
ctx: {
|
|
73034
73328
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -75185,7 +75479,7 @@ function loadWebLoginQr() {
|
|
|
75185
75479
|
return webLoginQrPromise;
|
|
75186
75480
|
}
|
|
75187
75481
|
function loadWebChannel() {
|
|
75188
|
-
webChannelPromise ??= import("./web-
|
|
75482
|
+
webChannelPromise ??= import("./web-DVvZ_mDC.js");
|
|
75189
75483
|
return webChannelPromise;
|
|
75190
75484
|
}
|
|
75191
75485
|
function loadWhatsAppActions() {
|
|
@@ -76403,69 +76697,6 @@ function parseUpdateFileChunk(lines, lineNumber, allowMissingContext) {
|
|
|
76403
76697
|
};
|
|
76404
76698
|
}
|
|
76405
76699
|
|
|
76406
|
-
//#endregion
|
|
76407
|
-
//#region src/agents/model-token-filter.ts
|
|
76408
|
-
/**
|
|
76409
|
-
* Strips model-specific control tokens from streamed text.
|
|
76410
|
-
*
|
|
76411
|
-
* Used both server-side (in the streaming pipeline) and by the Glass UI
|
|
76412
|
-
* (as a defense-in-depth fallback). The patterns here cover tokens known
|
|
76413
|
-
* to leak from Gemma 4 / vLLM; Claude output is left untouched.
|
|
76414
|
-
*/
|
|
76415
|
-
const GEMMA_TOKEN_PATTERNS = [
|
|
76416
|
-
/<\|channel>\w*/g,
|
|
76417
|
-
/<channel\|>/g,
|
|
76418
|
-
/<start_of_turn>(?:model|user)?/g,
|
|
76419
|
-
/<end_of_turn>/g,
|
|
76420
|
-
/<\|(?:fim_prefix|fim_suffix|fim_middle)\|>/g,
|
|
76421
|
-
/^\s*<bos>\s*/gm,
|
|
76422
|
-
/<\|[^|>]{0,30}\|>/g,
|
|
76423
|
-
/<\|[^>]{0,30}>/g
|
|
76424
|
-
];
|
|
76425
|
-
/**
|
|
76426
|
-
* Aggressively strip all fragments of model control token corruption from
|
|
76427
|
-
* tool arguments. This catches cases where the model produces raw garbage
|
|
76428
|
-
* like `<|<|"|<|<|\'` that doesn't match any known token template.
|
|
76429
|
-
*/
|
|
76430
|
-
const AGGRESSIVE_TOKEN_FRAGMENTS = [/<\|/g, /\|>/g];
|
|
76431
|
-
const GEMMA_MODEL_HINTS = ["gemma", "redsand/"];
|
|
76432
|
-
function isGemmaModel(modelId) {
|
|
76433
|
-
const lower = modelId.toLowerCase();
|
|
76434
|
-
return GEMMA_MODEL_HINTS.some((hint) => lower.includes(hint));
|
|
76435
|
-
}
|
|
76436
|
-
/**
|
|
76437
|
-
* Strip known control tokens from text. Only applies to Gemma-family models;
|
|
76438
|
-
* other models pass through unchanged.
|
|
76439
|
-
*/
|
|
76440
|
-
/**
|
|
76441
|
-
* Strip known control tokens from text. Only applies to Gemma-family models;
|
|
76442
|
-
* other models pass through unchanged. Used for streamed text output.
|
|
76443
|
-
*/
|
|
76444
|
-
function stripModelTokens(text, modelId) {
|
|
76445
|
-
if (!text || !isGemmaModel(modelId)) return text;
|
|
76446
|
-
let result = text;
|
|
76447
|
-
for (const re of GEMMA_TOKEN_PATTERNS) {
|
|
76448
|
-
re.lastIndex = 0;
|
|
76449
|
-
result = result.replace(re, "");
|
|
76450
|
-
}
|
|
76451
|
-
return result;
|
|
76452
|
-
}
|
|
76453
|
-
/**
|
|
76454
|
-
* Aggressively strip ALL token-like fragments from a string. Used for tool
|
|
76455
|
-
* call arguments where any `<|` corruption causes downstream failures.
|
|
76456
|
-
* More aggressive than `stripModelTokens` — removes bare `<|` and `|>` fragments
|
|
76457
|
-
* that don't match any known token template.
|
|
76458
|
-
*/
|
|
76459
|
-
function stripModelTokensAggressive(text, modelId) {
|
|
76460
|
-
if (!text || !isGemmaModel(modelId)) return text;
|
|
76461
|
-
let result = stripModelTokens(text, modelId);
|
|
76462
|
-
for (const re of AGGRESSIVE_TOKEN_FRAGMENTS) {
|
|
76463
|
-
re.lastIndex = 0;
|
|
76464
|
-
result = result.replace(re, "");
|
|
76465
|
-
}
|
|
76466
|
-
return result;
|
|
76467
|
-
}
|
|
76468
|
-
|
|
76469
76700
|
//#endregion
|
|
76470
76701
|
//#region src/agents/pi-tools.abort.ts
|
|
76471
76702
|
function throwAbortError() {
|
|
@@ -10,7 +10,7 @@ import { t as normalizeChatType } from "./chat-type-DFDuk3FY.js";
|
|
|
10
10
|
import { c as SafeOpenError, i as getImageMetadata, l as openFileWithinRoot, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-ByaQt43P.js";
|
|
11
11
|
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-BQINJQIT.js";
|
|
12
12
|
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-BmV60pPT.js";
|
|
13
|
-
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
13
|
+
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-D2SKJnR7.js";
|
|
14
14
|
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-BNpGMnp-.js";
|
|
15
15
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-CPfngF0S.js";
|
|
16
16
|
import { t as SsrFBlockedError } from "./ssrf-CxfFyMRZ.js";
|
|
@@ -931,7 +931,7 @@ function isModuleNotFoundError(err) {
|
|
|
931
931
|
}
|
|
932
932
|
async function loadPwAiModule(mode) {
|
|
933
933
|
try {
|
|
934
|
-
return await import("./pw-ai-
|
|
934
|
+
return await import("./pw-ai-1htA-NnS.js");
|
|
935
935
|
} catch (err) {
|
|
936
936
|
if (mode === "soft") return null;
|
|
937
937
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -3471,11 +3471,11 @@ function createProfileContext(opts, profile) {
|
|
|
3471
3471
|
const userDataDir = resolveSymiUserDataDir(profile.name);
|
|
3472
3472
|
const profileState = getProfileState();
|
|
3473
3473
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3474
|
-
await (await import("./pw-ai-
|
|
3474
|
+
await (await import("./pw-ai-1htA-NnS.js")).closePlaywrightBrowserConnection();
|
|
3475
3475
|
} catch {}
|
|
3476
3476
|
if (profileState.running) await stopRunningBrowser();
|
|
3477
3477
|
try {
|
|
3478
|
-
await (await import("./pw-ai-
|
|
3478
|
+
await (await import("./pw-ai-1htA-NnS.js")).closePlaywrightBrowserConnection();
|
|
3479
3479
|
} catch {}
|
|
3480
3480
|
if (!fs.existsSync(userDataDir)) return {
|
|
3481
3481
|
moved: false,
|
|
@@ -12,7 +12,7 @@ import { c as SafeOpenError, i as getImageMetadata, l as openFileWithinRoot, n a
|
|
|
12
12
|
import { S as isPidAlive, x as resolveProcessScopedMap } from "./model-auth-DK43VicI.js";
|
|
13
13
|
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-Dz5lr5b0.js";
|
|
14
14
|
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-DRbjHIwD.js";
|
|
15
|
-
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
15
|
+
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-EyvdASWt.js";
|
|
16
16
|
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-BFekKL7i.js";
|
|
17
17
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-BoQgnc8X.js";
|
|
18
18
|
import { t as SsrFBlockedError } from "./ssrf-BTMDZjHT.js";
|
|
@@ -933,7 +933,7 @@ function isModuleNotFoundError(err) {
|
|
|
933
933
|
}
|
|
934
934
|
async function loadPwAiModule(mode) {
|
|
935
935
|
try {
|
|
936
|
-
return await import("./pw-ai-
|
|
936
|
+
return await import("./pw-ai-Ch7liUOW.js");
|
|
937
937
|
} catch (err) {
|
|
938
938
|
if (mode === "soft") return null;
|
|
939
939
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -3473,11 +3473,11 @@ function createProfileContext(opts, profile) {
|
|
|
3473
3473
|
const userDataDir = resolveSymiUserDataDir(profile.name);
|
|
3474
3474
|
const profileState = getProfileState();
|
|
3475
3475
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3476
|
-
await (await import("./pw-ai-
|
|
3476
|
+
await (await import("./pw-ai-Ch7liUOW.js")).closePlaywrightBrowserConnection();
|
|
3477
3477
|
} catch {}
|
|
3478
3478
|
if (profileState.running) await stopRunningBrowser();
|
|
3479
3479
|
try {
|
|
3480
|
-
await (await import("./pw-ai-
|
|
3480
|
+
await (await import("./pw-ai-Ch7liUOW.js")).closePlaywrightBrowserConnection();
|
|
3481
3481
|
} catch {}
|
|
3482
3482
|
if (!fs$1.existsSync(userDataDir)) return {
|
|
3483
3483
|
moved: false,
|