librechat-data-provider 0.8.523 → 0.8.524
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/{data-service-Bx6IFaSa.mjs → data-service-B-WUVvTH.mjs} +434 -174
- package/dist/data-service-B-WUVvTH.mjs.map +1 -0
- package/dist/{data-service-CTX0tVO5.js → data-service-CUG1qdeC.js} +577 -203
- package/dist/data-service-CUG1qdeC.js.map +1 -0
- package/dist/index.js +346 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +307 -68
- package/dist/index.mjs.map +1 -1
- package/dist/react-query/index.js +1 -1
- package/dist/react-query/index.mjs +1 -1
- package/dist/types/actions.d.ts +1 -1
- package/dist/types/agentToolOptions.d.ts +1 -1
- package/dist/types/api-endpoints.d.ts +1 -0
- package/dist/types/backgroundResults.d.ts +13 -0
- package/dist/types/balance.d.ts +4 -0
- package/dist/types/bedrock.d.ts +77 -70
- package/dist/types/code/workspace.d.ts +22 -0
- package/dist/types/config.d.ts +5362 -4206
- package/dist/types/data-service.d.ts +14 -12
- package/dist/types/file-config.d.ts +81 -42
- package/dist/types/filters.d.ts +205 -205
- package/dist/types/footer.d.ts +20 -0
- package/dist/types/generate.d.ts +28 -28
- package/dist/types/index.d.ts +4 -0
- package/dist/types/keys.d.ts +2 -1
- package/dist/types/limits.d.ts +8 -0
- package/dist/types/mcp.d.ts +999 -352
- package/dist/types/messages.d.ts +12 -7
- package/dist/types/models.d.ts +429 -429
- package/dist/types/parameterSettings.d.ts +2 -1
- package/dist/types/parsers.d.ts +25 -1
- package/dist/types/resolve-llm-delivery-path.d.ts +97 -4
- package/dist/types/schemas.d.ts +646 -643
- package/dist/types/types/agents.d.ts +233 -2
- package/dist/types/types/assistants.d.ts +2 -641
- package/dist/types/types/content.d.ts +286 -0
- package/dist/types/types/files.d.ts +14 -1
- package/dist/types/types/mutations.d.ts +3 -2
- package/dist/types/types/queuedTurns.d.ts +124 -90
- package/dist/types/types/runs.d.ts +9 -0
- package/dist/types/types/schedules.d.ts +10 -10
- package/dist/types/types/skills.d.ts +43 -0
- package/dist/types/types/tools.d.ts +132 -0
- package/dist/types/types/traces.d.ts +49 -0
- package/dist/types/types.d.ts +31 -1
- package/package.json +1 -1
- package/dist/data-service-Bx6IFaSa.mjs.map +0 -1
- package/dist/data-service-CTX0tVO5.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as permissionEntrySchema, $a as eAnthropicEffortSchema, $i as specsConfigSchema, $n as ocrSchema, $o as tQueryParamsSchema, $r as registerPage, $s as MAX_PII_CUSTOM_REGEX_INSTRUCTIONS, $t as alternateName, Aa as ReasoningResponseKey, Ac as skillFilterFieldSchema, Ai as isAnthropicTextDocumentType, An as fileStrategiesSchema, Ao as isMythosClassModel, Ar as MAX_MCP_ICON_PATH_LENGTH, As as getTagByKey, At as MAX_SUBAGENT_RUN_CONFIGS, B as MutationKeys, Ba as anthropicSchema, Bi as resolveUseResponsesApi, Bn as isSpeechProviderConfigured, Bo as removeNullishValues, Br as WebSocketOptionsSchema, Bs as isCodeWorkspaceSelection, Bt as SafeSearchTypes, Ca as MYTHOS_CLASS_FAMILIES, Cc as hasActiveFiltersConfig, Ci as getDocumentFileExtension, Cn as defaultModels, Co as inputTokensIncludesCache, Cr as turnstileOptionsSchema, Cs as resolveCodePermissionDecision, Ct as KnownEndpoints, Da as ReasoningEffort, Dc as messageFilterFieldSchema, Di as imageTypeMapping, Dn as excludedKeys, Do as isImageVisionTool, Dr as vertexModelConfigSchema, Ds as feedbackRatingSchema, Dt as LocalStorageKeys, Ea as ReasoningContext, Ec as memoryFilterFieldSchema, Ei as imageMimeTypes, En as endpointSchema, Eo as isDocumentSupportedProvider, Er as vertexAISchema, Es as FEEDBACK_TAGS, Et as LANGFUSE_TRACE_USER_METADATA_FIELDS, F as request_default, Fa as Verbosity, Fc as extractEnvVariable, Fi as mbToBytes, Fn as imageGenTools, Fo as openAIBaseSchema, Fr as MCP_SERVER_TITLE_PATTERN, Fs as CODE_WORKSPACE_ID_PATTERN, Ft as SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, G as PrincipalType, Ga as coerceNumber, Gi as supportsFiles, Gn as memorySchema, Go as tConversationTagSchema, Gr as AuthorizationTypeEnum, Gs as CONVERSATION_STARTER_FILTER_FIELDS, Gt as SettingsViews, H as AccessRoleIds, Ha as assistantSchema, Hi as retrievalMimeTypesList, Hn as langfuseTraceConfigSchema, Ho as subagentThreadLineageSchema, Hr as isProcessMCPServerConfig, Hs as isCodeWorkspaceSelections, Ht as SearchCategories, I as getTokenHeader, Ia as agentsBaseSchema, Ic as extractVariableName, Ii as megabyte, In as initialModelsConfig, Io as openAISchema, Ir as MCP_USER_INPUT_FIELDS, Is as CODE_WORKSPACE_MAX_COUNT, It as SKILL_SYNC_MAX_DISCOVERY_DEPTH, J as accessRoleToPermBits, Ja as compactAssistantSchema, Ji as REFILL_INTERVAL_UNITS, Jn as modelConfigSchema, Jo as tMessageSchema, Jr as FileSources, Js as FILE_FILTER_FIELDS, Jt as Time, K as ResourceType, Ka as compactAgentsBaseSchema, Ki as textMimeTypes, Kn as messageFilterPiiSchema, Ko as tConvoUpdateSchema, Kr as TokenExchangeMethodEnum, Ks as CONVERSATION_TITLE_FILTER_FIELDS, Kt as SystemCategories, L as setAcceptLanguageHeader, La as agentsSchema, Lc as isSensitiveEnvVar, Li as mergeFileConfig, Ln as interfaceSchema, Lo as openAISettings, Lr as SSEOptionsSchema, Ls as CODE_WORKSPACE_OPERATIONS, Lt as SKILL_SYNC_MAX_INTERVAL_MINUTES, Ma as SkillsScope, Mc as unattributedAssistantContentSchema, Mi as isMessageFileUpload, Mn as getDefaultParamsEndpoint, Mo as isParamEndpoint, Mr as MCPServerUserInputSchema, Ms as toMinimalFeedback, Mt as RateLimitPrefix, Na as ThinkingDisplay, Nc as userSubmittedMessageFieldPathSchema, Ni as isPermissiveMimeConfig, Nn as getEndpointField, No as isUUID, Nr as MCPServersSchema, Ns as CODE_ENVIRONMENT_DECISION_VERSION, Nt as RerankerTypes, Oa as ReasoningMode, Oc as modelParameterFilterFieldSchema, Oi as inferMimeType, On as fileSourceSchema, Oo as isKnownProviderIdentifier, Or as visionModels, Os as feedbackSchema, Ot as MAX_SUBAGENT_DEPTH, Pa as ThinkingLevel, Pc as envVarRegex, Pi as isResponsesApiUpload, Pn as getSchemaDefaults, Po as mediaSupportedProviders, Pr as MCP_SERVER_TITLE_ERROR, Ps as CODE_ENVIRONMENT_MODES, Pt as RetentionMode, Q as permBitsToAccessLevel, Qa as documentSupportedProviders, Qi as resolveModelSpecEndpoint, Qn as normalizeServerName, Qo as tPresetSchema, Qr as loginPage, Qs as MAX_PII_CUSTOM_REGEX_CHARACTERS, Qt as allowedAddressesSchema, R as setTokenHeader, Ra as agentsSettings, Rc as normalizeEndpointName, Ri as mimeTypeAliases, Rn as isRemoteOidcUrlAllowed, Ro as openRouterSchema, Rr as StdioOptionsSchema, Rs as CODE_WORKSPACE_SELECTION_ERROR_REASONS, Rt as SKILL_SYNC_MIN_INTERVAL_MINUTES, Sa as ImageVisionTool, Sc as getPiiRegexProgramSize, Si as getConfiguredMimeAccept, Sn as defaultEndpoints, So as imageDetailValue, Sr as transactionsSchema, Ss as resolveCodeApprovalMode, St as InfiniteCollections, Ta as Providers, Tc as hasActivePiiPatterns, Ti as imageExtRegex, Tn as defaultSocialLogins, To as isAssistantsEndpoint, Tr as validateVisionModel, Ts as FEEDBACK_REASON_KEYS, Tt as LANGFUSE_TRACE_USER_ID_FIELDS, U as PermissionBits, Ua as authTypeSchema, Ui as setFileConfigRegexCompiler, Un as listConfiguredSpeechProviders, Uo as tBannerSchema, Ur as isProcessMCPServerField, Us as ACTION_METADATA_FILTER_FIELDS, Ut as SearchProviders, V as QueryKeys, Va as anthropicSettings, Vi as retrievalMimeTypes, Vn as langfuseConfigSchema, Vo as resolveAgentSkillsScope, Vr as hasProcessMCPServerConfig, Vs as isCodeWorkspaceSelectionErrorReason, Vt as ScraperProviders, W as PrincipalModel, Wa as cacheSubsetProviders, Wi as supportedMimeTypes, Wn as mcpRefreshDefaults, Wo as tConversationSchema, Wr as AuthTypeEnum, Ws as AGENT_INSTRUCTION_FILTER_FIELDS, Wt as SettingsTabValues, X as getResourcePermissionsResponseSchema, Xa as defaultAgentFormValues, Xi as materializeModelSpecEndpoints, Xn as normalizeMCPToolKey, Xo as tPluginAuthConfigSchema, Xr as apiBaseUrl, Xs as HITL_MESSAGE_FILTER_FIELDS, Xt as VisionModes, Y as effectivePermissionsResponseSchema, Ya as compactGoogleSchema, Yi as getRefillEligibilityDate, Yn as modularEndpoints, Yo as tModelSpecPresetSchema, Yr as checkOpenAIStorage, Ys as FILTER_PII_STARTER_PATTERNS, Yt as ViolationTypes, Z as hasPermissions, Za as defaultAssistantFormValues, Zi as modelSpecSubagentsSchema, Zn as normalizeSearxngEngines, Zo as tPluginSchema, Zr as buildLoginRedirectUrl, Zs as MAX_PII_CUSTOM_PATTERNS_TOTAL, Zt as agentsEndpointSchema, _a as AuthType, _c as filterPiiActionSchema, _i as excelFileTypes, _n as codeEnvironmentUserSettingsSchema, _o as googleBaseSchema, _r as toolApprovalHookConfigSchema, _s as resolveAllowedStatefulCodeEnvironments, _t as EndpointURLs, a as data_service_exports, aa as MAX_SUBAGENTS_CEILING, ac as MESSAGE_FILTER_FIELDS, ai as bedrockDocumentFormats, an as azureGroupSchema, ao as eReasoningParameterFormatSchema, ar as retainRecentConfigSchema, as as MessageContentTypes, at as AgentCapabilities, ba as EModelEndpoint, bc as filterPiiStarterPatternSchema, bi as fileConfigSchema, bn as defaultAgentCapabilities, bo as googleSettings, br as traceViewerDefaults, bs as CodeApprovalModeError, bt as ForkOptions, ca as ComponentTypes, cc as SKILL_FILTER_FIELDS, ci as codeInterpreterMimeTypesList, cn as bedrockEndpointSchema, co as eThinkingDisplaySchema, cr as skillSyncGitHubSourceSchema, cs as Tools, ct as BASE_PRINCIPAL_CONFIG_SECTIONS, da as clampSettingRange, dc as actionMetadataFilterFieldSchema, di as defaultLLMDeliveryPathSchema, dn as buildServerNameAliases, do as endpointSettings, dr as splitToolCallName, ds as agentGitIdentitySchema, dt as CacheKeys, ea as tModelSpecSchema, ec as MAX_PII_PATTERNS_PER_SOURCE, ei as sharedFileDownload, en as anthropicEndpointSchema, eo as eImageDetailSchema, er as paramDefinitionSchema, es as tSharedLinkSchema, et as principalSchema, fa as generateDynamicSchema, fc as agentInstructionFilterFieldSchema, fi as defaultOCRMimeTypes, fn as checkpointerSchema, fo as extendedModelEndpointSchema, fr as stripServerNamePrefix, fs as defaultOrderQuery, ft as Capabilities, ga as AnthropicEffort, gc as fileFilterFieldSchema, gi as endpointFileConfigSchema, gn as codeEnvironmentUserConfigSchema, go as getSettingsKeys, gr as supportsBalanceCheck, gs as STATEFUL_CODE_ENVIRONMENTS, gt as EImageOutputType, ha as validateSettingDefinitions, hc as feedbackFilterFieldSchema, hi as documentParserMimeTypes, hn as codeEnvironmentPermissionDecisionSchema, ho as getModelKey, hr as summarizationTriggerSchema, hs as isActionTool, ht as DEFAULT_MEMORY_MAX_INPUT_TOKENS, ia as MAX_SUBAGENTS, ic as MEMORY_FILTER_FIELDS, ii as bedrockDocumentExtensions, in as azureGroupConfigsSchema, io as eReasoningModeSchema, ir as resolveTraceViewerConfig, is as FilePurpose, it as AUTH_USER_DOC_BY_ID_PREFIX, ja as ReasoningSummary, jc as toolArgumentFilterFieldSchema, ji as isBedrockDocumentType, jn as getConfigDefaults, jo as isOpenAILikeProvider, jr as MCPOptionsSchema, js as getTagsForRating, jt as OCRStrategy, ka as ReasoningParameterFormat, kc as promptFilterFieldSchema, ki as isAnthropicDocumentType, kn as fileStorageSchema, ko as isMediaSupportedProvider, kr as webSearchSchema, ks as feedbackTagKeySchema, kt as MAX_SUBAGENT_GRAPH_NODES, la as OptionTypes, lc as STORED_MESSAGE_FILTER_FIELDS, li as codeTypeMapping, ln as bedrockGuardrailConfigSchema, lo as eThinkingLevelSchema, lr as specialVariables, ls as actionDelimiter, lt as CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS, ma as generateOpenAISchema, mc as conversationTitleFilterFieldSchema, mi as defaultTextMimeTypes, mn as cloudfrontConfigSchema, mo as getGoogleThinkingBudgetMax, mr as summarizationConfigSchema, ms as hostImageNamePrefix, mt as Constants, na as MAX_CHAT_PROJECT_NAME_LENGTH, nc as MAX_PII_PATTERN_LABEL_LENGTH, ni as applicationMimeTypes, nn as azureBaseSchema, no as eReasoningContextSchema, nr as rateLimitSchema, ns as AssistantStreamEvents, nt as updateResourcePermissionsRequestSchema, oa as getMaxSubagents, oc as MODEL_PARAMETER_FILTER_FIELDS, oi as bedrockDocumentMimeTypes, on as balanceSchema, oo as eReasoningResponseKeySchema, or as setMessageFilterRegexValidator, os as RunStatus, ot as AuthKeys, pa as generateGoogleSchema, pc as conversationStarterFilterFieldSchema, pi as defaultSTTMimeTypes, pn as checkpointerTypeSchema, po as getGoogleThinkingBudgetBounds, pr as stripServerNamePrefixes, ps as hostImageIdSuffix, pt as CohereConstants, q as accessRoleSchema, qa as compactAgentsSchema, qi as videoMimeTypes, qn as messageFilterSchema, qo as tExampleSchema, qr as FileContext, qs as FEEDBACK_FILTER_FIELDS, qt as TTSProviders, ra as MAX_GRAPH_SUBAGENT_MEMBERS, rc as MAX_PII_PATTERN_LENGTH, ri as audioMimeTypes, rn as azureEndpointSchema, ro as eReasoningEffortSchema, rr as resolveEndpointType, rs as EToolResources, rt as updateResourcePermissionsResponseSchema, sa as setMaxSubagents, sc as PROMPT_FILTER_FIELDS, si as codeInterpreterMimeTypes, sn as baseEndpointSchema, so as eReasoningSummarySchema, sr as skillSyncConfigSchema, ss as StepStatus, st as BASE_ONLY_CONFIG_SECTIONS, ta as MAX_CHAT_PROJECT_DESCRIPTION_LENGTH, tc as MAX_PII_PATTERN_ID_LENGTH, ti as DefaultLLMDeliveryPath, tn as assistantEndpointSchema, to as eModelEndpointSchema, tr as providerEndpointMap, ts as AnnotationTypes, tt as resourcePermissionsResponseSchema, ua as SettingTypes, uc as TOOL_ARGUMENT_FILTER_FIELDS, ui as convertStringsToRegex, un as bedrockModels, uo as eVerbositySchema, ur as splitMCPToolKey, us as actionDomainSeparator, ut as CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS, va as BedrockProviders, vc as filterPiiCustomPatternSchema, vi as excelMimeTypes, vn as configSchema, vo as googleGenConfigSchema, vr as toolApprovalModeSchema, vs as resolveStatefulCodeEnvironment, vt as ErrorTypes, wa as MemoryScope, wc as hasActivePiiFields, wi as getEndpointFileConfig, wn as defaultRetrievalModels, wo as isAgentsEndpoint, wr as turnstileSchema, ws as FEEDBACK_RATINGS, wt as LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS, xa as ImageDetail, xc as filtersConfigSchema, xi as fullMimeTypesList, xn as defaultAssistantsVersion, xo as imageDetailNumeric, xr as traceViewerLimits, xs as getAllowedCodeApprovalModes, xt as ImageDetailCost, ya as BedrockReasoningConfig, yc as filterPiiRegexSchema, yi as fileConfig, yn as contextPruningSchema, yo as googleSchema, yr as toolApprovalPolicySchema, ys as CODE_APPROVAL_MODES, yt as FetchTokenConfig, z as DynamicQueryKeys, za as anthropicBaseSchema, zi as resolveSandboxFilename, zn as isSecureCodeEnvironmentControlURL, zo as paramEndpoints, zr as StreamableHTTPOptionsSchema, zs as isCodeEnvironmentMode, zt as STTProviders } from "./data-service-Bx6IFaSa.mjs";
|
|
1
|
+
import { $ as permissionEntrySchema, $a as Providers, $c as envVarRegex, $i as isResponsesApiUpload, $n as isSpeechProviderConfigured, $o as isAssistantsEndpoint, $r as SSEOptionsSchema, $s as CODE_WORKSPACE_MAX_COUNT, $t as SearchCategories, Aa as validateSettingDefinitions, Ac as actionMetadataFilterFieldSchema, Ai as defaultOCRMimeTypes, An as codeEnvironmentUserSettingsSchema, Ao as eReasoningContextSchema, Ar as summarizationTriggerSchema, As as Tools, At as FetchTokenConfig, B as MutationKeys, Ba as DEFAULT_BALANCE_RESERVATION_TTL_MS, Bc as filtersConfigSchema, Bi as getConfiguredMimeAccept, Bn as excludedKeys, Bo as extendedModelEndpointSchema, Br as validateVisionModel, Bs as FEEDBACK_REASON_KEYS, Bt as MAX_SUBAGENT_GRAPH_NODES, Ca as ComponentTypes, Cc as MEMORY_FILTER_FIELDS, Ci as bedrockDocumentFormats, Cn as bedrockModels, Co as compactGoogleSchema, Cr as skillSyncGitHubSourceSchema, Cs as tModelSpecPresetSchema, Ct as DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS, Da as generateDynamicSchema, Dc as SKILL_FILTER_FIELDS, Di as codeTypeMapping, Dn as cloudfrontConfigSchema, Do as eAnthropicEffortSchema, Dr as stripServerNamePrefix, Ds as tQueryParamsSchema, Dt as EImageOutputType, Ea as clampSettingRange, Ec as PROMPT_FILTER_FIELDS, Ei as codeInterpreterMimeTypesList, En as checkpointerTypeSchema, Eo as documentSupportedProviders, Er as splitToolCallName, Es as tPresetSchema, Et as DEFAULT_OAUTH_STATE_TTL_MS, F as request_default, Fa as MAX_GRAPH_SUBAGENT_MEMBERS, Fc as fileFilterFieldSchema, Fi as excelFileTypes, Fn as defaultEndpoints, Fo as eReasoningSummarySchema, Fr as traceViewerDefaults, Fs as CodeApprovalModeError, Ft as LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS, G as PrincipalType, Ga as AuthType, Gc as memoryFilterFieldSchema, Gi as imageTypeMapping, Gn as getDefaultParamsEndpoint, Go as googleBaseSchema, Gr as MAX_MCP_ICON_PATH_LENGTH, Gs as getTagByKey, Gt as RetentionMode, H as AccessRoleIds, Ha as REFILL_INTERVAL_UNITS, Hc as hasActiveFiltersConfig, Hi as getEndpointFileConfig, Hn as fileStorageSchema, Ho as getGoogleThinkingBudgetMax, Hr as vertexModelConfigSchema, Hs as feedbackRatingSchema, Ht as OCRStrategy, I as getTokenHeader, Ia as MAX_SUBAGENTS, Ic as filterPiiActionSchema, Ii as excelMimeTypes, In as defaultModels, Io as eThinkingDisplaySchema, Ir as traceViewerLimits, Is as getAllowedCodeApprovalModes, It as LANGFUSE_TRACE_USER_ID_FIELDS, J as accessRoleToPermBits, Ja as EModelEndpoint, Jc as promptFilterFieldSchema, Ji as isAnthropicTextDocumentType, Jn as imageGenTools, Jo as googleSettings, Jr as MCPServerUserInputSchema, Js as CODE_ENVIRONMENT_DECISION_VERSION, Jt as SKILL_SYNC_MAX_INTERVAL_MINUTES, K as ResourceType, Ka as BedrockProviders, Kc as messageFilterFieldSchema, Ki as inferMimeType, Kn as getEndpointField, Ko as googleGenConfigSchema, Kr as MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS, Ks as getTagsForRating, Kt as SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, L as setAcceptLanguageHeader, La as MAX_SUBAGENTS_CEILING, Lc as filterPiiCustomPatternSchema, Li as fileConfig, Ln as defaultRetrievalModels, Lo as eThinkingLevelSchema, Lr as transactionsSchema, Ls as resolveCodeApprovalMode, Lt as LANGFUSE_TRACE_USER_METADATA_FIELDS, Ma as DEFAULT_RETAINED_ANSWER_TOKENS, Mc as conversationStarterFilterFieldSchema, Mi as defaultTextMimeTypes, Mn as contextPruningSchema, Mo as eReasoningModeSchema, Mr as toolApprovalHookConfigSchema, Ms as actionDomainSeparator, Mt as ImageDetailCost, Na as MAX_CHAT_PROJECT_DESCRIPTION_LENGTH, Nc as conversationTitleFilterFieldSchema, Ni as documentParserMimeTypes, Nn as defaultAgentCapabilities, No as eReasoningParameterFormatSchema, Nr as toolApprovalModeSchema, Ns as isActionTool, Nt as InfiniteCollections, Oa as generateGoogleSchema, Oc as STORED_MESSAGE_FILTER_FIELDS, Oi as convertStringsToRegex, On as codeEnvironmentPermissionDecisionSchema, Oo as eImageDetailSchema, Or as stripServerNamePrefixes, Os as tSharedLinkSchema, Ot as EndpointURLs, Pa as MAX_CHAT_PROJECT_NAME_LENGTH, Pc as feedbackFilterFieldSchema, Pi as endpointFileConfigSchema, Pn as defaultAssistantsVersion, Po as eReasoningResponseKeySchema, Pr as toolApprovalPolicySchema, Ps as CODE_APPROVAL_MODES, Pt as KnownEndpoints, Q as permBitsToAccessLevel, Qa as MemoryScope, Qc as userSubmittedMessageFieldPathSchema, Qi as isPermissiveMimeConfig, Qn as isSecureCodeEnvironmentControlURL, Qo as isAgentsEndpoint, Qr as MCP_USER_INPUT_FIELDS, Qs as CODE_WORKSPACE_INSTANCE_TYPES, Qt as ScraperProviders, R as setTokenHeader, Ra as getMaxSubagents, Rc as filterPiiRegexSchema, Ri as fileConfigSchema, Rn as defaultSocialLogins, Ro as eVerbositySchema, Rr as turnstileOptionsSchema, Rs as resolveCodePermissionDecision, Rt as LocalStorageKeys, Sa as resolveStatefulCodeEnvironment, Sc as MAX_PII_PATTERN_LENGTH, Si as bedrockDocumentExtensions, Sn as bedrockGuardrailConfigSchema, So as compactAssistantSchema, Sr as skillSyncConfigSchema, Ss as tMessageSchema, St as DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS, Ta as SettingTypes, Tc as MODEL_PARAMETER_FILTER_FIELDS, Ti as codeInterpreterMimeTypes, Tn as checkpointerSchema, To as defaultAssistantFormValues, Tr as splitMCPToolKey, Ts as tPluginSchema, Tt as DEFAULT_MEMORY_MAX_INPUT_TOKENS, U as PermissionBits, Ua as getRefillEligibilityDate, Uc as hasActivePiiFields, Ui as imageExtRegex, Un as fileStrategiesSchema, Uo as getModelKey, Ur as visionModels, Us as feedbackSchema, Ut as RateLimitPrefix, V as QueryKeys, Va as MIN_BALANCE_RESERVATION_TTL_MS, Vc as getPiiRegexProgramSize, Vi as getDocumentFileExtension, Vn as fileSourceSchema, Vo as getGoogleThinkingBudgetBounds, Vr as vertexAISchema, Vs as FEEDBACK_TAGS, Vt as MAX_SUBAGENT_RUN_CONFIGS, W as PrincipalModel, Wa as AnthropicEffort, Wc as hasActivePiiPatterns, Wi as imageMimeTypes, Wn as getConfigDefaults, Wo as getSettingsKeys, Wr as webSearchSchema, Ws as feedbackTagKeySchema, Wt as RerankerTypes, X as getResourcePermissionsResponseSchema, Xa as ImageVisionTool, Xc as toolArgumentFilterFieldSchema, Xi as isExplicitMimeConfig, Xn as interfaceSchema, Xo as imageDetailValue, Xr as MCP_SERVER_TITLE_ERROR, Xs as CODE_ENVIRONMENT_MOVE_VERSION, Xt as STTProviders, Y as effectivePermissionsResponseSchema, Ya as ImageDetail, Yc as skillFilterFieldSchema, Yi as isBedrockDocumentType, Yn as initialModelsConfig, Yo as imageDetailNumeric, Yr as MCPServersSchema, Ys as CODE_ENVIRONMENT_MODES, Yt as SKILL_SYNC_MIN_INTERVAL_MINUTES, Z as hasPermissions, Za as MYTHOS_CLASS_FAMILIES, Zc as unattributedAssistantContentSchema, Zi as isMessageFileUpload, Zn as isRemoteOidcUrlAllowed, Zo as inputTokensIncludesCache, Zr as MCP_SERVER_TITLE_PATTERN, Zs as CODE_WORKSPACE_ID_PATTERN, Zt as SafeSearchTypes, _a as resolveModelSpecEndpoint, _c as MAX_PII_CUSTOM_REGEX_CHARACTERS, _i as sharedFileDownload, _n as azureGroupConfigsSchema, _o as authTypeSchema, _r as rateLimitSchema, _s as tBannerSchema, _t as CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS, a as data_service_exports, aa as resolveEffectiveUseResponsesApi, ac as isCodeWorkspaceSelectionErrorReason, ai as isProcessMCPServerField, an as Time, ao as ReasoningSummary, ar as messageFilterPiiSchema, as as isOpenAILikeProvider, at as FilePurpose, ba as STATEFUL_CODE_ENVIRONMENTS, bc as MAX_PII_PATTERN_ID_LENGTH, bi as applicationMimeTypes, bn as baseEndpointSchema, bo as compactAgentsBaseSchema, br as retainRecentConfigSchema, bs as tConvoUpdateSchema, bt as CohereConstants, ca as retrievalMimeTypes, cc as ACTION_METADATA_FILTER_FIELDS, ci as TokenExchangeMethodEnum, cn as agentsEndpointSchema, co as ThinkingLevel, cr as modularEndpoints, cs as mediaSupportedProviders, ct as AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT, da as supportedMimeTypes, dc as CONVERSATION_TITLE_FILTER_FIELDS, di as FileSources, dn as anthropicEndpointSchema, do as agentsSchema, dr as normalizeServerName, ds as openAISettings, dt as AgentCapabilities, ea as mbToBytes, ec as CODE_WORKSPACE_OPERATIONS, ei as StdioOptionsSchema, el as extractEnvVariable, en as SearchProviders, eo as ReasoningContext, er as langfuseConfigSchema, es as isDocumentSupportedProvider, et as principalSchema, fa as supportsFiles, fc as FEEDBACK_FILTER_FIELDS, fi as checkOpenAIStorage, fn as askUserQuestionConfigSchema, fo as agentsSettings, fr as ocrSchema, fs as openRouterSchema, ft as AuthKeys, ga as modelSpecSubagentsSchema, gc as MAX_PII_CUSTOM_PATTERNS_TOTAL, gi as registerPage, gn as azureEndpointSchema, go as assistantSchema, gr as providerEndpointMap, gs as subagentThreadLineageSchema, gt as CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS, ha as materializeModelSpecEndpoints, hc as HITL_MESSAGE_FILTER_FIELDS, hi as loginPage, hn as azureBaseSchema, ho as anthropicSettings, hr as permissionWriteAttemptsSchema, hs as resolveAgentSkillsScope, ht as CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS, ia as prefersResponsesApiByModel, ic as isCodeWorkspaceSelection, ii as isProcessMCPServerConfig, in as TTSProviders, io as ReasoningResponseKey, ir as memorySchema, is as isMythosClassModel, it as AssistantStreamEvents, ja as DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS, jc as agentInstructionFilterFieldSchema, ji as defaultSTTMimeTypes, jn as configSchema, jo as eReasoningEffortSchema, jr as supportsBalanceCheck, js as actionDelimiter, jt as ForkOptions, ka as generateOpenAISchema, kc as TOOL_ARGUMENT_FILTER_FIELDS, ki as defaultLLMDeliveryPathSchema, kn as codeEnvironmentUserConfigSchema, ko as eModelEndpointSchema, kr as summarizationConfigSchema, ks as EToolResources, kt as ErrorTypes, la as retrievalMimeTypesList, lc as AGENT_INSTRUCTION_FILTER_FIELDS, li as agentGitIdentitySchema, ln as allowedAddressesSchema, lo as Verbosity, lr as normalizeMCPToolKey, ls as openAIBaseSchema, lt as AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX, ma as videoMimeTypes, mc as FILTER_PII_STARTER_PATTERNS, mi as buildLoginRedirectUrl, mn as assistantEndpointSchema, mo as anthropicSchema, mr as paramDefinitionSchema, ms as removeNullishValues, mt as BASE_PRINCIPAL_CONFIG_SECTIONS, na as mergeFileConfig, nc as isCodeEnvironmentMode, ni as WebSocketOptionsSchema, nl as isSensitiveEnvVar, nn as SettingsViews, no as ReasoningMode, nr as listConfiguredSpeechProviders, ns as isKnownProviderIdentifier, nt as updateResourcePermissionsRequestSchema, oa as resolveSandboxFilename, oc as isCodeWorkspaceSelections, oi as AuthTypeEnum, on as ViolationTypes, oo as SkillsScope, or as messageFilterSchema, os as isParamEndpoint, ot as RunStatus, pa as textMimeTypes, pc as FILE_FILTER_FIELDS, pi as apiBaseUrl, pn as askUserQuestionRetainedAnswersSchema, po as anthropicBaseSchema, pr as openIdDiscoverySchema, ps as paramEndpoints, pt as BASE_ONLY_CONFIG_SECTIONS, q as accessRoleSchema, qa as BedrockReasoningConfig, qc as modelParameterFilterFieldSchema, qi as isAnthropicDocumentType, qn as getSchemaDefaults, qo as googleSchema, qr as MCPOptionsSchema, qs as toMinimalFeedback, qt as SKILL_SYNC_MAX_DISCOVERY_DEPTH, ra as mimeTypeAliases, rc as isCodeWorkspaceEnvironment, ri as hasProcessMCPServerConfig, rl as normalizeEndpointName, rn as SystemCategories, ro as ReasoningParameterFormat, rr as mcpRefreshDefaults, rs as isMediaSupportedProvider, rt as updateResourcePermissionsResponseSchema, sa as resolveUseResponsesApi, sc as isRepositoryInstructionDescriptor, si as AuthorizationTypeEnum, sn as VisionModes, so as ThinkingDisplay, sr as modelConfigSchema, ss as isUUID, st as defaultOrderQuery, ta as megabyte, tc as CODE_WORKSPACE_SELECTION_ERROR_REASONS, ti as StreamableHTTPOptionsSchema, tl as extractVariableName, tn as SettingsTabValues, to as ReasoningEffort, tr as langfuseTraceConfigSchema, ts as isImageVisionTool, tt as resourcePermissionsResponseSchema, ua as setFileConfigRegexCompiler, uc as CONVERSATION_STARTER_FILTER_FIELDS, ui as FileContext, un as alternateName, uo as agentsBaseSchema, ur as normalizeSearxngEngines, us as openAISchema, ut as AUTH_USER_DOC_BY_ID_PREFIX, va as specsConfigSchema, vc as MAX_PII_CUSTOM_REGEX_INSTRUCTIONS, vi as DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY, vn as azureGroupSchema, vo as cacheSubsetProviders, vr as resolveEndpointType, vs as tConversationSchema, vt as CacheKeys, wa as OptionTypes, wc as MESSAGE_FILTER_FIELDS, wi as bedrockDocumentMimeTypes, wn as buildServerNameAliases, wo as defaultAgentFormValues, wr as specialVariables, ws as tPluginAuthConfigSchema, wt as DEFAULT_MAX_PROVIDER_ERROR_CHARS, xa as resolveAllowedStatefulCodeEnvironments, xc as MAX_PII_PATTERN_LABEL_LENGTH, xi as audioMimeTypes, xn as bedrockEndpointSchema, xo as compactAgentsSchema, xr as setMessageFilterRegexValidator, xs as tExampleSchema, xt as Constants, ya as tModelSpecSchema, yc as MAX_PII_PATTERNS_PER_SOURCE, yi as DefaultLLMDeliveryPath, yn as balanceSchema, yo as coerceNumber, yr as resolveTraceViewerConfig, ys as tConversationTagSchema, yt as Capabilities, z as DynamicQueryKeys, za as setMaxSubagents, zc as filterPiiStarterPatternSchema, zi as fullMimeTypesList, zn as endpointSchema, zo as endpointSettings, zr as turnstileSchema, zs as FEEDBACK_RATINGS, zt as MAX_SUBAGENT_DEPTH } from "./data-service-B-WUVvTH.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import utc from "dayjs/plugin/utc.js";
|
|
@@ -9,13 +9,18 @@ import { URL } from "url";
|
|
|
9
9
|
import crypto from "crypto";
|
|
10
10
|
import { load } from "js-yaml";
|
|
11
11
|
//#region src/bedrock.ts
|
|
12
|
+
const THINKING_BINDING_BETA = "thinking-binding-controls-2026-08-01";
|
|
12
13
|
const DEFAULT_THINKING_BUDGET = 2e3;
|
|
13
14
|
const BEDROCK_CLAUDE_SONNET_4_6_MAX_OUTPUT = 64e3;
|
|
14
15
|
const BEDROCK_OUTPUT_128K_BETA = "output-128k-2025-02-19";
|
|
15
16
|
const BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA = "fine-grained-tool-streaming-2025-05-14";
|
|
16
17
|
/** Betas LibreChat injects itself, safe to strip from persisted AMRF when a
|
|
17
18
|
* model no longer supports them; anything else in `anthropic_beta` is a user opt-in. */
|
|
18
|
-
const GENERATED_BEDROCK_BETAS = new Set([
|
|
19
|
+
const GENERATED_BEDROCK_BETAS = new Set([
|
|
20
|
+
BEDROCK_OUTPUT_128K_BETA,
|
|
21
|
+
BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA,
|
|
22
|
+
THINKING_BINDING_BETA
|
|
23
|
+
]);
|
|
19
24
|
const bedrockReasoningConfigValues = new Set(Object.values(BedrockReasoningConfig));
|
|
20
25
|
/**
|
|
21
26
|
* Resolves the final `thinking.display` value for an adaptive-thinking request.
|
|
@@ -59,6 +64,13 @@ function parseOpusVersion(model) {
|
|
|
59
64
|
};
|
|
60
65
|
return null;
|
|
61
66
|
}
|
|
67
|
+
/** Opus 5.5 has an always-on, conversation-bound thinking contract unlike Opus 5. */
|
|
68
|
+
function isOpus55Model(model) {
|
|
69
|
+
const opus = parseOpusVersion(model);
|
|
70
|
+
return opus?.major === 5 && opus.minor === 5;
|
|
71
|
+
}
|
|
72
|
+
/** LibreChat permits edits and compaction of earlier turns; drop only invalidated blocks. */
|
|
73
|
+
const OPUS_55_BLOCK_BINDING = { prefix_mismatch_behavior: "drop_block" };
|
|
62
74
|
/** Extracts sonnet major/minor version from both naming formats.
|
|
63
75
|
* Uses bounded minor capture to avoid matching date suffixes (e.g., -20250514). */
|
|
64
76
|
function parseSonnetVersion(model) {
|
|
@@ -127,6 +139,7 @@ function omitsSamplingParameters(model) {
|
|
|
127
139
|
* See https://platform.claude.com/docs/en/about-claude/models/migration-guide#migrating-to-claude-sonnet-5
|
|
128
140
|
*/
|
|
129
141
|
function requiresExplicitThinkingDisabled(model) {
|
|
142
|
+
if (isOpus55Model(model)) return false;
|
|
130
143
|
const sonnet = parseSonnetVersion(model);
|
|
131
144
|
if (sonnet != null && sonnet.major >= 5) return true;
|
|
132
145
|
const opus = parseOpusVersion(model);
|
|
@@ -144,6 +157,7 @@ const EFFORTS_REJECTED_WHEN_THINKING_DISABLED = new Set(["xhigh", "max"]);
|
|
|
144
157
|
* off, so the cap is Opus 5+ only.
|
|
145
158
|
*/
|
|
146
159
|
function capsEffortWhenThinkingDisabled(model) {
|
|
160
|
+
if (isOpus55Model(model)) return false;
|
|
147
161
|
const opus = parseOpusVersion(model);
|
|
148
162
|
return opus != null && opus.major >= 5;
|
|
149
163
|
}
|
|
@@ -216,6 +230,7 @@ function isBedrockClaudeModel(model) {
|
|
|
216
230
|
* @returns Array of beta header strings, or empty array if not applicable
|
|
217
231
|
*/
|
|
218
232
|
function getBedrockAnthropicBetaHeaders(model) {
|
|
233
|
+
if (isOpus55Model(model)) return [THINKING_BINDING_BETA];
|
|
219
234
|
const betaHeaders = [];
|
|
220
235
|
/** Mythos-class (Fable/Mythos) is intentionally not matched: these betas are built-in/no-op for the
|
|
221
236
|
* 4.7+ generation (Fable has native 128K output), so omitting them on Bedrock is lossless. */
|
|
@@ -363,7 +378,7 @@ const bedrockInputParser = tConversationSchema.pick({
|
|
|
363
378
|
/** Persisted AMRF is spread into the final request, so clearing only
|
|
364
379
|
* `additionalFields` leaves a stale value from a prior selection. */
|
|
365
380
|
const persistedAmrf = typedData.additionalModelRequestFields;
|
|
366
|
-
const thinkingDisabled = additionalFields.thinking === false;
|
|
381
|
+
const thinkingDisabled = additionalFields.thinking === false && !isOpus55Model(typedData.model);
|
|
367
382
|
const effort = additionalFields.effort;
|
|
368
383
|
if (typeof effort === "string" && effort !== "") additionalFields.output_config = { effort };
|
|
369
384
|
else if (effort !== void 0 && persistedAmrf)
|
|
@@ -379,7 +394,7 @@ const bedrockInputParser = tConversationSchema.pick({
|
|
|
379
394
|
* `effort`, so the branch above leaves it untouched).
|
|
380
395
|
*/
|
|
381
396
|
if (thinkingDisabled) [additionalFields, persistedAmrf].forEach((target) => clampOutputConfigEffort(typedData.model, target?.output_config));
|
|
382
|
-
if (
|
|
397
|
+
if (thinkingDisabled) {
|
|
383
398
|
delete additionalFields.thinkingBudget;
|
|
384
399
|
delete additionalFields.thinkingDisplay;
|
|
385
400
|
if (requiresExplicitThinkingDisabled(typedData.model)) additionalFields.thinking = { type: "disabled" };
|
|
@@ -401,6 +416,7 @@ const bedrockInputParser = tConversationSchema.pick({
|
|
|
401
416
|
const topLevelDisplay = additionalFields.thinkingDisplay;
|
|
402
417
|
const persistedDisplay = extractPersistedDisplay(typedData.additionalModelRequestFields);
|
|
403
418
|
const thinkingConfig = { type: "adaptive" };
|
|
419
|
+
if (isOpus55Model(typedData.model)) thinkingConfig.block_binding = { ...OPUS_55_BLOCK_BINDING };
|
|
404
420
|
const display = resolveThinkingDisplay(typedData.model, topLevelDisplay ?? persistedDisplay);
|
|
405
421
|
if (display) thinkingConfig.display = display;
|
|
406
422
|
additionalFields.thinking = thinkingConfig;
|
|
@@ -1068,6 +1084,45 @@ function replaceSpecialVars({ text, user, now: inputNow, timezone }) {
|
|
|
1068
1084
|
function getEphemeralSender({ modelLabel, specLabel, modelDisplayLabel }) {
|
|
1069
1085
|
return modelLabel ?? specLabel ?? modelDisplayLabel ?? "";
|
|
1070
1086
|
}
|
|
1087
|
+
/** Built-in endpoints; anything else in `endpoint` is a custom endpoint's own name. */
|
|
1088
|
+
const builtInEndpoints = new Set(Object.values(EModelEndpoint));
|
|
1089
|
+
/**
|
|
1090
|
+
* Whether a persisted `sender` is a label someone configured rather than the
|
|
1091
|
+
* model-derived name `getResponseSender` produces.
|
|
1092
|
+
*
|
|
1093
|
+
* The sender is the one thing that records which it was: `resolveSender` writes an
|
|
1094
|
+
* agent's name, then the `getEphemeralSender` chain (`modelLabel` → a model spec's
|
|
1095
|
+
* `label` → an endpoint's `modelDisplayLabel`), and falls back to `getResponseSender`
|
|
1096
|
+
* only when none of those is set. Asking the message rather than the conversation
|
|
1097
|
+
* settles three things a settings lookup cannot: labels that live in config a caller
|
|
1098
|
+
* may not hold, labels an endpoint ignores (Anthropic keeps reading `Claude` whatever
|
|
1099
|
+
* `chatGptLabel` says, and matches here), and labels changed since the message was
|
|
1100
|
+
* written — its header still shows the sender it was written under.
|
|
1101
|
+
*
|
|
1102
|
+
* Equality is the test, so the only way to be wrong is a stored name that no longer
|
|
1103
|
+
* matches what the current heuristics produce, which withholds a model rather than
|
|
1104
|
+
* revealing one.
|
|
1105
|
+
*/
|
|
1106
|
+
const isConfiguredSender = ({ sender, endpoint, endpointType, model, isCreatedByUser }) => {
|
|
1107
|
+
/** A user turn is headed by the person who wrote it, so it has no model to withhold
|
|
1108
|
+
* and its `User` sender would never match a derived name. */
|
|
1109
|
+
if (isCreatedByUser === true) return false;
|
|
1110
|
+
/** Agents and assistants are named by whoever authored them: the header shows that
|
|
1111
|
+
* name whether or not the response stored a sender, and `getResponseSender` has no
|
|
1112
|
+
* branch to derive one. */
|
|
1113
|
+
if (isAgentsEndpoint(endpoint) || isAssistantsEndpoint(endpoint)) return true;
|
|
1114
|
+
if (sender == null || sender === "") return false;
|
|
1115
|
+
const derived = getResponseSender({
|
|
1116
|
+
endpoint,
|
|
1117
|
+
endpointType: endpointType ?? (endpoint != null && !builtInEndpoints.has(endpoint) ? "custom" : void 0),
|
|
1118
|
+
model
|
|
1119
|
+
});
|
|
1120
|
+
/** An endpoint this cannot name — an older message stored without one, say — says
|
|
1121
|
+
* nothing either way, and reading that silence as "configured" would withhold the
|
|
1122
|
+
* model from every unlabelled row it reached. */
|
|
1123
|
+
if (derived === "") return false;
|
|
1124
|
+
return sender !== derived;
|
|
1125
|
+
};
|
|
1071
1126
|
/**
|
|
1072
1127
|
* Encodes an ephemeral agent ID from endpoint, model, optional sender, and optional index.
|
|
1073
1128
|
* Uses __ to replace : (reserved in graph node names) and ___ to separate sender.
|
|
@@ -1360,6 +1415,20 @@ function mapGroupToAzureConfig({ groupName, groupMap }) {
|
|
|
1360
1415
|
return result;
|
|
1361
1416
|
}
|
|
1362
1417
|
//#endregion
|
|
1418
|
+
//#region src/footer.ts
|
|
1419
|
+
/**
|
|
1420
|
+
* Whether a deployment configured footer content of its own — a custom footer,
|
|
1421
|
+
* a privacy policy or terms of service.
|
|
1422
|
+
*
|
|
1423
|
+
* The footer bar is absolutely positioned in a zero-height wrapper, so the
|
|
1424
|
+
* composer above it is what reserves its band: this answer decides both the
|
|
1425
|
+
* bar and the clearance. The client and the server share it because the two
|
|
1426
|
+
* answering differently is exactly the layout correction it exists to remove.
|
|
1427
|
+
*/
|
|
1428
|
+
function hasConfiguredFooter(source) {
|
|
1429
|
+
return typeof source?.customFooter === "string" || source?.interface?.privacyPolicy?.externalUrl != null || source?.interface?.termsOfService?.externalUrl != null;
|
|
1430
|
+
}
|
|
1431
|
+
//#endregion
|
|
1363
1432
|
//#region src/langchain.ts
|
|
1364
1433
|
/**
|
|
1365
1434
|
* LangChain classifies a provider failure by mutating the error: it stamps `lc_error_code` and
|
|
@@ -1450,12 +1519,83 @@ function parseLangChainErrorCode(message) {
|
|
|
1450
1519
|
}
|
|
1451
1520
|
}
|
|
1452
1521
|
//#endregion
|
|
1522
|
+
//#region src/codeEnvRef.ts
|
|
1523
|
+
/**
|
|
1524
|
+
* Closed set of resource kinds for sandbox file caching. Defined as a
|
|
1525
|
+
* `as const` tuple so the runtime list and the TypeScript union can't
|
|
1526
|
+
* drift on future additions — adding a new kind to the tuple updates
|
|
1527
|
+
* both at once.
|
|
1528
|
+
*
|
|
1529
|
+
* - `skill`: shared per skill identity. Cross-user-within-tenant
|
|
1530
|
+
* sharing. Code API sessionKey omits the user dimension.
|
|
1531
|
+
* `version` is required (the skill's monotonic counter scopes the
|
|
1532
|
+
* cache per revision so any edit invalidates the prior cache
|
|
1533
|
+
* entry naturally).
|
|
1534
|
+
* - `agent`: shared per agent identity. Same sharing semantic as
|
|
1535
|
+
* skills (agents are addressable resources accessible to a
|
|
1536
|
+
* permission-defined audience).
|
|
1537
|
+
* - `user`: user-private. Code API sessionKey is keyed by the
|
|
1538
|
+
* requesting user from auth context. Used for chat attachments
|
|
1539
|
+
* and code-output artifacts.
|
|
1540
|
+
*/
|
|
1541
|
+
const CODE_ENV_KINDS = [
|
|
1542
|
+
"skill",
|
|
1543
|
+
"agent",
|
|
1544
|
+
"user"
|
|
1545
|
+
];
|
|
1546
|
+
function getCodeEnvRefForProfile(refs, routeKey) {
|
|
1547
|
+
const profileRef = refs?.codeEnvRefs?.[routeKey];
|
|
1548
|
+
if (profileRef) return profileRef;
|
|
1549
|
+
const legacyRef = refs?.codeEnvRef;
|
|
1550
|
+
if (legacyRef && (legacyRef.executionRouteKey ?? legacyRef.executionProfile ?? "default") === routeKey) return legacyRef;
|
|
1551
|
+
}
|
|
1552
|
+
/** Adds one profile pointer without discarding the other profile's storage object. */
|
|
1553
|
+
function mergeCodeEnvRef(refs, ref) {
|
|
1554
|
+
const codeEnvRefs = { ...refs?.codeEnvRefs };
|
|
1555
|
+
const legacyRef = refs?.codeEnvRef;
|
|
1556
|
+
if (legacyRef) codeEnvRefs[legacyRef.executionRouteKey ?? legacyRef.executionProfile ?? "default"] ??= legacyRef;
|
|
1557
|
+
const routeKey = ref.executionRouteKey ?? ref.executionProfile ?? "default";
|
|
1558
|
+
codeEnvRefs[routeKey] = ref;
|
|
1559
|
+
return {
|
|
1560
|
+
codeEnvRef: codeEnvRefs.default ?? codeEnvRefs.stateful ?? ref,
|
|
1561
|
+
codeEnvRefs
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
/** Enumerates every deployment-local pointer, including legacy single-pointer records. */
|
|
1565
|
+
function getCodeEnvRefs(refs) {
|
|
1566
|
+
const merged = { ...refs?.codeEnvRefs };
|
|
1567
|
+
const legacyRef = refs?.codeEnvRef;
|
|
1568
|
+
if (legacyRef) merged[legacyRef.executionRouteKey ?? legacyRef.executionProfile ?? "default"] ??= legacyRef;
|
|
1569
|
+
return Object.entries(merged).flatMap(([routeKey, ref]) => ref ? [[routeKey, ref]] : []);
|
|
1570
|
+
}
|
|
1571
|
+
//#endregion
|
|
1453
1572
|
//#region src/resolve-llm-delivery-path.ts
|
|
1573
|
+
/**
|
|
1574
|
+
* The native provider a custom endpoint declares, when it declares one. A custom endpoint
|
|
1575
|
+
* speaks OpenAI's API unless its config names another dialect, and the upload route needs
|
|
1576
|
+
* that answer for the same reason request initialization does: the media encoders emit
|
|
1577
|
+
* OpenAI-format parts, so a custom endpoint running as Anthropic receives none.
|
|
1578
|
+
*/
|
|
1579
|
+
function getCustomEndpointProvider(customEndpoints, endpoint) {
|
|
1580
|
+
if (!customEndpoints || !endpoint) return;
|
|
1581
|
+
const normalized = normalizeEndpointName(endpoint);
|
|
1582
|
+
return customEndpoints.find((config) => normalizeEndpointName(config.name ?? "") === normalized)?.provider;
|
|
1583
|
+
}
|
|
1584
|
+
/** A custom endpoint emits OpenAI-format media parts only for the types the admin listed
|
|
1585
|
+
* in its `supportedMimeTypes`; the inherited default list is not an opt-in. A name that
|
|
1586
|
+
* is not a known provider is a custom endpoint. Mirrors `isConfiguredProviderMediaType`
|
|
1587
|
+
* on the encoder side, so the route and the encoder agree on which uploads the provider
|
|
1588
|
+
* actually receives; the built-in endpoints are left out because the client offers no
|
|
1589
|
+
* media for them. */
|
|
1590
|
+
const isConfiguredMediaEndpoint = (mimeType, endpoint, supportedMimeTypes) => {
|
|
1591
|
+
if (!isExplicitMimeConfig(supportedMimeTypes) || isKnownProviderIdentifier(endpoint)) return false;
|
|
1592
|
+
return fileConfig.checkType(mimeType, supportedMimeTypes);
|
|
1593
|
+
};
|
|
1454
1594
|
/** Audio and video reach the model only through the media encoders, which support a
|
|
1455
1595
|
* narrower provider set than documents. Images use the broadly supported vision
|
|
1456
1596
|
* path and are never gated here. */
|
|
1457
|
-
const isProviderCapable = (mimeType, endpoint, useResponsesApi) => {
|
|
1458
|
-
if (mimeType.startsWith("audio/") || mimeType.startsWith("video/")) return isMediaSupportedProvider(endpoint);
|
|
1597
|
+
const isProviderCapable = (mimeType, endpoint, useResponsesApi, supportedMimeTypes) => {
|
|
1598
|
+
if (mimeType.startsWith("audio/") || mimeType.startsWith("video/")) return isMediaSupportedProvider(endpoint) || isConfiguredMediaEndpoint(mimeType, endpoint, supportedMimeTypes);
|
|
1459
1599
|
if (mimeType === "application/pdf") return useResponsesApi === true || isDocumentSupportedProvider(endpoint);
|
|
1460
1600
|
return true;
|
|
1461
1601
|
};
|
|
@@ -1516,7 +1656,7 @@ function hasTextExtractionPath(mimeType) {
|
|
|
1516
1656
|
* Resolves the default file path destination for a given mime type.
|
|
1517
1657
|
* Resolution chain: endpoint overrides -> endpoint fallback -> global overrides -> global fallback -> system defaults.
|
|
1518
1658
|
*/
|
|
1519
|
-
function resolveDefaultLLMDeliveryPath(mimeType, endpointConfig, globalConfig, endpoint, useResponsesApi, sttConfigured) {
|
|
1659
|
+
function resolveDefaultLLMDeliveryPath(mimeType, endpointConfig, globalConfig, endpoint, useResponsesApi, sttConfigured, supportedMimeTypes) {
|
|
1520
1660
|
const wildcard = mimeType.split("/")[0] + "/*";
|
|
1521
1661
|
if (endpointConfig?.overrides) {
|
|
1522
1662
|
if (endpointConfig.overrides[mimeType]) return endpointConfig.overrides[mimeType];
|
|
@@ -1542,7 +1682,7 @@ function resolveDefaultLLMDeliveryPath(mimeType, endpointConfig, globalConfig, e
|
|
|
1542
1682
|
const providerKnown = namedEndpoint && isKnownProviderIdentifier(endpoint);
|
|
1543
1683
|
const isMedia = mimeType.startsWith("audio/") || mimeType.startsWith("video/");
|
|
1544
1684
|
const canRecoverText = (type) => type.startsWith("audio/") && sttConfigured === false ? false : hasTextExtractionPath(type);
|
|
1545
|
-
if (systemDefault === "provider" && (isMedia ? namedEndpoint : providerKnown) && !isProviderCapable(mimeType, endpoint, useResponsesApi)) return canRecoverText(mimeType) ? "text" : "none";
|
|
1685
|
+
if (systemDefault === "provider" && (isMedia ? namedEndpoint : providerKnown) && !isProviderCapable(mimeType, endpoint, useResponsesApi, supportedMimeTypes)) return canRecoverText(mimeType) ? "text" : "none";
|
|
1546
1686
|
/** Bedrock's Converse document path natively accepts more than PDF, so on that
|
|
1547
1687
|
* endpoint its document types belong on the provider path rather than being
|
|
1548
1688
|
* extracted, which would drop non-text content and layout. */
|
|
@@ -1554,12 +1694,13 @@ function resolveDefaultLLMDeliveryPath(mimeType, endpointConfig, globalConfig, e
|
|
|
1554
1694
|
* Delivery path for an upload that named no tool resource. The legacy chooser makes the
|
|
1555
1695
|
* destination explicit, so nothing is inferred there.
|
|
1556
1696
|
*/
|
|
1557
|
-
function resolveDefaultUploadLLMDeliveryPath({ mimeType, endpointConfig, fileConfig, endpoint, useResponsesApi, sttConfigured }) {
|
|
1697
|
+
function resolveDefaultUploadLLMDeliveryPath({ mimeType, endpointConfig, fileConfig, endpoint, endpointProvider, useResponsesApi, sttConfigured }) {
|
|
1558
1698
|
if (endpointConfig?.legacyFileUploadUX === true) return "provider";
|
|
1559
|
-
|
|
1699
|
+
const runsAsOpenAI = endpointProvider == null || isOpenAILikeProvider(endpointProvider);
|
|
1700
|
+
return resolveDefaultLLMDeliveryPath(mimeType, endpointConfig?.defaultLLMDeliveryPath, fileConfig?.defaultLLMDeliveryPath, endpoint, useResponsesApi, sttConfigured, runsAsOpenAI ? endpointConfig?.supportedMimeTypes : void 0);
|
|
1560
1701
|
}
|
|
1561
1702
|
/** Delivery path for an upload, honoring an explicitly chosen tool resource. */
|
|
1562
|
-
function resolveUploadLLMDeliveryPath({ toolResource, mimeType, endpointConfig, fileConfig, endpoint, useResponsesApi, sttConfigured }) {
|
|
1703
|
+
function resolveUploadLLMDeliveryPath({ toolResource, mimeType, endpointConfig, fileConfig, endpoint, useResponsesApi, endpointProvider, sttConfigured }) {
|
|
1563
1704
|
if (toolResource === "context" || toolResource === "ocr") return "text";
|
|
1564
1705
|
if (toolResource === "file_search" || toolResource === "execute_code") return "none";
|
|
1565
1706
|
return resolveDefaultUploadLLMDeliveryPath({
|
|
@@ -1567,6 +1708,7 @@ function resolveUploadLLMDeliveryPath({ toolResource, mimeType, endpointConfig,
|
|
|
1567
1708
|
endpointConfig,
|
|
1568
1709
|
fileConfig,
|
|
1569
1710
|
endpoint,
|
|
1711
|
+
endpointProvider,
|
|
1570
1712
|
useResponsesApi,
|
|
1571
1713
|
sttConfigured
|
|
1572
1714
|
});
|
|
@@ -1585,6 +1727,65 @@ function canToolResourceConsume(toolResource, mimeType) {
|
|
|
1585
1727
|
}
|
|
1586
1728
|
const matchesMimeList = (mimeType, patterns) => patterns.some((pattern) => pattern.test(mimeType));
|
|
1587
1729
|
/**
|
|
1730
|
+
* Whether the record shows this file reached a tool's own store: vectors for file search, a
|
|
1731
|
+
* sandbox pointer for code execution. Nothing else writes either, so their presence is proof
|
|
1732
|
+
* the file was provisioned and their absence proof it was not. The same evidence deferred
|
|
1733
|
+
* provisioning reads before queueing a file, so a turn cannot withhold content for a tool that
|
|
1734
|
+
* provisioning has yet to serve.
|
|
1735
|
+
*/
|
|
1736
|
+
function hasToolResourceProvisioning(file, toolResource) {
|
|
1737
|
+
if (toolResource === "execute_code") return getCodeEnvRefs(file.metadata).length > 0;
|
|
1738
|
+
return file.embedded === true || (file.metadata?.embeddedEntities?.length ?? 0) > 0;
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* Whether a tool this turn runs can read a file of this type.
|
|
1742
|
+
*
|
|
1743
|
+
* Passing the record asks the stricter question a delivery decision needs where a tool serves
|
|
1744
|
+
* only what it already holds. File search reads the vector store, and an upload that named no
|
|
1745
|
+
* destination is filed under no tool at all, so an enabled search tool is a reader only once
|
|
1746
|
+
* the record shows the store holds the file. Run Code needs no copy in advance: its first call
|
|
1747
|
+
* uploads every attachment it can read to the sandbox, so enabling it is enough. Requiring a
|
|
1748
|
+
* copy there would hand the file's text to the prompt on every turn before the first code run,
|
|
1749
|
+
* and a turn that refuses that text never runs code, so the file would never become held.
|
|
1750
|
+
*/
|
|
1751
|
+
function hasTurnFileConsumer(mimeType, consumers, file) {
|
|
1752
|
+
const searchHolds = file == null || hasToolResourceProvisioning(file, "file_search");
|
|
1753
|
+
return consumers.executeCode && canToolResourceConsume("execute_code", mimeType) || consumers.fileSearch && canToolResourceConsume("file_search", mimeType) && searchHolds;
|
|
1754
|
+
}
|
|
1755
|
+
const isLLMDeliveryPath = (value) => value === "provider" || value === "text" || value === "none";
|
|
1756
|
+
/** Whether a record's stored route was inferred at upload, so each turn resolves it again. */
|
|
1757
|
+
function hasInferredLLMDeliveryPath(file) {
|
|
1758
|
+
return file.llmDeliveryPath != null && file.metadata?.destinationChosen !== true;
|
|
1759
|
+
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Delivery path for one attachment on one agent's turn.
|
|
1762
|
+
*
|
|
1763
|
+
* A record predating routing and a destination the user chose keep what they stored. An
|
|
1764
|
+
* inferred route re-resolves against the endpoint handling the turn. A `none` route leaves
|
|
1765
|
+
* the file for a tool; where the endpoint enables `textFallbackWithoutTools` and no tool this
|
|
1766
|
+
* turn runs can read the file, the text extracted at upload is delivered rather than the file
|
|
1767
|
+
* reaching nothing. Consumers left undefined are unknown and not judged, as in
|
|
1768
|
+
* {@link resolveUploadDestination}.
|
|
1769
|
+
*
|
|
1770
|
+
* For file search, reading is asked of the record rather than of the tool set, because the two
|
|
1771
|
+
* disagree for the upload that needs the fallback most: one that named no destination is filed
|
|
1772
|
+
* under no tool, so enabling file search would otherwise withhold the text for a vector store
|
|
1773
|
+
* that never received the file. Run Code is judged by the tool set: see
|
|
1774
|
+
* {@link hasTurnFileConsumer}.
|
|
1775
|
+
*/
|
|
1776
|
+
function resolveTurnLLMDeliveryPath(routing, file, consumers) {
|
|
1777
|
+
if (routing == null || !hasInferredLLMDeliveryPath(file)) return isLLMDeliveryPath(file.llmDeliveryPath) ? file.llmDeliveryPath : void 0;
|
|
1778
|
+
const { endpointConfig } = routing;
|
|
1779
|
+
const mimeType = file.metadata?.routingMimeType ?? file.type ?? "";
|
|
1780
|
+
const path = resolveUploadLLMDeliveryPath({
|
|
1781
|
+
mimeType,
|
|
1782
|
+
...routing
|
|
1783
|
+
});
|
|
1784
|
+
const hasFallbackText = typeof file.text === "string" && file.text.length > 0;
|
|
1785
|
+
if (path === "none" && endpointConfig?.textFallbackWithoutTools === true && consumers != null && hasFallbackText && !hasTurnFileConsumer(mimeType, consumers, file)) return "text";
|
|
1786
|
+
return path;
|
|
1787
|
+
}
|
|
1788
|
+
/**
|
|
1588
1789
|
* Where a unified upload will end up, and whether it can be accepted at all.
|
|
1589
1790
|
*
|
|
1590
1791
|
* An upload has to be readable by something: the model, an extraction step, or a file
|
|
@@ -1719,17 +1920,22 @@ function findMessageById(messages, messageId) {
|
|
|
1719
1920
|
}
|
|
1720
1921
|
/**
|
|
1721
1922
|
* True when a turn carries the marker the server stamps on a manual compaction:
|
|
1722
|
-
* `
|
|
1723
|
-
*
|
|
1724
|
-
*
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
1727
|
-
*
|
|
1923
|
+
* `markCompactionOutcome` sets `initiatedBy: 'user'` on whichever part carries
|
|
1924
|
+
* the outcome — the summary a Compact action produced, or the error part a run
|
|
1925
|
+
* that produced none recorded instead — and nothing else writes it, so an
|
|
1926
|
+
* automatic summary detour is not one. This is the compaction's own identity,
|
|
1927
|
+
* independent of where it hangs: Compact runs on whatever leaf the branch ends
|
|
1928
|
+
* with, so its response can parent onto a user message as easily as onto the
|
|
1929
|
+
* answer it summarized. Redoing one is the context indicator's Compact action,
|
|
1930
|
+
* never a rerun of the turn behind it.
|
|
1931
|
+
*
|
|
1932
|
+
* Compactions stored before the marker existed carry none, so callers keep
|
|
1933
|
+
* their own ancestry test as the fallback.
|
|
1728
1934
|
*/
|
|
1729
1935
|
function isUserInitiatedCompaction(message) {
|
|
1730
1936
|
const content = message?.content;
|
|
1731
1937
|
if (!Array.isArray(content)) return false;
|
|
1732
|
-
return content.some((part) => part?.type === "summary" && part.initiatedBy === "user");
|
|
1938
|
+
return content.some((part) => (part?.type === "summary" || part?.type === "error") && part.initiatedBy === "user");
|
|
1733
1939
|
}
|
|
1734
1940
|
/**
|
|
1735
1941
|
* True when a message is a finished manual compaction: every content part is a
|
|
@@ -1743,7 +1949,9 @@ function isCompactedLeaf(message) {
|
|
|
1743
1949
|
let usable = false;
|
|
1744
1950
|
for (const part of content) {
|
|
1745
1951
|
if (part?.type !== "summary") return false;
|
|
1746
|
-
|
|
1952
|
+
/** No `boundary` means the round never completed: only the final summary
|
|
1953
|
+
* block carries one, so a part holding streamed deltas alone lacks it. */
|
|
1954
|
+
if (part.summarizing === true || part.failed === true || part.boundary == null) continue;
|
|
1747
1955
|
const hasText = (part.content ?? []).some((block) => typeof block?.text === "string" && block.text.trim().length > 0);
|
|
1748
1956
|
usable = usable || hasText;
|
|
1749
1957
|
}
|
|
@@ -5390,6 +5598,28 @@ let InvocationMode = /* @__PURE__ */ function(InvocationMode) {
|
|
|
5390
5598
|
return InvocationMode;
|
|
5391
5599
|
}({});
|
|
5392
5600
|
//#endregion
|
|
5601
|
+
//#region src/types/content.ts
|
|
5602
|
+
let AnnotationTypes = /* @__PURE__ */ function(AnnotationTypes) {
|
|
5603
|
+
AnnotationTypes["FILE_CITATION"] = "file_citation";
|
|
5604
|
+
AnnotationTypes["FILE_PATH"] = "file_path";
|
|
5605
|
+
return AnnotationTypes;
|
|
5606
|
+
}({});
|
|
5607
|
+
let StepStatus = /* @__PURE__ */ function(StepStatus) {
|
|
5608
|
+
StepStatus["IN_PROGRESS"] = "in_progress";
|
|
5609
|
+
StepStatus["CANCELLED"] = "cancelled";
|
|
5610
|
+
StepStatus["FAILED"] = "failed";
|
|
5611
|
+
StepStatus["COMPLETED"] = "completed";
|
|
5612
|
+
StepStatus["EXPIRED"] = "expired";
|
|
5613
|
+
return StepStatus;
|
|
5614
|
+
}({});
|
|
5615
|
+
let MessageContentTypes = /* @__PURE__ */ function(MessageContentTypes) {
|
|
5616
|
+
MessageContentTypes["TEXT"] = "text";
|
|
5617
|
+
MessageContentTypes["IMAGE_FILE"] = "image_file";
|
|
5618
|
+
return MessageContentTypes;
|
|
5619
|
+
}({});
|
|
5620
|
+
const hostImageIdSuffix = "_host_copy";
|
|
5621
|
+
const hostImageNamePrefix = "host_copy_";
|
|
5622
|
+
//#endregion
|
|
5393
5623
|
//#region src/types/schedules.ts
|
|
5394
5624
|
/** Cadences the dialog builds from structured pickers (hour, minute, weekday). */
|
|
5395
5625
|
const scheduleStructuredFrequencies = [
|
|
@@ -5780,7 +6010,12 @@ const agentQueuedTurnFileRefSchema = z.object({
|
|
|
5780
6010
|
filename: z.string().optional(),
|
|
5781
6011
|
height: z.number().optional(),
|
|
5782
6012
|
width: z.number().optional(),
|
|
5783
|
-
bytes: z.number().nonnegative().optional()
|
|
6013
|
+
bytes: z.number().nonnegative().optional(),
|
|
6014
|
+
llmDeliveryPath: z.enum([
|
|
6015
|
+
"provider",
|
|
6016
|
+
"text",
|
|
6017
|
+
"none"
|
|
6018
|
+
]).optional()
|
|
5784
6019
|
});
|
|
5785
6020
|
const enqueueAgentQueuedTurnSchema = z.object({
|
|
5786
6021
|
conversationId: z.string().trim().min(1),
|
|
@@ -7790,8 +8025,50 @@ const agentParamSettings = Object.entries(presetSettings).reduce((acc, [key, val
|
|
|
7790
8025
|
* current models (2.5 and 3+) surface their 64K output limit instead of the legacy 8K value.
|
|
7791
8026
|
* Anthropic prompt-cache controls are only surfaced for models that support them.
|
|
7792
8027
|
*/
|
|
7793
|
-
function applyModelAwareDefaults(settings, endpoint, model) {
|
|
8028
|
+
function applyModelAwareDefaults(settings, endpoint, model, responsesApiRouting) {
|
|
7794
8029
|
if (!model) return settings;
|
|
8030
|
+
if (/^grok-4[.-]7(?:$|[-:])/.test(model.split("/").pop() ?? "")) return settings.map((setting) => setting.key === "reasoning_effort" ? {
|
|
8031
|
+
...setting,
|
|
8032
|
+
options: [
|
|
8033
|
+
"",
|
|
8034
|
+
"low",
|
|
8035
|
+
"medium",
|
|
8036
|
+
"high",
|
|
8037
|
+
"xhigh"
|
|
8038
|
+
]
|
|
8039
|
+
} : setting);
|
|
8040
|
+
if (/^gpt-6-(?:sol|luna)(?:$|-)/i.test(model)) return settings.map((setting) => {
|
|
8041
|
+
if (setting.key === "reasoning_effort") return {
|
|
8042
|
+
...setting,
|
|
8043
|
+
options: setting.options?.filter((effort) => effort !== "minimal")
|
|
8044
|
+
};
|
|
8045
|
+
/** Match the native backend's unset default without writing into stored
|
|
8046
|
+
* settings. Explicit false still overrides this rendered default. */
|
|
8047
|
+
if (setting.key === "useResponsesApi") {
|
|
8048
|
+
const route = (value) => resolveEffectiveUseResponsesApi({
|
|
8049
|
+
endpoint,
|
|
8050
|
+
model,
|
|
8051
|
+
routing: responsesApiRouting,
|
|
8052
|
+
value
|
|
8053
|
+
});
|
|
8054
|
+
return {
|
|
8055
|
+
...setting,
|
|
8056
|
+
default: route() ?? false,
|
|
8057
|
+
enumMappings: {
|
|
8058
|
+
true: route(true) ?? true,
|
|
8059
|
+
false: route(false) ?? false
|
|
8060
|
+
}
|
|
8061
|
+
};
|
|
8062
|
+
}
|
|
8063
|
+
return setting;
|
|
8064
|
+
});
|
|
8065
|
+
if (isOpus55Model(model)) return settings.filter((setting) => ![
|
|
8066
|
+
"thinking",
|
|
8067
|
+
"thinkingBudget",
|
|
8068
|
+
"temperature",
|
|
8069
|
+
"topP",
|
|
8070
|
+
"topK"
|
|
8071
|
+
].includes(setting.key));
|
|
7795
8072
|
const modelAwareSettings = endpoint === "google" ? settings.map((setting) => {
|
|
7796
8073
|
if (setting.key === "maxOutputTokens") return {
|
|
7797
8074
|
...setting,
|
|
@@ -7855,55 +8132,17 @@ function removeCodeExecutionCaller(toolOptions) {
|
|
|
7855
8132
|
return normalized;
|
|
7856
8133
|
}
|
|
7857
8134
|
//#endregion
|
|
7858
|
-
//#region src/
|
|
7859
|
-
/**
|
|
7860
|
-
|
|
7861
|
-
* `as const` tuple so the runtime list and the TypeScript union can't
|
|
7862
|
-
* drift on future additions — adding a new kind to the tuple updates
|
|
7863
|
-
* both at once.
|
|
7864
|
-
*
|
|
7865
|
-
* - `skill`: shared per skill identity. Cross-user-within-tenant
|
|
7866
|
-
* sharing. Code API sessionKey omits the user dimension.
|
|
7867
|
-
* `version` is required (the skill's monotonic counter scopes the
|
|
7868
|
-
* cache per revision so any edit invalidates the prior cache
|
|
7869
|
-
* entry naturally).
|
|
7870
|
-
* - `agent`: shared per agent identity. Same sharing semantic as
|
|
7871
|
-
* skills (agents are addressable resources accessible to a
|
|
7872
|
-
* permission-defined audience).
|
|
7873
|
-
* - `user`: user-private. Code API sessionKey is keyed by the
|
|
7874
|
-
* requesting user from auth context. Used for chat attachments
|
|
7875
|
-
* and code-output artifacts.
|
|
7876
|
-
*/
|
|
7877
|
-
const CODE_ENV_KINDS = [
|
|
7878
|
-
"skill",
|
|
7879
|
-
"agent",
|
|
7880
|
-
"user"
|
|
7881
|
-
];
|
|
7882
|
-
function getCodeEnvRefForProfile(refs, routeKey) {
|
|
7883
|
-
const profileRef = refs?.codeEnvRefs?.[routeKey];
|
|
7884
|
-
if (profileRef) return profileRef;
|
|
7885
|
-
const legacyRef = refs?.codeEnvRef;
|
|
7886
|
-
if (legacyRef && (legacyRef.executionRouteKey ?? legacyRef.executionProfile ?? "default") === routeKey) return legacyRef;
|
|
7887
|
-
}
|
|
7888
|
-
/** Adds one profile pointer without discarding the other profile's storage object. */
|
|
7889
|
-
function mergeCodeEnvRef(refs, ref) {
|
|
7890
|
-
const codeEnvRefs = { ...refs?.codeEnvRefs };
|
|
7891
|
-
const legacyRef = refs?.codeEnvRef;
|
|
7892
|
-
if (legacyRef) codeEnvRefs[legacyRef.executionRouteKey ?? legacyRef.executionProfile ?? "default"] ??= legacyRef;
|
|
7893
|
-
const routeKey = ref.executionRouteKey ?? ref.executionProfile ?? "default";
|
|
7894
|
-
codeEnvRefs[routeKey] = ref;
|
|
8135
|
+
//#region src/backgroundResults.ts
|
|
8136
|
+
/** Shared serialized metadata shape for admission budgeting and continuation rendering. */
|
|
8137
|
+
function backgroundResultMetadata(result) {
|
|
7895
8138
|
return {
|
|
7896
|
-
|
|
7897
|
-
|
|
8139
|
+
background_task_id: result.taskId,
|
|
8140
|
+
tool_call_id: result.toolCallId,
|
|
8141
|
+
tool: result.toolName,
|
|
8142
|
+
status: result.status,
|
|
8143
|
+
result: ""
|
|
7898
8144
|
};
|
|
7899
8145
|
}
|
|
7900
|
-
/** Enumerates every deployment-local pointer, including legacy single-pointer records. */
|
|
7901
|
-
function getCodeEnvRefs(refs) {
|
|
7902
|
-
const merged = { ...refs?.codeEnvRefs };
|
|
7903
|
-
const legacyRef = refs?.codeEnvRef;
|
|
7904
|
-
if (legacyRef) merged[legacyRef.executionRouteKey ?? legacyRef.executionProfile ?? "default"] ??= legacyRef;
|
|
7905
|
-
return Object.entries(merged).flatMap(([routeKey, ref]) => ref ? [[routeKey, ref]] : []);
|
|
7906
|
-
}
|
|
7907
8146
|
//#endregion
|
|
7908
8147
|
//#region src/code/worker.ts
|
|
7909
8148
|
function isCodeWorkerShell(value) {
|
|
@@ -7927,6 +8166,6 @@ function createCodeWorkerSetupCommand(pairing, shell, options = {}) {
|
|
|
7927
8166
|
return `${pair}\nLIBRECHAT_CODE_WORKER_ID=${quote(pairing.workerId)} ${run}`;
|
|
7928
8167
|
}
|
|
7929
8168
|
//#endregion
|
|
7930
|
-
export { ACTION_METADATA_FILTER_FIELDS, AGENT_INSTRUCTION_FILTER_FIELDS, AUTH_USER_DOC_BY_ID_PREFIX, AccessRoleIds, ActionRequest, ActivityLabelEvents, AgentCapabilities, AnnotationTypes, AnthropicEffort, ApprovalEvents, ArtifactModes, AssistantStreamEvents, AuthKeys, AuthType, AuthTypeEnum, AuthorizationTypeEnum, BASE_ONLY_CONFIG_SECTIONS, BASE_PRINCIPAL_CONFIG_SECTIONS, BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA, BEDROCK_OUTPUT_128K_BETA, BedrockProviders, BedrockReasoningConfig, CODE_APPROVAL_MODES, CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS, CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS, CODE_ENVIRONMENT_DECISION_VERSION, CODE_ENVIRONMENT_MODES, CODE_ENV_KINDS, CODE_WORKSPACE_ID_PATTERN, CODE_WORKSPACE_MAX_COUNT, CODE_WORKSPACE_OPERATIONS, CODE_WORKSPACE_SELECTION_ERROR_REASONS, CONVERSATION_STARTER_FILTER_FIELDS, CONVERSATION_TITLE_FILTER_FIELDS, CacheKeys, Capabilities, CodeApprovalModeError, CohereConstants, ComponentTypes, Constants, ContentTypes, DATE_RANGE, DEFAULT_MEMORY_MAX_INPUT_TOKENS, DefaultLLMDeliveryPath, DynamicQueryKeys, EImageOutputType, EModelEndpoint, EToolResources, EndpointURLs, ErrorTypes, FEEDBACK_FILTER_FIELDS, FEEDBACK_RATINGS, FEEDBACK_REASON_KEYS, FEEDBACK_TAGS, FILE_FILTER_FIELDS, FILTER_PII_STARTER_PATTERNS, FetchTokenConfig, FileContext, FilePurpose, FileSources, ForkOptions, FunctionSignature, HITL_MESSAGE_FILTER_FIELDS, INSIGHTS_AGENT_ID_MAX_LENGTH, INSIGHTS_MAX_RANGE_DAYS, INSIGHTS_SEARCH_MAX_LENGTH, INSIGHTS_SEARCH_MIN_LENGTH, INTERFACE_PERMISSION_FIELDS, ImageDetail, ImageDetailCost, ImageVisionTool, InfiniteCollections, InvocationMode, KnownEndpoints, LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS, LANGFUSE_TRACE_USER_ID_FIELDS, LANGFUSE_TRACE_USER_METADATA_FIELDS, LocalStorageKeys, MAX_CHAT_PROJECT_DESCRIPTION_LENGTH, MAX_CHAT_PROJECT_NAME_LENGTH, MAX_GRAPH_SUBAGENT_MEMBERS, MAX_MCP_ICON_PATH_LENGTH, MAX_PII_CUSTOM_PATTERNS_TOTAL, MAX_PII_CUSTOM_REGEX_CHARACTERS, MAX_PII_CUSTOM_REGEX_INSTRUCTIONS, MAX_PII_PATTERNS_PER_SOURCE, MAX_PII_PATTERN_ID_LENGTH, MAX_PII_PATTERN_LABEL_LENGTH, MAX_PII_PATTERN_LENGTH, MAX_SUBAGENTS, MAX_SUBAGENTS_CEILING, MAX_SUBAGENT_DEPTH, MAX_SUBAGENT_GRAPH_NODES, MAX_SUBAGENT_RUN_CONFIGS, MCPOptionsSchema, MCPServerUserInputSchema, MCPServersSchema, MCP_SERVER_TITLE_ERROR, MCP_SERVER_TITLE_PATTERN, MCP_USER_INPUT_FIELDS, MEMORY_FILTER_FIELDS, MESSAGE_FILTER_FIELDS, MIN_REPORTABLE_RUN_STEP_DURATION_MS, MODEL_PARAMETER_FILTER_FIELDS, MYTHOS_CLASS_FAMILIES, MemoryScope, MessageContentTypes, MutationKeys, OCRStrategy, OptionTypes, PERMISSION_SUB_KEYS, PERMISSION_TYPE_INTERFACE_FIELDS, PROMPT_FILTER_FIELDS, PermissionBits, PermissionTypes, Permissions, PrincipalModel, PrincipalType, ProviderId, Providers, QueryKeys, REFILL_INTERVAL_UNITS, RUNTIME_CONFIG_INTERFACE_FIELDS, RateLimitPrefix, ReasoningContext, ReasoningEffort, ReasoningLabelEvents, ReasoningMode, ReasoningParameterFormat, ReasoningResponseKey, ReasoningSummary, RerankerTypes, ResourceType, RetentionMode, RunStatus, SCHEDULE_CRON_MAX_LENGTH, SEPARATORS, SKILL_BODY_MAX_LENGTH, SKILL_DESCRIPTION_MAX_LENGTH, SKILL_DESCRIPTION_SHORT_THRESHOLD, SKILL_DISPLAY_TITLE_MAX_LENGTH, SKILL_FILTER_FIELDS, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, SKILL_SYNC_MAX_DISCOVERY_DEPTH, SKILL_SYNC_MAX_INTERVAL_MINUTES, SKILL_SYNC_MIN_INTERVAL_MINUTES, SSEOptionsSchema, STATEFUL_CODE_ENVIRONMENTS, STORED_MESSAGE_FILTER_FIELDS, STTProviders, SVG_SANITIZE_CONFIG, SYSTEM_LLM_DELIVERY_DEFAULTS, SafeSearchTypes, ScraperProviders, SearchCategories, SearchProviders, SettingTypes, SettingsTabValues, SettingsViews, SkillsScope, StdioOptionsSchema, SteerEvents, StepEvents, StepStatus, StepTypes, StreamableHTTPOptionsSchema, SystemCategories, SystemRoles, TOOL_ARGUMENT_FILTER_FIELDS, TRACE_CURSOR_MAX_LENGTH, TRACE_RECORD_ID_MAX_LENGTH, TRACE_SOURCE_ID_MAX_LENGTH, TTSProviders, ThinkingDisplay, ThinkingLevel, Time, TokenExchangeMethodEnum, ToolCallTypes, Tools, UsageEvents, Verbosity, ViolationTypes, VisionModes, WebSocketOptionsSchema, accessRoleSchema, accessRoleToPermBits, accordian, actionDelimiter, actionDomainSeparator, actionMetadataFilterFieldSchema, agentGitIdentitySchema, agentInstructionFilterFieldSchema, agentParamSettings, agentPermissionsSchema, agentQueuedTurnCapabilitySchema, agentQueuedTurnDurability, agentQueuedTurnFileRefSchema, agentQueuedTurnReceiptSchema, agentQueuedTurnStatuses, agentsBaseSchema, agentsEndpointSchema, agentsSchema, agentsSettings, alert, alertDialog, allowedAddressesSchema, alternateName, anthropicBaseSchema, anthropicEndpointSchema, anthropicSchema, anthropicSettings, apiBaseUrl, appendAgentIdSuffix, applicationMimeTypes, applyModelAwareDefaults, assistantEndpointSchema, assistantSchema, audioMimeTypes, authTypeSchema, avatar, azureBaseSchema, azureEndpointSchema, azureGroupConfigsSchema, azureGroupSchema, badge, balanceSchema, baseEndpointSchema, bedrockDocumentExtensions, bedrockDocumentFormats, bedrockDocumentMimeTypes, bedrockEndpointSchema, bedrockGuardrailConfigSchema, bedrockInputParser, bedrockInputSchema, bedrockModels, bedrockOutputParser, bookmarkPermissionsSchema, breadcrumb, buildLoginRedirectUrl, buildServerNameAliases, buildTree, button, cacheSubsetProviders, cadenceIntervalMinutes, cadenceToCron, calendar, canToolResourceConsume, cancelAgentQueuedTurnResponseSchema, cancelAgentQueuedTurnSchema, capsEffortWhenThinkingDisabled, card, carousel, checkOpenAIStorage, checkbox, checkpointerSchema, checkpointerTypeSchema, clampEffortForDisabledThinking, clampOutputConfigEffort, clampSettingRange, cloudfrontConfigSchema, codeEnvironmentPermissionDecisionSchema, codeEnvironmentUserConfigSchema, codeEnvironmentUserSettingsSchema, codeInterpreterMimeTypes, codeInterpreterMimeTypesList, codeTypeMapping, coerceNumber, collapsible, compactAgentsBaseSchema, compactAgentsSchema, compactAssistantSchema, compactGoogleSchema, configSchema, contextPruningSchema, conversationStarterFilterFieldSchema, conversationTitleFilterFieldSchema, convertStringsToRegex, createCodeWorkerSetupCommand, createPayload, createSchedulePayloadSchema, createURL, cronCadenceSchema, data_service_exports as dataService, defaultAgentCapabilities, defaultAgentFormValues, defaultAssistantFormValues, defaultAssistantsVersion, defaultEndpoints, defaultLLMDeliveryPathSchema, defaultModels, defaultOCRMimeTypes, defaultOrderQuery, defaultRetrievalModels, defaultSTTMimeTypes, defaultSocialLogins, defaultTextMimeTypes, dialog, documentParserMimeTypes, documentSupportedProviders, drawer, dropdownMenu, eAnthropicEffortSchema, eImageDetailSchema, eModelEndpointSchema, eReasoningContextSchema, eReasoningEffortSchema, eReasoningModeSchema, eReasoningParameterFormatSchema, eReasoningResponseKeySchema, eReasoningSummarySchema, eThinkingDisplaySchema, eThinkingLevelSchema, eVerbositySchema, effectivePermissionsResponseSchema, encodeEphemeralAgentId, endpointFileConfigSchema, endpointSchema, endpointSettings, endpointToProvider, enqueueAgentQueuedTurnResponseSchema, enqueueAgentQueuedTurnSchema, envVarRegex, errorsToString, essentialShadcnComponents, excelFileTypes, excelMimeTypes, excludedKeys, extendedModelEndpointSchema, extractDomainFromUrl, extractEnvVariable, extractVariableName, feedbackFilterFieldSchema, feedbackRatingSchema, feedbackSchema, feedbackTagKeySchema, fileCitationsPermissionsSchema, fileConfig, fileConfigSchema, fileFilterFieldSchema, fileSearchPermissionsSchema, fileSourceSchema, fileStorageSchema, fileStrategiesSchema, filterPiiActionSchema, filterPiiCustomPatternSchema, filterPiiRegexSchema, filterPiiStarterPatternSchema, filtersConfigSchema, finalizeSvgMarkup, findLastSeparatorIndex, findMessageById, fullMimeTypesList, generateDynamicSchema, generateGoogleSchema, generateOpenAISchema, getAllowedCodeApprovalModes, getCodeEnvRefForProfile, getCodeEnvRefs, getConfigDefaults, getConfiguredMimeAccept, getDefaultParamsEndpoint, getDocumentFileExtension, getEnabledEndpoints, getEndpointField, getEndpointFileConfig, getEphemeralSender, getFirstDefinedValue, getGoogleThinkingBudgetBounds, getGoogleThinkingBudgetMax, getMaxSubagents, getModelKey, getNonEmptyValue, getPiiRegexProgramSize, getRefillEligibilityDate, getResourcePermissionsResponseSchema, getResponseSender, getRunStepDurationMs, getScheduleMCPDisabledReason, getSchemaDefaults, getSettingsKeys, getTagByKey, getTagsForRating, getTokenHeader, googleBaseSchema, googleGenConfigSchema, googleSchema, googleSettings, hasActiveFiltersConfig, hasActivePiiFields, hasActivePiiPatterns, hasPermissions, hasProcessMCPServerConfig, hasTextExtractionPath, hasToolCallErrorPrefix, hostImageIdSuffix, hostImageNamePrefix, hoverCard, imageDetailNumeric, imageDetailValue, imageExtRegex, imageGenTools, imageMimeTypes, imageTypeMapping, inferMimeType, initialModelsConfig, input, inputTokensIncludesCache, interfaceSchema, isActionTool, isAgentsEndpoint, isAnthropicDocumentType, isAnthropicTextDocumentType, isAssistantsEndpoint, isBedrockDocumentType, isCodeEnvironmentMode, isCodeWorkerShell, isCodeWorkspaceSelection, isCodeWorkspaceSelectionErrorReason, isCodeWorkspaceSelections, isCompactedLeaf, isCronCadence, isDocumentSupportedProvider, isEphemeralAgentId, isImageVisionTool, isKnownProviderIdentifier, isMediaSupportedProvider, isMessageFileUpload, isMythosClassModel, isNativelyReadableText, isOpenAILikeProvider, isParamEndpoint, isPermissiveMimeConfig, isProcessMCPServerConfig, isProcessMCPServerField, isRemoteOidcUrlAllowed, isReportableRunStepDuration, isResponsesApiUpload, isSecureCodeEnvironmentControlURL, isSensitiveEnvVar, isSpeechProviderConfigured, isSystemRoleName, isThinkingDisabled, isUUID, isUserInitiatedCompaction, isValidCronExpression, knownEndpointToProvider, label, langfuseConfigSchema, langfuseTraceConfigSchema, librechat, listAgentQueuedTurnsResponseSchema, listAgentQueuedTurnsSchema, listConfiguredSpeechProviders, loginPage, mapGroupToAzureConfig, mapModelToAzureConfig, marketplacePermissionsSchema, materializeModelSpecEndpoints, mbToBytes, mcpRefreshDefaults, mcpServersPermissionsSchema, mediaSupportedProviders, megabyte, memoryFilterFieldSchema, memoryPermissionsSchema, memorySchema, menuBar, mergeCodeEnvRef, mergeFileConfig, messageFilterFieldSchema, messageFilterPiiSchema, messageFilterSchema, mimeTypeAliases, modelConfigSchema, modelParameterFilterFieldSchema, modelSpecSubagentsSchema, modularEndpoints, multiConvoPermissionsSchema, navigationMenu, nextRunInstants, normalizeActionToolName, normalizeEndpointName, normalizeMCPToolKey, normalizeSearxngEngines, normalizeServerName, ocrSchema, omitsSamplingParameters, omitsThinkingByDefault, openAIBaseSchema, openAISchema, openAISettings, openRouterSchema, openapiToFunction, orderEndpointsConfig, outputTokensFromUsage, pagination, paramDefinitionSchema, paramEndpoints, paramSettings, parseCompactConvo, parseConvo, parseEphemeralAgentId, parseLangChainErrorCode, parseTextParts, peoplePickerPermissionsSchema, permBitsToAccessLevel, permissionEntrySchema, permissionsSchema, popover, presetSettings, principalSchema, progress, promptFilterFieldSchema, promptPermissionsSchema, promptTokensFromUsage, providerEndpointMap, radioGroup, rateLimitSchema, readScheduleMCPOutcomes, reconcileContextUsage, reconcileContextUsageFromEvent, registerPage, remoteAgentsPermissionsSchema, removeCodeExecutionCaller, removeNullishValues, replaceSpecialVars, request_default as request, requiresExplicitThinkingDisabled, resolveAgentSkillsScope, resolveAllowedStatefulCodeEnvironments, resolveCodeApprovalMode, resolveCodePermissionDecision, resolveDefaultLLMDeliveryPath, resolveDefaultUploadLLMDeliveryPath, resolveDropParamsUIKeys, resolveEndpointType, resolveModelCatalogKey, resolveModelSpecEndpoint, resolveProviderId, resolveRef, resolveSandboxFilename, resolveStatefulCodeEnvironment, resolveThinkingDisplay, resolveTraceViewerConfig, resolveUploadDestination, resolveUploadLLMDeliveryPath, resolveUseResponsesApi, resourcePermissionsResponseSchema, restrictSvgReferences, retainRecentConfigSchema, retrievalMimeTypes, retrievalMimeTypesList, roleDefaults, roleSchema, runCodePermissionsSchema, scheduleCadenceSchema, scheduleFrequencies, scheduleMCPOutcomeSchema, scheduleStructuredFrequencies, scheduleTargets, schedulesPermissionsSchema, select, separator, setAcceptLanguageHeader, setFileConfigRegexCompiler, setMaxSubagents, setMessageFilterRegexValidator, setTokenHeader, sha1, shadcnComponents, sharedFileDownload, sharedLinksPermissionsSchema, skeleton, skillFilterFieldSchema, skillPermissionsSchema, skillSyncConfigSchema, skillSyncGitHubSourceSchema, slider, specialVariables, specsConfigSchema, splitMCPToolKey, splitToolCallName, stripAgentIdSuffix, stripLangChainTroubleshootingUrl, stripReasoningLabelMetadata, stripServerNamePrefix, stripServerNamePrefixes, stripToolCallErrorPrefix, structuredCadenceSchema, subagentThreadLineageSchema, summarizationConfigSchema, summarizationTriggerSchema, supportedMimeTypes, supportsAdaptiveThinking, supportsBalanceCheck, supportsContext1m, supportsFiles, supportsPromptCache, switchComponent, tBannerSchema, tConversationSchema, tConversationTagSchema, tConvoUpdateSchema, tExampleSchema, tMessageSchema, tModelSpecPresetSchema, tModelSpecSchema, tPluginAuthConfigSchema, tPluginSchema, tPresetSchema, tQueryParamsSchema, tSharedLinkSchema, table, tabs, temporaryChatPermissionsSchema, textMimeTypes, textarea, toMinimalFeedback, toast, toaster, toggle, toggleGroup, toolApprovalHookConfigSchema, toolApprovalModeSchema, toolApprovalPolicySchema, toolArgumentFilterFieldSchema, tooltip, traceViewerDefaults, traceViewerLimits, transactionsSchema, turnstileOptionsSchema, turnstileSchema, unattributedAssistantContentSchema, updateResourcePermissionsRequestSchema, updateResourcePermissionsResponseSchema, updateSchedulePayloadSchema, useToast, userSubmittedMessageFieldPathSchema, utils, validateActionDomain, validateAndParseOpenAPISpec, validateAzureGroups, validateSettingDefinitions, validateVisionModel, vertexAISchema, vertexModelConfigSchema, videoMimeTypes, visionModels, webSearchPermissionsSchema, webSearchSchema };
|
|
8169
|
+
export { ACTION_METADATA_FILTER_FIELDS, AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT, AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX, AGENT_INSTRUCTION_FILTER_FIELDS, AUTH_USER_DOC_BY_ID_PREFIX, AccessRoleIds, ActionRequest, ActivityLabelEvents, AgentCapabilities, AnnotationTypes, AnthropicEffort, ApprovalEvents, ArtifactModes, AssistantStreamEvents, AuthKeys, AuthType, AuthTypeEnum, AuthorizationTypeEnum, BASE_ONLY_CONFIG_SECTIONS, BASE_PRINCIPAL_CONFIG_SECTIONS, BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA, BEDROCK_OUTPUT_128K_BETA, BedrockProviders, BedrockReasoningConfig, CODE_APPROVAL_MODES, CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS, CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS, CODE_ENVIRONMENT_DECISION_VERSION, CODE_ENVIRONMENT_MODES, CODE_ENVIRONMENT_MOVE_VERSION, CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS, CODE_ENV_KINDS, CODE_WORKSPACE_ID_PATTERN, CODE_WORKSPACE_INSTANCE_TYPES, CODE_WORKSPACE_MAX_COUNT, CODE_WORKSPACE_OPERATIONS, CODE_WORKSPACE_SELECTION_ERROR_REASONS, CONVERSATION_STARTER_FILTER_FIELDS, CONVERSATION_TITLE_FILTER_FIELDS, CacheKeys, Capabilities, CodeApprovalModeError, CohereConstants, ComponentTypes, Constants, ContentTypes, DATE_RANGE, DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS, DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS, DEFAULT_BALANCE_RESERVATION_TTL_MS, DEFAULT_MAX_PROVIDER_ERROR_CHARS, DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS, DEFAULT_MEMORY_MAX_INPUT_TOKENS, DEFAULT_OAUTH_STATE_TTL_MS, DEFAULT_RETAINED_ANSWER_TOKENS, DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY, DefaultLLMDeliveryPath, DynamicQueryKeys, EImageOutputType, EModelEndpoint, EToolResources, EndpointURLs, ErrorTypes, FEEDBACK_FILTER_FIELDS, FEEDBACK_RATINGS, FEEDBACK_REASON_KEYS, FEEDBACK_TAGS, FILE_FILTER_FIELDS, FILTER_PII_STARTER_PATTERNS, FetchTokenConfig, FileContext, FilePurpose, FileSources, ForkOptions, FunctionSignature, HITL_MESSAGE_FILTER_FIELDS, INSIGHTS_AGENT_ID_MAX_LENGTH, INSIGHTS_MAX_RANGE_DAYS, INSIGHTS_SEARCH_MAX_LENGTH, INSIGHTS_SEARCH_MIN_LENGTH, INTERFACE_PERMISSION_FIELDS, ImageDetail, ImageDetailCost, ImageVisionTool, InfiniteCollections, InvocationMode, KnownEndpoints, LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS, LANGFUSE_TRACE_USER_ID_FIELDS, LANGFUSE_TRACE_USER_METADATA_FIELDS, LocalStorageKeys, MAX_CHAT_PROJECT_DESCRIPTION_LENGTH, MAX_CHAT_PROJECT_NAME_LENGTH, MAX_GRAPH_SUBAGENT_MEMBERS, MAX_MCP_ICON_PATH_LENGTH, MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS, MAX_PII_CUSTOM_PATTERNS_TOTAL, MAX_PII_CUSTOM_REGEX_CHARACTERS, MAX_PII_CUSTOM_REGEX_INSTRUCTIONS, MAX_PII_PATTERNS_PER_SOURCE, MAX_PII_PATTERN_ID_LENGTH, MAX_PII_PATTERN_LABEL_LENGTH, MAX_PII_PATTERN_LENGTH, MAX_SUBAGENTS, MAX_SUBAGENTS_CEILING, MAX_SUBAGENT_DEPTH, MAX_SUBAGENT_GRAPH_NODES, MAX_SUBAGENT_RUN_CONFIGS, MCPOptionsSchema, MCPServerUserInputSchema, MCPServersSchema, MCP_SERVER_TITLE_ERROR, MCP_SERVER_TITLE_PATTERN, MCP_USER_INPUT_FIELDS, MEMORY_FILTER_FIELDS, MESSAGE_FILTER_FIELDS, MIN_BALANCE_RESERVATION_TTL_MS, MIN_REPORTABLE_RUN_STEP_DURATION_MS, MODEL_PARAMETER_FILTER_FIELDS, MYTHOS_CLASS_FAMILIES, MemoryScope, MessageContentTypes, MutationKeys, OCRStrategy, OPUS_55_BLOCK_BINDING, OptionTypes, PERMISSION_SUB_KEYS, PERMISSION_TYPE_INTERFACE_FIELDS, PROMPT_FILTER_FIELDS, PermissionBits, PermissionTypes, Permissions, PrincipalModel, PrincipalType, ProviderId, Providers, QueryKeys, REFILL_INTERVAL_UNITS, RUNTIME_CONFIG_INTERFACE_FIELDS, RateLimitPrefix, ReasoningContext, ReasoningEffort, ReasoningLabelEvents, ReasoningMode, ReasoningParameterFormat, ReasoningResponseKey, ReasoningSummary, RerankerTypes, ResourceType, RetentionMode, RunStatus, SCHEDULE_CRON_MAX_LENGTH, SEPARATORS, SKILL_BODY_MAX_LENGTH, SKILL_DESCRIPTION_MAX_LENGTH, SKILL_DESCRIPTION_SHORT_THRESHOLD, SKILL_DISPLAY_TITLE_MAX_LENGTH, SKILL_FILTER_FIELDS, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, SKILL_SYNC_MAX_DISCOVERY_DEPTH, SKILL_SYNC_MAX_INTERVAL_MINUTES, SKILL_SYNC_MIN_INTERVAL_MINUTES, SSEOptionsSchema, STATEFUL_CODE_ENVIRONMENTS, STORED_MESSAGE_FILTER_FIELDS, STTProviders, SVG_SANITIZE_CONFIG, SYSTEM_LLM_DELIVERY_DEFAULTS, SafeSearchTypes, ScraperProviders, SearchCategories, SearchProviders, SettingTypes, SettingsTabValues, SettingsViews, SkillsScope, StdioOptionsSchema, SteerEvents, StepEvents, StepStatus, StepTypes, StreamableHTTPOptionsSchema, SystemCategories, SystemRoles, THINKING_BINDING_BETA, TOOL_ARGUMENT_FILTER_FIELDS, TRACE_CURSOR_MAX_LENGTH, TRACE_RECORD_ID_MAX_LENGTH, TRACE_SOURCE_ID_MAX_LENGTH, TTSProviders, ThinkingDisplay, ThinkingLevel, Time, TokenExchangeMethodEnum, ToolCallTypes, Tools, UsageEvents, Verbosity, ViolationTypes, VisionModes, WebSocketOptionsSchema, accessRoleSchema, accessRoleToPermBits, accordian, actionDelimiter, actionDomainSeparator, actionMetadataFilterFieldSchema, agentGitIdentitySchema, agentInstructionFilterFieldSchema, agentParamSettings, agentPermissionsSchema, agentQueuedTurnCapabilitySchema, agentQueuedTurnDurability, agentQueuedTurnFileRefSchema, agentQueuedTurnReceiptSchema, agentQueuedTurnStatuses, agentsBaseSchema, agentsEndpointSchema, agentsSchema, agentsSettings, alert, alertDialog, allowedAddressesSchema, alternateName, anthropicBaseSchema, anthropicEndpointSchema, anthropicSchema, anthropicSettings, apiBaseUrl, appendAgentIdSuffix, applicationMimeTypes, applyModelAwareDefaults, askUserQuestionConfigSchema, askUserQuestionRetainedAnswersSchema, assistantEndpointSchema, assistantSchema, audioMimeTypes, authTypeSchema, avatar, azureBaseSchema, azureEndpointSchema, azureGroupConfigsSchema, azureGroupSchema, backgroundResultMetadata, badge, balanceSchema, baseEndpointSchema, bedrockDocumentExtensions, bedrockDocumentFormats, bedrockDocumentMimeTypes, bedrockEndpointSchema, bedrockGuardrailConfigSchema, bedrockInputParser, bedrockInputSchema, bedrockModels, bedrockOutputParser, bookmarkPermissionsSchema, breadcrumb, buildLoginRedirectUrl, buildServerNameAliases, buildTree, button, cacheSubsetProviders, cadenceIntervalMinutes, cadenceToCron, calendar, canToolResourceConsume, cancelAgentQueuedTurnResponseSchema, cancelAgentQueuedTurnSchema, capsEffortWhenThinkingDisabled, card, carousel, checkOpenAIStorage, checkbox, checkpointerSchema, checkpointerTypeSchema, clampEffortForDisabledThinking, clampOutputConfigEffort, clampSettingRange, cloudfrontConfigSchema, codeEnvironmentPermissionDecisionSchema, codeEnvironmentUserConfigSchema, codeEnvironmentUserSettingsSchema, codeInterpreterMimeTypes, codeInterpreterMimeTypesList, codeTypeMapping, coerceNumber, collapsible, compactAgentsBaseSchema, compactAgentsSchema, compactAssistantSchema, compactGoogleSchema, configSchema, contextPruningSchema, conversationStarterFilterFieldSchema, conversationTitleFilterFieldSchema, convertStringsToRegex, createCodeWorkerSetupCommand, createPayload, createSchedulePayloadSchema, createURL, cronCadenceSchema, data_service_exports as dataService, defaultAgentCapabilities, defaultAgentFormValues, defaultAssistantFormValues, defaultAssistantsVersion, defaultEndpoints, defaultLLMDeliveryPathSchema, defaultModels, defaultOCRMimeTypes, defaultOrderQuery, defaultRetrievalModels, defaultSTTMimeTypes, defaultSocialLogins, defaultTextMimeTypes, dialog, documentParserMimeTypes, documentSupportedProviders, drawer, dropdownMenu, eAnthropicEffortSchema, eImageDetailSchema, eModelEndpointSchema, eReasoningContextSchema, eReasoningEffortSchema, eReasoningModeSchema, eReasoningParameterFormatSchema, eReasoningResponseKeySchema, eReasoningSummarySchema, eThinkingDisplaySchema, eThinkingLevelSchema, eVerbositySchema, effectivePermissionsResponseSchema, encodeEphemeralAgentId, endpointFileConfigSchema, endpointSchema, endpointSettings, endpointToProvider, enqueueAgentQueuedTurnResponseSchema, enqueueAgentQueuedTurnSchema, envVarRegex, errorsToString, essentialShadcnComponents, excelFileTypes, excelMimeTypes, excludedKeys, extendedModelEndpointSchema, extractDomainFromUrl, extractEnvVariable, extractVariableName, feedbackFilterFieldSchema, feedbackRatingSchema, feedbackSchema, feedbackTagKeySchema, fileCitationsPermissionsSchema, fileConfig, fileConfigSchema, fileFilterFieldSchema, fileSearchPermissionsSchema, fileSourceSchema, fileStorageSchema, fileStrategiesSchema, filterPiiActionSchema, filterPiiCustomPatternSchema, filterPiiRegexSchema, filterPiiStarterPatternSchema, filtersConfigSchema, finalizeSvgMarkup, findLastSeparatorIndex, findMessageById, fullMimeTypesList, generateDynamicSchema, generateGoogleSchema, generateOpenAISchema, getAllowedCodeApprovalModes, getCodeEnvRefForProfile, getCodeEnvRefs, getConfigDefaults, getConfiguredMimeAccept, getCustomEndpointProvider, getDefaultParamsEndpoint, getDocumentFileExtension, getEnabledEndpoints, getEndpointField, getEndpointFileConfig, getEphemeralSender, getFirstDefinedValue, getGoogleThinkingBudgetBounds, getGoogleThinkingBudgetMax, getMaxSubagents, getModelKey, getNonEmptyValue, getPiiRegexProgramSize, getRefillEligibilityDate, getResourcePermissionsResponseSchema, getResponseSender, getRunStepDurationMs, getScheduleMCPDisabledReason, getSchemaDefaults, getSettingsKeys, getTagByKey, getTagsForRating, getTokenHeader, googleBaseSchema, googleGenConfigSchema, googleSchema, googleSettings, hasActiveFiltersConfig, hasActivePiiFields, hasActivePiiPatterns, hasConfiguredFooter, hasInferredLLMDeliveryPath, hasPermissions, hasProcessMCPServerConfig, hasTextExtractionPath, hasToolCallErrorPrefix, hasToolResourceProvisioning, hasTurnFileConsumer, hostImageIdSuffix, hostImageNamePrefix, hoverCard, imageDetailNumeric, imageDetailValue, imageExtRegex, imageGenTools, imageMimeTypes, imageTypeMapping, inferMimeType, initialModelsConfig, input, inputTokensIncludesCache, interfaceSchema, isActionTool, isAgentsEndpoint, isAnthropicDocumentType, isAnthropicTextDocumentType, isAssistantsEndpoint, isBedrockDocumentType, isCodeEnvironmentMode, isCodeWorkerShell, isCodeWorkspaceEnvironment, isCodeWorkspaceSelection, isCodeWorkspaceSelectionErrorReason, isCodeWorkspaceSelections, isCompactedLeaf, isConfiguredSender, isCronCadence, isDocumentSupportedProvider, isEphemeralAgentId, isExplicitMimeConfig, isImageVisionTool, isKnownProviderIdentifier, isMediaSupportedProvider, isMessageFileUpload, isMythosClassModel, isNativelyReadableText, isOpenAILikeProvider, isOpus55Model, isParamEndpoint, isPermissiveMimeConfig, isProcessMCPServerConfig, isProcessMCPServerField, isRemoteOidcUrlAllowed, isReportableRunStepDuration, isRepositoryInstructionDescriptor, isResponsesApiUpload, isSecureCodeEnvironmentControlURL, isSensitiveEnvVar, isSpeechProviderConfigured, isSystemRoleName, isThinkingDisabled, isUUID, isUserInitiatedCompaction, isValidCronExpression, knownEndpointToProvider, label, langfuseConfigSchema, langfuseTraceConfigSchema, librechat, listAgentQueuedTurnsResponseSchema, listAgentQueuedTurnsSchema, listConfiguredSpeechProviders, loginPage, mapGroupToAzureConfig, mapModelToAzureConfig, marketplacePermissionsSchema, materializeModelSpecEndpoints, mbToBytes, mcpRefreshDefaults, mcpServersPermissionsSchema, mediaSupportedProviders, megabyte, memoryFilterFieldSchema, memoryPermissionsSchema, memorySchema, menuBar, mergeCodeEnvRef, mergeFileConfig, messageFilterFieldSchema, messageFilterPiiSchema, messageFilterSchema, mimeTypeAliases, modelConfigSchema, modelParameterFilterFieldSchema, modelSpecSubagentsSchema, modularEndpoints, multiConvoPermissionsSchema, navigationMenu, nextRunInstants, normalizeActionToolName, normalizeEndpointName, normalizeMCPToolKey, normalizeSearxngEngines, normalizeServerName, ocrSchema, omitsSamplingParameters, omitsThinkingByDefault, openAIBaseSchema, openAISchema, openAISettings, openIdDiscoverySchema, openRouterSchema, openapiToFunction, orderEndpointsConfig, outputTokensFromUsage, pagination, paramDefinitionSchema, paramEndpoints, paramSettings, parseCompactConvo, parseConvo, parseEphemeralAgentId, parseLangChainErrorCode, parseTextParts, peoplePickerPermissionsSchema, permBitsToAccessLevel, permissionEntrySchema, permissionWriteAttemptsSchema, permissionsSchema, popover, prefersResponsesApiByModel, presetSettings, principalSchema, progress, promptFilterFieldSchema, promptPermissionsSchema, promptTokensFromUsage, providerEndpointMap, radioGroup, rateLimitSchema, readScheduleMCPOutcomes, reconcileContextUsage, reconcileContextUsageFromEvent, registerPage, remoteAgentsPermissionsSchema, removeCodeExecutionCaller, removeNullishValues, replaceSpecialVars, request_default as request, requiresExplicitThinkingDisabled, resolveAgentSkillsScope, resolveAllowedStatefulCodeEnvironments, resolveCodeApprovalMode, resolveCodePermissionDecision, resolveDefaultLLMDeliveryPath, resolveDefaultUploadLLMDeliveryPath, resolveDropParamsUIKeys, resolveEffectiveUseResponsesApi, resolveEndpointType, resolveModelCatalogKey, resolveModelSpecEndpoint, resolveProviderId, resolveRef, resolveSandboxFilename, resolveStatefulCodeEnvironment, resolveThinkingDisplay, resolveTraceViewerConfig, resolveTurnLLMDeliveryPath, resolveUploadDestination, resolveUploadLLMDeliveryPath, resolveUseResponsesApi, resourcePermissionsResponseSchema, restrictSvgReferences, retainRecentConfigSchema, retrievalMimeTypes, retrievalMimeTypesList, roleDefaults, roleSchema, runCodePermissionsSchema, scheduleCadenceSchema, scheduleFrequencies, scheduleMCPOutcomeSchema, scheduleStructuredFrequencies, scheduleTargets, schedulesPermissionsSchema, select, separator, setAcceptLanguageHeader, setFileConfigRegexCompiler, setMaxSubagents, setMessageFilterRegexValidator, setTokenHeader, sha1, shadcnComponents, sharedFileDownload, sharedLinksPermissionsSchema, skeleton, skillFilterFieldSchema, skillPermissionsSchema, skillSyncConfigSchema, skillSyncGitHubSourceSchema, slider, specialVariables, specsConfigSchema, splitMCPToolKey, splitToolCallName, stripAgentIdSuffix, stripLangChainTroubleshootingUrl, stripReasoningLabelMetadata, stripServerNamePrefix, stripServerNamePrefixes, stripToolCallErrorPrefix, structuredCadenceSchema, subagentThreadLineageSchema, summarizationConfigSchema, summarizationTriggerSchema, supportedMimeTypes, supportsAdaptiveThinking, supportsBalanceCheck, supportsContext1m, supportsFiles, supportsPromptCache, switchComponent, tBannerSchema, tConversationSchema, tConversationTagSchema, tConvoUpdateSchema, tExampleSchema, tMessageSchema, tModelSpecPresetSchema, tModelSpecSchema, tPluginAuthConfigSchema, tPluginSchema, tPresetSchema, tQueryParamsSchema, tSharedLinkSchema, table, tabs, temporaryChatPermissionsSchema, textMimeTypes, textarea, toMinimalFeedback, toast, toaster, toggle, toggleGroup, toolApprovalHookConfigSchema, toolApprovalModeSchema, toolApprovalPolicySchema, toolArgumentFilterFieldSchema, tooltip, traceViewerDefaults, traceViewerLimits, transactionsSchema, turnstileOptionsSchema, turnstileSchema, unattributedAssistantContentSchema, updateResourcePermissionsRequestSchema, updateResourcePermissionsResponseSchema, updateSchedulePayloadSchema, useToast, userSubmittedMessageFieldPathSchema, utils, validateActionDomain, validateAndParseOpenAPISpec, validateAzureGroups, validateSettingDefinitions, validateVisionModel, vertexAISchema, vertexModelConfigSchema, videoMimeTypes, visionModels, webSearchPermissionsSchema, webSearchSchema };
|
|
7931
8170
|
|
|
7932
8171
|
//# sourceMappingURL=index.mjs.map
|