librechat-data-provider 0.8.521 → 0.8.523

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.
Files changed (64) hide show
  1. package/dist/{data-service-pwrlWjJs.mjs → data-service-Bx6IFaSa.mjs} +1770 -51
  2. package/dist/data-service-Bx6IFaSa.mjs.map +1 -0
  3. package/dist/{data-service-DOIF4BkW.js → data-service-CTX0tVO5.js} +2509 -112
  4. package/dist/data-service-CTX0tVO5.js.map +1 -0
  5. package/dist/index.js +1503 -54
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +1314 -55
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react-query/index.js +2 -1
  10. package/dist/react-query/index.js.map +1 -1
  11. package/dist/react-query/index.mjs +2 -1
  12. package/dist/react-query/index.mjs.map +1 -1
  13. package/dist/types/accessPermissions.d.ts +58 -1
  14. package/dist/types/actions.d.ts +2 -2
  15. package/dist/types/agentToolOptions.d.ts +11 -0
  16. package/dist/types/api-endpoints.d.ts +24 -0
  17. package/dist/types/bedrock.d.ts +238 -10
  18. package/dist/types/cadence.d.ts +33 -0
  19. package/dist/types/code/approval.d.ts +26 -0
  20. package/dist/types/code/worker.d.ts +10 -0
  21. package/dist/types/code/workspace.d.ts +28 -0
  22. package/dist/types/codeEnvRef.d.ts +26 -0
  23. package/dist/types/config.d.ts +13180 -3021
  24. package/dist/types/data-service.d.ts +48 -2
  25. package/dist/types/errors.d.ts +2 -0
  26. package/dist/types/file-config.d.ts +138 -9
  27. package/dist/types/filters.d.ts +1422 -0
  28. package/dist/types/generate.d.ts +103 -1
  29. package/dist/types/index.d.ts +17 -0
  30. package/dist/types/keys.d.ts +33 -2
  31. package/dist/types/langchain.d.ts +4 -0
  32. package/dist/types/limits.d.ts +13 -0
  33. package/dist/types/mcp.d.ts +555 -460
  34. package/dist/types/messages.d.ts +24 -0
  35. package/dist/types/models.d.ts +1112 -319
  36. package/dist/types/parameterSettings.d.ts +13 -1
  37. package/dist/types/parsers.d.ts +10 -0
  38. package/dist/types/permissions.d.ts +42 -1
  39. package/dist/types/providers.d.ts +37 -0
  40. package/dist/types/request.d.ts +2 -2
  41. package/dist/types/resolve-llm-delivery-path.d.ts +68 -0
  42. package/dist/types/roles.d.ts +34 -0
  43. package/dist/types/runSteps.d.ts +59 -0
  44. package/dist/types/schemas.d.ts +1724 -248
  45. package/dist/types/stateful-code.d.ts +7 -0
  46. package/dist/types/svg.d.ts +34 -0
  47. package/dist/types/types/agents.d.ts +116 -7
  48. package/dist/types/types/assistants.d.ts +121 -6
  49. package/dist/types/types/files.d.ts +46 -2
  50. package/dist/types/types/index.d.ts +2 -0
  51. package/dist/types/types/insights.d.ts +71 -0
  52. package/dist/types/types/mutations.d.ts +1 -0
  53. package/dist/types/types/queries.d.ts +37 -2
  54. package/dist/types/types/queuedTurns.d.ts +870 -0
  55. package/dist/types/types/runs.d.ts +119 -9
  56. package/dist/types/types/schedules.d.ts +339 -0
  57. package/dist/types/types/skills.d.ts +9 -0
  58. package/dist/types/types/subagents.d.ts +159 -0
  59. package/dist/types/types/traces.d.ts +85 -0
  60. package/dist/types/types/web.d.ts +12 -2
  61. package/dist/types/types.d.ts +101 -1
  62. package/package.json +5 -3
  63. package/dist/data-service-DOIF4BkW.js.map +0 -1
  64. package/dist/data-service-pwrlWjJs.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,8 +1,9 @@
1
- import { $ as permissionEntrySchema, $a as tMessageSchema, $i as anthropicSettings, $n as supportsBalanceCheck, $r as imageTypeMapping, $t as azureGroupConfigsSchema, Aa as googleSettings, Ai as AuthType, An as isRemoteOidcUrlAllowed, Ao as extractEnvVariable, Ar as applicationMimeTypes, At as SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, B as MutationKeys, Ba as isParamEndpoint, Bi as ReasoningEffort, Bn as paramDefinitionSchema, Br as defaultSTTMimeTypes, Bt as SettingsViews, Ca as endpointSettings, Ci as OptionTypes, Cn as getConfigDefaults, Co as feedbackRatingSchema, Cr as FileSources, Ct as MAX_SUBAGENT_DEPTH, Da as googleBaseSchema, Di as generateOpenAISchema, Dn as imageGenTools, Do as getTagsForRating, Dr as loginPage, Dt as RateLimitPrefix, Ea as getSettingsKeys, Ei as generateGoogleSchema, En as getSchemaDefaults, Eo as getTagByKey, Er as buildLoginRedirectUrl, Et as OCRStrategy, F as request_default, Fa as isAssistantsEndpoint, Fi as ImageVisionTool, Fn as modelConfigSchema, Fr as codeInterpreterMimeTypes, Ft as SafeSearchTypes, G as PrincipalType, Ga as openRouterSchema, Gi as ThinkingDisplay, Gn as setMessageFilterRegexValidator, Gr as excelMimeTypes, Gt as VisionModes, H as AccessRoleIds, Ha as openAIBaseSchema, Hi as ReasoningParameterFormat, Hn as rateLimitSchema, Hr as documentParserMimeTypes, Ht as TTSProviders, I as getTokenHeader, Ia as isDocumentSupportedProvider, Ii as MYTHOS_CLASS_FAMILIES, In as modularEndpoints, Ir as codeInterpreterMimeTypesList, It as ScraperProviders, J as accessRoleToPermBits, Ja as tBannerSchema, Ji as agentsBaseSchema, Jn as specialVariables, Jr as fullMimeTypesList, Jt as alternateName, K as ResourceType, Ka as paramEndpoints, Ki as ThinkingLevel, Kn as skillSyncConfigSchema, Kr as fileConfig, Kt as agentsEndpointSchema, L as setAcceptLanguageHeader, La as isImageVisionTool, Li as MemoryScope, Ln as normalizeMCPToolKey, Lr as codeTypeMapping, Lt as SearchCategories, Ma as imageDetailValue, Mi as BedrockReasoningConfig, Mn as memorySchema, Mo as isSensitiveEnvVar, Mr as bedrockDocumentExtensions, Mt as SKILL_SYNC_MAX_INTERVAL_MINUTES, Na as inputTokensIncludesCache, Ni as EModelEndpoint, Nn as messageFilterPiiSchema, No as normalizeEndpointName, Nr as bedrockDocumentFormats, Nt as SKILL_SYNC_MIN_INTERVAL_MINUTES, Oa as googleGenConfigSchema, Oi as validateSettingDefinitions, On as initialModelsConfig, Oo as toMinimalFeedback, Or as registerPage, Ot as RerankerTypes, Pa as isAgentsEndpoint, Pi as ImageDetail, Pn as messageFilterSchema, Pr as bedrockDocumentMimeTypes, Pt as STTProviders, Q as permBitsToAccessLevel, Qa as tExampleSchema, Qi as anthropicSchema, Qn as summarizationTriggerSchema, Qr as imageMimeTypes, Qt as azureEndpointSchema, R as setTokenHeader, Ra as isMythosClassModel, Ri as Providers, Rn as normalizeServerName, Rr as convertStringsToRegex, Rt as SearchProviders, Sa as eVerbositySchema, Si as ComponentTypes, Sn as fileStrategiesSchema, So as FEEDBACK_TAGS, Sr as FileContext, St as LocalStorageKeys, Ta as getModelKey, Ti as generateDynamicSchema, Tn as getEndpointField, To as feedbackTagKeySchema, Tr as apiBaseUrl, Tt as MAX_SUBAGENT_RUN_CONFIGS, U as PermissionBits, Ua as openAISchema, Ui as ReasoningResponseKey, Un as resolveEndpointType, Ur as endpointFileConfigSchema, Ut as Time, V as QueryKeys, Va as isUUID, Vi as ReasoningMode, Vn as providerEndpointMap, Vr as defaultTextMimeTypes, Vt as SystemCategories, W as PrincipalModel, Wa as openAISettings, Wi as ReasoningSummary, Wn as retainRecentConfigSchema, Wr as excelFileTypes, Wt as ViolationTypes, X as getResourcePermissionsResponseSchema, Xa as tConversationTagSchema, Xi as agentsSettings, Xn as splitToolCallName, Xr as getEndpointFileConfig, Xt as assistantEndpointSchema, Y as effectivePermissionsResponseSchema, Ya as tConversationSchema, Yi as agentsSchema, Yn as splitMCPToolKey, Yr as getConfiguredMimeAccept, Yt as anthropicEndpointSchema, Z as hasPermissions, Za as tConvoUpdateSchema, Zi as anthropicBaseSchema, Zn as summarizationConfigSchema, Zr as imageExtRegex, Zt as azureBaseSchema, _a as eReasoningParameterFormatSchema, _i as getRefillEligibilityDate, _n as defaultSocialLogins, _o as hostImageIdSuffix, _r as StreamableHTTPOptionsSchema, _t as FetchTokenConfig, a as data_service_exports, aa as compactAgentsSchema, ai as mbToBytes, an as bedrockModels, ao as tSharedLinkSchema, ar as turnstileSchema, at as AgentCapabilities, ba as eThinkingDisplaySchema, bi as tModelSpecSchema, bn as fileSourceSchema, bo as FEEDBACK_RATINGS, br as AuthorizationTypeEnum, bt as InfiniteCollections, ca as defaultAgentFormValues, ci as mimeTypeAliases, cn as checkpointerTypeSchema, co as EToolResources, cr as vertexModelConfigSchema, ct as BASE_PRINCIPAL_CONFIG_SECTIONS, da as eAnthropicEffortSchema, di as setFileConfigRegexCompiler, dn as contextPruningSchema, do as RunStatus, dr as MCPOptionsSchema, dt as CohereConstants, ea as assistantSchema, ei as inferMimeType, en as azureGroupSchema, eo as tModelSpecPresetSchema, er as toolApprovalHookConfigSchema, et as principalSchema, fa as eImageDetailSchema, fi as supportedMimeTypes, fn as defaultAgentCapabilities, fo as StepStatus, fr as MCPServerUserInputSchema, ft as Constants, ga as eReasoningModeSchema, gi as REFILL_INTERVAL_UNITS, gn as defaultRetrievalModels, go as defaultOrderQuery, gr as StdioOptionsSchema, gt as ErrorTypes, ha as eReasoningEffortSchema, hi as videoMimeTypes, hn as defaultModels, ho as actionDomainSeparator, hr as SSEOptionsSchema, ht as EndpointURLs, ia as compactAgentsBaseSchema, ii as isPermissiveMimeConfig, in as bedrockGuardrailConfigSchema, io as tQueryParamsSchema, ir as turnstileOptionsSchema, it as AUTH_USER_DOC_BY_ID_PREFIX, ja as imageDetailNumeric, ji as BedrockProviders, jn as langfuseConfigSchema, jo as extractVariableName, jr as audioMimeTypes, jt as SKILL_SYNC_MAX_DISCOVERY_DEPTH, ka as googleSchema, ki as AnthropicEffort, kn as interfaceSchema, ko as envVarRegex, kr as sharedFileDownload, kt as RetentionMode, la as defaultAssistantFormValues, li as retrievalMimeTypes, ln as cloudfrontConfigSchema, lo as FilePurpose, lr as visionModels, lt as CacheKeys, ma as eReasoningContextSchema, mi as textMimeTypes, mn as defaultEndpoints, mo as actionDelimiter, mr as MCP_USER_INPUT_FIELDS, mt as EImageOutputType, na as cacheSubsetProviders, ni as isAnthropicTextDocumentType, nn as baseEndpointSchema, no as tPluginSchema, nr as toolApprovalPolicySchema, nt as updateResourcePermissionsRequestSchema, oa as compactAssistantSchema, oi as megabyte, on as buildServerNameAliases, oo as AnnotationTypes, or as validateVisionModel, ot as AuthKeys, pa as eModelEndpointSchema, pi as supportsFiles, pn as defaultAssistantsVersion, po as Tools, pr as MCPServersSchema, pt as DEFAULT_MEMORY_MAX_INPUT_TOKENS, q as accessRoleSchema, qa as removeNullishValues, qi as Verbosity, qn as skillSyncGitHubSourceSchema, qr as fileConfigSchema, qt as allowedAddressesSchema, ra as coerceNumber, ri as isBedrockDocumentType, rn as bedrockEndpointSchema, ro as tPresetSchema, rr as transactionsSchema, rt as updateResourcePermissionsResponseSchema, sa as compactGoogleSchema, si as mergeFileConfig, sn as checkpointerSchema, so as AssistantStreamEvents, sr as vertexAISchema, st as BASE_ONLY_CONFIG_SECTIONS, ta as authTypeSchema, ti as isAnthropicDocumentType, tn as balanceSchema, to as tPluginAuthConfigSchema, tr as toolApprovalModeSchema, tt as resourcePermissionsResponseSchema, ua as documentSupportedProviders, ui as retrievalMimeTypesList, un as configSchema, uo as MessageContentTypes, ur as webSearchSchema, ut as Capabilities, va as eReasoningResponseKeySchema, vi as modelSpecSubagentsSchema, vn as endpointSchema, vo as hostImageNamePrefix, vr as WebSocketOptionsSchema, vt as ForkOptions, wa as extendedModelEndpointSchema, wi as SettingTypes, wn as getDefaultParamsEndpoint, wo as feedbackSchema, wr as checkOpenAIStorage, wt as MAX_SUBAGENT_GRAPH_NODES, xa as eThinkingLevelSchema, xi as MAX_SUBAGENTS, xn as fileStorageSchema, xo as FEEDBACK_REASON_KEYS, xr as TokenExchangeMethodEnum, xt as KnownEndpoints, ya as eReasoningSummarySchema, yi as specsConfigSchema, yn as excludedKeys, yo as isActionTool, yr as AuthTypeEnum, yt as ImageDetailCost, z as DynamicQueryKeys, za as isOpenAILikeProvider, zi as ReasoningContext, zn as ocrSchema, zr as defaultOCRMimeTypes, zt as SettingsTabValues } from "./data-service-pwrlWjJs.mjs";
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";
2
2
  import { z } from "zod";
3
3
  import dayjs from "dayjs";
4
4
  import utc from "dayjs/plugin/utc.js";
5
5
  import timezonePlugin from "dayjs/plugin/timezone.js";
6
+ import { Cron } from "croner";
6
7
  import axios from "axios";
7
8
  import { URL } from "url";
8
9
  import crypto from "crypto";
@@ -184,6 +185,17 @@ function supportsContext1m(model) {
184
185
  return false;
185
186
  }
186
187
  /**
188
+ * Checks whether a native Anthropic Claude model supports prompt caching.
189
+ *
190
+ * This uses the configured model ID directly. Resolving it through a token
191
+ * map first can collapse a newly released Claude model to the generic
192
+ * `claude-` fallback and incorrectly disable cache control.
193
+ */
194
+ function supportsPromptCache(model) {
195
+ if (model.includes("claude-3-5-sonnet-latest") || model.includes("claude-3.5-sonnet-latest")) return false;
196
+ return /claude-3[-.]7/.test(model) || /claude-3[-.]5-(?:sonnet|haiku)/.test(model) || /claude-3-(?:sonnet|haiku|opus)?/.test(model) || /claude-(?:sonnet|opus|haiku)[-.]?(?:[4-9]|\d{2,})/.test(model) || /claude-(?:[4-9]|\d{2,})(?:[-.](?:sonnet|opus|haiku))?/.test(model) || isMythosClassModel(model);
197
+ }
198
+ /**
187
199
  * A Bedrock Claude model ID may be prefixed (`anthropic.claude-*`,
188
200
  * `us.anthropic.claude-*`, `global.anthropic.claude-*`) or bare (`claude-*`,
189
201
  * used when the LibreChat model ID maps to an application inference profile).
@@ -638,11 +650,14 @@ let StepEvents = /* @__PURE__ */ function(StepEvents) {
638
650
  StepEvents["ON_REASONING_DELTA"] = "on_reasoning_delta";
639
651
  StepEvents["ON_RUN_STEP_DELTA"] = "on_run_step_delta";
640
652
  StepEvents["ON_RUN_STEP_COMPLETED"] = "on_run_step_completed";
653
+ /** Terminal signal for a run step: closed with a status and timestamps. */
654
+ StepEvents["ON_RUN_STEP_CLOSED"] = "on_run_step_closed";
641
655
  StepEvents["ON_SUMMARIZE_START"] = "on_summarize_start";
642
656
  StepEvents["ON_SUMMARIZE_DELTA"] = "on_summarize_delta";
643
657
  StepEvents["ON_SUMMARIZE_COMPLETE"] = "on_summarize_complete";
644
658
  StepEvents["ON_SUBAGENT_UPDATE"] = "on_subagent_update";
645
659
  StepEvents["ON_SANDBOX_STARTING"] = "on_sandbox_starting";
660
+ StepEvents["ON_PTC_TOOL_CALL"] = "on_ptc_tool_call";
646
661
  return StepEvents;
647
662
  }({});
648
663
  /** Token-tracking event names streamed to the client (separate from StepEvents dispatch). */
@@ -683,6 +698,17 @@ let ActivityLabelEvents = /* @__PURE__ */ function(ActivityLabelEvents) {
683
698
  ActivityLabelEvents["ON_ACTIVITY_LABEL"] = "on_activity_label";
684
699
  return ActivityLabelEvents;
685
700
  }({});
701
+ /** Live title updates for an existing reasoning content part. */
702
+ let ReasoningLabelEvents = /* @__PURE__ */ function(ReasoningLabelEvents) {
703
+ ReasoningLabelEvents["ON_REASONING_LABEL"] = "on_reasoning_label";
704
+ /** Internal durable budget reservation; clients intentionally do not render it. */
705
+ ReasoningLabelEvents["ON_REASONING_LABEL_ATTEMPT"] = "on_reasoning_label_attempt";
706
+ return ReasoningLabelEvents;
707
+ }({});
708
+ const finiteNonNegativeInteger = (value) => {
709
+ if (typeof value !== "number" || !Number.isFinite(value)) return;
710
+ return Math.min(Number.MAX_SAFE_INTEGER, Math.max(0, Math.floor(value)));
711
+ };
686
712
  /**
687
713
  * Full prompt token count for one completed model call — the EXACT context the
688
714
  * model saw, provider-aware: additive providers (Bedrock) report `input_tokens`
@@ -694,37 +720,114 @@ let ActivityLabelEvents = /* @__PURE__ */ function(ActivityLabelEvents) {
694
720
  * gauge reconciles its calibrated estimate to.
695
721
  */
696
722
  const promptTokensFromUsage = (event) => {
697
- const input = event.input_tokens ?? 0;
723
+ const input = finiteNonNegativeInteger(event.input_tokens) ?? 0;
698
724
  const details = event.input_token_details ?? {};
699
- const cacheRead = details.cache_read ?? 0;
700
- const cacheCreation = details.cache_creation ?? 0;
701
- return (event.provider != null ? inputTokensIncludesCache(event.provider) : cacheRead + cacheCreation <= input) ? input : input + cacheRead + cacheCreation;
725
+ const cacheRead = finiteNonNegativeInteger(details.cache_read) ?? 0;
726
+ const cacheCreation = finiteNonNegativeInteger(details.cache_creation) ?? 0;
727
+ return (event.provider != null ? inputTokensIncludesCache(event.provider) : cacheRead + cacheCreation <= input) ? input : Math.min(Number.MAX_SAFE_INTEGER, input + cacheRead + cacheCreation);
728
+ };
729
+ /**
730
+ * Scales per-tool result-message counts while bounding both malformed input and
731
+ * rounding error. Null-prototype records keep tool names as ordinary data keys;
732
+ * cumulative apportionment preserves the scaled sum in one linear pass.
733
+ */
734
+ const scaleToolMessageTokenCounts = (value, oldTotal, newTotal) => {
735
+ if (value == null || typeof value !== "object" || Array.isArray(value)) return;
736
+ const scaled = Object.create(null);
737
+ let remaining = oldTotal;
738
+ let cumulative = 0;
739
+ let allocated = 0;
740
+ let found = false;
741
+ for (const [name, rawCount] of Object.entries(value)) {
742
+ const count = finiteNonNegativeInteger(rawCount);
743
+ if (count == null || count === 0) continue;
744
+ const bounded = Math.min(count, remaining);
745
+ remaining -= bounded;
746
+ cumulative += bounded;
747
+ const target = oldTotal > 0 ? Math.round(cumulative / oldTotal * newTotal) : 0;
748
+ const apportioned = target - allocated;
749
+ allocated = target;
750
+ if (apportioned > 0) {
751
+ scaled[name] = apportioned;
752
+ found = true;
753
+ }
754
+ }
755
+ return found ? scaled : void 0;
702
756
  };
703
757
  /**
704
758
  * Reconciles a pre-invoke context snapshot's CALIBRATED estimate to a call's
705
759
  * ACTUAL prompt tokens. The SDK's calibration multiplier scales only
706
- * `messageTokens` (instructions/summary are raw tiktoken counts), and it can
760
+ * `messageTokens` (instructions/summary are raw tiktoken counts) and can
707
761
  * over-shoot badly when a provider injects server-side content the SDK never
708
762
  * counted (e.g. Anthropic web search) — pinning the gauge several× too high and
709
763
  * persisting it. Trust the provider's own prompt count: keep the raw
710
- * instruction/summary rows, set `messageTokens` to the remainder, and recompute
711
- * the free space. No-op when `promptTokens` is unusable.
764
+ * instruction/summary rows, set `messageTokens` to the remainder, recompute the
765
+ * free space, and rescale the `toolMessageTokens` share to the new message
766
+ * total. No-op when `promptTokens` is unusable.
712
767
  */
713
768
  const reconcileContextUsage = (snapshot, promptTokens) => {
714
769
  if (!Number.isFinite(promptTokens) || promptTokens <= 0) return snapshot;
770
+ const normalizedPromptTokens = Math.min(Number.MAX_SAFE_INTEGER, Math.floor(promptTokens));
771
+ if (normalizedPromptTokens <= 0) return snapshot;
715
772
  const { breakdown } = snapshot;
716
- const budget = snapshot.contextBudget ?? breakdown.maxContextTokens;
717
- const nonMessageTokens = (breakdown.instructionTokens ?? 0) + (breakdown.summaryTokens ?? 0);
718
- const messageTokens = Math.max(0, promptTokens - nonMessageTokens);
719
- return {
773
+ const instructionTokens = finiteNonNegativeInteger(breakdown.instructionTokens) ?? 0;
774
+ const summaryTokens = finiteNonNegativeInteger(breakdown.summaryTokens) ?? 0;
775
+ const budget = finiteNonNegativeInteger(snapshot.contextBudget) ?? finiteNonNegativeInteger(breakdown.maxContextTokens);
776
+ const nonMessageTokens = instructionTokens + summaryTokens;
777
+ const messageTokens = Math.max(0, normalizedPromptTokens - nonMessageTokens);
778
+ /** `toolMessageTokens` is a subset of the OLD (calibrated) `messageTokens`;
779
+ * rescale it by the same proportion so the split tracks the provider's real
780
+ * total. A supplied zero remains a known-zero split; absent fields stay absent
781
+ * for older snapshots. */
782
+ const priorMessageTokens = finiteNonNegativeInteger(breakdown.messageTokens) ?? 0;
783
+ const priorToolMessageTokens = finiteNonNegativeInteger(breakdown.toolMessageTokens);
784
+ let toolMessageTokens;
785
+ if (priorToolMessageTokens != null) {
786
+ toolMessageTokens = 0;
787
+ if (priorMessageTokens > 0 && priorToolMessageTokens > 0) toolMessageTokens = Math.min(messageTokens, Math.round(Math.min(priorToolMessageTokens, priorMessageTokens) / priorMessageTokens * messageTokens));
788
+ }
789
+ const toolMessageTokenCounts = toolMessageTokens != null ? scaleToolMessageTokenCounts(breakdown.toolMessageTokenCounts, Math.min(priorToolMessageTokens ?? 0, priorMessageTokens), toolMessageTokens) : void 0;
790
+ const nextBreakdown = {
791
+ ...breakdown,
792
+ instructionTokens,
793
+ summaryTokens,
794
+ messageTokens
795
+ };
796
+ if (toolMessageTokens == null) {
797
+ delete nextBreakdown.toolMessageTokens;
798
+ delete nextBreakdown.toolMessageTokenCounts;
799
+ } else {
800
+ nextBreakdown.toolMessageTokens = toolMessageTokens;
801
+ if (toolMessageTokenCounts == null) delete nextBreakdown.toolMessageTokenCounts;
802
+ else nextBreakdown.toolMessageTokenCounts = toolMessageTokenCounts;
803
+ }
804
+ const result = {
720
805
  ...snapshot,
721
- breakdown: {
722
- ...breakdown,
723
- messageTokens
724
- },
725
- remainingContextTokens: budget != null ? Math.max(0, budget - promptTokens) : snapshot.remainingContextTokens
806
+ breakdown: nextBreakdown
726
807
  };
808
+ if (budget != null) result.remainingContextTokens = Math.max(0, budget - normalizedPromptTokens);
809
+ else {
810
+ const remaining = finiteNonNegativeInteger(snapshot.remainingContextTokens);
811
+ if (remaining == null) delete result.remainingContextTokens;
812
+ else result.remainingContextTokens = remaining;
813
+ }
814
+ return result;
727
815
  };
816
+ /** Provider output, including reasoning omitted from an under-reported output count. */
817
+ const outputTokensFromUsage = (event) => {
818
+ const output = finiteNonNegativeInteger(event.output_tokens) ?? 0;
819
+ const total = finiteNonNegativeInteger(event.total_tokens) ?? 0;
820
+ return Math.max(output, total - promptTokensFromUsage(event));
821
+ };
822
+ /** Reconcile and retain the primary call details on live, saved, and resumable snapshots. */
823
+ const reconcileContextUsageFromEvent = (snapshot, event) => ({
824
+ ...reconcileContextUsage(snapshot, promptTokensFromUsage(event)),
825
+ model: event.model,
826
+ provider: event.provider,
827
+ completedOutputTokens: outputTokensFromUsage(event),
828
+ cacheRead: finiteNonNegativeInteger(event.input_token_details?.cache_read) ?? 0,
829
+ cacheWrite: finiteNonNegativeInteger(event.input_token_details?.cache_creation) ?? 0
830
+ });
728
831
  //#endregion
729
832
  //#region src/parsers.ts
730
833
  dayjs.extend(utc);
@@ -958,6 +1061,14 @@ function replaceSpecialVars({ text, user, now: inputNow, timezone }) {
958
1061
  return result;
959
1062
  }
960
1063
  /**
1064
+ * Resolves the display label ("sender") for an ephemeral agent:
1065
+ * `modelLabel` (user/preset) → model spec's `label` → endpoint config's
1066
+ * `modelDisplayLabel` → `''` (lets consumers fall back to the model name).
1067
+ */
1068
+ function getEphemeralSender({ modelLabel, specLabel, modelDisplayLabel }) {
1069
+ return modelLabel ?? specLabel ?? modelDisplayLabel ?? "";
1070
+ }
1071
+ /**
961
1072
  * Encodes an ephemeral agent ID from endpoint, model, optional sender, and optional index.
962
1073
  * Uses __ to replace : (reserved in graph node names) and ___ to separate sender.
963
1074
  *
@@ -1249,7 +1360,266 @@ function mapGroupToAzureConfig({ groupName, groupMap }) {
1249
1360
  return result;
1250
1361
  }
1251
1362
  //#endregion
1363
+ //#region src/langchain.ts
1364
+ /**
1365
+ * LangChain classifies a provider failure by mutating the error: it stamps `lc_error_code` and
1366
+ * appends `\n\nTroubleshooting URL: <docs url>\n` to the message. Both halves are handled here
1367
+ * because the server strips the URL before persisting the message, while the client still reads the
1368
+ * code back out of messages persisted before it did.
1369
+ */
1370
+ const LANGCHAIN = "langchain";
1371
+ const ERROR_PATH = "/errors/";
1372
+ const TROUBLESHOOTING_LABEL = "Troubleshooting URL:";
1373
+ const WHITESPACE = /\s/;
1374
+ /** Provider errors cross untyped boundaries, so a `message` is not guaranteed to be a string. */
1375
+ function toMessageText(message) {
1376
+ if (typeof message === "string") return message;
1377
+ return message == null ? "" : String(message);
1378
+ }
1379
+ function isErrorCodeCharacter(character) {
1380
+ const code = character.charCodeAt(0);
1381
+ return character === "_" || code >= 65 && code <= 90 || code >= 97 && code <= 122;
1382
+ }
1383
+ function findTokenEnd(text, start, limit = text.length) {
1384
+ let end = start;
1385
+ while (end < limit && !WHITESPACE.test(text[end])) end += 1;
1386
+ return end;
1387
+ }
1388
+ function findErrorCode(text, searchableText, start, end) {
1389
+ const langChainIndex = searchableText.indexOf(LANGCHAIN, start);
1390
+ if (langChainIndex < 0 || langChainIndex >= end) return;
1391
+ let errorCode;
1392
+ let pathIndex = searchableText.indexOf(ERROR_PATH, langChainIndex + 9);
1393
+ while (pathIndex >= 0 && pathIndex < end) {
1394
+ const codeStart = pathIndex + 8;
1395
+ let codeEnd = codeStart;
1396
+ while (codeEnd < end && isErrorCodeCharacter(text[codeEnd])) codeEnd += 1;
1397
+ if (codeEnd > codeStart) errorCode = {
1398
+ start: codeStart,
1399
+ end: codeEnd
1400
+ };
1401
+ pathIndex = searchableText.indexOf(ERROR_PATH, Math.max(codeStart, codeEnd));
1402
+ }
1403
+ return errorCode;
1404
+ }
1405
+ /** Removes LangChain's appended docs URL so provider text carries no third-party attribution. */
1406
+ function stripLangChainTroubleshootingUrl(message) {
1407
+ const text = toMessageText(message);
1408
+ const parts = [];
1409
+ let copiedUntil = 0;
1410
+ let searchFrom = 0;
1411
+ while (searchFrom < text.length) {
1412
+ const labelStart = text.indexOf(TROUBLESHOOTING_LABEL, searchFrom);
1413
+ if (labelStart < 0) break;
1414
+ let matchStart = labelStart;
1415
+ while (matchStart > copiedUntil && WHITESPACE.test(text[matchStart - 1])) matchStart -= 1;
1416
+ let urlStart = labelStart + 20;
1417
+ while (urlStart < text.length && WHITESPACE.test(text[urlStart])) urlStart += 1;
1418
+ if (!text.startsWith("https://", urlStart) && !text.startsWith("http://", urlStart)) {
1419
+ searchFrom = urlStart;
1420
+ continue;
1421
+ }
1422
+ const urlEnd = findTokenEnd(text, urlStart);
1423
+ const errorCode = findErrorCode(text, text, urlStart, urlEnd);
1424
+ if (errorCode == null) {
1425
+ searchFrom = urlEnd;
1426
+ continue;
1427
+ }
1428
+ let matchEnd = errorCode.end;
1429
+ if (text[matchEnd] === "/") matchEnd += 1;
1430
+ while (matchEnd < text.length && WHITESPACE.test(text[matchEnd])) matchEnd += 1;
1431
+ parts.push(text.slice(copiedUntil, matchStart), " ");
1432
+ copiedUntil = matchEnd;
1433
+ searchFrom = matchEnd;
1434
+ }
1435
+ parts.push(text.slice(copiedUntil));
1436
+ return parts.join("").trim();
1437
+ }
1438
+ /** The classification LangChain encoded in the docs URL it appended, when the text carries one. */
1439
+ function parseLangChainErrorCode(message) {
1440
+ const text = toMessageText(message);
1441
+ const searchableText = text.toLowerCase();
1442
+ let searchFrom = 0;
1443
+ while (searchFrom < text.length) {
1444
+ const langChainIndex = searchableText.indexOf(LANGCHAIN, searchFrom);
1445
+ if (langChainIndex < 0) return;
1446
+ const tokenEnd = findTokenEnd(text, langChainIndex);
1447
+ const errorCode = findErrorCode(text, searchableText, langChainIndex, tokenEnd);
1448
+ if (errorCode != null) return text.slice(errorCode.start, errorCode.end).toUpperCase();
1449
+ searchFrom = tokenEnd + 1;
1450
+ }
1451
+ }
1452
+ //#endregion
1453
+ //#region src/resolve-llm-delivery-path.ts
1454
+ /** Audio and video reach the model only through the media encoders, which support a
1455
+ * narrower provider set than documents. Images use the broadly supported vision
1456
+ * path and are never gated here. */
1457
+ const isProviderCapable = (mimeType, endpoint, useResponsesApi) => {
1458
+ if (mimeType.startsWith("audio/") || mimeType.startsWith("video/")) return isMediaSupportedProvider(endpoint);
1459
+ if (mimeType === "application/pdf") return useResponsesApi === true || isDocumentSupportedProvider(endpoint);
1460
+ return true;
1461
+ };
1462
+ const SYSTEM_LLM_DELIVERY_DEFAULTS = {
1463
+ fallback: "text",
1464
+ overrides: {
1465
+ "image/*": "provider",
1466
+ "video/*": "provider",
1467
+ "audio/*": "provider",
1468
+ "application/pdf": "provider"
1469
+ }
1470
+ };
1471
+ /**
1472
+ * Types some step in the upload pipeline can turn into text: natively readable text,
1473
+ * documents a parser or OCR handles, images through OCR, and audio through transcription.
1474
+ *
1475
+ * Everything absent from this list, notably archives, tarballs, columnar data files and
1476
+ * video, has no such step, and the default text matcher accepts any well-formed type, so
1477
+ * routing them to text ends in their bytes being decoded as UTF-8.
1478
+ */
1479
+ const TEXT_RECOVERABLE_MIME_TYPES = [
1480
+ /^text\//,
1481
+ /^image\//,
1482
+ /^audio\//,
1483
+ /^application\/(json|javascript|xml|sql|yaml|x-yaml|csv|typescript|x-sh|vnd\.coffeescript)$/,
1484
+ /^application\/pdf$/,
1485
+ /^application\/vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|spreadsheetml\.sheet)$/,
1486
+ /^application\/vnd\.oasis\.opendocument\.(text|spreadsheet)$/,
1487
+ /^application\/(vnd\.ms-excel|x-msexcel|msexcel|x-ms-excel|x-excel|x-dos_ms_excel|xls|x-xls)$/,
1488
+ /^message\/rfc822$/
1489
+ ];
1490
+ /**
1491
+ * Types whose bytes are text already, so reading them directly is meaningful. Everything
1492
+ * else needs a real extractor: decoding it as UTF-8 produces mojibake rather than content.
1493
+ */
1494
+ /** Application types whose payload is text. Mirrors the set the content-protection code
1495
+ * treats as textual, plus the source and data formats this pipeline also accepts. */
1496
+ const TEXTUAL_APPLICATION_MIME_TYPES = new Set([
1497
+ "application/json",
1498
+ "application/javascript",
1499
+ "application/sql",
1500
+ "application/xml",
1501
+ "application/x-yaml",
1502
+ "application/yaml",
1503
+ "application/csv",
1504
+ "application/typescript",
1505
+ "application/x-sh",
1506
+ "application/vnd.coffeescript"
1507
+ ]);
1508
+ function isNativelyReadableText(mimeType) {
1509
+ const normalized = mimeType.split(";", 1)[0].trim().toLowerCase();
1510
+ return normalized.startsWith("text/") || TEXTUAL_APPLICATION_MIME_TYPES.has(normalized) || normalized === "message/rfc822";
1511
+ }
1512
+ function hasTextExtractionPath(mimeType) {
1513
+ return TEXT_RECOVERABLE_MIME_TYPES.some((pattern) => pattern.test(mimeType));
1514
+ }
1515
+ /**
1516
+ * Resolves the default file path destination for a given mime type.
1517
+ * Resolution chain: endpoint overrides -> endpoint fallback -> global overrides -> global fallback -> system defaults.
1518
+ */
1519
+ function resolveDefaultLLMDeliveryPath(mimeType, endpointConfig, globalConfig, endpoint, useResponsesApi, sttConfigured) {
1520
+ const wildcard = mimeType.split("/")[0] + "/*";
1521
+ if (endpointConfig?.overrides) {
1522
+ if (endpointConfig.overrides[mimeType]) return endpointConfig.overrides[mimeType];
1523
+ if (endpointConfig.overrides[wildcard]) return endpointConfig.overrides[wildcard];
1524
+ }
1525
+ if (endpointConfig?.fallback) return endpointConfig.fallback;
1526
+ if (globalConfig?.overrides) {
1527
+ if (globalConfig.overrides[mimeType]) return globalConfig.overrides[mimeType];
1528
+ if (globalConfig.overrides[wildcard]) return globalConfig.overrides[wildcard];
1529
+ }
1530
+ if (globalConfig?.fallback) return globalConfig.fallback;
1531
+ const systemDefault = SYSTEM_LLM_DELIVERY_DEFAULTS.overrides[mimeType] ?? SYSTEM_LLM_DELIVERY_DEFAULTS.overrides[wildcard] ?? SYSTEM_LLM_DELIVERY_DEFAULTS.fallback;
1532
+ /** Only the system default is capability-gated: an explicit config above is the
1533
+ * admin's decision. A known endpoint that cannot encode documents or media would
1534
+ * otherwise accept the upload and hand the model nothing at all. */
1535
+ /** `agents` is a container, not a provider: it is what an upload reports when the
1536
+ * agent's real provider could not be resolved, as for ephemeral agents. A custom
1537
+ * endpoint name is likewise unresolvable here, since its real provider is chosen
1538
+ * at request time and is usually OpenAI- or Anthropic-compatible. Judging
1539
+ * capability from either would downgrade media the actual provider can deliver,
1540
+ * so an unresolved provider keeps the system default. */
1541
+ const namedEndpoint = endpoint != null && endpoint !== "agents";
1542
+ const providerKnown = namedEndpoint && isKnownProviderIdentifier(endpoint);
1543
+ const isMedia = mimeType.startsWith("audio/") || mimeType.startsWith("video/");
1544
+ 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";
1546
+ /** Bedrock's Converse document path natively accepts more than PDF, so on that
1547
+ * endpoint its document types belong on the provider path rather than being
1548
+ * extracted, which would drop non-text content and layout. */
1549
+ if (systemDefault !== "provider" && endpoint === "bedrock" && isBedrockDocumentType(mimeType)) return "provider";
1550
+ if (systemDefault === "text" && !canRecoverText(mimeType)) return "none";
1551
+ return systemDefault;
1552
+ }
1553
+ /**
1554
+ * Delivery path for an upload that named no tool resource. The legacy chooser makes the
1555
+ * destination explicit, so nothing is inferred there.
1556
+ */
1557
+ function resolveDefaultUploadLLMDeliveryPath({ mimeType, endpointConfig, fileConfig, endpoint, useResponsesApi, sttConfigured }) {
1558
+ if (endpointConfig?.legacyFileUploadUX === true) return "provider";
1559
+ return resolveDefaultLLMDeliveryPath(mimeType, endpointConfig?.defaultLLMDeliveryPath, fileConfig?.defaultLLMDeliveryPath, endpoint, useResponsesApi, sttConfigured);
1560
+ }
1561
+ /** Delivery path for an upload, honoring an explicitly chosen tool resource. */
1562
+ function resolveUploadLLMDeliveryPath({ toolResource, mimeType, endpointConfig, fileConfig, endpoint, useResponsesApi, sttConfigured }) {
1563
+ if (toolResource === "context" || toolResource === "ocr") return "text";
1564
+ if (toolResource === "file_search" || toolResource === "execute_code") return "none";
1565
+ return resolveDefaultUploadLLMDeliveryPath({
1566
+ mimeType,
1567
+ endpointConfig,
1568
+ fileConfig,
1569
+ endpoint,
1570
+ useResponsesApi,
1571
+ sttConfigured
1572
+ });
1573
+ }
1574
+ /**
1575
+ * Whether a file tool can do anything with this type. `file_search` indexes extracted
1576
+ * text, so it needs a type some step can turn into text and cannot use media, whose
1577
+ * extraction paths are OCR and speech rather than the vector store. Code execution is
1578
+ * judged by the list the client offers it from. Shared by upload-time selection and
1579
+ * deferred provisioning so the two cannot queue a file the other would refuse.
1580
+ */
1581
+ function canToolResourceConsume(toolResource, mimeType) {
1582
+ if (toolResource === "file_search") return !mimeType.startsWith("image") && !mimeType.startsWith("audio") && !mimeType.startsWith("video") && (hasTextExtractionPath(mimeType) || matchesMimeList(mimeType, retrievalMimeTypes));
1583
+ if (toolResource === "execute_code") return matchesMimeList(mimeType, codeInterpreterMimeTypes);
1584
+ return true;
1585
+ }
1586
+ const matchesMimeList = (mimeType, patterns) => patterns.some((pattern) => pattern.test(mimeType));
1587
+ /**
1588
+ * Where a unified upload will end up, and whether it can be accepted at all.
1589
+ *
1590
+ * An upload has to be readable by something: the model, an extraction step, or a file
1591
+ * tool. A permanent one has to land on an agent resource too, or storing it succeeds
1592
+ * while leaving the agent no reference to it. Both outcomes are decided here rather than
1593
+ * discovered later, so a request that would change nothing is refused with a reason.
1594
+ *
1595
+ * `agentTools` is undefined when no agent record backs the upload, as for an ephemeral
1596
+ * agent that exists only for the request. An unknown tool set is not judged.
1597
+ */
1598
+ function resolveUploadDestination(params) {
1599
+ const { toolResource, deliveryPath, mimeType, agentTools, hasAgent, isMessageAttachment, allowUnknownMessageConsumer = false, contextEnabled } = params;
1600
+ const refusesContext = (resource) => resource === "context" && hasAgent && !isMessageAttachment && contextEnabled === false;
1601
+ if (toolResource) {
1602
+ const resolved = toolResource === "ocr" ? "context" : toolResource;
1603
+ return refusesContext(resolved) ? { rejection: "context-disabled" } : { toolResource: resolved };
1604
+ }
1605
+ if (deliveryPath === "text") return refusesContext("context") ? { rejection: "context-disabled" } : { toolResource: "context" };
1606
+ const consumingTool = agentTools?.find((tool) => (tool === "execute_code" || tool === "file_search") && canToolResourceConsume(tool, mimeType));
1607
+ if (deliveryPath === "none" && consumingTool) return { toolResource: consumingTool };
1608
+ if (hasAgent && !isMessageAttachment) return { rejection: "no-agent-resource" };
1609
+ if (deliveryPath === "none" && (!isMessageAttachment || !allowUnknownMessageConsumer)) return { rejection: "no-consumer" };
1610
+ return {};
1611
+ }
1612
+ //#endregion
1252
1613
  //#region src/messages.ts
1614
+ /** A generated reasoning title describes the text as it existed at generation time.
1615
+ * Any manual edit or merge into a different reasoning step invalidates the entire
1616
+ * title revision domain while preserving unrelated content metadata. */
1617
+ function stripReasoningLabelMetadata(part) {
1618
+ if (part.type !== "think") return part;
1619
+ const { reasoning_label: _label, reasoning_label_step_id: _stepId, reasoning_label_attempts: _attempts, reasoning_label_submitted_chars: _submittedChars, reasoning_label_revision: _revision, reasoning_label_status: _status, ...unlabeledPart } = part;
1620
+ return unlabeledPart;
1621
+ }
1622
+ const treeCache = /* @__PURE__ */ new WeakMap();
1253
1623
  /**
1254
1624
  * Builds the render tree from the flat messages array. Order-robust: live
1255
1625
  * stream/steer/preempt cache writes can momentarily place a child before its
@@ -1260,6 +1630,11 @@ function mapGroupToAzureConfig({ groupName, groupMap }) {
1260
1630
  */
1261
1631
  function buildTree({ messages, fileMap }) {
1262
1632
  if (messages === null) return null;
1633
+ const cached = treeCache.get(messages);
1634
+ if (cached) {
1635
+ if (fileMap == null && cached.bare) return cached.bare;
1636
+ if (fileMap != null && cached.fileMap === fileMap && cached.hydrated) return cached.hydrated;
1637
+ }
1263
1638
  const messageMap = {};
1264
1639
  const orderedMessages = [];
1265
1640
  const rootMessages = [];
@@ -1313,7 +1688,129 @@ function buildTree({ messages, fileMap }) {
1313
1688
  rootMessages.push(extendedMessage);
1314
1689
  assignDepths(extendedMessage);
1315
1690
  }
1316
- return rootMessages;
1691
+ const tree = rootMessages;
1692
+ const entry = cached ?? {};
1693
+ if (fileMap == null) entry.bare = tree;
1694
+ else {
1695
+ entry.fileMap = fileMap;
1696
+ entry.hydrated = tree;
1697
+ }
1698
+ if (!cached) treeCache.set(messages, entry);
1699
+ return tree;
1700
+ }
1701
+ /**
1702
+ * Memoizes a messages array's id index. Every row that needs to look another
1703
+ * message up (the hover controls resolving the turn a rerun would replay) would
1704
+ * otherwise scan the whole array, which is quadratic in the conversation. A
1705
+ * cache write replaces the array, so the index dies with the array it indexes
1706
+ * and can never answer from stale rows.
1707
+ */
1708
+ const indexCache = /* @__PURE__ */ new WeakMap();
1709
+ /** The message with this id, resolved through the array's memoized index. */
1710
+ function findMessageById(messages, messageId) {
1711
+ if (messages == null || messageId == null) return;
1712
+ let index = indexCache.get(messages);
1713
+ if (index == null) {
1714
+ index = /* @__PURE__ */ new Map();
1715
+ for (const message of messages) if (message?.messageId != null && !index.has(message.messageId)) index.set(message.messageId, message);
1716
+ indexCache.set(messages, index);
1717
+ }
1718
+ return index.get(messageId);
1719
+ }
1720
+ /**
1721
+ * True when a turn carries the marker the server stamps on a manual compaction:
1722
+ * `markCompactionSummary` sets `initiatedBy: 'user'` on the summary a Compact
1723
+ * action produced, and nothing else writes it, so an automatic summary detour is
1724
+ * not one. This is the compaction's own identity, independent of where it hangs:
1725
+ * Compact runs on whatever leaf the branch ends with, so its response can parent
1726
+ * onto a user message as easily as onto the answer it summarized. Redoing one is
1727
+ * the context indicator's Compact action, never a rerun of the turn behind it.
1728
+ */
1729
+ function isUserInitiatedCompaction(message) {
1730
+ const content = message?.content;
1731
+ if (!Array.isArray(content)) return false;
1732
+ return content.some((part) => part?.type === "summary" && part.initiatedBy === "user");
1733
+ }
1734
+ /**
1735
+ * True when a message is a finished manual compaction: every content part is a
1736
+ * summary and at least one of them carries text. A part that is still streaming
1737
+ * or that failed contributes no text of its own, so an interrupted compaction
1738
+ * can be retried.
1739
+ */
1740
+ function isCompactedLeaf(message) {
1741
+ const content = message?.content;
1742
+ if (!Array.isArray(content) || content.length === 0) return false;
1743
+ let usable = false;
1744
+ for (const part of content) {
1745
+ if (part?.type !== "summary") return false;
1746
+ if (part.summarizing === true || part.failed === true) continue;
1747
+ const hasText = (part.content ?? []).some((block) => typeof block?.text === "string" && block.text.trim().length > 0);
1748
+ usable = usable || hasText;
1749
+ }
1750
+ return usable;
1751
+ }
1752
+ //#endregion
1753
+ //#region src/errors.ts
1754
+ const TOOL_CALL_ERROR_PREFIX = /^Error:\s*(?:\[[^\]]*\]\s*)*tool call failed:\s*/i;
1755
+ function hasToolCallErrorPrefix(text) {
1756
+ return TOOL_CALL_ERROR_PREFIX.test(text);
1757
+ }
1758
+ function stripToolCallErrorPrefix(text) {
1759
+ return text.replace(TOOL_CALL_ERROR_PREFIX, "");
1760
+ }
1761
+ //#endregion
1762
+ //#region src/runSteps.ts
1763
+ /**
1764
+ * Below this, a duration is noise rather than information: sub-second tool
1765
+ * calls are the common case, and labelling every one of them `· 0.3s` adds a
1766
+ * moving number to the end of most cards without telling the reader anything
1767
+ * they could act on. Callers use {@link isReportableRunStepDuration} rather
1768
+ * than comparing against this directly.
1769
+ */
1770
+ const MIN_REPORTABLE_RUN_STEP_DURATION_MS = 1e3;
1771
+ /**
1772
+ * Wall-clock duration of a run step, derived from the terminal
1773
+ * `on_run_step_closed` event.
1774
+ *
1775
+ * Returns `undefined` rather than a fallback whenever the value would be a
1776
+ * guess, because a wrong duration is worse than an absent one — an absent one
1777
+ * renders nothing, a wrong one is indistinguishable from a real measurement:
1778
+ *
1779
+ * - `created_at` is optional on the event; emitters that do not know when the
1780
+ * step opened cannot have their duration inferred from anything else.
1781
+ * - A negative result means the two timestamps came from clocks that disagree.
1782
+ * That is not hypothetical: since `@librechat/agents` v3.6.0 a step can be
1783
+ * opened in one process and closed in another after a checkpoint resume, so
1784
+ * the two stamps can legitimately originate on different machines.
1785
+ * - Non-finite input is treated as absent instead of propagating `NaN` into
1786
+ * rendering.
1787
+ *
1788
+ * Known limits, accepted rather than guessed at: only the negative direction
1789
+ * of clock skew is detectable from a single stamp pair — positive skew
1790
+ * inflates the result and cannot be distinguished from a genuinely long
1791
+ * step. And the value is wall-clock elapsed between open and close, so a
1792
+ * step held open across a suspension (a checkpoint resume, a HITL approval
1793
+ * wait) includes that held-open time. Both are properties of the only data
1794
+ * available, not derivation bugs.
1795
+ */
1796
+ function getRunStepDurationMs(closed) {
1797
+ const { created_at: createdAt, closed_at: closedAt } = closed;
1798
+ if (typeof createdAt !== "number" || typeof closedAt !== "number") return;
1799
+ if (!Number.isFinite(createdAt) || !Number.isFinite(closedAt)) return;
1800
+ const durationMs = closedAt - createdAt;
1801
+ return durationMs >= 0 ? durationMs : void 0;
1802
+ }
1803
+ /**
1804
+ * Whether a derived duration is worth showing to the reader.
1805
+ *
1806
+ * This is a presentation judgment, so it belongs at render time only. The
1807
+ * stamp sites persist the raw {@link getRunStepDurationMs} value instead of
1808
+ * pre-filtering through this — thresholding at write time would bake a
1809
+ * display rule into stored data, making "fast" indistinguishable from "not
1810
+ * derivable" and unrecoverable if the rule ever changes.
1811
+ */
1812
+ function isReportableRunStepDuration(durationMs) {
1813
+ return typeof durationMs === "number" && durationMs >= 1e3;
1317
1814
  }
1318
1815
  //#endregion
1319
1816
  //#region src/artifacts.ts
@@ -4486,6 +4983,10 @@ let PermissionTypes = /* @__PURE__ */ function(PermissionTypes) {
4486
4983
  * Type for Shared Link Permissions
4487
4984
  */
4488
4985
  PermissionTypes["SHARED_LINKS"] = "SHARED_LINKS";
4986
+ /**
4987
+ * Type for Scheduled Chats Permissions
4988
+ */
4989
+ PermissionTypes["SCHEDULES"] = "SCHEDULES";
4489
4990
  return PermissionTypes;
4490
4991
  }({});
4491
4992
  /**
@@ -4509,11 +5010,20 @@ const PERMISSION_TYPE_INTERFACE_FIELDS = {
4509
5010
  ["MCP_SERVERS"]: "mcpServers",
4510
5011
  ["REMOTE_AGENTS"]: "remoteAgents",
4511
5012
  ["SKILLS"]: "skills",
4512
- ["SHARED_LINKS"]: "sharedLinks"
5013
+ ["SHARED_LINKS"]: "sharedLinks",
5014
+ ["SCHEDULES"]: "schedules"
4513
5015
  };
4514
5016
  /** Set of interface config field names that correspond to role permissions. */
4515
5017
  const INTERFACE_PERMISSION_FIELDS = new Set(Object.values(PERMISSION_TYPE_INTERFACE_FIELDS));
4516
5018
  /**
5019
+ * Interface fields that seed a permission (use/create) BUT also carry runtime
5020
+ * config that must survive DB/tenant/user overrides. For these, override
5021
+ * sanitizers strip only the permission sub-keys (use/create) from the object
5022
+ * form and PRESERVE the boolean form — for `schedules`, `interface.schedules: false`
5023
+ * is the runtime feature disable that `getLimits` reads, not a permission toggle.
5024
+ */
5025
+ const RUNTIME_CONFIG_INTERFACE_FIELDS = new Set(["schedules"]);
5026
+ /**
4517
5027
  * YAML sub-keys within composite interface permission fields that map to permission bits.
4518
5028
  * When an interface permission field is an object, only these sub-keys are stripped from
4519
5029
  * DB overrides — other sub-keys (like `placeholder`, `trustCheckbox`) are UI-only and pass through.
@@ -4614,6 +5124,10 @@ const skillPermissionsSchema = z.object({
4614
5124
  ["SHARE"]: z.boolean().default(false),
4615
5125
  ["SHARE_PUBLIC"]: z.boolean().default(false)
4616
5126
  });
5127
+ const schedulesPermissionsSchema = z.object({
5128
+ ["USE"]: z.boolean().default(true),
5129
+ ["CREATE"]: z.boolean().default(true)
5130
+ });
4617
5131
  const sharedLinksPermissionsSchema = z.object({
4618
5132
  ["CREATE"]: z.boolean().default(true),
4619
5133
  ["SHARE"]: z.boolean().default(true),
@@ -4635,7 +5149,8 @@ const permissionsSchema = z.object({
4635
5149
  ["MCP_SERVERS"]: mcpServersPermissionsSchema,
4636
5150
  ["REMOTE_AGENTS"]: remoteAgentsPermissionsSchema,
4637
5151
  ["SKILLS"]: skillPermissionsSchema,
4638
- ["SHARED_LINKS"]: sharedLinksPermissionsSchema
5152
+ ["SHARED_LINKS"]: sharedLinksPermissionsSchema,
5153
+ ["SCHEDULES"]: schedulesPermissionsSchema
4639
5154
  });
4640
5155
  //#endregion
4641
5156
  //#region src/roles.ts
@@ -4716,6 +5231,10 @@ const defaultRolesSchema = z.object({
4716
5231
  ["CREATE"]: z.boolean().default(true),
4717
5232
  ["SHARE"]: z.boolean().default(true),
4718
5233
  ["SHARE_PUBLIC"]: z.boolean().default(true)
5234
+ }),
5235
+ ["SCHEDULES"]: schedulesPermissionsSchema.extend({
5236
+ ["USE"]: z.boolean().default(true),
5237
+ ["CREATE"]: z.boolean().default(true)
4719
5238
  })
4720
5239
  })
4721
5240
  }),
@@ -4789,6 +5308,10 @@ const roleDefaults = defaultRolesSchema.parse({
4789
5308
  ["CREATE"]: true,
4790
5309
  ["SHARE"]: true,
4791
5310
  ["SHARE_PUBLIC"]: true
5311
+ },
5312
+ ["SCHEDULES"]: {
5313
+ ["USE"]: true,
5314
+ ["CREATE"]: true
4792
5315
  }
4793
5316
  }
4794
5317
  },
@@ -4844,6 +5367,10 @@ const roleDefaults = defaultRolesSchema.parse({
4844
5367
  ["CREATE"]: true,
4845
5368
  ["SHARE"]: true,
4846
5369
  ["SHARE_PUBLIC"]: true
5370
+ },
5371
+ ["SCHEDULES"]: {
5372
+ ["USE"]: true,
5373
+ ["CREATE"]: true
4847
5374
  }
4848
5375
  }
4849
5376
  }
@@ -4863,6 +5390,337 @@ let InvocationMode = /* @__PURE__ */ function(InvocationMode) {
4863
5390
  return InvocationMode;
4864
5391
  }({});
4865
5392
  //#endregion
5393
+ //#region src/types/schedules.ts
5394
+ /** Cadences the dialog builds from structured pickers (hour, minute, weekday). */
5395
+ const scheduleStructuredFrequencies = [
5396
+ "hourly",
5397
+ "daily",
5398
+ "weekdays",
5399
+ "weekly"
5400
+ ];
5401
+ const scheduleFrequencies = [...scheduleStructuredFrequencies, "cron"];
5402
+ /** Bounds a stored expression. Generous for five fields, because each one can hold a
5403
+ * list: an every-minute-of-the-hour cadence spelled out runs past two hundred chars. */
5404
+ const SCHEDULE_CRON_MAX_LENGTH = 256;
5405
+ const scheduleTargets = ["new"];
5406
+ const structuredCadenceSchema = z.object({
5407
+ frequency: z.enum(scheduleStructuredFrequencies),
5408
+ hour: z.number().int().min(0).max(23),
5409
+ minute: z.number().int().min(0).max(59),
5410
+ daysOfWeek: z.array(z.number().int().min(0).max(6)).min(1).max(7).transform((days) => Array.from(new Set(days))).optional()
5411
+ });
5412
+ /**
5413
+ * A raw cron expression carries its own hour and minute, so it cannot share the
5414
+ * structured shape: there is no single `hour` for `0 9,17 * * 1-5`. Syntax is
5415
+ * validated server-side by croner, the same parser the engine fires from, rather
5416
+ * than by a regex that would accept patterns croner then rejects at fire time.
5417
+ */
5418
+ const cronCadenceSchema = z.object({
5419
+ frequency: z.literal("cron"),
5420
+ expression: z.string().trim().min(1).max(256)
5421
+ });
5422
+ const scheduleCadenceSchema = z.discriminatedUnion("frequency", [structuredCadenceSchema, cronCadenceSchema]);
5423
+ const isCronCadence = (cadence) => cadence.frequency === "cron";
5424
+ const createSchedulePayloadSchema = z.object({
5425
+ name: z.string().trim().min(1).max(256),
5426
+ prompt: z.string().trim().min(1).max(32e3),
5427
+ agent_id: z.string().trim().min(1),
5428
+ cadence: scheduleCadenceSchema,
5429
+ timezone: z.string().min(1),
5430
+ target: z.enum(scheduleTargets).default("new"),
5431
+ file_ids: z.array(z.string()).max(10).transform((ids) => Array.from(new Set(ids))).optional(),
5432
+ /**
5433
+ * Chat project each run's conversation is filed under. `null` clears the scope.
5434
+ * Ownership is checked server-side at write time and again at every fire, so a
5435
+ * deleted project disables the schedule instead of silently filing runs loose.
5436
+ */
5437
+ chatProjectId: z.string().trim().min(1).nullable().optional(),
5438
+ enabled: z.boolean().default(true),
5439
+ /**
5440
+ * Client-generated key making creation idempotent across retries. Creation commits
5441
+ * the row and arms it in two writes, so a failure between them leaves the client
5442
+ * unable to tell whether anything persisted; retrying blind can produce two recurring
5443
+ * schedules. A retry carrying the same key resolves to the original row instead.
5444
+ * REQUIRED: an optional key preserves the keyless duplicate path for any client
5445
+ * that omits it, which is exactly the failure the key exists to close.
5446
+ */
5447
+ clientRequestId: z.string().trim().min(1).max(128)
5448
+ });
5449
+ /** Idempotency is a property of the CREATE attempt, not of the schedule's config. */
5450
+ const updateSchedulePayloadSchema = createSchedulePayloadSchema.omit({ clientRequestId: true }).partial().extend({
5451
+ /**
5452
+ * The configRevision the client's edit was computed from (captured when the
5453
+ * dialog opened). The server fences the update on it, so a concurrent edit
5454
+ * from another tab answers 409 instead of being silently overwritten by a
5455
+ * payload rebuilt from a stale snapshot (cadence is sent whole, so the
5456
+ * server-side fresh-read fence alone cannot detect this).
5457
+ */
5458
+ expectedConfigRevision: z.number().int().min(0).optional() });
5459
+ /** Only structured schedule preflight failures may request immediate suspension. */
5460
+ function getScheduleMCPDisabledReason(outcomes) {
5461
+ const statuses = new Set(outcomes?.map((outcome) => outcome.status));
5462
+ if (statuses.has("mcp_permission_denied")) return "mcp_permission_denied";
5463
+ if (statuses.has("mcp_configuration_missing")) return "mcp_configuration_missing";
5464
+ if (statuses.has("mcp_reauth_required")) return "mcp_reauth_required";
5465
+ }
5466
+ const scheduleMCPOutcomeSchema = z.object({
5467
+ server: z.string(),
5468
+ /** Agent whose selected tool requires this server. Used to open the correct
5469
+ * recovery chat when the requirement belongs to a handoff or subagent. */
5470
+ agentId: z.string().optional(),
5471
+ status: z.enum([
5472
+ "ready",
5473
+ "mcp_reauth_required",
5474
+ "mcp_configuration_missing",
5475
+ "mcp_permission_denied",
5476
+ "mcp_unavailable"
5477
+ ])
5478
+ });
5479
+ function readScheduleMCPOutcomes(error) {
5480
+ if (!error || !/^mcp_(reauth_required|configuration_missing|permission_denied|unavailable): \[/.test(error)) return [];
5481
+ try {
5482
+ const result = scheduleMCPOutcomeSchema.array().safeParse(JSON.parse(error.slice(error.indexOf(": ") + 2)));
5483
+ return result.success ? result.data : [];
5484
+ } catch {
5485
+ return [];
5486
+ }
5487
+ }
5488
+ //#endregion
5489
+ //#region src/cadence.ts
5490
+ /** Mirrors the server default when a weekly cadence omits `daysOfWeek`. */
5491
+ const WEEKLY_DEFAULT_DAY = 1;
5492
+ /**
5493
+ * Minute, hour, day of month, month, day of week. croner also reads a six-field form
5494
+ * carrying seconds and a seven-field form that pins a year, and both are refused.
5495
+ * Seconds would promise a precision the runtime does not keep: the engine polls on a
5496
+ * thirty-second tick and offsets each schedule by up to two minutes of jitter. A pinned
5497
+ * year makes a cadence that runs out, and every caller here treats "no next occurrence"
5498
+ * as a cadence it cannot read.
5499
+ */
5500
+ const CRON_FIELD_COUNT = 5;
5501
+ /**
5502
+ * Spring-forward compresses consecutive wall-clock occurrences, so the ENFORCEABLE
5503
+ * minimum for day-and-longer gaps is the nominal gap minus the largest real-world
5504
+ * transition: two hours (Antarctica/Troll; every other zone shifts at most one).
5505
+ * A floor set exactly at the nominal value would otherwise admit a schedule that
5506
+ * genuinely violates it once a year. Hourly gaps are unaffected (the skipped hours
5507
+ * lengthen, never shorten, the gap between occurrences).
5508
+ */
5509
+ const DST_COMPRESSION_MINUTES = 120;
5510
+ /**
5511
+ * Occurrences sampled when measuring a cron expression's tightest gap. The floor
5512
+ * exists to reject expressions that fire too OFTEN, and a dense pattern reveals
5513
+ * its short gap within the first few occurrences, so a small window answers the
5514
+ * question this guards. Known limit: this is a bounded probe, not the exhaustive
5515
+ * proof the structured formulas give. An expression that is sparse for the next
5516
+ * `CRON_PROBE_OCCURRENCES` runs and dense later would pass here and be caught by
5517
+ * the fire-time recheck instead.
5518
+ */
5519
+ const CRON_PROBE_OCCURRENCES = 32;
5520
+ /** Enough to span four nominal gaps from an anchor two gaps before a transition,
5521
+ * which is what guarantees the straddling pair falls inside the window. */
5522
+ const TRANSITION_PROBE_OCCURRENCES = 5;
5523
+ /**
5524
+ * Compiles a cadence to the cron expression the engine fires from. Shared rather
5525
+ * than server-owned because the dialog previews the next runs, validates the
5526
+ * interval floor, and disables its own submit from these same functions: a second
5527
+ * client-side implementation would drift and either show run times the schedule
5528
+ * does not keep or accept a cadence the server then rejects.
5529
+ */
5530
+ function cadenceToCron(cadence) {
5531
+ if (cadence.frequency === "cron") return cadence.expression;
5532
+ const { frequency, hour, minute } = cadence;
5533
+ if (frequency === "hourly") return `${minute} * * * *`;
5534
+ if (frequency === "daily") return `${minute} ${hour} * * *`;
5535
+ if (frequency === "weekdays") return `${minute} ${hour} * * 1-5`;
5536
+ return `${minute} ${hour} * * ${[...cadence.daysOfWeek?.length ? cadence.daysOfWeek : [WEEKLY_DEFAULT_DAY]].sort((a, b) => a - b).join(",")}`;
5537
+ }
5538
+ /**
5539
+ * Everything `cronCadenceSchema` will accept: exactly five fields, within the length
5540
+ * the schema stores, and actually matching at some point. croner accepts syntactically
5541
+ * valid patterns that can never match (`0 0 30 2 *`), and those would arm a schedule
5542
+ * that never fires. Validated with croner rather than a regex, because a regex would
5543
+ * accept patterns croner then rejects at fire time.
5544
+ *
5545
+ * A five-field expression that matches at all matches forever, which is what lets every
5546
+ * caller keep reading "no next occurrence" as "this cadence is unreadable".
5547
+ */
5548
+ function isValidCronExpression(expression, timezone) {
5549
+ const trimmed = expression.trim();
5550
+ if (trimmed.length > 256) return false;
5551
+ if (trimmed.split(/\s+/).length !== CRON_FIELD_COUNT) return false;
5552
+ try {
5553
+ return new Cron(trimmed, {
5554
+ timezone,
5555
+ paused: true
5556
+ }).nextRun() != null;
5557
+ } catch {
5558
+ return false;
5559
+ }
5560
+ }
5561
+ /**
5562
+ * The next occurrences the engine would fire. Server-side jitter (up to two
5563
+ * minutes) is deliberately not modelled: it is keyed off a schedule id that does
5564
+ * not exist yet at create time, and showing 9:01 for a 9:00 schedule reads as a bug.
5565
+ */
5566
+ function nextRunInstants(cadence, timezone, count) {
5567
+ try {
5568
+ const runs = new Cron(cadenceToCron(cadence), {
5569
+ timezone,
5570
+ paused: true
5571
+ }).nextRuns(count);
5572
+ return runs.filter((run, index) => index === 0 || run.getTime() !== runs[index - 1].getTime());
5573
+ } catch {
5574
+ return [];
5575
+ }
5576
+ }
5577
+ const MINUTE_MS = 6e4;
5578
+ const DAY_MS = 1440 * MINUTE_MS;
5579
+ /** A year and a bit, so a zone with a single yearly transition always shows one. */
5580
+ const TRANSITION_SEARCH_DAYS = 400;
5581
+ const offsetFormatters = /* @__PURE__ */ new Map();
5582
+ /** Minutes east of UTC in `zone` at `instant`, read back from the wall clock the
5583
+ * zone renders. The only way to observe a zone's offset without a tz database. */
5584
+ function zoneOffsetMinutes(zone, instant) {
5585
+ let formatter = offsetFormatters.get(zone);
5586
+ if (formatter == null) {
5587
+ formatter = new Intl.DateTimeFormat("en-US", {
5588
+ timeZone: zone,
5589
+ hourCycle: "h23",
5590
+ year: "numeric",
5591
+ month: "2-digit",
5592
+ day: "2-digit",
5593
+ hour: "2-digit",
5594
+ minute: "2-digit",
5595
+ second: "2-digit"
5596
+ });
5597
+ offsetFormatters.set(zone, formatter);
5598
+ }
5599
+ const parts = {};
5600
+ for (const part of formatter.formatToParts(instant)) parts[part.type] = part.value;
5601
+ const wallClock = Date.UTC(Number(parts.year), Number(parts.month) - 1, Number(parts.day), Number(parts.hour), Number(parts.minute), Number(parts.second));
5602
+ return Math.round((wallClock - instant.getTime()) / MINUTE_MS);
5603
+ }
5604
+ /** Zone transitions are asked for once per fire, and the scan below costs ~10ms.
5605
+ * Keyed by day because that is how far the answer stays put as the window slides,
5606
+ * and cleared wholesale at the cap so a long-lived worker cannot accumulate an
5607
+ * entry per zone per day forever. */
5608
+ const transitionCache = /* @__PURE__ */ new Map();
5609
+ const TRANSITION_CACHE_MAX = 512;
5610
+ /**
5611
+ * Every instant `zone` changes its UTC offset within the search window; empty for a
5612
+ * fixed-offset zone. Both directions matter and only one of them shortens anything,
5613
+ * so taking just the next one would usually find the harmless fall-back and miss the
5614
+ * spring-forward six months behind it. Bracketed a day at a time, bisected to the
5615
+ * minute.
5616
+ */
5617
+ function offsetChanges(zone, from) {
5618
+ const day = Math.floor(from.getTime() / DAY_MS);
5619
+ const cacheKey = `${zone}:${day}`;
5620
+ const cached = transitionCache.get(cacheKey);
5621
+ if (cached != null) return cached;
5622
+ const changes = [];
5623
+ const start = /* @__PURE__ */ new Date((day - 1) * DAY_MS);
5624
+ let low = start.getTime();
5625
+ let baseOffset = zoneOffsetMinutes(zone, start);
5626
+ const end = low + TRANSITION_SEARCH_DAYS * DAY_MS;
5627
+ for (let probe = low + DAY_MS; probe <= end; probe += DAY_MS) {
5628
+ const offset = zoneOffsetMinutes(zone, new Date(probe));
5629
+ if (offset !== baseOffset) {
5630
+ let high = probe;
5631
+ let bracket = low;
5632
+ while (high - bracket > MINUTE_MS) {
5633
+ const mid = bracket + Math.floor((high - bracket) / 2);
5634
+ if (zoneOffsetMinutes(zone, new Date(mid)) === baseOffset) bracket = mid;
5635
+ else high = mid;
5636
+ }
5637
+ changes.push(new Date(high));
5638
+ baseOffset = offset;
5639
+ }
5640
+ low = probe;
5641
+ }
5642
+ if (transitionCache.size >= TRANSITION_CACHE_MAX) transitionCache.clear();
5643
+ transitionCache.set(cacheKey, changes);
5644
+ return changes;
5645
+ }
5646
+ function runsAfter(expression, from, zone, occurrences = CRON_PROBE_OCCURRENCES) {
5647
+ return new Cron(expression, {
5648
+ timezone: zone,
5649
+ paused: true
5650
+ }).nextRuns(occurrences, from);
5651
+ }
5652
+ /** Tightest gap, in minutes, across `runs`; null when there is no pair to measure. */
5653
+ function minGapMinutes(runs) {
5654
+ if (runs.length < 2) return null;
5655
+ let minGapMs = Number.MAX_SAFE_INTEGER;
5656
+ for (let i = 1; i < runs.length; i++) {
5657
+ const gapMs = runs[i].getTime() - runs[i - 1].getTime();
5658
+ if (gapMs <= 0) continue;
5659
+ minGapMs = Math.min(minGapMs, gapMs);
5660
+ }
5661
+ if (minGapMs === Number.MAX_SAFE_INTEGER) return null;
5662
+ return Math.floor(minGapMs / MINUTE_MS);
5663
+ }
5664
+ function probeMinGapMinutes(expression, zone, from, occurrences = CRON_PROBE_OCCURRENCES) {
5665
+ return minGapMinutes(runsAfter(expression, from, zone, occurrences));
5666
+ }
5667
+ /**
5668
+ * Smallest gap in minutes between occurrences. Returns 0 for an unparseable or
5669
+ * never-matching expression so every floor rejects it, failing closed rather than
5670
+ * admitting an expression the engine cannot fire.
5671
+ *
5672
+ * Measured twice, and the smaller wins:
5673
+ *
5674
+ * 1. Nominal, probed in UTC, then discounted by the same worst-case DST allowance
5675
+ * the structured branches assume. This keeps `0 9 * * *` reporting exactly what
5676
+ * the Daily preset reports, so the same schedule cannot be admitted in one form
5677
+ * and rejected in the other.
5678
+ * 2. Real elapsed time in the schedule's own zone, across each of that zone's
5679
+ * transitions. Spring-forward compresses a gap that straddles one
5680
+ * (`0 0,12 * * *` in America/New_York is 11 hours that day, not 12), and step 1
5681
+ * only discounts gaps of a day or more, so a subdaily gap needs measuring rather
5682
+ * than estimating. Anchoring at the transition is what makes a bounded probe see
5683
+ * it at all: from today it is usually months outside any reasonable window.
5684
+ */
5685
+ function cronIntervalMinutes(expression, timezone) {
5686
+ try {
5687
+ const now = /* @__PURE__ */ new Date();
5688
+ const nominal = probeMinGapMinutes(expression, "UTC", now);
5689
+ if (nominal == null) return 0;
5690
+ const estimate = nominal < 1440 ? nominal : Math.max(0, nominal - DST_COMPRESSION_MINUTES);
5691
+ if (timezone == null || estimate === 0) return estimate;
5692
+ const anchorBackMs = 2 * Math.max(nominal, 1) * MINUTE_MS;
5693
+ let smallest = estimate;
5694
+ for (const transition of offsetChanges(timezone, now)) {
5695
+ const measured = probeMinGapMinutes(expression, timezone, new Date(Math.max(now.getTime(), transition.getTime() - anchorBackMs)), TRANSITION_PROBE_OCCURRENCES);
5696
+ if (measured != null) smallest = Math.min(smallest, measured);
5697
+ }
5698
+ return smallest;
5699
+ } catch {
5700
+ return 0;
5701
+ }
5702
+ }
5703
+ /**
5704
+ * Minimum minutes between occurrences, for the admin interval floor. `timezone` is
5705
+ * the schedule's own; passing it lets the cron branch measure a DST-compressed gap
5706
+ * instead of estimating one. The structured branches are zone-independent: their
5707
+ * formulas already carry the worst-case allowance.
5708
+ */
5709
+ function cadenceIntervalMinutes(cadence, timezone) {
5710
+ if (isCronCadence(cadence)) return cronIntervalMinutes(cadence.expression, timezone);
5711
+ if (cadence.frequency === "hourly") return 60;
5712
+ if (cadence.frequency === "daily" || cadence.frequency === "weekdays") return 1440 - DST_COMPRESSION_MINUTES;
5713
+ const days = cadence.daysOfWeek?.length ? Array.from(new Set(cadence.daysOfWeek)) : [WEEKLY_DEFAULT_DAY];
5714
+ if (days.length <= 1) return 10080 - DST_COMPRESSION_MINUTES;
5715
+ const sorted = [...days].sort((a, b) => a - b);
5716
+ let minGapDays = 7;
5717
+ for (let i = 0; i < sorted.length; i++) {
5718
+ const gap = i + 1 < sorted.length ? sorted[i + 1] - sorted[i] : 7 - sorted[i] + sorted[0];
5719
+ minGapDays = Math.min(minGapDays, gap);
5720
+ }
5721
+ return minGapDays * 24 * 60 - DST_COMPRESSION_MINUTES;
5722
+ }
5723
+ //#endregion
4866
5724
  //#region src/types/skills.ts
4867
5725
  /**
4868
5726
  * Shared skill validation constants — the single source of truth for name,
@@ -4895,6 +5753,252 @@ let DATE_RANGE = /* @__PURE__ */ function(DATE_RANGE) {
4895
5753
  return DATE_RANGE;
4896
5754
  }({});
4897
5755
  //#endregion
5756
+ //#region src/types/insights.ts
5757
+ const INSIGHTS_MAX_RANGE_DAYS = 30;
5758
+ const INSIGHTS_SEARCH_MIN_LENGTH = 3;
5759
+ const INSIGHTS_SEARCH_MAX_LENGTH = 200;
5760
+ const INSIGHTS_AGENT_ID_MAX_LENGTH = 256;
5761
+ //#endregion
5762
+ //#region src/types/traces.ts
5763
+ const TRACE_CURSOR_MAX_LENGTH = 4096;
5764
+ const TRACE_SOURCE_ID_MAX_LENGTH = 128;
5765
+ const TRACE_RECORD_ID_MAX_LENGTH = 256;
5766
+ //#endregion
5767
+ //#region src/types/queuedTurns.ts
5768
+ const agentQueuedTurnStatuses = [
5769
+ "queued",
5770
+ "claimed",
5771
+ "admitted",
5772
+ "cancelled",
5773
+ "dead"
5774
+ ];
5775
+ const agentQueuedTurnDurability = ["process_local", "durable"];
5776
+ const agentQueuedTurnFileRefSchema = z.object({
5777
+ file_id: z.string().trim().min(1),
5778
+ type: z.string().optional(),
5779
+ filepath: z.string().optional(),
5780
+ filename: z.string().optional(),
5781
+ height: z.number().optional(),
5782
+ width: z.number().optional(),
5783
+ bytes: z.number().nonnegative().optional()
5784
+ });
5785
+ const enqueueAgentQueuedTurnSchema = z.object({
5786
+ conversationId: z.string().trim().min(1),
5787
+ parentMessageId: z.string().trim().min(1),
5788
+ clientRequestId: z.string().trim().min(1).max(128),
5789
+ text: z.string(),
5790
+ files: z.array(agentQueuedTurnFileRefSchema).optional(),
5791
+ quotes: z.array(z.string()).optional(),
5792
+ manualSkills: z.array(z.string().trim().min(1)).optional(),
5793
+ priority: z.boolean().optional(),
5794
+ expectedPredecessorCreatedAt: z.number().int().nonnegative().optional()
5795
+ });
5796
+ const listAgentQueuedTurnsSchema = z.object({
5797
+ conversationId: z.string().trim().min(1),
5798
+ clientRequestIds: z.array(z.string().trim().min(1).max(128)).max(100).transform((ids) => Array.from(new Set(ids))).optional()
5799
+ });
5800
+ const cancelAgentQueuedTurnSchema = z.object({ queuedTurnId: z.string().trim().min(1) });
5801
+ const agentQueuedTurnReceiptSchema = enqueueAgentQueuedTurnSchema.extend({
5802
+ queuedTurnId: z.string().trim().min(1),
5803
+ status: z.enum(agentQueuedTurnStatuses),
5804
+ /** Effective generation boundary consumed by an admitted turn. This can
5805
+ * advance beyond the originally captured root as queued turns chain. */
5806
+ effectivePredecessorCreatedAt: z.number().int().nonnegative().optional(),
5807
+ /** Explicitly proves that this admission consumed no predecessor boundary. */
5808
+ rootPredecessor: z.literal(true).optional(),
5809
+ position: z.number().int().nonnegative().optional(),
5810
+ /** Immutable queue sequence retained as `revision` for wire compatibility. */
5811
+ revision: z.number().int().nonnegative(),
5812
+ failure: z.object({
5813
+ code: z.string().trim().min(1).max(128),
5814
+ message: z.string().max(2048).optional()
5815
+ }).optional(),
5816
+ createdAt: z.string(),
5817
+ updatedAt: z.string()
5818
+ });
5819
+ const agentQueuedTurnCapabilitySchema = z.discriminatedUnion("supported", [z.object({ supported: z.literal(false) }), z.object({
5820
+ supported: z.literal(true),
5821
+ durability: z.enum(agentQueuedTurnDurability)
5822
+ })]);
5823
+ const enqueueAgentQueuedTurnResponseSchema = z.object({
5824
+ receipt: agentQueuedTurnReceiptSchema,
5825
+ capability: agentQueuedTurnCapabilitySchema
5826
+ });
5827
+ const listAgentQueuedTurnsResponseSchema = z.object({
5828
+ queuedTurns: z.array(agentQueuedTurnReceiptSchema),
5829
+ capability: agentQueuedTurnCapabilitySchema,
5830
+ revision: z.number().int().nonnegative()
5831
+ });
5832
+ const cancelAgentQueuedTurnResponseSchema = z.object({ receipt: agentQueuedTurnReceiptSchema });
5833
+ //#endregion
5834
+ //#region src/providers.ts
5835
+ /** Canonical provider identity used for branding across client and server. */
5836
+ let ProviderId = /* @__PURE__ */ function(ProviderId) {
5837
+ ProviderId["openai"] = "openai";
5838
+ ProviderId["anthropic"] = "anthropic";
5839
+ ProviderId["google"] = "google";
5840
+ ProviderId["azure"] = "azure";
5841
+ ProviderId["bedrock"] = "bedrock";
5842
+ ProviderId["xai"] = "xai";
5843
+ ProviderId["moonshot"] = "moonshot";
5844
+ ProviderId["anyscale"] = "anyscale";
5845
+ ProviderId["apipie"] = "apipie";
5846
+ ProviderId["cohere"] = "cohere";
5847
+ ProviderId["deepseek"] = "deepseek";
5848
+ ProviderId["fireworks"] = "fireworks";
5849
+ ProviderId["groq"] = "groq";
5850
+ ProviderId["helicone"] = "helicone";
5851
+ ProviderId["huggingface"] = "huggingface";
5852
+ ProviderId["lemonade"] = "lemonade";
5853
+ ProviderId["mistral"] = "mistral";
5854
+ ProviderId["mlx"] = "mlx";
5855
+ ProviderId["ollama"] = "ollama";
5856
+ ProviderId["openrouter"] = "openrouter";
5857
+ ProviderId["perplexity"] = "perplexity";
5858
+ ProviderId["qwen"] = "qwen";
5859
+ ProviderId["shuttleai"] = "shuttleai";
5860
+ ProviderId["together"] = "together";
5861
+ ProviderId["unify"] = "unify";
5862
+ ProviderId["vercel"] = "vercel";
5863
+ return ProviderId;
5864
+ }({});
5865
+ const endpointToProvider = {
5866
+ ["openAI"]: "openai",
5867
+ ["azureOpenAI"]: "azure",
5868
+ ["anthropic"]: "anthropic",
5869
+ ["google"]: "google",
5870
+ ["bedrock"]: "bedrock"
5871
+ };
5872
+ const knownEndpointToProvider = {
5873
+ ["anyscale"]: "anyscale",
5874
+ ["apipie"]: "apipie",
5875
+ ["cohere"]: "cohere",
5876
+ ["fireworks"]: "fireworks",
5877
+ ["deepseek"]: "deepseek",
5878
+ ["moonshot"]: "moonshot",
5879
+ ["groq"]: "groq",
5880
+ ["helicone"]: "helicone",
5881
+ ["huggingface"]: "huggingface",
5882
+ ["lemonade"]: "lemonade",
5883
+ ["mistral"]: "mistral",
5884
+ ["mlx"]: "mlx",
5885
+ ["ollama"]: "ollama",
5886
+ ["openrouter"]: "openrouter",
5887
+ ["perplexity"]: "perplexity",
5888
+ ["shuttleai"]: "shuttleai",
5889
+ ["together.ai"]: "together",
5890
+ ["unify"]: "unify",
5891
+ ["vercel"]: "vercel",
5892
+ ["xai"]: "xai"
5893
+ };
5894
+ const providerAliases = {
5895
+ chatgpt: "openai",
5896
+ gpt: "openai",
5897
+ azureopenai: "azure",
5898
+ claude: "anthropic",
5899
+ gemini: "google",
5900
+ gemma: "google",
5901
+ vertex: "google",
5902
+ vertexai: "google",
5903
+ palm: "google",
5904
+ awsbedrock: "bedrock",
5905
+ grok: "xai",
5906
+ kimi: "moonshot",
5907
+ moonshotai: "moonshot",
5908
+ amdlemonade: "lemonade",
5909
+ lemonadeserver: "lemonade",
5910
+ mistralai: "mistral",
5911
+ togetherai: "together"
5912
+ };
5913
+ const modelCatalogAliases = { ["vertexai"]: "google" };
5914
+ const normalize = (input) => input.toLowerCase().replace(/[\s._-]/g, "");
5915
+ const providerByNormalizedId = Object.values(ProviderId).reduce((acc, id) => {
5916
+ acc[normalize(id)] = id;
5917
+ return acc;
5918
+ }, {});
5919
+ /** Resolves free-form provider text to a canonical id, ignoring case and separators. */
5920
+ function resolveProviderId(input) {
5921
+ if (!input) return null;
5922
+ const key = normalize(input);
5923
+ return providerByNormalizedId[key] ?? providerAliases[key] ?? null;
5924
+ }
5925
+ /** Resolves a runtime provider to its model catalog, using a native alias only when needed. */
5926
+ function resolveModelCatalogKey(provider, catalogs) {
5927
+ const key = provider ?? "";
5928
+ return catalogs?.[key] != null ? key : modelCatalogAliases[key] ?? key;
5929
+ }
5930
+ //#endregion
5931
+ //#region src/svg.ts
5932
+ /**
5933
+ * DOMPurify policy for user-provided SVG icons, shared by the browser uploader and
5934
+ * the server trust boundary so a preview and the persisted icon cannot disagree.
5935
+ * `use` is re-added for self-contained `<defs>` references (targets restricted by
5936
+ * `restrictSvgReferences`); every SMIL element is forbidden so a stored icon
5937
+ * cannot animate forever wherever it renders.
5938
+ */
5939
+ const SVG_SANITIZE_CONFIG = {
5940
+ USE_PROFILES: {
5941
+ svg: true,
5942
+ svgFilters: true
5943
+ },
5944
+ ADD_TAGS: ["use"],
5945
+ ADD_ATTR: ["fr"],
5946
+ FORBID_TAGS: [
5947
+ "script",
5948
+ "foreignObject",
5949
+ "style",
5950
+ "a",
5951
+ "image",
5952
+ "animate",
5953
+ "animateColor",
5954
+ "animateMotion",
5955
+ "animateTransform",
5956
+ "mpath",
5957
+ "set"
5958
+ ],
5959
+ FORBID_ATTR: ["style"]
5960
+ };
5961
+ const URL_TOKEN_PREFIX = /url\(\s*['"]?\s*/gi;
5962
+ /**
5963
+ * True when every `url()` token targets a fragment. Backslashes reject the value
5964
+ * outright: CSS unescapes idents before tokenizing, so `u\72l(...)` is a `url()`.
5965
+ */
5966
+ function referencesOnlyFragments(value) {
5967
+ if (value.includes("\\")) return false;
5968
+ if (!value.toLowerCase().includes("url(")) return true;
5969
+ URL_TOKEN_PREFIX.lastIndex = 0;
5970
+ while (URL_TOKEN_PREFIX.exec(value) !== null) if (value[URL_TOKEN_PREFIX.lastIndex] !== "#") return false;
5971
+ return true;
5972
+ }
5973
+ /** DOMPurify hook that drops every attribute referencing outside the document. */
5974
+ function restrictSvgReferences(node) {
5975
+ const names = [];
5976
+ for (let i = 0; i < node.attributes.length; i += 1) names.push(node.attributes[i].name);
5977
+ for (const name of names) {
5978
+ const value = node.getAttribute(name)?.trim();
5979
+ if (value == null) continue;
5980
+ if (name === "href" || name === "xlink:href") {
5981
+ if (!value.startsWith("#")) node.removeAttribute(name);
5982
+ continue;
5983
+ }
5984
+ if (!referencesOnlyFragments(value)) node.removeAttribute(name);
5985
+ }
5986
+ }
5987
+ /** SVG names the HTML parser lowercases and its adjustment table does not restore. */
5988
+ const UNADJUSTED_SVG_TAGS = [[/(<\/?)fedropshadow\b/gi, "$1feDropShadow"]];
5989
+ const SVG_ROOT_TAG = /<svg(\s[^>]*)?>/i;
5990
+ /**
5991
+ * Makes HTML-mode sanitizer output valid as a standalone `image/svg+xml`
5992
+ * document: restores camelCase element names the HTML parser lowercased and
5993
+ * declares the SVG namespace on the root, without which an XML parser puts the
5994
+ * root in no namespace and the icon renders blank.
5995
+ */
5996
+ function finalizeSvgMarkup(markup) {
5997
+ let restored = markup;
5998
+ for (const [pattern, canonical] of UNADJUSTED_SVG_TAGS) restored = restored.replace(pattern, canonical);
5999
+ return restored.replace(SVG_ROOT_TAG, (tag, attributes) => attributes != null && /\sxmlns\s*=/i.test(attributes) ? tag : `<svg xmlns="http://www.w3.org/2000/svg"${attributes ?? ""}>`);
6000
+ }
6001
+ //#endregion
4898
6002
  //#region src/actions.ts
4899
6003
  function sha1(input) {
4900
6004
  return crypto.createHash("sha1").update(input).digest("hex");
@@ -5378,11 +6482,13 @@ function getUserTimezone() {
5378
6482
  }
5379
6483
  }
5380
6484
  function createPayload(submission) {
5381
- const { isEdited, addedConvo, userMessage, isContinued, isTemporary, isRegenerate, conversation, editedContent, ephemeralAgent, endpointOption, manualSkills, clientRequestId, recoverySteerId, expectedPredecessorCreatedAt } = submission;
6485
+ const { isEdited, addedConvo, userMessage, isContinued, isTemporary, isRegenerate, compact, conversation, editedContent, ephemeralAgent, endpointOption, manualSkills, codeApprovalMode, codeEnvironmentMode, codeWorkspaces, clientRequestId, recoverySteerId, expectedPredecessorCreatedAt } = submission;
5382
6486
  const { conversationId } = tConvoUpdateSchema.parse(conversation);
5383
6487
  const { endpoint: _e, endpointType } = endpointOption;
5384
6488
  const endpoint = _e;
5385
- let server = `${EndpointURLs["agents"]}/${endpoint}`;
6489
+ /** Custom endpoint names are user-defined and may contain `/`, which would
6490
+ * otherwise split into extra path segments and miss the `/:endpoint` route. */
6491
+ let server = `${EndpointURLs["agents"]}/${encodeURIComponent(endpoint)}`;
5386
6492
  if (isAssistantsEndpoint(endpoint)) server = EndpointURLs[endpointType ?? endpoint] + (isEdited ? "/modify" : "");
5387
6493
  const payload = {
5388
6494
  ...userMessage,
@@ -5390,12 +6496,18 @@ function createPayload(submission) {
5390
6496
  endpoint,
5391
6497
  addedConvo,
5392
6498
  isTemporary,
5393
- isRegenerate,
6499
+ /** A compaction borrows the regenerate shape client-side only: the server
6500
+ * must see it as a compaction, never as a regenerated user turn. */
6501
+ isRegenerate: compact === true ? void 0 : isRegenerate,
6502
+ ...compact === true && { compact: true },
5394
6503
  editedContent,
5395
6504
  conversationId,
5396
6505
  isContinued: !!(isEdited && isContinued),
5397
6506
  ephemeralAgent: isAssistantsEndpoint(endpoint) ? void 0 : ephemeralAgent,
5398
6507
  manualSkills: isAssistantsEndpoint(endpoint) ? void 0 : manualSkills,
6508
+ codeApprovalMode: isAssistantsEndpoint(endpoint) ? void 0 : codeApprovalMode,
6509
+ codeEnvironmentMode: isAssistantsEndpoint(endpoint) ? void 0 : codeEnvironmentMode,
6510
+ codeWorkspaces: isAssistantsEndpoint(endpoint) ? void 0 : codeWorkspaces,
5399
6511
  timezone: getUserTimezone(),
5400
6512
  clientRequestId,
5401
6513
  recoverySteerId,
@@ -5458,28 +6570,6 @@ const baseDefinitions = {
5458
6570
  optionType: "conversation",
5459
6571
  minTags: 0,
5460
6572
  maxTags: 4
5461
- },
5462
- imageDetail: {
5463
- key: "imageDetail",
5464
- label: "com_endpoint_plug_image_detail",
5465
- labelCode: true,
5466
- description: "com_endpoint_openai_detail",
5467
- descriptionCode: true,
5468
- type: "enum",
5469
- default: "auto",
5470
- component: "slider",
5471
- options: [
5472
- "low",
5473
- "auto",
5474
- "high"
5475
- ],
5476
- enumMappings: {
5477
- ["low"]: "com_ui_low",
5478
- ["auto"]: "com_ui_auto",
5479
- ["high"]: "com_ui_high"
5480
- },
5481
- optionType: "conversation",
5482
- columnSpan: 2
5483
6573
  }
5484
6574
  };
5485
6575
  const createDefinition = (base, overrides) => {
@@ -5537,6 +6627,30 @@ const librechat = {
5537
6627
  placeholderCode: true,
5538
6628
  optionType: "model"
5539
6629
  },
6630
+ /** Controls how LibreChat encodes image content blocks, not a provider request
6631
+ * parameter — so it belongs to this group and is stripped from model options. */
6632
+ imageDetail: {
6633
+ key: "imageDetail",
6634
+ label: "com_endpoint_plug_image_detail",
6635
+ labelCode: true,
6636
+ description: "com_endpoint_openai_detail",
6637
+ descriptionCode: true,
6638
+ type: "enum",
6639
+ default: "auto",
6640
+ component: "slider",
6641
+ options: [
6642
+ "low",
6643
+ "auto",
6644
+ "high"
6645
+ ],
6646
+ enumMappings: {
6647
+ ["low"]: "com_ui_low",
6648
+ ["auto"]: "com_ui_auto",
6649
+ ["high"]: "com_ui_high"
6650
+ },
6651
+ optionType: "conversation",
6652
+ columnSpan: 2
6653
+ },
5540
6654
  fileTokenLimit: {
5541
6655
  key: "fileTokenLimit",
5542
6656
  label: "com_ui_file_token_limit",
@@ -6115,6 +7229,14 @@ const meta = {
6115
7229
  })
6116
7230
  };
6117
7231
  const google = {
7232
+ /** Bounds the hand-rolled editor enforced through InputNumber, and they stay
7233
+ * scoped to this endpoint: the shared definition is rendered by every other
7234
+ * endpoint, whose own context windows may fall outside them. */
7235
+ maxContextTokens: createDefinition(librechat.maxContextTokens, { range: {
7236
+ min: googleSettings.maxContextTokens.min,
7237
+ max: googleSettings.maxContextTokens.max,
7238
+ step: googleSettings.maxContextTokens.step
7239
+ } }),
6118
7240
  temperature: createDefinition(baseDefinitions.temperature, {
6119
7241
  default: googleSettings.temperature.default,
6120
7242
  range: {
@@ -6254,7 +7376,7 @@ const google = {
6254
7376
  const googleConfig = [
6255
7377
  librechat.modelLabel,
6256
7378
  librechat.promptPrefix,
6257
- librechat.maxContextTokens,
7379
+ google.maxContextTokens,
6258
7380
  google.maxOutputTokens,
6259
7381
  google.temperature,
6260
7382
  google.topP,
@@ -6273,7 +7395,7 @@ const googleCol1 = [
6273
7395
  librechat.promptPrefix
6274
7396
  ];
6275
7397
  const googleCol2 = [
6276
- librechat.maxContextTokens,
7398
+ google.maxContextTokens,
6277
7399
  google.maxOutputTokens,
6278
7400
  google.temperature,
6279
7401
  google.topP,
@@ -6297,7 +7419,7 @@ const openAI = [
6297
7419
  openAIParams.presence_penalty,
6298
7420
  baseDefinitions.stop,
6299
7421
  librechat.resendFiles,
6300
- baseDefinitions.imageDetail,
7422
+ librechat.imageDetail,
6301
7423
  openAIParams.web_search,
6302
7424
  openAIParams.reasoning_effort,
6303
7425
  openAIParams.useResponsesApi,
@@ -6327,7 +7449,7 @@ const openAICol2 = [
6327
7449
  openAIParams.presence_penalty,
6328
7450
  baseDefinitions.stop,
6329
7451
  librechat.resendFiles,
6330
- baseDefinitions.imageDetail,
7452
+ librechat.imageDetail,
6331
7453
  openAIParams.reasoning_effort,
6332
7454
  openAIParams.reasoning_summary,
6333
7455
  openAIParams.reasoning_mode,
@@ -6568,6 +7690,38 @@ const paramSettings = {
6568
7690
  [`bedrock-zai`]: bedrockZAI,
6569
7691
  ["google"]: googleConfig
6570
7692
  };
7693
+ /**
7694
+ * Maps effective backend param names for OpenAI-compatible/Azure endpoints (as deleted from
7695
+ * `llmConfig` via `dropParams`, e.g. `maxTokens`) to their corresponding UI/conversation keys
7696
+ * (e.g. `max_tokens`). Native providers (anthropic, google, bedrock, ...) already render these
7697
+ * same camelCase names as their UI key (e.g. `topP`), so this alias must only be applied to
7698
+ * OpenAI-compatible parameter sets — see `resolveDropParamsUIKeys`.
7699
+ */
7700
+ const dropParamsBackendToUIKey = {
7701
+ maxTokens: "max_tokens",
7702
+ topP: "top_p",
7703
+ frequencyPenalty: "frequency_penalty",
7704
+ presencePenalty: "presence_penalty"
7705
+ };
7706
+ /** Endpoint keys whose parameter settings render the OpenAI-compatible (snake_case) UI keys. */
7707
+ const openAILikeParamEndpointKeys = new Set([
7708
+ "openAI",
7709
+ "azureOpenAI",
7710
+ "custom",
7711
+ "openrouter"
7712
+ ]);
7713
+ /**
7714
+ * Normalizes an admin-configured `dropParams` list into the UI/conversation keys used to hide
7715
+ * the matching controls in the settings panels. `endpointKey` should be the same key used to
7716
+ * resolve the panel's parameter settings (e.g. `overriddenEndpointKey`); the backend-name alias
7717
+ * is only applied for OpenAI-compatible endpoints, since native providers (anthropic, google,
7718
+ * bedrock, ...) already use these backend names as their UI key.
7719
+ */
7720
+ function resolveDropParamsUIKeys(dropParams, endpointKey) {
7721
+ if (!dropParams || dropParams.length === 0) return /* @__PURE__ */ new Set();
7722
+ if (!openAILikeParamEndpointKeys.has(endpointKey)) return new Set(dropParams);
7723
+ return new Set(dropParams.map((param) => dropParamsBackendToUIKey[param] ?? param));
7724
+ }
6571
7725
  const openAIColumns = {
6572
7726
  col1: openAICol1,
6573
7727
  col2: openAICol2
@@ -6634,13 +7788,71 @@ const agentParamSettings = Object.entries(presetSettings).reduce((acc, [key, val
6634
7788
  * Resolves model-aware defaults for a settings configuration before rendering.
6635
7789
  * Google's `maxOutputTokens` default depends on the selected Gemini model so that
6636
7790
  * current models (2.5 and 3+) surface their 64K output limit instead of the legacy 8K value.
7791
+ * Anthropic prompt-cache controls are only surfaced for models that support them.
6637
7792
  */
6638
7793
  function applyModelAwareDefaults(settings, endpoint, model) {
6639
- if (endpoint !== "google" || !model) return settings;
6640
- return settings.map((setting) => setting.key === "maxOutputTokens" ? {
6641
- ...setting,
6642
- default: googleSettings.maxOutputTokens.reset(model)
6643
- } : setting);
7794
+ if (!model) return settings;
7795
+ const modelAwareSettings = endpoint === "google" ? settings.map((setting) => {
7796
+ if (setting.key === "maxOutputTokens") return {
7797
+ ...setting,
7798
+ default: googleSettings.maxOutputTokens.reset(model)
7799
+ };
7800
+ /** The shared thinking budget range is model-agnostic, so it caps Pro below
7801
+ * its real ceiling and accepts Flash values the provider rejects. The
7802
+ * maximum and the positive floor move together. `range.min` stays -1 so
7803
+ * the "decide automatically" sentinel remains typeable. */
7804
+ if (setting.key === "thinkingBudget" && setting.range != null) {
7805
+ const bounds = getGoogleThinkingBudgetBounds(model);
7806
+ if (bounds != null) return {
7807
+ ...setting,
7808
+ range: {
7809
+ ...setting.range,
7810
+ max: bounds.max,
7811
+ positiveMin: bounds.min,
7812
+ modelSpecific: true
7813
+ }
7814
+ };
7815
+ }
7816
+ return setting;
7817
+ }) : settings;
7818
+ if (endpoint !== "anthropic" || supportsPromptCache(model)) return modelAwareSettings;
7819
+ return modelAwareSettings.filter((setting) => setting.key !== "promptCache" && setting.key !== "promptCacheTtl");
7820
+ }
7821
+ //#endregion
7822
+ //#region src/agentToolOptions.ts
7823
+ const actionDomainSeparatorRegex = /* @__PURE__ */ new RegExp("---", "g");
7824
+ /**
7825
+ * Collapses the encoded-domain suffix of an action tool name to the shape used
7826
+ * by runtime tool definitions. The operation id is deliberately preserved.
7827
+ */
7828
+ function normalizeActionToolName(toolName) {
7829
+ if (!isActionTool(toolName)) return toolName;
7830
+ const prefixEnd = toolName.lastIndexOf(actionDelimiter) + actionDelimiter.length;
7831
+ const encodedDomain = toolName.slice(prefixEnd);
7832
+ return toolName.slice(0, prefixEnd) + encodedDomain.replace(actionDomainSeparatorRegex, "_");
7833
+ }
7834
+ /**
7835
+ * Removes Code Interpreter as an allowed caller without mutating the input.
7836
+ * Tool entries and unrelated options are preserved; an empty entry is removed.
7837
+ */
7838
+ function removeCodeExecutionCaller(toolOptions) {
7839
+ if (toolOptions == null) return toolOptions;
7840
+ const normalized = {};
7841
+ for (const [toolName, options] of Object.entries(toolOptions)) {
7842
+ const callers = options.allowed_callers;
7843
+ if (callers?.includes("code_execution") !== true) {
7844
+ normalized[toolName] = options;
7845
+ continue;
7846
+ }
7847
+ const allowedCallers = callers.filter((caller) => caller !== "code_execution");
7848
+ const { allowed_callers: _removed, ...remainingOptions } = options;
7849
+ const nextOptions = allowedCallers.length > 0 ? {
7850
+ ...remainingOptions,
7851
+ allowed_callers: allowedCallers
7852
+ } : remainingOptions;
7853
+ if (Object.keys(nextOptions).length > 0) normalized[toolName] = nextOptions;
7854
+ }
7855
+ return normalized;
6644
7856
  }
6645
7857
  //#endregion
6646
7858
  //#region src/codeEnvRef.ts
@@ -6667,7 +7879,54 @@ const CODE_ENV_KINDS = [
6667
7879
  "agent",
6668
7880
  "user"
6669
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;
7895
+ return {
7896
+ codeEnvRef: codeEnvRefs.default ?? codeEnvRefs.stateful ?? ref,
7897
+ codeEnvRefs
7898
+ };
7899
+ }
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
+ //#endregion
7908
+ //#region src/code/worker.ts
7909
+ function isCodeWorkerShell(value) {
7910
+ return value === "posix" || value === "powershell";
7911
+ }
7912
+ function quotePosix(value) {
7913
+ return `'${value.replace(/'/g, `'\\''`)}'`;
7914
+ }
7915
+ function quotePowerShell(value) {
7916
+ return `'${value.replace(/'/g, "''")}'`;
7917
+ }
7918
+ function createCodeWorkerSetupCommand(pairing, shell, options = {}) {
7919
+ const quote = shell === "powershell" ? quotePowerShell : quotePosix;
7920
+ const pair = `librechat-code pair ${quote(pairing.endpoint)} ${quote(pairing.code)} --worker-id ${quote(pairing.workerId)}`;
7921
+ const run = ["librechat-code run", ...[
7922
+ options.defaultWorkspace === false ? null : "--default-workspace",
7923
+ options.allowWorkspaceWrites === true ? "--allow-workspace-writes" : null,
7924
+ options.allowWorkspaceCommands === true ? "--allow-workspace-commands" : null
7925
+ ].filter((value) => value != null)].join(" ");
7926
+ if (shell === "powershell") return `${pair}\n$env:LIBRECHAT_CODE_WORKER_ID = ${quote(pairing.workerId)}\n${run}`;
7927
+ return `${pair}\nLIBRECHAT_CODE_WORKER_ID=${quote(pairing.workerId)} ${run}`;
7928
+ }
6670
7929
  //#endregion
6671
- export { 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_ENV_KINDS, CacheKeys, Capabilities, CohereConstants, ComponentTypes, Constants, ContentTypes, DATE_RANGE, DEFAULT_MEMORY_MAX_INPUT_TOKENS, DynamicQueryKeys, EImageOutputType, EModelEndpoint, EToolResources, EndpointURLs, ErrorTypes, FEEDBACK_RATINGS, FEEDBACK_REASON_KEYS, FEEDBACK_TAGS, FetchTokenConfig, FileContext, FilePurpose, FileSources, ForkOptions, FunctionSignature, INTERFACE_PERMISSION_FIELDS, ImageDetail, ImageDetailCost, ImageVisionTool, InfiniteCollections, InvocationMode, KnownEndpoints, LocalStorageKeys, MAX_SUBAGENTS, MAX_SUBAGENT_DEPTH, MAX_SUBAGENT_GRAPH_NODES, MAX_SUBAGENT_RUN_CONFIGS, MCPOptionsSchema, MCPServerUserInputSchema, MCPServersSchema, MCP_USER_INPUT_FIELDS, MYTHOS_CLASS_FAMILIES, MemoryScope, MessageContentTypes, MutationKeys, OCRStrategy, OptionTypes, PERMISSION_SUB_KEYS, PERMISSION_TYPE_INTERFACE_FIELDS, PermissionBits, PermissionTypes, Permissions, PrincipalModel, PrincipalType, Providers, QueryKeys, REFILL_INTERVAL_UNITS, RateLimitPrefix, ReasoningContext, ReasoningEffort, ReasoningMode, ReasoningParameterFormat, ReasoningResponseKey, ReasoningSummary, RerankerTypes, ResourceType, RetentionMode, RunStatus, SEPARATORS, SKILL_BODY_MAX_LENGTH, SKILL_DESCRIPTION_MAX_LENGTH, SKILL_DESCRIPTION_SHORT_THRESHOLD, SKILL_DISPLAY_TITLE_MAX_LENGTH, 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, STTProviders, SafeSearchTypes, ScraperProviders, SearchCategories, SearchProviders, SettingTypes, SettingsTabValues, SettingsViews, StdioOptionsSchema, SteerEvents, StepEvents, StepStatus, StepTypes, StreamableHTTPOptionsSchema, SystemCategories, SystemRoles, TTSProviders, ThinkingDisplay, ThinkingLevel, Time, TokenExchangeMethodEnum, ToolCallTypes, Tools, UsageEvents, Verbosity, ViolationTypes, VisionModes, WebSocketOptionsSchema, accessRoleSchema, accessRoleToPermBits, accordian, actionDelimiter, actionDomainSeparator, agentParamSettings, agentPermissionsSchema, 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, calendar, capsEffortWhenThinkingDisabled, card, carousel, checkOpenAIStorage, checkbox, checkpointerSchema, checkpointerTypeSchema, clampEffortForDisabledThinking, clampOutputConfigEffort, cloudfrontConfigSchema, codeInterpreterMimeTypes, codeInterpreterMimeTypesList, codeTypeMapping, coerceNumber, collapsible, compactAgentsBaseSchema, compactAgentsSchema, compactAssistantSchema, compactGoogleSchema, configSchema, contextPruningSchema, convertStringsToRegex, createPayload, createURL, data_service_exports as dataService, defaultAgentCapabilities, defaultAgentFormValues, defaultAssistantFormValues, defaultAssistantsVersion, defaultEndpoints, 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, envVarRegex, errorsToString, essentialShadcnComponents, excelFileTypes, excelMimeTypes, excludedKeys, extendedModelEndpointSchema, extractDomainFromUrl, extractEnvVariable, extractVariableName, feedbackRatingSchema, feedbackSchema, feedbackTagKeySchema, fileCitationsPermissionsSchema, fileConfig, fileConfigSchema, fileSearchPermissionsSchema, fileSourceSchema, fileStorageSchema, fileStrategiesSchema, findLastSeparatorIndex, fullMimeTypesList, generateDynamicSchema, generateGoogleSchema, generateOpenAISchema, getConfigDefaults, getConfiguredMimeAccept, getDefaultParamsEndpoint, getEnabledEndpoints, getEndpointField, getEndpointFileConfig, getFirstDefinedValue, getModelKey, getNonEmptyValue, getRefillEligibilityDate, getResourcePermissionsResponseSchema, getResponseSender, getSchemaDefaults, getSettingsKeys, getTagByKey, getTagsForRating, getTokenHeader, googleBaseSchema, googleGenConfigSchema, googleSchema, googleSettings, hasPermissions, hostImageIdSuffix, hostImageNamePrefix, hoverCard, imageDetailNumeric, imageDetailValue, imageExtRegex, imageGenTools, imageMimeTypes, imageTypeMapping, inferMimeType, initialModelsConfig, input, inputTokensIncludesCache, interfaceSchema, isActionTool, isAgentsEndpoint, isAnthropicDocumentType, isAnthropicTextDocumentType, isAssistantsEndpoint, isBedrockDocumentType, isDocumentSupportedProvider, isEphemeralAgentId, isImageVisionTool, isMythosClassModel, isOpenAILikeProvider, isParamEndpoint, isPermissiveMimeConfig, isRemoteOidcUrlAllowed, isSensitiveEnvVar, isSystemRoleName, isThinkingDisabled, isUUID, label, langfuseConfigSchema, librechat, loginPage, mapGroupToAzureConfig, mapModelToAzureConfig, marketplacePermissionsSchema, mbToBytes, mcpServersPermissionsSchema, megabyte, memoryPermissionsSchema, memorySchema, menuBar, mergeFileConfig, messageFilterPiiSchema, messageFilterSchema, mimeTypeAliases, modelConfigSchema, modelSpecSubagentsSchema, modularEndpoints, multiConvoPermissionsSchema, navigationMenu, normalizeEndpointName, normalizeMCPToolKey, normalizeServerName, ocrSchema, omitsSamplingParameters, omitsThinkingByDefault, openAIBaseSchema, openAISchema, openAISettings, openRouterSchema, openapiToFunction, orderEndpointsConfig, pagination, paramDefinitionSchema, paramEndpoints, paramSettings, parseCompactConvo, parseConvo, parseEphemeralAgentId, parseTextParts, peoplePickerPermissionsSchema, permBitsToAccessLevel, permissionEntrySchema, permissionsSchema, popover, presetSettings, principalSchema, progress, promptPermissionsSchema, promptTokensFromUsage, providerEndpointMap, radioGroup, rateLimitSchema, reconcileContextUsage, registerPage, remoteAgentsPermissionsSchema, removeNullishValues, replaceSpecialVars, request_default as request, requiresExplicitThinkingDisabled, resolveEndpointType, resolveRef, resolveThinkingDisplay, resourcePermissionsResponseSchema, retainRecentConfigSchema, retrievalMimeTypes, retrievalMimeTypesList, roleDefaults, roleSchema, runCodePermissionsSchema, select, separator, setAcceptLanguageHeader, setFileConfigRegexCompiler, setMessageFilterRegexValidator, setTokenHeader, sha1, shadcnComponents, sharedFileDownload, sharedLinksPermissionsSchema, skeleton, skillPermissionsSchema, skillSyncConfigSchema, skillSyncGitHubSourceSchema, slider, specialVariables, specsConfigSchema, splitMCPToolKey, splitToolCallName, stripAgentIdSuffix, summarizationConfigSchema, summarizationTriggerSchema, supportedMimeTypes, supportsAdaptiveThinking, supportsBalanceCheck, supportsContext1m, supportsFiles, 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, tooltip, transactionsSchema, turnstileOptionsSchema, turnstileSchema, updateResourcePermissionsRequestSchema, updateResourcePermissionsResponseSchema, useToast, utils, validateActionDomain, validateAndParseOpenAPISpec, validateAzureGroups, validateSettingDefinitions, validateVisionModel, vertexAISchema, vertexModelConfigSchema, videoMimeTypes, visionModels, webSearchPermissionsSchema, webSearchSchema };
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 };
6672
7931
 
6673
7932
  //# sourceMappingURL=index.mjs.map