@symerian/symi 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agents-B0pTMEwy.js → agents-DzuttgJU.js} +4 -4
- package/dist/{agents.config-_b7ghdyb.js → agents.config-2HlZJsR3.js} +1 -1
- package/dist/{agents.config-CdNbu8M5.js → agents.config-CSucty2T.js} +1 -1
- package/dist/{audio-preflight-BkIfnmpi.js → audio-preflight-BsfqyC31.js} +4 -4
- package/dist/{audio-preflight-CPBOQV4I.js → audio-preflight-C40mKAp7.js} +4 -4
- package/dist/{auth-choice-Bx2Ly3cQ.js → auth-choice-ChrEc3cZ.js} +1 -1
- package/dist/{auth-choice-EFFQA4ii.js → auth-choice-Cve09z1a.js} +1 -1
- package/dist/{banner-B3eic4uq.js → banner-BoLflN_R.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-CiowWU_F.js → channel-options-Dkd1WQZx.js} +1 -1
- package/dist/{channel-options-75aPoFR-.js → channel-options-DqgeO1f6.js} +1 -1
- package/dist/{channel-web-B3e8z6ws.js → channel-web-CJvDQ5Ea.js} +1 -1
- package/dist/{channels-cli-DZM3aIdY.js → channels-cli-D0jjOLRb.js} +4 -4
- package/dist/{channels-cli-BDAVsmSm.js → channels-cli-DtqwJZWy.js} +4 -4
- package/dist/{chrome-D2SKJnR7.js → chrome-CDJYxX5a.js} +7 -7
- package/dist/{chrome-CxSAp8x3.js → chrome-w3SLcQJF.js} +7 -7
- package/dist/{cli-BRwovkQi.js → cli-CEtg8kql.js} +1 -1
- package/dist/{cli-D9SQsNnH.js → cli-CHOmeum9.js} +1 -1
- package/dist/{command-registry-BOI6nYdi.js → command-registry-Ba2z3dYq.js} +9 -9
- package/dist/{completion-cli-NNzoK79d.js → completion-cli-BgX3MWVU.js} +1 -1
- package/dist/{completion-cli-83vpWmfU.js → completion-cli-CD-306wt.js} +2 -2
- package/dist/{config-cli-DEAh6EN8.js → config-cli-Cz87-TYh.js} +1 -1
- package/dist/{config-cli-MLtPektI.js → config-cli-DAbXVRUL.js} +1 -1
- package/dist/{configure-BdfU-OWp.js → configure-0nrthdSf.js} +3 -3
- package/dist/{configure-vl7Z4vWj.js → configure-D45ne4lm.js} +3 -3
- package/dist/{deliver-C-37cZUe.js → deliver-BH0l3UKW.js} +1 -1
- package/dist/{deliver-BA7ZN3iM.js → deliver-BmPK91JP.js} +1 -1
- package/dist/{doctor-completion-Ds-_m1_I.js → doctor-completion-CcDVOtZ5.js} +1 -1
- package/dist/{doctor-completion-OyrrKhcY.js → doctor-completion-CmGtqUHQ.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{gateway-cli-Coue82yW.js → gateway-cli-BVN31fwu.js} +9 -9
- package/dist/{gateway-cli-DfFSqETj.js → gateway-cli-DajX3Pye.js} +9 -9
- package/dist/{glass-ui-ws-D0Y3Ftjr.js → glass-ui-ws-CQG6acJl.js} +7 -7
- package/dist/{glass-ui-ws-Dkh8KQKx.js → glass-ui-ws-Z1IOT6Vc.js} +7 -7
- package/dist/{health-BL_zFcJ8.js → health-D9eQW7fJ.js} +1 -1
- package/dist/{health-B1LT2TG3.js → health-f056vLGT.js} +1 -1
- package/dist/{hooks-cli-CI7p--JB.js → hooks-cli-CW-IRS72.js} +2 -2
- package/dist/{hooks-cli-BoE1T7F1.js → hooks-cli-hJ4euq2R.js} +2 -2
- package/dist/{image-DcpMiprB.js → image-CHzdaNJ4.js} +1 -1
- package/dist/{image-BGmVDkkw.js → image-rZ4x9VS9.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/llm-slug-generator.js +6 -6
- package/dist/{models-cli-B-mDqwNv.js → models-cli-B2ticsCM.js} +2 -2
- package/dist/{models-cli-Dm_3bpun.js → models-cli-D9bG44Ao.js} +3 -3
- package/dist/{models-DSx-ohwA.js → models-nO_t1uzp.js} +2 -2
- package/dist/{onboard-CPRPPhos.js → onboard-BDbpfrZj.js} +2 -2
- package/dist/{onboard-u4HyeN9s.js → onboard-BtZ9WqhJ.js} +2 -2
- package/dist/{onboard-channels-BUz8JSpV.js → onboard-channels-CHE8nfNA.js} +1 -1
- package/dist/{onboard-channels-CixaQo6p.js → onboard-channels-HubyUVjT.js} +1 -1
- package/dist/{onboarding-DVnX6G65.js → onboarding-DtP0sps0.js} +3 -3
- package/dist/{onboarding-HeYKKCUg.js → onboarding-eVb5gvwo.js} +3 -3
- package/dist/{onboarding.finalize-CyfJOd_0.js → onboarding.finalize-CetxPTxL.js} +5 -5
- package/dist/{onboarding.finalize-BJD7ST55.js → onboarding.finalize-D8035U2E.js} +6 -6
- package/dist/{pi-embedded-Du1crlEA.js → pi-embedded-BY-dBus2.js} +216 -171
- package/dist/{pi-embedded-Dbwt0RDE.js → pi-embedded-Dc3muKtS.js} +216 -171
- package/dist/{pi-embedded-helpers-DEEaCvEp.js → pi-embedded-helpers-B2z46qeM.js} +4 -4
- package/dist/{pi-embedded-helpers-B8kqLWns.js → pi-embedded-helpers-lgx_U5KS.js} +4 -4
- package/dist/{plugin-registry-B3_VvP9Z.js → plugin-registry-CuoX8mar.js} +1 -1
- package/dist/{plugin-registry-BHTWmVtf.js → plugin-registry-fxcvycGr.js} +1 -1
- package/dist/plugin-sdk/{channel-web-pXiGDTMm.js → channel-web-CV1KLtZh.js} +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{reply-ClH0tnJf.js → reply-C4mijdMZ.js} +202 -157
- package/dist/plugin-sdk/{web-D-2D6z4H.js → web-B17UUsjm.js} +2 -2
- package/dist/{plugins-cli-CiJ3j55S.js → plugins-cli-4OqSGHp-.js} +2 -2
- package/dist/{plugins-cli-Dm1uy7by.js → plugins-cli-BbE_Qnlk.js} +2 -2
- package/dist/{program-CH2ZAXFK.js → program-DkXOdfM2.js} +7 -7
- package/dist/{program-context-BHdXKRCG.js → program-context-0bDxGpMx.js} +17 -17
- package/dist/{prompt-select-styled-D8-TYiCU.js → prompt-select-styled-DJkRn30j.js} +4 -4
- package/dist/{prompt-select-styled-YbkZmrxn.js → prompt-select-styled-_6KbTFXs.js} +4 -4
- package/dist/{provider-auth-helpers-BvwbMhtC.js → provider-auth-helpers-Bnkj4QXS.js} +1 -1
- package/dist/{provider-auth-helpers-BXnJRRuA.js → provider-auth-helpers-BpVAdwK_.js} +1 -1
- package/dist/{push-apns-CtNHq-T0.js → push-apns-C0wMP1XU.js} +1 -1
- package/dist/{push-apns-BKDV4tcx.js → push-apns-EKnCwrqK.js} +1 -1
- package/dist/{pw-ai-1htA-NnS.js → pw-ai-De-KR9_s.js} +1 -1
- package/dist/{pw-ai-DhwRiS06.js → pw-ai-PiQUncix.js} +1 -1
- package/dist/{register.agent-BUq96Y9v.js → register.agent-B0S1CJEx.js} +5 -5
- package/dist/{register.agent-BKI5-fHH.js → register.agent-B48Vf_DK.js} +6 -6
- package/dist/{register.configure-D5lE614j.js → register.configure-Drr3E9OG.js} +6 -6
- package/dist/{register.configure-wxLUAVNm.js → register.configure-Wyv7vb24.js} +6 -6
- package/dist/{register.maintenance-C7McOGSl.js → register.maintenance-Cmf17EW0.js} +7 -7
- package/dist/{register.maintenance-CBkeGPZ5.js → register.maintenance-TgjAQ4E0.js} +8 -8
- package/dist/{register.message-COdTYFse.js → register.message-BcsPnPvW.js} +2 -2
- package/dist/{register.message-CI-7hMop.js → register.message-Dwv2puIB.js} +2 -2
- package/dist/{register.onboard-BB0BR6ER.js → register.onboard-BDGaSyq2.js} +4 -4
- package/dist/{register.onboard-Cvq4D9PO.js → register.onboard-C8w7_w93.js} +4 -4
- package/dist/{register.setup-BFsDqWth.js → register.setup-CMGSNKXS.js} +4 -4
- package/dist/{register.setup-BYdcj7kG.js → register.setup-CiEuZOlI.js} +4 -4
- package/dist/{register.status-health-sessions-Z5xGFCb6.js → register.status-health-sessions-C8p0uINc.js} +3 -3
- package/dist/{register.status-health-sessions-CLTBPceP.js → register.status-health-sessions-zKjmZyOs.js} +3 -3
- package/dist/{register.subclis-DbjFcioS.js → register.subclis-CofZE_pt.js} +9 -9
- package/dist/{reply-Dlka9TPn.js → reply-SBi_U7P7.js} +202 -157
- package/dist/{run-main-CZKS1Km-.js → run-main-BJaDO3WW.js} +14 -14
- package/dist/{runner-B_KP4voe.js → runner-CCSMfQee.js} +1 -1
- package/dist/{runner-BcQ0sF9T.js → runner-DUBExAb5.js} +1 -1
- package/dist/{server-methods-Dl2xnUeP.js → server-methods-Cm6W01ne.js} +7 -7
- package/dist/{server-methods-060ibtki.js → server-methods-CyFB3XQf.js} +7 -7
- package/dist/{server-node-events-BaVEbs-L.js → server-node-events-Bhgt3xLw.js} +2 -2
- package/dist/{server-node-events-CxdmKBmm.js → server-node-events-CX1plxJz.js} +2 -2
- package/dist/{status-B161_hoB.js → status-BBpD_1pG.js} +2 -2
- package/dist/{status-DFFFYwyN.js → status-BdmYV3_x.js} +1 -1
- package/dist/{status-DqWKFOGN.js → status-CwXg8OO1.js} +2 -2
- package/dist/{status-V0eZ4bzN.js → status-U_1mE-yc.js} +1 -1
- package/dist/{subagent-registry-DLH72QgE.js → subagent-registry-Du9P0G2U.js} +202 -157
- package/dist/{update-cli-BHNHad5c.js → update-cli-DJzF_9UX.js} +7 -7
- package/dist/{update-cli-t1GIk6uw.js → update-cli-_45TJ3hZ.js} +8 -8
- package/dist/{update-runner-Ciq1c0YL.js → update-runner-8Ac4bJ1w.js} +1 -1
- package/dist/{update-runner-CDG0-jLB.js → update-runner-BSQFv9b6.js} +1 -1
- package/dist/{web-CWhHll12.js → web-BZSI7b07.js} +2 -2
- package/dist/{web-B_JQgMeX.js → web-BqRsq6mP.js} +6 -6
- package/dist/{web-BkvYOXO1.js → web-C1Zn8_qW.js} +6 -6
- package/dist/{web-FaXjM6fP.js → web-w-vV1rCZ.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-BH0l3UKW.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-lgx_U5KS.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-CDJYxX5a.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-CHzdaNJ4.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-DUBExAb5.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";
|
|
@@ -79,7 +79,7 @@ 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, { WebSocket
|
|
82
|
+
import WebSocket$1, { WebSocket } 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
|
|
5717
|
+
this.ws = new WebSocket(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
|
|
5936
|
+
if (!this.ws || this.ws.readyState !== WebSocket.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-BH0l3UKW.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-BH0l3UKW.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-CHzdaNJ4.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-C40mKAp7.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: {
|
|
@@ -51787,7 +51787,7 @@ function isVoiceChannelType(type) {
|
|
|
51787
51787
|
function createDefaultDeps() {
|
|
51788
51788
|
return {
|
|
51789
51789
|
sendMessageWhatsApp: async (...args) => {
|
|
51790
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
51790
|
+
const { sendMessageWhatsApp } = await import("./web-C1Zn8_qW.js");
|
|
51791
51791
|
return await sendMessageWhatsApp(...args);
|
|
51792
51792
|
},
|
|
51793
51793
|
sendMessageTelegram: async (...args) => {
|
|
@@ -54694,7 +54694,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
54694
54694
|
super(options);
|
|
54695
54695
|
}
|
|
54696
54696
|
createWebSocket(url) {
|
|
54697
|
-
return new WebSocket(url, { agent });
|
|
54697
|
+
return new WebSocket$1(url, { agent });
|
|
54698
54698
|
}
|
|
54699
54699
|
}
|
|
54700
54700
|
return new ProxyGatewayPlugin();
|
|
@@ -64912,7 +64912,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
64912
64912
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
64913
64913
|
let preflightTranscript;
|
|
64914
64914
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
64915
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
64915
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-C40mKAp7.js");
|
|
64916
64916
|
preflightTranscript = await transcribeFirstAudio({
|
|
64917
64917
|
ctx: {
|
|
64918
64918
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -67069,7 +67069,7 @@ function loadWebLoginQr() {
|
|
|
67069
67069
|
return webLoginQrPromise;
|
|
67070
67070
|
}
|
|
67071
67071
|
function loadWebChannel() {
|
|
67072
|
-
webChannelPromise ??= import("./web-
|
|
67072
|
+
webChannelPromise ??= import("./web-C1Zn8_qW.js");
|
|
67073
67073
|
return webChannelPromise;
|
|
67074
67074
|
}
|
|
67075
67075
|
function loadWhatsAppActions() {
|
|
@@ -72586,6 +72586,162 @@ async function compactEmbeddedPiSession(params) {
|
|
|
72586
72586
|
return enqueueCommandInLane(sessionLane, () => enqueueGlobal(async () => compactEmbeddedPiSessionDirect(params)));
|
|
72587
72587
|
}
|
|
72588
72588
|
|
|
72589
|
+
//#endregion
|
|
72590
|
+
//#region src/config/model-profiles-builtin.ts
|
|
72591
|
+
/**
|
|
72592
|
+
* Built-in model profiles. Ordered from most-specific to least-specific so
|
|
72593
|
+
* that `resolveModelProfile` can return the first match.
|
|
72594
|
+
*
|
|
72595
|
+
* Order matters: "ollama/" must precede "gemma" because model IDs like
|
|
72596
|
+
* "ollama/gemma4:31b-128k" contain both substrings.
|
|
72597
|
+
*/
|
|
72598
|
+
const BUILTIN_PROFILES = [
|
|
72599
|
+
{
|
|
72600
|
+
match: ["ollama/"],
|
|
72601
|
+
label: "Ollama Local",
|
|
72602
|
+
params: {
|
|
72603
|
+
temperature: 1,
|
|
72604
|
+
top_p: .95,
|
|
72605
|
+
top_k: 64,
|
|
72606
|
+
max_tokens: 4096,
|
|
72607
|
+
stop: ["<end_of_turn>", "<eos>"]
|
|
72608
|
+
},
|
|
72609
|
+
streaming: {
|
|
72610
|
+
deltaThrottleMs: 50,
|
|
72611
|
+
flushOnFinal: true,
|
|
72612
|
+
chunkPattern: "burst"
|
|
72613
|
+
},
|
|
72614
|
+
filters: {
|
|
72615
|
+
stripPatterns: [
|
|
72616
|
+
"<\\|channel>\\w*",
|
|
72617
|
+
"<channel\\|>",
|
|
72618
|
+
"<start_of_turn>(?:model|user)?",
|
|
72619
|
+
"<end_of_turn>"
|
|
72620
|
+
],
|
|
72621
|
+
suppressMonologue: true,
|
|
72622
|
+
hasStructuredThinking: false
|
|
72623
|
+
},
|
|
72624
|
+
promptAdditions: ["You are running locally via Ollama. Do not output raw control tokens or internal monologue. Send brief progress updates on long tasks."],
|
|
72625
|
+
ui: {
|
|
72626
|
+
badge: "Local",
|
|
72627
|
+
watchdogMs: 9e5,
|
|
72628
|
+
armWatchdogOnSend: true
|
|
72629
|
+
}
|
|
72630
|
+
},
|
|
72631
|
+
{
|
|
72632
|
+
match: ["anthropic/", "claude-"],
|
|
72633
|
+
label: "Claude",
|
|
72634
|
+
params: {
|
|
72635
|
+
temperature: 1,
|
|
72636
|
+
top_p: 1,
|
|
72637
|
+
max_tokens: 8192
|
|
72638
|
+
},
|
|
72639
|
+
streaming: {
|
|
72640
|
+
deltaThrottleMs: 150,
|
|
72641
|
+
flushOnFinal: false,
|
|
72642
|
+
chunkPattern: "token"
|
|
72643
|
+
},
|
|
72644
|
+
filters: {
|
|
72645
|
+
stripPatterns: [],
|
|
72646
|
+
suppressMonologue: false,
|
|
72647
|
+
hasStructuredThinking: true
|
|
72648
|
+
},
|
|
72649
|
+
promptAdditions: [],
|
|
72650
|
+
ui: {
|
|
72651
|
+
badge: "API",
|
|
72652
|
+
watchdogMs: 3e5,
|
|
72653
|
+
armWatchdogOnSend: false
|
|
72654
|
+
}
|
|
72655
|
+
},
|
|
72656
|
+
{
|
|
72657
|
+
match: ["gemma", "redsand/"],
|
|
72658
|
+
label: "Gemma 4",
|
|
72659
|
+
params: {
|
|
72660
|
+
temperature: 1,
|
|
72661
|
+
top_p: .95,
|
|
72662
|
+
top_k: 64,
|
|
72663
|
+
max_tokens: 4096,
|
|
72664
|
+
stop: ["<end_of_turn>", "<eos>"]
|
|
72665
|
+
},
|
|
72666
|
+
streaming: {
|
|
72667
|
+
deltaThrottleMs: 50,
|
|
72668
|
+
flushOnFinal: true,
|
|
72669
|
+
chunkPattern: "burst"
|
|
72670
|
+
},
|
|
72671
|
+
filters: {
|
|
72672
|
+
stripPatterns: [
|
|
72673
|
+
"<\\|channel>\\w*",
|
|
72674
|
+
"<channel\\|>",
|
|
72675
|
+
"<start_of_turn>(?:model|user)?",
|
|
72676
|
+
"<end_of_turn>",
|
|
72677
|
+
"<\\|(?:fim_prefix|fim_suffix|fim_middle)\\|>",
|
|
72678
|
+
"^\\s*<bos>\\s*"
|
|
72679
|
+
],
|
|
72680
|
+
suppressMonologue: true,
|
|
72681
|
+
hasStructuredThinking: false
|
|
72682
|
+
},
|
|
72683
|
+
promptAdditions: [
|
|
72684
|
+
"You are running as Gemma 4 via vLLM. Important behavioral rules:",
|
|
72685
|
+
"- Never output raw control tokens, channel tags, or turn markers in your responses.",
|
|
72686
|
+
"- Never display internal status checks, plans, or self-assessments. Your visible output should only be conversational responses and final results.",
|
|
72687
|
+
"- When working on multi-step tasks, send a brief one-line status update every 30-60 seconds so the user knows you are active.",
|
|
72688
|
+
"- Keep planning and reasoning internal. Only speak when you have a result or need user input.",
|
|
72689
|
+
"- Do not use <|channel>thought or similar syntax. If you need to reason, do so silently."
|
|
72690
|
+
],
|
|
72691
|
+
ui: {
|
|
72692
|
+
badge: "CoreWeave",
|
|
72693
|
+
watchdogMs: 6e5,
|
|
72694
|
+
armWatchdogOnSend: true
|
|
72695
|
+
}
|
|
72696
|
+
}
|
|
72697
|
+
];
|
|
72698
|
+
|
|
72699
|
+
//#endregion
|
|
72700
|
+
//#region src/config/resolve-model-profile.ts
|
|
72701
|
+
/** Default profile returned when no match is found. */
|
|
72702
|
+
const FALLBACK_PROFILE = {
|
|
72703
|
+
match: "*",
|
|
72704
|
+
label: "Generic",
|
|
72705
|
+
params: {
|
|
72706
|
+
temperature: 1,
|
|
72707
|
+
max_tokens: 4096
|
|
72708
|
+
},
|
|
72709
|
+
streaming: {
|
|
72710
|
+
deltaThrottleMs: 150,
|
|
72711
|
+
flushOnFinal: true,
|
|
72712
|
+
chunkPattern: "burst"
|
|
72713
|
+
},
|
|
72714
|
+
filters: {
|
|
72715
|
+
stripPatterns: [],
|
|
72716
|
+
suppressMonologue: false,
|
|
72717
|
+
hasStructuredThinking: false
|
|
72718
|
+
},
|
|
72719
|
+
promptAdditions: [],
|
|
72720
|
+
ui: {
|
|
72721
|
+
watchdogMs: 3e5,
|
|
72722
|
+
armWatchdogOnSend: true
|
|
72723
|
+
}
|
|
72724
|
+
};
|
|
72725
|
+
/**
|
|
72726
|
+
* Resolve the active model profile for a given model ID.
|
|
72727
|
+
*
|
|
72728
|
+
* Resolution order:
|
|
72729
|
+
* 1. User-defined profiles (from `models.profiles` in symi.json)
|
|
72730
|
+
* 2. Built-in profiles ({@link BUILTIN_PROFILES})
|
|
72731
|
+
* 3. Fallback "Generic" profile
|
|
72732
|
+
*
|
|
72733
|
+
* Matching is case-insensitive prefix/substring against the model ID.
|
|
72734
|
+
*/
|
|
72735
|
+
function resolveModelProfile(modelId, userProfiles) {
|
|
72736
|
+
const id = modelId.toLowerCase();
|
|
72737
|
+
const allProfiles = [...userProfiles ?? [], ...BUILTIN_PROFILES];
|
|
72738
|
+
for (const profile of allProfiles) {
|
|
72739
|
+
const patterns = Array.isArray(profile.match) ? profile.match : [profile.match];
|
|
72740
|
+
for (const pattern of patterns) if (id.startsWith(pattern.toLowerCase()) || id.includes(pattern.toLowerCase())) return profile;
|
|
72741
|
+
}
|
|
72742
|
+
return FALLBACK_PROFILE;
|
|
72743
|
+
}
|
|
72744
|
+
|
|
72589
72745
|
//#endregion
|
|
72590
72746
|
//#region src/agents/pi-embedded-runner/extra-params.ts
|
|
72591
72747
|
const OPENROUTER_APP_HEADERS = {
|
|
@@ -72605,7 +72761,9 @@ const OPENAI_RESPONSES_PROVIDERS = new Set(["openai"]);
|
|
|
72605
72761
|
function resolveExtraParams(params) {
|
|
72606
72762
|
const modelKey = `${params.provider}/${params.modelId}`;
|
|
72607
72763
|
const modelConfig = params.cfg?.agents?.defaults?.models?.[modelKey];
|
|
72608
|
-
|
|
72764
|
+
if (modelConfig?.params) return { ...modelConfig.params };
|
|
72765
|
+
const profile = resolveModelProfile(modelKey, params.cfg?.models?.profiles);
|
|
72766
|
+
if (profile.params && Object.keys(profile.params).length > 0) return { ...profile.params };
|
|
72609
72767
|
}
|
|
72610
72768
|
/**
|
|
72611
72769
|
* Resolve cacheRetention from extraParams, supporting both new `cacheRetention`
|
|
@@ -72635,6 +72793,7 @@ function createStreamFnWithExtraParams(baseStreamFn, extraParams, provider) {
|
|
|
72635
72793
|
if (typeof extraParams.top_p === "number") streamParams.top_p = extraParams.top_p;
|
|
72636
72794
|
if (typeof extraParams.top_k === "number") streamParams.top_k = extraParams.top_k;
|
|
72637
72795
|
if (typeof extraParams.repeat_penalty === "number") streamParams.repeat_penalty = extraParams.repeat_penalty;
|
|
72796
|
+
if (Array.isArray(extraParams.stop) && extraParams.stop.length > 0) streamParams.stop = extraParams.stop;
|
|
72638
72797
|
if (extraParams.chat_template_kwargs && typeof extraParams.chat_template_kwargs === "object") streamParams.chat_template_kwargs = extraParams.chat_template_kwargs;
|
|
72639
72798
|
const cacheRetention = resolveCacheRetention(extraParams, provider);
|
|
72640
72799
|
if (cacheRetention) streamParams.cacheRetention = cacheRetention;
|
|
@@ -72763,6 +72922,42 @@ function createZaiToolStreamWrapper(baseStreamFn, enabled) {
|
|
|
72763
72922
|
});
|
|
72764
72923
|
};
|
|
72765
72924
|
}
|
|
72925
|
+
const GEMMA_STOP_SEQUENCES = ["<end_of_turn>", "<eos>"];
|
|
72926
|
+
const VLLM_GEMMA_HINTS = ["gemma", "redsand"];
|
|
72927
|
+
function isVllmOrGemmaProvider(provider, modelId, cfg) {
|
|
72928
|
+
const lower = `${provider}/${modelId}`.toLowerCase();
|
|
72929
|
+
if (VLLM_GEMMA_HINTS.some((h) => lower.includes(h))) return true;
|
|
72930
|
+
const baseUrl = ((cfg?.models?.providers?.[provider])?.baseUrl ?? "").toLowerCase();
|
|
72931
|
+
return baseUrl.includes("coreweave") || baseUrl.includes("vllm");
|
|
72932
|
+
}
|
|
72933
|
+
/**
|
|
72934
|
+
* Wrap the stream function to fix vLLM/Gemma compat issues via onPayload:
|
|
72935
|
+
* 1. Replace `max_completion_tokens` with `max_tokens` (vLLM ignores the former)
|
|
72936
|
+
* 2. Inject Gemma stop sequences if none are set
|
|
72937
|
+
* 3. Remove unsupported fields (store, stream_options.include_usage on older vLLM)
|
|
72938
|
+
*/
|
|
72939
|
+
function createVllmCompatWrapper(baseStreamFn, extraParams) {
|
|
72940
|
+
const underlying = baseStreamFn ?? streamSimple;
|
|
72941
|
+
const configuredStop = Array.isArray(extraParams.stop) ? extraParams.stop : GEMMA_STOP_SEQUENCES;
|
|
72942
|
+
return (model, context, options) => {
|
|
72943
|
+
const originalOnPayload = options?.onPayload;
|
|
72944
|
+
return underlying(model, context, {
|
|
72945
|
+
...options,
|
|
72946
|
+
onPayload: (payload) => {
|
|
72947
|
+
if (payload && typeof payload === "object") {
|
|
72948
|
+
const p = payload;
|
|
72949
|
+
if (p.max_completion_tokens && !p.max_tokens) {
|
|
72950
|
+
p.max_tokens = p.max_completion_tokens;
|
|
72951
|
+
delete p.max_completion_tokens;
|
|
72952
|
+
}
|
|
72953
|
+
if (!p.stop && configuredStop.length > 0) p.stop = configuredStop;
|
|
72954
|
+
delete p.store;
|
|
72955
|
+
}
|
|
72956
|
+
originalOnPayload?.(payload);
|
|
72957
|
+
}
|
|
72958
|
+
});
|
|
72959
|
+
};
|
|
72960
|
+
}
|
|
72766
72961
|
/**
|
|
72767
72962
|
* Apply extra params (like temperature) to an agent's streamFn.
|
|
72768
72963
|
* Also adds OpenRouter app attribution headers when using the OpenRouter provider.
|
|
@@ -72797,161 +72992,11 @@ function applyExtraParamsToAgent(agent, cfg, provider, modelId, extraParamsOverr
|
|
|
72797
72992
|
agent.streamFn = createZaiToolStreamWrapper(agent.streamFn, true);
|
|
72798
72993
|
}
|
|
72799
72994
|
}
|
|
72800
|
-
|
|
72801
|
-
}
|
|
72802
|
-
|
|
72803
|
-
//#endregion
|
|
72804
|
-
//#region src/config/model-profiles-builtin.ts
|
|
72805
|
-
/**
|
|
72806
|
-
* Built-in model profiles. Ordered from most-specific to least-specific so
|
|
72807
|
-
* that `resolveModelProfile` can return the first match.
|
|
72808
|
-
*
|
|
72809
|
-
* Order matters: "ollama/" must precede "gemma" because model IDs like
|
|
72810
|
-
* "ollama/gemma4:31b-128k" contain both substrings.
|
|
72811
|
-
*/
|
|
72812
|
-
const BUILTIN_PROFILES = [
|
|
72813
|
-
{
|
|
72814
|
-
match: ["ollama/"],
|
|
72815
|
-
label: "Ollama Local",
|
|
72816
|
-
params: {
|
|
72817
|
-
temperature: 1,
|
|
72818
|
-
top_p: .95,
|
|
72819
|
-
top_k: 64,
|
|
72820
|
-
max_tokens: 4096
|
|
72821
|
-
},
|
|
72822
|
-
streaming: {
|
|
72823
|
-
deltaThrottleMs: 50,
|
|
72824
|
-
flushOnFinal: true,
|
|
72825
|
-
chunkPattern: "burst"
|
|
72826
|
-
},
|
|
72827
|
-
filters: {
|
|
72828
|
-
stripPatterns: [
|
|
72829
|
-
"<\\|channel>\\w*",
|
|
72830
|
-
"<channel\\|>",
|
|
72831
|
-
"<start_of_turn>(?:model|user)?",
|
|
72832
|
-
"<end_of_turn>"
|
|
72833
|
-
],
|
|
72834
|
-
suppressMonologue: true,
|
|
72835
|
-
hasStructuredThinking: false
|
|
72836
|
-
},
|
|
72837
|
-
promptAdditions: ["You are running locally via Ollama. Do not output raw control tokens or internal monologue. Send brief progress updates on long tasks."],
|
|
72838
|
-
ui: {
|
|
72839
|
-
badge: "Local",
|
|
72840
|
-
watchdogMs: 9e5,
|
|
72841
|
-
armWatchdogOnSend: true
|
|
72842
|
-
}
|
|
72843
|
-
},
|
|
72844
|
-
{
|
|
72845
|
-
match: ["anthropic/", "claude-"],
|
|
72846
|
-
label: "Claude",
|
|
72847
|
-
params: {
|
|
72848
|
-
temperature: 1,
|
|
72849
|
-
top_p: 1,
|
|
72850
|
-
max_tokens: 8192
|
|
72851
|
-
},
|
|
72852
|
-
streaming: {
|
|
72853
|
-
deltaThrottleMs: 150,
|
|
72854
|
-
flushOnFinal: false,
|
|
72855
|
-
chunkPattern: "token"
|
|
72856
|
-
},
|
|
72857
|
-
filters: {
|
|
72858
|
-
stripPatterns: [],
|
|
72859
|
-
suppressMonologue: false,
|
|
72860
|
-
hasStructuredThinking: true
|
|
72861
|
-
},
|
|
72862
|
-
promptAdditions: [],
|
|
72863
|
-
ui: {
|
|
72864
|
-
badge: "API",
|
|
72865
|
-
watchdogMs: 3e5,
|
|
72866
|
-
armWatchdogOnSend: false
|
|
72867
|
-
}
|
|
72868
|
-
},
|
|
72869
|
-
{
|
|
72870
|
-
match: ["gemma", "redsand/"],
|
|
72871
|
-
label: "Gemma 4",
|
|
72872
|
-
params: {
|
|
72873
|
-
temperature: 1,
|
|
72874
|
-
top_p: .95,
|
|
72875
|
-
top_k: 64,
|
|
72876
|
-
max_tokens: 8192
|
|
72877
|
-
},
|
|
72878
|
-
streaming: {
|
|
72879
|
-
deltaThrottleMs: 50,
|
|
72880
|
-
flushOnFinal: true,
|
|
72881
|
-
chunkPattern: "burst"
|
|
72882
|
-
},
|
|
72883
|
-
filters: {
|
|
72884
|
-
stripPatterns: [
|
|
72885
|
-
"<\\|channel>\\w*",
|
|
72886
|
-
"<channel\\|>",
|
|
72887
|
-
"<start_of_turn>(?:model|user)?",
|
|
72888
|
-
"<end_of_turn>",
|
|
72889
|
-
"<\\|(?:fim_prefix|fim_suffix|fim_middle)\\|>",
|
|
72890
|
-
"^\\s*<bos>\\s*"
|
|
72891
|
-
],
|
|
72892
|
-
suppressMonologue: true,
|
|
72893
|
-
hasStructuredThinking: false
|
|
72894
|
-
},
|
|
72895
|
-
promptAdditions: [
|
|
72896
|
-
"You are running as Gemma 4 via vLLM. Important behavioral rules:",
|
|
72897
|
-
"- Never output raw control tokens, channel tags, or turn markers in your responses.",
|
|
72898
|
-
"- Never display internal status checks, plans, or self-assessments. Your visible output should only be conversational responses and final results.",
|
|
72899
|
-
"- When working on multi-step tasks, send a brief one-line status update every 30-60 seconds so the user knows you are active.",
|
|
72900
|
-
"- Keep planning and reasoning internal. Only speak when you have a result or need user input.",
|
|
72901
|
-
"- Do not use <|channel>thought or similar syntax. If you need to reason, do so silently."
|
|
72902
|
-
],
|
|
72903
|
-
ui: {
|
|
72904
|
-
badge: "CoreWeave",
|
|
72905
|
-
watchdogMs: 6e5,
|
|
72906
|
-
armWatchdogOnSend: true
|
|
72907
|
-
}
|
|
72908
|
-
}
|
|
72909
|
-
];
|
|
72910
|
-
|
|
72911
|
-
//#endregion
|
|
72912
|
-
//#region src/config/resolve-model-profile.ts
|
|
72913
|
-
/** Default profile returned when no match is found. */
|
|
72914
|
-
const FALLBACK_PROFILE = {
|
|
72915
|
-
match: "*",
|
|
72916
|
-
label: "Generic",
|
|
72917
|
-
params: {
|
|
72918
|
-
temperature: 1,
|
|
72919
|
-
max_tokens: 4096
|
|
72920
|
-
},
|
|
72921
|
-
streaming: {
|
|
72922
|
-
deltaThrottleMs: 150,
|
|
72923
|
-
flushOnFinal: true,
|
|
72924
|
-
chunkPattern: "burst"
|
|
72925
|
-
},
|
|
72926
|
-
filters: {
|
|
72927
|
-
stripPatterns: [],
|
|
72928
|
-
suppressMonologue: false,
|
|
72929
|
-
hasStructuredThinking: false
|
|
72930
|
-
},
|
|
72931
|
-
promptAdditions: [],
|
|
72932
|
-
ui: {
|
|
72933
|
-
watchdogMs: 3e5,
|
|
72934
|
-
armWatchdogOnSend: true
|
|
72995
|
+
if (isVllmOrGemmaProvider(provider, modelId, cfg)) {
|
|
72996
|
+
log$2.debug(`applying vLLM/Gemma compat wrapper for ${provider}/${modelId}`);
|
|
72997
|
+
agent.streamFn = createVllmCompatWrapper(agent.streamFn, merged);
|
|
72935
72998
|
}
|
|
72936
|
-
|
|
72937
|
-
/**
|
|
72938
|
-
* Resolve the active model profile for a given model ID.
|
|
72939
|
-
*
|
|
72940
|
-
* Resolution order:
|
|
72941
|
-
* 1. User-defined profiles (from `models.profiles` in symi.json)
|
|
72942
|
-
* 2. Built-in profiles ({@link BUILTIN_PROFILES})
|
|
72943
|
-
* 3. Fallback "Generic" profile
|
|
72944
|
-
*
|
|
72945
|
-
* Matching is case-insensitive prefix/substring against the model ID.
|
|
72946
|
-
*/
|
|
72947
|
-
function resolveModelProfile(modelId, userProfiles) {
|
|
72948
|
-
const id = modelId.toLowerCase();
|
|
72949
|
-
const allProfiles = [...userProfiles ?? [], ...BUILTIN_PROFILES];
|
|
72950
|
-
for (const profile of allProfiles) {
|
|
72951
|
-
const patterns = Array.isArray(profile.match) ? profile.match : [profile.match];
|
|
72952
|
-
for (const pattern of patterns) if (id.startsWith(pattern.toLowerCase()) || id.includes(pattern.toLowerCase())) return profile;
|
|
72953
|
-
}
|
|
72954
|
-
return FALLBACK_PROFILE;
|
|
72999
|
+
agent.streamFn = createOpenAIResponsesStoreWrapper(agent.streamFn);
|
|
72955
73000
|
}
|
|
72956
73001
|
|
|
72957
73002
|
//#endregion
|