librechat-data-provider 0.8.522 → 0.8.524

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/{data-service-CaB7saTP.mjs → data-service-B-WUVvTH.mjs} +1044 -173
  2. package/dist/data-service-B-WUVvTH.mjs.map +1 -0
  3. package/dist/{data-service-D5kHzBt-.js → data-service-CUG1qdeC.js} +1426 -207
  4. package/dist/data-service-CUG1qdeC.js.map +1 -0
  5. package/dist/index.js +886 -74
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +780 -70
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react-query/index.js +1 -1
  10. package/dist/react-query/index.mjs +1 -1
  11. package/dist/types/accessPermissions.d.ts +54 -1
  12. package/dist/types/actions.d.ts +1 -1
  13. package/dist/types/agentToolOptions.d.ts +1 -1
  14. package/dist/types/api-endpoints.d.ts +7 -0
  15. package/dist/types/backgroundResults.d.ts +13 -0
  16. package/dist/types/balance.d.ts +4 -0
  17. package/dist/types/bedrock.d.ts +132 -65
  18. package/dist/types/code/approval.d.ts +26 -0
  19. package/dist/types/code/worker.d.ts +10 -0
  20. package/dist/types/code/workspace.d.ts +50 -0
  21. package/dist/types/codeEnvRef.d.ts +5 -0
  22. package/dist/types/config.d.ts +5859 -2469
  23. package/dist/types/data-service.d.ts +22 -12
  24. package/dist/types/errors.d.ts +2 -0
  25. package/dist/types/file-config.d.ts +179 -12
  26. package/dist/types/filters.d.ts +97 -97
  27. package/dist/types/footer.d.ts +20 -0
  28. package/dist/types/generate.d.ts +48 -24
  29. package/dist/types/index.d.ts +11 -0
  30. package/dist/types/keys.d.ts +13 -2
  31. package/dist/types/limits.d.ts +8 -0
  32. package/dist/types/mcp.d.ts +683 -30
  33. package/dist/types/messages.d.ts +25 -1
  34. package/dist/types/models.d.ts +312 -183
  35. package/dist/types/parameterSettings.d.ts +10 -1
  36. package/dist/types/parsers.d.ts +25 -1
  37. package/dist/types/providers.d.ts +1 -0
  38. package/dist/types/resolve-llm-delivery-path.d.ts +161 -0
  39. package/dist/types/schemas.d.ts +771 -457
  40. package/dist/types/svg.d.ts +34 -0
  41. package/dist/types/types/agents.d.ts +257 -2
  42. package/dist/types/types/assistants.d.ts +2 -617
  43. package/dist/types/types/content.d.ts +286 -0
  44. package/dist/types/types/files.d.ts +48 -1
  45. package/dist/types/types/insights.d.ts +9 -0
  46. package/dist/types/types/mutations.d.ts +3 -2
  47. package/dist/types/types/queries.d.ts +8 -1
  48. package/dist/types/types/queuedTurns.d.ts +140 -106
  49. package/dist/types/types/runs.d.ts +33 -5
  50. package/dist/types/types/schedules.d.ts +40 -7
  51. package/dist/types/types/skills.d.ts +43 -0
  52. package/dist/types/types/tools.d.ts +132 -0
  53. package/dist/types/types/traces.d.ts +134 -0
  54. package/dist/types/types.d.ts +72 -2
  55. package/package.json +2 -2
  56. package/dist/data-service-CaB7saTP.mjs.map +0 -1
  57. package/dist/data-service-D5kHzBt-.js.map +0 -1
@@ -330,6 +330,75 @@ const filtersConfigSchema = z.object({
330
330
  });
331
331
  });
332
332
  //#endregion
333
+ //#region src/code/workspace.ts
334
+ const CODE_WORKSPACE_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
335
+ /** Protocol-v1 ceiling enforced by the worker and Code API. */
336
+ const CODE_WORKSPACE_MAX_COUNT = 32;
337
+ /** API/client protocol for immutable conversation-owned environment decisions. */
338
+ const CODE_ENVIRONMENT_DECISION_VERSION = 1;
339
+ /** API/client protocol for an owner's explicit move of a sealed environment decision. */
340
+ const CODE_ENVIRONMENT_MOVE_VERSION = 1;
341
+ const CODE_WORKSPACE_OPERATIONS = [
342
+ "read_file",
343
+ "search_text",
344
+ "list_files",
345
+ "write_file",
346
+ "preview_edit",
347
+ "edit_file",
348
+ "execute_command"
349
+ ];
350
+ const CODE_WORKSPACE_INSTANCE_TYPES = ["git_worktree"];
351
+ const CODE_WORKSPACE_SELECTION_ERROR_REASONS = [
352
+ "required",
353
+ "invalid",
354
+ "worker_unavailable",
355
+ "unsupported",
356
+ "missing",
357
+ "locked"
358
+ ];
359
+ const CODE_ENVIRONMENT_MODES = ["attached", "without_attached"];
360
+ function isRepositoryInstructionDescriptor(value) {
361
+ if (value == null || typeof value !== "object") return false;
362
+ const descriptor = value;
363
+ return Object.keys(descriptor).every((key) => [
364
+ "path",
365
+ "bytes",
366
+ "sha256",
367
+ "truncated"
368
+ ].includes(key)) && (descriptor.path === "AGENTS.md" || descriptor.path === "CLAUDE.md") && Number.isSafeInteger(descriptor.bytes) && Number(descriptor.bytes) >= 0 && Number(descriptor.bytes) <= 32768 && typeof descriptor.sha256 === "string" && /^[a-f0-9]{64}$/.test(descriptor.sha256) && typeof descriptor.truncated === "boolean";
369
+ }
370
+ function isCodeWorkspaceEnvironment(value) {
371
+ if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
372
+ const environment = value;
373
+ return Object.keys(environment).every((key) => [
374
+ "fingerprint",
375
+ "repo",
376
+ "ref",
377
+ "actions"
378
+ ].includes(key)) && typeof environment.fingerprint === "string" && /^[a-f0-9]{64}$/.test(environment.fingerprint) && (environment.repo === void 0 || typeof environment.repo === "string" && environment.repo.length <= 256 && /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(environment.repo)) && (environment.ref === void 0 || typeof environment.ref === "string" && environment.ref.trim().length > 0 && environment.ref.length <= 256 && !/[\0\r\n]/.test(environment.ref)) && Array.isArray(environment.actions) && environment.actions.length <= 32 && environment.actions.every((name) => typeof name === "string" && /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(name)) && new Set(environment.actions).size === environment.actions.length;
379
+ }
380
+ function isCodeEnvironmentMode(value) {
381
+ return CODE_ENVIRONMENT_MODES.some((mode) => mode === value);
382
+ }
383
+ function isCodeWorkspaceSelectionErrorReason(value) {
384
+ return CODE_WORKSPACE_SELECTION_ERROR_REASONS.some((reason) => reason === value);
385
+ }
386
+ function isCodeWorkspaceSelection(value) {
387
+ if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
388
+ const selection = value;
389
+ return Object.keys(selection).every((key) => key === "environmentId" || key === "workspaceId") && typeof selection.environmentId === "string" && CODE_WORKSPACE_ID_PATTERN.test(selection.environmentId) && typeof selection.workspaceId === "string" && CODE_WORKSPACE_ID_PATTERN.test(selection.workspaceId);
390
+ }
391
+ /** One exact workspace per attached environment used by a conversation. */
392
+ function isCodeWorkspaceSelections(value) {
393
+ if (!Array.isArray(value)) return false;
394
+ const environmentIds = /* @__PURE__ */ new Set();
395
+ return value.every((selection) => {
396
+ if (!isCodeWorkspaceSelection(selection) || environmentIds.has(selection.environmentId)) return false;
397
+ environmentIds.add(selection.environmentId);
398
+ return true;
399
+ });
400
+ }
401
+ //#endregion
333
402
  //#region src/feedback.ts
334
403
  const FEEDBACK_RATINGS = ["thumbsUp", "thumbsDown"];
335
404
  const FEEDBACK_REASON_KEYS = [
@@ -439,26 +508,64 @@ function getTagByKey(key) {
439
508
  return FEEDBACK_TAGS.find((tag) => tag.key === key);
440
509
  }
441
510
  //#endregion
442
- //#region src/stateful-code.ts
443
- const STATEFUL_CODE_ENVIRONMENTS = [
444
- "user",
445
- "agent-user",
446
- "conversation"
511
+ //#region src/code/approval.ts
512
+ const CODE_APPROVAL_MODES = [
513
+ "ask",
514
+ "acceptEdits",
515
+ "fullAccess"
447
516
  ];
448
- /** Resolve a deployment allowlist in stable UI order. An omitted value preserves
449
- * the backward-compatible behavior where every environment is available. */
450
- function resolveAllowedStatefulCodeEnvironments(configured) {
451
- if (configured == null) return [...STATEFUL_CODE_ENVIRONMENTS];
452
- const configuredSet = new Set(configured);
453
- return STATEFUL_CODE_ENVIRONMENTS.filter((environment) => configuredSet.has(environment));
517
+ const MODE_PERMISSIONS = {
518
+ ask: {
519
+ fileWrite: "ask",
520
+ commandExecution: "ask"
521
+ },
522
+ acceptEdits: {
523
+ fileWrite: "allow",
524
+ commandExecution: "ask"
525
+ },
526
+ fullAccess: {
527
+ fileWrite: "allow",
528
+ commandExecution: "allow"
529
+ }
530
+ };
531
+ /** Omitted deployment configuration never grants unattended execution. */
532
+ function getAllowedCodeApprovalModes({ enabled, allowedModes, configSchema, settings, environment }) {
533
+ if (enabled === false) return [];
534
+ const permitted = new Set(allowedModes ?? ["ask"]);
535
+ return CODE_APPROVAL_MODES.filter((mode) => {
536
+ if (!permitted.has(mode)) return false;
537
+ if (environment === "managed") return true;
538
+ for (const category of ["fileWrite", "commandExecution"]) {
539
+ if (MODE_PERMISSIONS[mode][category] !== "allow") continue;
540
+ const field = configSchema?.permissions?.[category];
541
+ const configured = settings?.permissions?.[category];
542
+ if ((configured != null && field?.allowed.includes(configured) === true ? configured : field?.default ?? "ask") === "deny" || field?.allowed.includes("allow") !== true) return false;
543
+ }
544
+ return true;
545
+ });
454
546
  }
455
- /** Keep an allowed preference, otherwise select the first deployment-allowed scope. */
456
- function resolveStatefulCodeEnvironment(preferred, configured) {
457
- const allowed = resolveAllowedStatefulCodeEnvironments(configured);
458
- return preferred != null && allowed.includes(preferred) ? preferred : allowed[0];
547
+ var CodeApprovalModeError = class extends Error {
548
+ constructor() {
549
+ super("The selected code approval mode is not permitted by the current policy.");
550
+ this.code = "CODE_APPROVAL_MODE_NOT_ALLOWED";
551
+ this.name = "CodeApprovalModeError";
552
+ }
553
+ };
554
+ /** Validate untrusted request state again at admission, including after policy changes. */
555
+ function resolveCodeApprovalMode(requested, constraints) {
556
+ if (requested == null) return void 0;
557
+ const selected = getAllowedCodeApprovalModes(constraints).find((mode) => mode === requested);
558
+ if (selected == null) throw new CodeApprovalModeError();
559
+ return selected;
560
+ }
561
+ /** Apply a turn preference without modifying machine settings or overriding an existing deny. */
562
+ function resolveCodePermissionDecision({ mode, category, decision }) {
563
+ if (mode == null || decision === "deny") return decision;
564
+ if (MODE_PERMISSIONS[mode] == null) throw new CodeApprovalModeError();
565
+ return MODE_PERMISSIONS[mode][category];
459
566
  }
460
567
  //#endregion
461
- //#region src/types/assistants.ts
568
+ //#region src/types/tools.ts
462
569
  let Tools = /* @__PURE__ */ function(Tools) {
463
570
  Tools["execute_code"] = "execute_code";
464
571
  Tools["code_interpreter"] = "code_interpreter";
@@ -482,35 +589,6 @@ let EToolResources = /* @__PURE__ */ function(EToolResources) {
482
589
  EToolResources["ocr"] = "ocr";
483
590
  return EToolResources;
484
591
  }({});
485
- let AnnotationTypes = /* @__PURE__ */ function(AnnotationTypes) {
486
- AnnotationTypes["FILE_CITATION"] = "file_citation";
487
- AnnotationTypes["FILE_PATH"] = "file_path";
488
- return AnnotationTypes;
489
- }({});
490
- let StepStatus = /* @__PURE__ */ function(StepStatus) {
491
- StepStatus["IN_PROGRESS"] = "in_progress";
492
- StepStatus["CANCELLED"] = "cancelled";
493
- StepStatus["FAILED"] = "failed";
494
- StepStatus["COMPLETED"] = "completed";
495
- StepStatus["EXPIRED"] = "expired";
496
- return StepStatus;
497
- }({});
498
- let MessageContentTypes = /* @__PURE__ */ function(MessageContentTypes) {
499
- MessageContentTypes["TEXT"] = "text";
500
- MessageContentTypes["IMAGE_FILE"] = "image_file";
501
- return MessageContentTypes;
502
- }({});
503
- let RunStatus = /* @__PURE__ */ function(RunStatus) {
504
- RunStatus["QUEUED"] = "queued";
505
- RunStatus["IN_PROGRESS"] = "in_progress";
506
- RunStatus["REQUIRES_ACTION"] = "requires_action";
507
- RunStatus["CANCELLING"] = "cancelling";
508
- RunStatus["CANCELLED"] = "cancelled";
509
- RunStatus["FAILED"] = "failed";
510
- RunStatus["COMPLETED"] = "completed";
511
- RunStatus["EXPIRED"] = "expired";
512
- return RunStatus;
513
- }({});
514
592
  const actionDelimiter = "_action_";
515
593
  const actionDomainSeparator = "---";
516
594
  /** Mirrors `Constants.mcp_delimiter`; duplicated here to avoid a circular import from `config.ts`. */
@@ -538,46 +616,6 @@ function isActionTool(toolName) {
538
616
  const mcpIdx = toolName.indexOf(mcpDelimiter);
539
617
  return mcpIdx < 0 || mcpIdx < actionIdx;
540
618
  }
541
- const hostImageIdSuffix = "_host_copy";
542
- const hostImageNamePrefix = "host_copy_";
543
- let FilePurpose = /* @__PURE__ */ function(FilePurpose) {
544
- FilePurpose["Vision"] = "vision";
545
- FilePurpose["FineTune"] = "fine-tune";
546
- FilePurpose["FineTuneResults"] = "fine-tune-results";
547
- FilePurpose["Assistants"] = "assistants";
548
- FilePurpose["AssistantsOutput"] = "assistants_output";
549
- return FilePurpose;
550
- }({});
551
- const defaultOrderQuery = {
552
- order: "desc",
553
- limit: 100
554
- };
555
- let AssistantStreamEvents = /* @__PURE__ */ function(AssistantStreamEvents) {
556
- AssistantStreamEvents["ThreadCreated"] = "thread.created";
557
- AssistantStreamEvents["ThreadRunCreated"] = "thread.run.created";
558
- AssistantStreamEvents["ThreadRunQueued"] = "thread.run.queued";
559
- AssistantStreamEvents["ThreadRunInProgress"] = "thread.run.in_progress";
560
- AssistantStreamEvents["ThreadRunRequiresAction"] = "thread.run.requires_action";
561
- AssistantStreamEvents["ThreadRunCompleted"] = "thread.run.completed";
562
- AssistantStreamEvents["ThreadRunFailed"] = "thread.run.failed";
563
- AssistantStreamEvents["ThreadRunCancelling"] = "thread.run.cancelling";
564
- AssistantStreamEvents["ThreadRunCancelled"] = "thread.run.cancelled";
565
- AssistantStreamEvents["ThreadRunExpired"] = "thread.run.expired";
566
- AssistantStreamEvents["ThreadRunStepCreated"] = "thread.run.step.created";
567
- AssistantStreamEvents["ThreadRunStepInProgress"] = "thread.run.step.in_progress";
568
- AssistantStreamEvents["ThreadRunStepCompleted"] = "thread.run.step.completed";
569
- AssistantStreamEvents["ThreadRunStepFailed"] = "thread.run.step.failed";
570
- AssistantStreamEvents["ThreadRunStepCancelled"] = "thread.run.step.cancelled";
571
- AssistantStreamEvents["ThreadRunStepExpired"] = "thread.run.step.expired";
572
- AssistantStreamEvents["ThreadRunStepDelta"] = "thread.run.step.delta";
573
- AssistantStreamEvents["ThreadMessageCreated"] = "thread.message.created";
574
- AssistantStreamEvents["ThreadMessageInProgress"] = "thread.message.in_progress";
575
- AssistantStreamEvents["ThreadMessageCompleted"] = "thread.message.completed";
576
- AssistantStreamEvents["ThreadMessageIncomplete"] = "thread.message.incomplete";
577
- AssistantStreamEvents["ThreadMessageDelta"] = "thread.message.delta";
578
- AssistantStreamEvents["ErrorEvent"] = "error";
579
- return AssistantStreamEvents;
580
- }({});
581
619
  //#endregion
582
620
  //#region src/schemas.ts
583
621
  const isUUID = z.string().uuid();
@@ -673,7 +711,35 @@ const inputTokensIncludesCache = (provider) => {
673
711
  return cacheSubsetProviders.has(provider ?? "");
674
712
  };
675
713
  const isDocumentSupportedProvider = (provider) => {
676
- return documentSupportedProviders.has(provider ?? "");
714
+ const normalized = provider?.toLowerCase() ?? "";
715
+ return Array.from(documentSupportedProviders).some((candidate) => candidate.toLowerCase() === normalized);
716
+ };
717
+ /**
718
+ * Endpoints whose encoders actually build native audio/video payloads. Narrower than
719
+ * `documentSupportedProviders`: a provider can accept PDFs and still emit nothing for
720
+ * media, in which case the upload has to fall back to text/STT.
721
+ */
722
+ const mediaSupportedProviders = new Set([
723
+ "google",
724
+ "vertexai",
725
+ "openrouter"
726
+ ]);
727
+ const isMediaSupportedProvider = (provider) => {
728
+ return mediaSupportedProviders.has(provider?.toLowerCase() ?? "");
729
+ };
730
+ /**
731
+ * Built-in endpoint and provider identifiers. A name outside this set is a custom
732
+ * endpoint whose real provider is resolved at request time, so its capabilities
733
+ * cannot be judged from the name alone.
734
+ */
735
+ const knownProviderIdentifiers = new Set([
736
+ ...Object.values(EModelEndpoint),
737
+ ...Object.values(Providers),
738
+ ...Object.values(EModelEndpoint).map((provider) => provider.toLowerCase()),
739
+ ...Object.values(Providers).map((provider) => provider.toLowerCase())
740
+ ]);
741
+ const isKnownProviderIdentifier = (provider) => {
742
+ return knownProviderIdentifiers.has(provider?.toLowerCase() ?? "");
677
743
  };
678
744
  const paramEndpoints = new Set([
679
745
  "agents",
@@ -876,6 +942,8 @@ const defaultAgentFormValues = {
876
942
  ["memory"]: false,
877
943
  stateful_code_environment: "user",
878
944
  code_environment_id: void 0,
945
+ code_workspace_id: void 0,
946
+ repositoryInstructions: void 0,
879
947
  category: "general",
880
948
  support_contact: {
881
949
  name: "",
@@ -1366,6 +1434,12 @@ const tConversationSchema = z.object({
1366
1434
  pinned: z.boolean().optional(),
1367
1435
  /** Server-derived: an active shared link exists for this conversation. Not persisted. */
1368
1436
  isShared: z.boolean().optional(),
1437
+ codeApprovalMode: z.enum(CODE_APPROVAL_MODES).optional(),
1438
+ codeEnvironmentMode: z.enum(CODE_ENVIRONMENT_MODES).optional(),
1439
+ codeWorkspaces: z.array(z.object({
1440
+ environmentId: z.string().regex(CODE_WORKSPACE_ID_PATTERN),
1441
+ workspaceId: z.string().regex(CODE_WORKSPACE_ID_PATTERN)
1442
+ }).strict()).optional(),
1369
1443
  title: z.string().nullable().or(z.literal("New Chat")).default("New Chat"),
1370
1444
  user: z.string().optional(),
1371
1445
  messages: z.array(z.string()).optional(),
@@ -1847,6 +1921,72 @@ const compactAgentsBaseSchema = tConversationSchema.pick({
1847
1921
  });
1848
1922
  const compactAgentsSchema = compactAgentsBaseSchema.transform((obj) => removeNullishValues(obj)).catch(() => ({}));
1849
1923
  //#endregion
1924
+ //#region src/balance.ts
1925
+ const REFILL_INTERVAL_UNITS = [
1926
+ "seconds",
1927
+ "minutes",
1928
+ "hours",
1929
+ "days",
1930
+ "weeks",
1931
+ "months"
1932
+ ];
1933
+ /** How long an unreleased in-flight balance reservation keeps counting against the balance. */
1934
+ const DEFAULT_BALANCE_RESERVATION_TTL_MS = 1800 * 1e3;
1935
+ /** Shortest reservation TTL; a live reservation is renewed every half TTL. */
1936
+ const MIN_BALANCE_RESERVATION_TTL_MS = 10 * 1e3;
1937
+ function getRefillEligibilityDate(lastRefill, value, unit) {
1938
+ const result = new Date(lastRefill);
1939
+ switch (unit) {
1940
+ case "seconds":
1941
+ result.setSeconds(result.getSeconds() + value);
1942
+ return result;
1943
+ case "minutes":
1944
+ result.setMinutes(result.getMinutes() + value);
1945
+ return result;
1946
+ case "hours":
1947
+ result.setHours(result.getHours() + value);
1948
+ return result;
1949
+ case "days":
1950
+ result.setDate(result.getDate() + value);
1951
+ return result;
1952
+ case "weeks":
1953
+ result.setDate(result.getDate() + value * 7);
1954
+ return result;
1955
+ case "months":
1956
+ result.setMonth(result.getMonth() + value);
1957
+ return result;
1958
+ default: return result;
1959
+ }
1960
+ }
1961
+ //#endregion
1962
+ //#region src/limits.ts
1963
+ /** Maximum number of explicit subagents per parent agent. UI + Zod schema share this. */
1964
+ const MAX_SUBAGENTS = 10;
1965
+ /** Hard upper bound for `endpoints.agents.maxSubagents`, keeping the request-validation
1966
+ * cap bounded no matter what the config file says. */
1967
+ const MAX_SUBAGENTS_CEILING = 50;
1968
+ let maxSubagents = 10;
1969
+ /** Effective subagents-per-agent cap; initialized from `endpoints.agents.maxSubagents` at startup. */
1970
+ const getMaxSubagents = () => maxSubagents;
1971
+ /** Applies a configured cap; any missing or out-of-range value resets to the default. */
1972
+ const setMaxSubagents = (value) => {
1973
+ maxSubagents = typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 50 ? value : 10;
1974
+ };
1975
+ /** Chat project field limits. The dialogs and the persistence layer share these,
1976
+ * so the inputs stop at the same point the server would otherwise truncate. */
1977
+ const MAX_CHAT_PROJECT_NAME_LENGTH = 100;
1978
+ const MAX_CHAT_PROJECT_DESCRIPTION_LENGTH = 1e3;
1979
+ /** Mirrors the bounded graph-child member limit in `@librechat/agents`. */
1980
+ const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
1981
+ /** Characters of retained tool output one stopped turn may be tokenized for, so the
1982
+ * context gauge can add an exact figure instead of an estimate. The schema default
1983
+ * and the save path share it; tokenizing runs ~60 ms/MB, once per stopped turn. */
1984
+ const DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS = 8 * 1024 * 1024;
1985
+ /** Token ceiling for the block of Ask User answers carried verbatim in an agent's
1986
+ * user context (`endpoints.agents.askUserQuestion.retainedAnswers.maxTokens`).
1987
+ * Older answers drop first once the block exceeds it; the newest set is always kept. */
1988
+ const DEFAULT_RETAINED_ANSWER_TOKENS = 4096;
1989
+ //#endregion
1850
1990
  //#region src/generate.ts
1851
1991
  let ComponentTypes = /* @__PURE__ */ function(ComponentTypes) {
1852
1992
  ComponentTypes["Input"] = "input";
@@ -2245,30 +2385,30 @@ const generateGoogleSchema = (customGoogle) => {
2245
2385
  }));
2246
2386
  };
2247
2387
  //#endregion
2248
- //#region src/limits.ts
2249
- /** Maximum number of explicit subagents per parent agent. UI + Zod schema share this. */
2250
- const MAX_SUBAGENTS = 10;
2251
- /** Hard upper bound for `endpoints.agents.maxSubagents`, keeping the request-validation
2252
- * cap bounded no matter what the config file says. */
2253
- const MAX_SUBAGENTS_CEILING = 50;
2254
- let maxSubagents = 10;
2255
- /** Effective subagents-per-agent cap; initialized from `endpoints.agents.maxSubagents` at startup. */
2256
- const getMaxSubagents = () => maxSubagents;
2257
- /** Applies a configured cap; any missing or out-of-range value resets to the default. */
2258
- const setMaxSubagents = (value) => {
2259
- maxSubagents = typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 50 ? value : 10;
2260
- };
2261
- /** Chat project field limits. The dialogs and the persistence layer share these,
2262
- * so the inputs stop at the same point the server would otherwise truncate. */
2263
- const MAX_CHAT_PROJECT_NAME_LENGTH = 100;
2264
- const MAX_CHAT_PROJECT_DESCRIPTION_LENGTH = 1e3;
2265
- /** Mirrors the bounded graph-child member limit in `@librechat/agents`. */
2266
- const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
2388
+ //#region src/stateful-code.ts
2389
+ const STATEFUL_CODE_ENVIRONMENTS = [
2390
+ "user",
2391
+ "agent-user",
2392
+ "conversation"
2393
+ ];
2394
+ /** Resolve a deployment allowlist in stable UI order. An omitted value preserves
2395
+ * the backward-compatible behavior where every environment is available. */
2396
+ function resolveAllowedStatefulCodeEnvironments(configured) {
2397
+ if (configured == null) return [...STATEFUL_CODE_ENVIRONMENTS];
2398
+ const configuredSet = new Set(configured);
2399
+ return STATEFUL_CODE_ENVIRONMENTS.filter((environment) => configuredSet.has(environment));
2400
+ }
2401
+ /** Keep an allowed preference, otherwise select the first deployment-allowed scope. */
2402
+ function resolveStatefulCodeEnvironment(preferred, configured) {
2403
+ const allowed = resolveAllowedStatefulCodeEnvironments(configured);
2404
+ return preferred != null && allowed.includes(preferred) ? preferred : allowed[0];
2405
+ }
2267
2406
  //#endregion
2268
2407
  //#region src/models.ts
2269
2408
  const modelSpecSubagentsSchema = z.object({
2270
2409
  enabled: z.boolean().optional(),
2271
2410
  allowSelf: z.boolean().optional(),
2411
+ shareFiles: z.boolean().optional(),
2272
2412
  agent_ids: z.array(z.string()).optional()
2273
2413
  }).superRefine((subagents, ctx) => {
2274
2414
  const maxSubagents = getMaxSubagents();
@@ -2362,41 +2502,9 @@ const specsConfigSchema = z.object({
2362
2502
  addedEndpoints: z.array(z.union([z.string(), eModelEndpointSchema])).optional()
2363
2503
  });
2364
2504
  //#endregion
2365
- //#region src/balance.ts
2366
- const REFILL_INTERVAL_UNITS = [
2367
- "seconds",
2368
- "minutes",
2369
- "hours",
2370
- "days",
2371
- "weeks",
2372
- "months"
2373
- ];
2374
- function getRefillEligibilityDate(lastRefill, value, unit) {
2375
- const result = new Date(lastRefill);
2376
- switch (unit) {
2377
- case "seconds":
2378
- result.setSeconds(result.getSeconds() + value);
2379
- return result;
2380
- case "minutes":
2381
- result.setMinutes(result.getMinutes() + value);
2382
- return result;
2383
- case "hours":
2384
- result.setHours(result.getHours() + value);
2385
- return result;
2386
- case "days":
2387
- result.setDate(result.getDate() + value);
2388
- return result;
2389
- case "weeks":
2390
- result.setDate(result.getDate() + value * 7);
2391
- return result;
2392
- case "months":
2393
- result.setMonth(result.getMonth() + value);
2394
- return result;
2395
- default: return result;
2396
- }
2397
- }
2398
- //#endregion
2399
2505
  //#region src/file-config.ts
2506
+ /** Parallel storage deletions during rollback of a failed skill archive import. */
2507
+ const DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY = 8;
2400
2508
  const supportsFiles = {
2401
2509
  ["openAI"]: true,
2402
2510
  ["google"]: true,
@@ -2550,6 +2658,68 @@ const bedrockDocumentFormats = {
2550
2658
  "text/plain": "txt",
2551
2659
  "text/markdown": "md"
2552
2660
  };
2661
+ /**
2662
+ * Whether an upload belongs to the conversation rather than to the agent. The value
2663
+ * arrives from multipart form data, so it can be the string "false", which is truthy.
2664
+ * Shared so the route, the authorization check and processing cannot disagree about it.
2665
+ */
2666
+ const isMessageFileUpload = (value) => value === true || value === "true";
2667
+ /**
2668
+ * Whether the upload's conversation uses the Responses API, which decides whether Azure
2669
+ * can carry a document natively. Multipart form data has no booleans, so it arrives as
2670
+ * the string "true".
2671
+ */
2672
+ const isResponsesApiUpload = (value) => value === true || value === "true";
2673
+ /**
2674
+ * The name a file carries inside the code sandbox.
2675
+ *
2676
+ * Image uploads are converted to the configured output type while the record keeps the
2677
+ * original filename, so the extension has to follow the stored bytes or the sandbox
2678
+ * decoder is handed a mismatch. Provisioning and priming both resolve the mount path
2679
+ * from here: deriving it twice under different rules leaves a later turn advertising a
2680
+ * path that does not exist in the sandbox.
2681
+ */
2682
+ const resolveSandboxFilename = (filename, mimeType) => {
2683
+ if (!mimeType?.startsWith("image/")) return filename;
2684
+ const subtype = mimeType.slice(6);
2685
+ if (![
2686
+ "webp",
2687
+ "png",
2688
+ "jpeg",
2689
+ "gif"
2690
+ ].includes(subtype)) return filename;
2691
+ const accepted = subtype === "jpeg" ? [".jpg", ".jpeg"] : [`.${subtype}`];
2692
+ const lastDot = filename.lastIndexOf(".");
2693
+ const currentExt = lastDot > 0 ? filename.slice(lastDot).toLowerCase() : "";
2694
+ if (accepted.includes(currentExt)) return filename;
2695
+ return `${lastDot > 0 ? filename.slice(0, lastDot) : filename}${accepted[0]}`;
2696
+ };
2697
+ /**
2698
+ * The Responses setting a turn actually runs on. A saved agent's own record wins, since
2699
+ * execution reads its model parameters; a conversation only answers for itself. Upload
2700
+ * and delivery must agree here, or a document is stored as raw provider content and then
2701
+ * re-resolved to text it has no extraction for.
2702
+ */
2703
+ const resolveUseResponsesApi = (agentValue, conversationValue) => agentValue ?? conversationValue ?? void 0;
2704
+ /** Models whose native OpenAI and Azure execution defaults to Responses. Keep
2705
+ * this shared with client upload routing so documents follow the API that the
2706
+ * backend will actually invoke. Explicit false remains an opt-out. */
2707
+ const prefersResponsesApiByModel = (model) => typeof model === "string" && /^gpt-6-(?:astra|sol|luna)(?:-|$)/i.test(model);
2708
+ /** The server has transport and administrator settings the browser cannot see.
2709
+ * Missing policy never enables model-based uploads (including during upgrades). */
2710
+ const resolveEffectiveUseResponsesApi = ({ value, endpoint, model, routing, webSearch }) => {
2711
+ if (endpoint !== "openAI" && endpoint !== "azureOpenAI") return value ?? void 0;
2712
+ let policy = model ? routing?.[model] : void 0;
2713
+ if (!policy && model && prefersResponsesApiByModel(model)) {
2714
+ const family = /^gpt-6-(?:astra|sol|luna)(?=-|$)/i.exec(model)?.[0].toLowerCase();
2715
+ policy = family ? routing?.[`${family}-*`] : void 0;
2716
+ }
2717
+ policy ??= routing?.["*"];
2718
+ if (!policy) return value ?? void 0;
2719
+ if (webSearch && policy.withWebSearch) policy = policy.withWebSearch;
2720
+ if (value == null) return policy.default;
2721
+ return value ? policy.on : policy.off;
2722
+ };
2553
2723
  const isBedrockDocumentType = (mimeType) => mimeType != null && mimeType in bedrockDocumentFormats;
2554
2724
  /** MIME types Bedrock's Converse document path can send to the model (mirrors `bedrockDocumentFormats`). */
2555
2725
  const bedrockDocumentMimeTypes = Object.keys(bedrockDocumentFormats);
@@ -2783,6 +2953,8 @@ const mbToBytes = (mb) => mb * megabyte;
2783
2953
  const defaultSizeLimit = mbToBytes(512);
2784
2954
  const defaultSkillImportSizeLimit = mbToBytes(50);
2785
2955
  const defaultTokenLimit = 1e5;
2956
+ const defaultContextSizeLimit = mbToBytes(128);
2957
+ const defaultContextCharLimit = 1e6;
2786
2958
  const assistantsFileConfig = {
2787
2959
  fileLimit: 10,
2788
2960
  fileSizeLimit: defaultSizeLimit,
@@ -2810,10 +2982,15 @@ const fileConfig = {
2810
2982
  disabled: false
2811
2983
  }
2812
2984
  },
2813
- skills: { fileSizeLimit: defaultSkillImportSizeLimit },
2985
+ skills: {
2986
+ fileSizeLimit: defaultSkillImportSizeLimit,
2987
+ importCleanupConcurrency: 8
2988
+ },
2814
2989
  serverFileSizeLimit: defaultSizeLimit,
2815
2990
  avatarSizeLimit: mbToBytes(2),
2816
2991
  fileTokenLimit: defaultTokenLimit,
2992
+ fileContextSizeLimit: defaultContextSizeLimit,
2993
+ fileContextCharLimit: defaultContextCharLimit,
2817
2994
  clientImageResize: {
2818
2995
  enabled: false,
2819
2996
  maxWidth: 1900,
@@ -2828,21 +3005,48 @@ const fileConfig = {
2828
3005
  return supportedTypes.some((regex) => regex.test(fileType));
2829
3006
  }
2830
3007
  };
2831
- const supportedMimeTypesSchema = z.array(z.string()).optional();
3008
+ const supportedMimeTypesSchema = z.array(z.string().superRefine((pattern, context) => {
3009
+ try {
3010
+ compileMimeRegex(pattern);
3011
+ } catch {
3012
+ context.addIssue({
3013
+ code: z.ZodIssueCode.custom,
3014
+ message: "Invalid MIME type regex: not supported by the configured regex engine"
3015
+ });
3016
+ }
3017
+ })).optional();
3018
+ const DefaultLLMDeliveryPath = z.enum([
3019
+ "provider",
3020
+ "text",
3021
+ "none"
3022
+ ]);
3023
+ const defaultLLMDeliveryPathSchema = z.object({
3024
+ fallback: DefaultLLMDeliveryPath.optional(),
3025
+ overrides: z.record(DefaultLLMDeliveryPath).optional()
3026
+ });
2832
3027
  const endpointFileConfigSchema = z.object({
2833
3028
  disabled: z.boolean().optional(),
2834
3029
  fileLimit: z.number().min(0).optional(),
2835
3030
  fileSizeLimit: z.number().min(0).optional(),
2836
3031
  totalSizeLimit: z.number().min(0).optional(),
2837
- supportedMimeTypes: supportedMimeTypesSchema.optional()
3032
+ supportedMimeTypes: supportedMimeTypesSchema.optional(),
3033
+ defaultLLMDeliveryPath: defaultLLMDeliveryPathSchema.optional(),
3034
+ legacyFileUploadUX: z.boolean().optional(),
3035
+ textFallbackWithoutTools: z.boolean().optional()
3036
+ });
3037
+ const skillFileConfigSchema = z.object({
3038
+ fileSizeLimit: z.number().min(0).optional(),
3039
+ importCleanupConcurrency: z.number().int().positive().optional()
2838
3040
  });
2839
- const skillFileConfigSchema = z.object({ fileSizeLimit: z.number().min(0).optional() });
2840
3041
  const fileConfigSchema = z.object({
2841
3042
  endpoints: z.record(endpointFileConfigSchema).optional(),
2842
3043
  skills: skillFileConfigSchema.optional(),
2843
3044
  serverFileSizeLimit: z.number().min(0).optional(),
2844
3045
  avatarSizeLimit: z.number().min(0).optional(),
2845
3046
  fileTokenLimit: z.number().min(0).optional(),
3047
+ fileContextSizeLimit: z.number().min(0).optional(),
3048
+ fileContextCharLimit: z.number().min(0).optional(),
3049
+ codeEnvLivenessSafeWindowMs: z.number().min(0).optional(),
2846
3050
  imageGeneration: z.object({
2847
3051
  percentage: z.number().min(0).max(100).optional(),
2848
3052
  px: z.number().min(0).optional()
@@ -2854,7 +3058,10 @@ const fileConfigSchema = z.object({
2854
3058
  quality: z.number().min(0).max(1).optional()
2855
3059
  }).optional(),
2856
3060
  ocr: z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
2857
- text: z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional()
3061
+ text: z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
3062
+ defaultLLMDeliveryPath: defaultLLMDeliveryPathSchema.optional(),
3063
+ legacyFileUploadUX: z.boolean().optional(),
3064
+ textFallbackWithoutTools: z.boolean().optional()
2858
3065
  });
2859
3066
  /**
2860
3067
  * Compiler for admin-supplied MIME patterns. Defaults to native `RegExp`, which browser
@@ -2891,6 +3098,15 @@ const isPermissiveMimeConfig = (types) => {
2891
3098
  if (!types || types.length === 0) return false;
2892
3099
  return types.some((regex) => regex.test("x-librechat/x-probe"));
2893
3100
  };
3101
+ /**
3102
+ * Detects whether an endpoint's `supportedMimeTypes` were set by the admin rather than inherited
3103
+ * from the built-in default list. Inheritance is signaled by referential identity with
3104
+ * `supportedMimeTypes`, which `mergeWithDefault` preserves for unconfigured endpoints.
3105
+ */
3106
+ const isExplicitMimeConfig = (types) => {
3107
+ if (!types || types.length === 0) return false;
3108
+ return types !== supportedMimeTypes;
3109
+ };
2894
3110
  /** Media categories that collapse to a wildcard `accept` token when any member type is allowed. */
2895
3111
  const mimeAcceptCategories = [
2896
3112
  {
@@ -2990,6 +3206,12 @@ const documentMimeExtensions = [
2990
3206
  ["text/calendar", [".ics"]],
2991
3207
  ["message/rfc822", [".eml"]]
2992
3208
  ];
3209
+ /** Preferred extension for a known document MIME type, including its leading dot. */
3210
+ function getDocumentFileExtension(mimeType) {
3211
+ const normalized = mimeType?.split(";", 1)[0].trim().toLowerCase();
3212
+ const canonical = normalized === "text/comma-separated-values" ? "text/csv" : normalized;
3213
+ return documentMimeExtensions.find(([type]) => type === canonical)?.[1][0];
3214
+ }
2993
3215
  const documentMimeSet = new Set(documentMimeExtensions.map(([mimeType]) => mimeType));
2994
3216
  /** Every MIME type LibreChat may accept, used to detect patterns that reach beyond the representable set. */
2995
3217
  const knownMimeUniverse = Array.from(new Set([
@@ -3083,7 +3305,46 @@ function mergeWithDefault(endpointConfig, defaultConfig, endpoint) {
3083
3305
  fileLimit: endpointConfig.fileLimit ?? defaultConfig.fileLimit,
3084
3306
  fileSizeLimit: endpointConfig.fileSizeLimit ?? defaultConfig.fileSizeLimit,
3085
3307
  totalSizeLimit: endpointConfig.totalSizeLimit ?? defaultConfig.totalSizeLimit,
3086
- supportedMimeTypes: endpointConfig.supportedMimeTypes ?? defaultMimeTypes
3308
+ supportedMimeTypes: endpointConfig.supportedMimeTypes ?? defaultMimeTypes,
3309
+ defaultLLMDeliveryPath: mergeDeliveryPathConfig(endpointConfig.defaultLLMDeliveryPath, defaultConfig.defaultLLMDeliveryPath),
3310
+ legacyFileUploadUX: endpointConfig.legacyFileUploadUX ?? defaultConfig.legacyFileUploadUX,
3311
+ textFallbackWithoutTools: endpointConfig.textFallbackWithoutTools ?? defaultConfig.textFallbackWithoutTools
3312
+ };
3313
+ }
3314
+ /**
3315
+ * Deep-merges delivery-path config so an endpoint that supplies only one override
3316
+ * still inherits the default's fallback and shared overrides. Whole-object
3317
+ * replacement would silently drop the inherited routing.
3318
+ */
3319
+ function mergeDeliveryPathConfig(endpointValue, defaultValue) {
3320
+ if (!endpointValue) return defaultValue;
3321
+ if (!defaultValue) return endpointValue;
3322
+ if (endpointValue.fallback != null) return endpointValue;
3323
+ const hasOverrides = endpointValue.overrides != null || defaultValue.overrides != null;
3324
+ return {
3325
+ ...defaultValue.fallback != null ? { fallback: defaultValue.fallback } : {},
3326
+ ...hasOverrides ? { overrides: { ...shadowByWildcard(defaultValue.overrides, endpointValue.overrides) } } : {}
3327
+ };
3328
+ }
3329
+ /**
3330
+ * Flattens two override layers into one map that still resolves like the layered chain.
3331
+ * Resolution reads exact keys before wildcards, so a plain spread would let a lower
3332
+ * layer's `image/png` outrank the upper layer's `image/*`. Dropping the entries an
3333
+ * upper wildcard covers restores precedence without changing how lookups work.
3334
+ */
3335
+ function shadowByWildcard(lower, upper) {
3336
+ if (!lower) return { ...upper };
3337
+ const upperWildcards = /* @__PURE__ */ new Set();
3338
+ for (const key in upper) if (key.endsWith("/*")) upperWildcards.add(key.slice(0, -1));
3339
+ if (upperWildcards.size === 0) return {
3340
+ ...lower,
3341
+ ...upper
3342
+ };
3343
+ const retained = {};
3344
+ for (const key in lower) if (!(!key.endsWith("/*") && upperWildcards.has(key.slice(0, key.indexOf("/") + 1)) && upper?.[key] == null)) retained[key] = lower[key];
3345
+ return {
3346
+ ...retained,
3347
+ ...upper
3087
3348
  };
3088
3349
  }
3089
3350
  function getEndpointFileConfig(params) {
@@ -3091,8 +3352,14 @@ function getEndpointFileConfig(params) {
3091
3352
  if (!mergedFileConfig?.endpoints) return fileConfig.endpoints.default;
3092
3353
  /** Compute an effective default by merging user-configured default over the base default */
3093
3354
  const baseDefaultConfig = fileConfig.endpoints.default;
3355
+ const globalDefaultConfig = {
3356
+ ...baseDefaultConfig,
3357
+ defaultLLMDeliveryPath: mergeDeliveryPathConfig(mergedFileConfig.defaultLLMDeliveryPath, baseDefaultConfig.defaultLLMDeliveryPath),
3358
+ legacyFileUploadUX: mergedFileConfig.legacyFileUploadUX ?? baseDefaultConfig.legacyFileUploadUX,
3359
+ textFallbackWithoutTools: mergedFileConfig.textFallbackWithoutTools ?? baseDefaultConfig.textFallbackWithoutTools
3360
+ };
3094
3361
  const userDefaultConfig = mergedFileConfig.endpoints.default;
3095
- const defaultConfig = userDefaultConfig ? mergeWithDefault(userDefaultConfig, baseDefaultConfig, "default") : baseDefaultConfig;
3362
+ const defaultConfig = userDefaultConfig ? mergeWithDefault(userDefaultConfig, globalDefaultConfig, "default") : globalDefaultConfig;
3096
3363
  const normalizedEndpoint = normalizeEndpointName(endpoint ?? "");
3097
3364
  const standardEndpoints = new Set([
3098
3365
  "default",
@@ -3147,9 +3414,18 @@ function mergeFileConfig(dynamic) {
3147
3414
  }
3148
3415
  };
3149
3416
  if (!dynamic) return mergedConfig;
3417
+ if (dynamic.defaultLLMDeliveryPath !== void 0) mergedConfig.defaultLLMDeliveryPath = dynamic.defaultLLMDeliveryPath;
3418
+ if (dynamic.legacyFileUploadUX !== void 0) mergedConfig.legacyFileUploadUX = dynamic.legacyFileUploadUX;
3419
+ if (dynamic.textFallbackWithoutTools !== void 0) mergedConfig.textFallbackWithoutTools = dynamic.textFallbackWithoutTools;
3150
3420
  if (dynamic.serverFileSizeLimit !== void 0) mergedConfig.serverFileSizeLimit = mbToBytes(dynamic.serverFileSizeLimit);
3151
3421
  if (dynamic.avatarSizeLimit !== void 0) mergedConfig.avatarSizeLimit = mbToBytes(dynamic.avatarSizeLimit);
3152
3422
  if (dynamic.fileTokenLimit !== void 0) mergedConfig.fileTokenLimit = dynamic.fileTokenLimit;
3423
+ if (dynamic.fileContextSizeLimit !== void 0) mergedConfig.fileContextSizeLimit = mbToBytes(dynamic.fileContextSizeLimit);
3424
+ if (dynamic.fileContextCharLimit !== void 0) mergedConfig.fileContextCharLimit = dynamic.fileContextCharLimit;
3425
+ if (dynamic.skills?.importCleanupConcurrency !== void 0) mergedConfig.skills = {
3426
+ ...mergedConfig.skills,
3427
+ importCleanupConcurrency: dynamic.skills.importCleanupConcurrency
3428
+ };
3153
3429
  if (dynamic.skills?.fileSizeLimit !== void 0) mergedConfig.skills = {
3154
3430
  ...mergedConfig.skills,
3155
3431
  fileSizeLimit: mbToBytes(dynamic.skills.fileSizeLimit)
@@ -3197,6 +3473,9 @@ function mergeFileConfig(dynamic) {
3197
3473
  });
3198
3474
  if (dynamicEndpoint.disabled !== void 0) mergedEndpoint.disabled = dynamicEndpoint.disabled;
3199
3475
  if (dynamicEndpoint.supportedMimeTypes) mergedEndpoint.supportedMimeTypes = convertStringsToRegex(dynamicEndpoint.supportedMimeTypes);
3476
+ if (dynamicEndpoint.defaultLLMDeliveryPath !== void 0) mergedEndpoint.defaultLLMDeliveryPath = dynamicEndpoint.defaultLLMDeliveryPath;
3477
+ if (dynamicEndpoint.legacyFileUploadUX !== void 0) mergedEndpoint.legacyFileUploadUX = dynamicEndpoint.legacyFileUploadUX;
3478
+ if (dynamicEndpoint.textFallbackWithoutTools !== void 0) mergedEndpoint.textFallbackWithoutTools = dynamicEndpoint.textFallbackWithoutTools;
3200
3479
  }
3201
3480
  return mergedConfig;
3202
3481
  }
@@ -3226,6 +3505,8 @@ const codeEnvironments = () => `${BASE_URL}/api/code-environments`;
3226
3505
  const codeEnvironmentPairings = () => `${codeEnvironments()}/pairings`;
3227
3506
  const codeEnvironmentById = (id) => `${codeEnvironments()}/${encodeURIComponent(id)}`;
3228
3507
  const codeEnvironmentSettings = (id) => `${codeEnvironmentById(id)}/settings`;
3508
+ const codeEnvironmentStatus = (id) => `${codeEnvironmentById(id)}/status`;
3509
+ const codeEnvironmentConversationDecision = (conversationId) => `${codeEnvironments()}/conversations/${encodeURIComponent(conversationId)}/decision`;
3229
3510
  const messagesRoot = `${BASE_URL}/api/messages`;
3230
3511
  const messages = (params) => {
3231
3512
  const { conversationId, messageId, ...rest } = params;
@@ -3438,8 +3719,15 @@ const listSkillsWithFilters = (filter) => {
3438
3719
  };
3439
3720
  const skillFiles = (id) => `${getSkill$1(id)}/files`;
3440
3721
  const skillFile = (id, relativePath) => `${skillFiles(id)}/${encodeURIComponent(relativePath)}`;
3441
- const insights = () => `${BASE_URL}/api/admin/insights`;
3722
+ const insights = () => `${BASE_URL}/api/insights`;
3442
3723
  const insightsAccess = () => `${insights()}/access`;
3724
+ const conversationTrace = (conversationId) => `${BASE_URL}/api/traces/${encodeURIComponent(conversationId)}`;
3725
+ const conversationTraceAvailability = (conversationId) => `${conversationTrace(conversationId)}/availability`;
3726
+ const conversationTraceRecords = (conversationId, cursor) => `${conversationTrace(conversationId)}/records${cursor ? `?${new URLSearchParams({ cursor }).toString()}` : ""}`;
3727
+ const conversationTraceRecord = (conversationId, recordId, messageId, sourceId) => `${conversationTrace(conversationId)}/records/${encodeURIComponent(recordId)}?${new URLSearchParams({
3728
+ message: messageId,
3729
+ ...sourceId ? { source: sourceId } : {}
3730
+ }).toString()}`;
3443
3731
  const adminSkillsSync = () => `${BASE_URL}/api/admin/skills/sync`;
3444
3732
  const adminSkillsSyncStatus = () => `${adminSkillsSync()}/status`;
3445
3733
  const adminSkillsSyncRun = () => `${adminSkillsSync()}/run`;
@@ -3448,6 +3736,7 @@ const skillStates = () => `${BASE_URL}/api/user/settings/skills/active`;
3448
3736
  const adminLangfuseConnection = () => `${BASE_URL}/api/admin/langfuse/connection`;
3449
3737
  const adminLangfuseConnectionTest = () => `${adminLangfuseConnection()}/test`;
3450
3738
  const adminLangfuseSessionLink = (conversationId) => `${adminLangfuseConnection()}/session/${encodeURIComponent(conversationId)}`;
3739
+ const pinnedOrder = () => `${BASE_URL}/api/user/settings/pinned-order`;
3451
3740
  const toolFavorites = () => `${BASE_URL}/api/user/settings/favorites/tools`;
3452
3741
  const toolFavorite = (itemType, itemId) => `${toolFavorites()}/${itemType}/${encodeURIComponent(itemId)}`;
3453
3742
  const roles = () => `${BASE_URL}/api/roles`;
@@ -3519,6 +3808,7 @@ let FileContext = /* @__PURE__ */ function(FileContext) {
3519
3808
  FileContext["image_generation"] = "image_generation";
3520
3809
  FileContext["assistants_output"] = "assistants_output";
3521
3810
  FileContext["message_attachment"] = "message_attachment";
3811
+ FileContext["run_artifact"] = "run_artifact";
3522
3812
  FileContext["skill_file"] = "skill_file";
3523
3813
  FileContext["filename"] = "filename";
3524
3814
  FileContext["updatedAt"] = "updatedAt";
@@ -3547,8 +3837,20 @@ let TokenExchangeMethodEnum = /* @__PURE__ */ function(TokenExchangeMethodEnum)
3547
3837
  TokenExchangeMethodEnum["BasicAuthHeader"] = "basic_auth_header";
3548
3838
  return TokenExchangeMethodEnum;
3549
3839
  }({});
3840
+ const agentGitIdentitySchema = z.object({
3841
+ name: z.string().trim().min(1).max(128).refine((value) => !/[\0\r\n]/.test(value)),
3842
+ email: z.string().trim().email().max(254).refine((value) => !/[\0\r\n]/.test(value))
3843
+ }).optional();
3550
3844
  //#endregion
3551
3845
  //#region src/mcp.ts
3846
+ /**
3847
+ * Upper bound on a stored MCP `iconPath` (URL or data URI). Enforced by
3848
+ * `sanitizeMcpIconPath`, not a schema `.max()`, so re-submitting a server whose
3849
+ * stored icon predates the cap clears the icon instead of rejecting the update.
3850
+ */
3851
+ const MAX_MCP_ICON_PATH_LENGTH = 256 * 1024;
3852
+ /** Keep persistence admission waits below the shared lease's 15-minute lifetime. */
3853
+ const MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS = 14 * 6e4;
3552
3854
  const validateOAuthClientCredentials = (oauth, ctx) => {
3553
3855
  if (oauth.client_secret && !oauth.client_id) ctx.addIssue({
3554
3856
  code: z.ZodIssueCode.custom,
@@ -3623,6 +3925,27 @@ const OAuthOptionsBaseSchema = z.object({
3623
3925
  * Ignored when `audience` itself is not configured.
3624
3926
  */
3625
3927
  forward_audience_on_refresh: z.boolean().optional(),
3928
+ /**
3929
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
3930
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
3931
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
3932
+ * (RFC 9728), never an operator-supplied string.
3933
+ *
3934
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
3935
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
3936
+ * fails an `/authorize` request carrying both `resource` and `scope` with
3937
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
3938
+ * `audience` above) to obtain an API-scoped token.
3939
+ *
3940
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
3941
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
3942
+ * still recorded on the stored client binding, so scope discovery, authorization
3943
+ * server discovery and re-authentication checks are unaffected.
3944
+ *
3945
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
3946
+ * from user-managed servers.
3947
+ */
3948
+ send_resource_parameter: z.boolean().optional(),
3626
3949
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
3627
3950
  revocation_endpoint: z.string().transform((val) => extractEnvVariable(val)).pipe(z.string().url()).optional(),
3628
3951
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -3641,14 +3964,16 @@ const userOAuthEndpointUrlSchema = z.string().refine((val) => !envVarPattern.tes
3641
3964
  }, { message: "OAuth endpoint URLs cannot include audience or resource query parameters" });
3642
3965
  const UserOAuthOptionsSchema = OAuthOptionsBaseSchema.omit({
3643
3966
  audience: true,
3644
- forward_audience_on_refresh: true
3967
+ forward_audience_on_refresh: true,
3968
+ send_resource_parameter: true
3645
3969
  }).extend({
3646
3970
  authorization_url: userOAuthEndpointUrlSchema.optional(),
3647
3971
  token_url: userOAuthEndpointUrlSchema.optional(),
3648
3972
  redirect_uri: userOAuthEndpointUrlSchema.optional(),
3649
3973
  revocation_endpoint: userOAuthEndpointUrlSchema.optional(),
3650
3974
  audience: z.never().optional(),
3651
- forward_audience_on_refresh: z.never().optional()
3975
+ forward_audience_on_refresh: z.never().optional(),
3976
+ send_resource_parameter: z.never().optional()
3652
3977
  }).superRefine(validateOAuthClientCredentials);
3653
3978
  const OboOptionsSchema = z.object({
3654
3979
  /** Scopes to request for the downstream MCP server (e.g., "api://<client-id>/Mcp.Tools.ReadWrite") */
@@ -3673,6 +3998,21 @@ const BaseOptionsSchema = z.object({
3673
3998
  sseReadTimeout: z.number().int().positive().optional(),
3674
3999
  initTimeout: z.number().int().nonnegative().optional(),
3675
4000
  /**
4001
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
4002
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
4003
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
4004
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
4005
+ *
4006
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
4007
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
4008
+ * common case this wait exists to serve. Omit the field to take the default.
4009
+ */
4010
+ oauthRefreshWaitTimeout: z.number().int().positive().optional(),
4011
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
4012
+ oauthRefreshCoordination: z.boolean().optional(),
4013
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
4014
+ oauthPersistenceWaitTimeout: z.number().int().positive().max(MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS).optional(),
4015
+ /**
3676
4016
  * Whether the server is offered in chat.
3677
4017
  *
3678
4018
  * `false` hides it from the chat dropdown (MCPSelect) AND bars it from the
@@ -3806,6 +4146,13 @@ const SSEOptionsSchema = BaseOptionsSchema.extend({
3806
4146
  type: z.literal("sse").default("sse"),
3807
4147
  headers: z.record(z.string(), z.string()).optional(),
3808
4148
  /**
4149
+ * Headers resolved from the live chat request and merged over `headers`.
4150
+ * Omitted during catalog discovery, which has no request context, so a
4151
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
4152
+ * On a duplicate header name the resolved `requestHeaders` value wins.
4153
+ */
4154
+ requestHeaders: z.record(z.string(), z.string()).optional(),
4155
+ /**
3809
4156
  * On-Behalf-Of (OBO) token exchange configuration.
3810
4157
  * When configured, LibreChat exchanges the logged-in user's federated access token
3811
4158
  * for a token scoped to this MCP server via the OAuth 2.0 OBO flow (jwt-bearer grant).
@@ -3824,6 +4171,13 @@ const StreamableHTTPOptionsSchema = BaseOptionsSchema.extend({
3824
4171
  type: z.union([z.literal("streamable-http"), z.literal("http")]),
3825
4172
  headers: z.record(z.string(), z.string()).optional(),
3826
4173
  /**
4174
+ * Headers resolved from the live chat request and merged over `headers`.
4175
+ * Omitted during catalog discovery, which has no request context, so a
4176
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
4177
+ * On a duplicate header name the resolved `requestHeaders` value wins.
4178
+ */
4179
+ requestHeaders: z.record(z.string(), z.string()).optional(),
4180
+ /**
3827
4181
  * On-Behalf-Of (OBO) token exchange configuration.
3828
4182
  * When configured, LibreChat exchanges the logged-in user's federated access token
3829
4183
  * for a token scoped to this MCP server via the OAuth 2.0 OBO flow (jwt-bearer grant).
@@ -3853,6 +4207,9 @@ const omitServerManagedFields = (schema) => schema.omit({
3853
4207
  timeout: true,
3854
4208
  sseReadTimeout: true,
3855
4209
  initTimeout: true,
4210
+ oauthRefreshWaitTimeout: true,
4211
+ oauthRefreshCoordination: true,
4212
+ oauthPersistenceWaitTimeout: true,
3856
4213
  chatMenu: true,
3857
4214
  serverInstructions: true,
3858
4215
  requiresOAuth: true,
@@ -3919,6 +4276,8 @@ const MCP_USER_INPUT_FIELDS = (() => {
3919
4276
  })();
3920
4277
  //#endregion
3921
4278
  //#region src/config.ts
4279
+ const AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT = 24 * 1024;
4280
+ const AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX = 64 * 1024;
3922
4281
  const defaultSocialLogins = [
3923
4282
  "google",
3924
4283
  "facebook",
@@ -3927,6 +4286,8 @@ const defaultSocialLogins = [
3927
4286
  "discord",
3928
4287
  "saml"
3929
4288
  ];
4289
+ /** How long a started social login may take to return to its callback before its `state` expires. */
4290
+ const DEFAULT_OAUTH_STATE_TTL_MS = 600 * 1e3;
3930
4291
  const BASE_ONLY_CONFIG_SECTIONS = ["filters"];
3931
4292
  /** Sections that may be stored in the tenant's base config document but must
3932
4293
  * not be overridden or tombstoned by role, group, or user config documents. */
@@ -3957,6 +4318,8 @@ const excludedKeys = new Set([
3957
4318
  "conversationId",
3958
4319
  "agentEventBinding",
3959
4320
  "agentEventActor",
4321
+ "agentEventActorCleanup",
4322
+ "agentEventActorSuspension",
3960
4323
  "agentEventActorReconciliations",
3961
4324
  "agentEventActorEpoch",
3962
4325
  "agentEventActorLegacyTurn",
@@ -4465,13 +4828,13 @@ function isRemoteOidcUrlAllowed(value) {
4465
4828
  }
4466
4829
  const remoteApiOidcUrlSchema = z.string().url().refine(isRemoteOidcUrlAllowed, { message: "must use https:// unless targeting localhost" });
4467
4830
  const remoteApiOidcScopeSchema = z.string().refine((scope) => !scope.includes(","), { message: "scopes must be space-separated" });
4468
- const remoteApiOidcSchema = z.object({
4831
+ const oidcAccessTokenSchema = z.object({
4469
4832
  enabled: z.boolean().default(false),
4470
4833
  issuer: remoteApiOidcUrlSchema.optional(),
4471
4834
  audience: z.string().min(1).optional(),
4472
- jwksUri: remoteApiOidcUrlSchema.optional(),
4473
- scope: remoteApiOidcScopeSchema.optional()
4474
- }).superRefine((oidc, ctx) => {
4835
+ jwksUri: remoteApiOidcUrlSchema.optional()
4836
+ });
4837
+ function validateEnabledOidc(oidc, ctx) {
4475
4838
  if (oidc.enabled === true && !oidc.issuer) ctx.addIssue({
4476
4839
  code: z.ZodIssueCode.custom,
4477
4840
  path: ["issuer"],
@@ -4482,12 +4845,60 @@ const remoteApiOidcSchema = z.object({
4482
4845
  path: ["audience"],
4483
4846
  message: "audience is required when OIDC auth is enabled"
4484
4847
  });
4485
- });
4848
+ }
4849
+ const remoteApiOidcSchema = oidcAccessTokenSchema.extend({ scope: remoteApiOidcScopeSchema.optional() }).superRefine(validateEnabledOidc);
4486
4850
  const remoteApiAuthSchema = z.object({
4487
4851
  apiKey: z.object({ enabled: z.boolean().default(true) }).optional(),
4488
4852
  oidc: remoteApiOidcSchema.optional()
4489
4853
  });
4490
4854
  const remoteApiSchema = z.object({ auth: remoteApiAuthSchema.optional() });
4855
+ const managementClientBindingSchema = z.object({
4856
+ clientId: z.string().trim().min(1).max(128),
4857
+ subject: z.string().trim().min(1).max(512).optional(),
4858
+ userId: z.string().trim().regex(/^[a-f\d]{24}$/i, "must be a MongoDB ObjectId").transform((userId) => userId.toLowerCase()),
4859
+ tenantId: z.string().trim().min(1).max(128).regex(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/, "must be a valid tenant id").refine((tenantId) => tenantId !== "__SYSTEM__", "system tenant is not allowed"),
4860
+ enabled: z.boolean().default(true)
4861
+ }).strict();
4862
+ const managementApiOidcSchema = oidcAccessTokenSchema.extend({
4863
+ tokenUse: z.literal("access").optional(),
4864
+ requiredScopes: z.array(z.string().trim().min(1).max(256).regex(/^\S+$/, "must be a single scope token")).min(1).max(20).optional()
4865
+ }).strict().superRefine((oidc, ctx) => {
4866
+ if (oidc.enabled === true && !oidc.issuer) ctx.addIssue({
4867
+ code: z.ZodIssueCode.custom,
4868
+ path: ["issuer"],
4869
+ message: "issuer is required when OIDC auth is enabled"
4870
+ });
4871
+ if (oidc.enabled === true && !oidc.audience && (oidc.tokenUse !== "access" || !oidc.requiredScopes?.length)) ctx.addIssue({
4872
+ code: z.ZodIssueCode.custom,
4873
+ path: ["requiredScopes"],
4874
+ message: "audience or access-token validation with required scopes is required when OIDC auth is enabled"
4875
+ });
4876
+ });
4877
+ const managementApiAuthSchema = z.object({
4878
+ oidc: managementApiOidcSchema,
4879
+ clients: z.array(managementClientBindingSchema).max(100).default([])
4880
+ }).strict().superRefine((auth, ctx) => {
4881
+ if (auth.oidc.enabled === true && auth.clients.length === 0) ctx.addIssue({
4882
+ code: z.ZodIssueCode.custom,
4883
+ path: ["clients"],
4884
+ message: "at least one client binding is required when management auth is enabled"
4885
+ });
4886
+ const clientIds = /* @__PURE__ */ new Set();
4887
+ for (let index = 0; index < auth.clients.length; index++) {
4888
+ const client = auth.clients[index];
4889
+ if (clientIds.has(client.clientId)) ctx.addIssue({
4890
+ code: z.ZodIssueCode.custom,
4891
+ path: [
4892
+ "clients",
4893
+ index,
4894
+ "clientId"
4895
+ ],
4896
+ message: "client IDs must be unique"
4897
+ });
4898
+ clientIds.add(client.clientId);
4899
+ }
4900
+ });
4901
+ const managementApiSchema = z.object({ auth: managementApiAuthSchema.optional() }).strict();
4491
4902
  /**
4492
4903
  * Permission mode applied to a tool call. Mirrors `@librechat/agents`'s
4493
4904
  * `ToolPolicyMode` 1:1.
@@ -4561,6 +4972,24 @@ const toolApprovalPolicySchema = z.object({
4561
4972
  */
4562
4973
  hooks: z.array(toolApprovalHookConfigSchema).optional()
4563
4974
  }).optional();
4975
+ const askUserQuestionRetainedAnswersSchema = z.object({
4976
+ /** `false` stops carrying answers forward; they then live only in the messages. */
4977
+ enabled: z.boolean().optional(),
4978
+ /** Token ceiling for the carried block. Older answers drop first once it is
4979
+ * exceeded; the newest set is always kept. Defaults to
4980
+ * `DEFAULT_RETAINED_ANSWER_TOKENS` (4096). */
4981
+ maxTokens: z.number().int().positive().optional()
4982
+ });
4983
+ /**
4984
+ * Behavior of the `ask_user_question` tool beyond the admin kill switch
4985
+ * (`filteredTools` / `includedTools`).
4986
+ *
4987
+ * `retainedAnswers`: every answer the user gave to an agent's question is
4988
+ * quoted verbatim in the run's user context, so it survives after the
4989
+ * messages that carried it were summarized, pruned or dropped from the context
4990
+ * window. On by default.
4991
+ */
4992
+ const askUserQuestionConfigSchema = z.object({ retainedAnswers: askUserQuestionRetainedAnswersSchema.optional() }).optional();
4564
4993
  /**
4565
4994
  * Durable checkpointer backing human-in-the-loop resume.
4566
4995
  *
@@ -4626,22 +5055,55 @@ const codeEnvironmentPermissionFieldSchema = z.object({
4626
5055
  message: "Permission default must be included in allowed values"
4627
5056
  });
4628
5057
  });
5058
+ /** Existing attached commands used a fixed 30-second execution budget. */
5059
+ const CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS = 3e4;
5060
+ /** Protocol-level ceiling; deployments may only lower this value. */
5061
+ const CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS = 5 * 6e4;
5062
+ /**
5063
+ * Client retry horizon across Code API admission windows. Also the hard cap:
5064
+ * deployments may only lower it. `0` disables client retries, not the server's
5065
+ * initial admission wait or an already-admitted operation's execution budget.
5066
+ */
5067
+ const CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS = 5 * 6e4;
4629
5068
  /**
4630
5069
  * Typed user-tunable surface for one attached code environment. Omitted fields
4631
5070
  * remain fixed at LibreChat's safe baseline. Isolation, networking, mounts,
4632
5071
  * privileged execution, and secrets are deliberately not representable here.
4633
5072
  */
4634
- const codeEnvironmentUserConfigSchema = z.object({ permissions: z.object({
4635
- fileWrite: codeEnvironmentPermissionFieldSchema.optional(),
4636
- commandExecution: codeEnvironmentPermissionFieldSchema.optional()
4637
- }).strict().optional() }).strict();
5073
+ const codeEnvironmentUserConfigSchema = z.object({
5074
+ permissions: z.object({
5075
+ fileWrite: codeEnvironmentPermissionFieldSchema.optional(),
5076
+ commandExecution: codeEnvironmentPermissionFieldSchema.optional()
5077
+ }).strict().optional(),
5078
+ limits: z.object({
5079
+ /** Maximum timeout a Bash invocation may request. Omission preserves
5080
+ * the historical 30-second command budget. */
5081
+ maxCommandTimeoutMs: z.number().int().min(1).max(CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS).optional(),
5082
+ /** Client retry horizon for capacity expirations, shared by preview/edit.
5083
+ * Omission keeps five minutes; `0` makes each required operation try once.
5084
+ * An in-flight request retains Code API's admission/execution budgets and
5085
+ * can finish after this horizon. This is not a server admission timeout. */
5086
+ maxQueueWaitMs: z.number().int().min(0).max(CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS).optional()
5087
+ }).strict().optional()
5088
+ }).strict();
4638
5089
  const codeEnvironmentUserSettingsSchema = z.object({ permissions: z.object({
4639
5090
  fileWrite: codeEnvironmentPermissionDecisionSchema.optional(),
4640
5091
  commandExecution: codeEnvironmentPermissionDecisionSchema.optional()
4641
5092
  }).strict().optional() }).strict();
5093
+ const DEFAULT_MAX_PROVIDER_ERROR_CHARS = 2e3;
5094
+ const DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS = 9e5;
5095
+ const DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS = 3e5;
4642
5096
  const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.object({
5097
+ /** Maximum provider error characters retained in unprotected terminal failures. */
5098
+ maxProviderErrorChars: z.number().int().min(0).max(1e6).default(DEFAULT_MAX_PROVIDER_ERROR_CHARS),
5099
+ /** Maximum inactivity between provider response body chunks; 0 disables the idle timeout. */
5100
+ modelResponseBodyTimeoutMs: z.number().int().min(0).max(864e5).default(DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS),
5101
+ /** Maximum wait for provider response headers; 0 disables the header timeout. */
5102
+ modelResponseHeadersTimeoutMs: z.number().int().min(0).max(864e5).default(DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS),
4643
5103
  recursionLimit: z.number().optional(),
4644
5104
  disableBuilder: z.boolean().optional().default(false),
5105
+ /** Optional workspace guidance acquisition budget, separate from command execution. */
5106
+ repositoryInstructions: z.object({ timeoutMs: z.number().int().min(100).max(3e4).optional().default(2e3) }).optional(),
4645
5107
  maxRecursionLimit: z.number().optional(),
4646
5108
  /** Max cumulative bytes a single streamed tool call's arguments may reach before the run
4647
5109
  * aborts. Defaults to 64 KiB in the agents SDK; `0` disables the guard. */
@@ -4652,6 +5114,13 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.
4652
5114
  * disables the guard for that tool only. Merged over LibreChat's shipped default of
4653
5115
  * `{ create_file: 131072 }`. */
4654
5116
  maxToolCallArgBytesByTool: z.record(z.number()).optional(),
5117
+ /** Characters of retained tool output the save path may tokenize exactly for the
5118
+ * context gauge when a turn stops at the tool-call limit (see
5119
+ * `retainedToolTokens`). Tokenizing costs ~60 ms/MB and runs once per stopped
5120
+ * turn; past this ceiling the figure is withdrawn rather than estimated, so the
5121
+ * gauge under-reports that turn instead of blocking the save. Raise it for
5122
+ * deployments whose tools legitimately return more, lower it on slow hardware. */
5123
+ maxRetainedToolCountChars: z.number().int().min(0).optional().default(DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS),
4655
5124
  maxCitations: z.number().min(1).max(50).optional().default(30),
4656
5125
  maxCitationsPerFile: z.number().min(1).max(10).optional().default(7),
4657
5126
  minRelevanceScore: z.number().min(0).max(1).optional().default(.45),
@@ -4659,12 +5128,35 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.
4659
5128
  * the shipped default of 10 for orchestration-heavy deployments, bounded by
4660
5129
  * `MAX_SUBAGENTS_CEILING`. */
4661
5130
  maxSubagents: z.number().int().min(1).max(50).optional().default(10),
5131
+ /** Run-scoped file access for explicitly opted-in subagent delegations. */
5132
+ fileSharing: z.object({
5133
+ enabled: z.boolean().optional().default(false),
5134
+ allowSiblingSharing: z.boolean().optional().default(false),
5135
+ maxFiles: z.number().int().min(1).max(1e3).optional().default(100),
5136
+ /** Aggregate disk budget for private output versions retained during a run. */
5137
+ maxPrivateBytes: z.number().int().min(1).max(10737418240).optional().default(268435456),
5138
+ ttlMs: z.number().int().min(1).max(864e5).optional().default(36e5)
5139
+ }).optional(),
5140
+ /** Maximum concurrent Code API uploads per route and authenticated principal. */
5141
+ codeApiUploadConcurrency: z.number().int().min(1).max(100).optional().default(3),
5142
+ /** Maximum wall-clock time spent waiting on Code API rate limits per operation. */
5143
+ codeApiMaxRetryWaitMs: z.number().int().min(0).max(3e5).optional().default(2e4),
4662
5144
  allowedProviders: z.array(z.union([z.string(), eModelEndpointSchema])).optional(),
4663
5145
  capabilities: z.array(z.nativeEnum(AgentCapabilities)).optional().default(defaultAgentCapabilities),
4664
5146
  /** Controls which workspace-sharing scopes users may select for stateful code sessions.
4665
5147
  * Omit this block to preserve the legacy behavior of allowing every scope. */
4666
5148
  statefulCodeSessions: z.object({
4667
5149
  allowedEnvironments: z.array(z.enum(STATEFUL_CODE_ENVIRONMENTS)).min(1),
5150
+ /** Server-only personal worker enrollment policy. Effective principal
5151
+ * policy may tighten, but never raise, the deployment ceiling. */
5152
+ principalWorkers: z.object({
5153
+ enabled: z.boolean().optional(),
5154
+ /** Defaults to five. Zero disables enrollment; existing machines remain usable. */
5155
+ maxPerUser: z.number().int().min(0).max(Number.MAX_SAFE_INTEGER).optional()
5156
+ }).optional(),
5157
+ /** Server-only policy letting a conversation's owner move its sealed attached decision
5158
+ * onto the environments its agents now use. Omit to keep sealed decisions immovable. */
5159
+ conversationMoves: z.object({ enabled: z.boolean().optional() }).optional(),
4668
5160
  /** Operator-managed execution environments. Attached entries route to a
4669
5161
  * Code API deployment backed by an outbound librechat-code worker. */
4670
5162
  environments: z.array(z.object({
@@ -4771,11 +5263,25 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.
4771
5263
  eventDriven: z.object({ selfUrl: z.string().url().optional() }).optional(),
4772
5264
  /** Conversational background-task delivery policy. Automatic completion wakeups are
4773
5265
  * enabled unless an administrator explicitly restores poll-only behavior. */
4774
- backgroundTasks: z.object({ completionWakeups: z.boolean().optional().default(true) }).optional(),
5266
+ backgroundTasks: z.object({
5267
+ completionWakeups: z.boolean().optional().default(true),
5268
+ /** Maximum terminal output copied into the private completion receipt.
5269
+ * Generated files remain governed by their separate attachment policy. */
5270
+ completionResultMaxChars: z.number().int().min(1).max(AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX).optional().default(AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT),
5271
+ /** Maximum message-backed sibling results in one continuation.
5272
+ * Independent receipts retain task-local delivery ownership. */
5273
+ completionResultBatchSize: z.number().int().min(1).max(16).optional().default(8),
5274
+ /** Cooperative cancellation for process-local ordinary tools. Off
5275
+ * by default so existing deployments opt into the new control. */
5276
+ ordinaryToolCancellation: z.boolean().optional().default(false)
5277
+ }).optional(),
4775
5278
  skills: z.object({ maxCatalogSkills: z.number().int().min(1).max(100).optional() }).optional(),
5279
+ managementApi: managementApiSchema.optional(),
4776
5280
  remoteApi: remoteApiSchema.optional(),
4777
5281
  /** Human-in-the-loop tool approval policy. Off by default. */
4778
5282
  toolApproval: toolApprovalPolicySchema,
5283
+ /** Ask User question behavior; see {@link askUserQuestionConfigSchema}. */
5284
+ askUserQuestion: askUserQuestionConfigSchema,
4779
5285
  /** Durable checkpointer backing tool-approval and Ask User resume.
4780
5286
  * Defaults to the app's MongoDB when either flow needs it. */
4781
5287
  checkpointer: checkpointerSchema
@@ -5030,6 +5536,21 @@ const sttSchema = z.object({
5030
5536
  openai: sttOpenaiSchema.optional(),
5031
5537
  azureOpenAI: sttAzureOpenAISchema.optional()
5032
5538
  });
5539
+ /**
5540
+ * The speech providers a schema actually configures. `allowedAddresses` is transport
5541
+ * policy rather than a provider, and a provider key present but empty configures
5542
+ * nothing. The speech services accept a schema only when exactly one survives here, so
5543
+ * the upload router reads availability from the same list and never routes audio to a
5544
+ * transcription that cannot run.
5545
+ */
5546
+ function listConfiguredSpeechProviders(schema) {
5547
+ if (schema == null) return [];
5548
+ return Object.entries(schema).filter(([key, value]) => key !== "allowedAddresses" && value != null && typeof value === "object" && Object.keys(value).length > 0);
5549
+ }
5550
+ /** Whether a speech schema names exactly one usable provider. */
5551
+ function isSpeechProviderConfigured(schema) {
5552
+ return listConfiguredSpeechProviders(schema).length === 1;
5553
+ }
5033
5554
  const speechTab = z.object({
5034
5555
  conversationMode: z.boolean().optional(),
5035
5556
  advancedMode: z.boolean().optional(),
@@ -5114,7 +5635,14 @@ const termsOfServiceSchema = z.object({
5114
5635
  modalContent: z.string().or(z.array(z.string())).optional()
5115
5636
  });
5116
5637
  const localizedStringSchema = z.union([z.string(), z.record(z.string())]);
5638
+ const mcpRefreshDefaults = {
5639
+ toolsRefreshInterval: 300 * 1e3,
5640
+ statusRefreshInterval: 30 * 1e3
5641
+ };
5117
5642
  const mcpServersSchema = z.object({
5643
+ /** Foreground polling intervals in milliseconds; 0 disables polling. */
5644
+ toolsRefreshInterval: z.number().int().nonnegative().max(2147483647).optional(),
5645
+ statusRefreshInterval: z.number().int().nonnegative().max(2147483647).optional(),
5118
5646
  placeholder: z.string().optional(),
5119
5647
  use: z.boolean().optional(),
5120
5648
  create: z.boolean().optional(),
@@ -5126,6 +5654,76 @@ const mcpServersSchema = z.object({
5126
5654
  subLabel: localizedStringSchema.optional()
5127
5655
  }).optional()
5128
5656
  }).optional();
5657
+ /** Values the trace viewer uses for any `interface.traceViewer` field left unset. */
5658
+ const traceViewerDefaults = {
5659
+ enabled: false,
5660
+ showInputOutput: false,
5661
+ showToolNames: false,
5662
+ maxRecords: 1e3,
5663
+ maxContentLength: 5e4,
5664
+ requestsPerMinute: 30,
5665
+ requestTimeoutMs: 1e4
5666
+ };
5667
+ /** Inclusive bounds for the numeric `interface.traceViewer` fields. */
5668
+ const traceViewerLimits = {
5669
+ maxRecords: {
5670
+ min: 1,
5671
+ max: 1e4
5672
+ },
5673
+ maxContentLength: {
5674
+ min: 1,
5675
+ max: 1e6
5676
+ },
5677
+ requestsPerMinute: {
5678
+ min: 1,
5679
+ max: 1e3
5680
+ },
5681
+ requestTimeoutMs: {
5682
+ min: 1e3,
5683
+ max: 3e5
5684
+ }
5685
+ };
5686
+ const boundedIntegerSchema = (field) => z.number().int().min(traceViewerLimits[field].min).max(traceViewerLimits[field].max).optional();
5687
+ const traceViewerSchema = z.object({
5688
+ /** Shows the conversation trace control for traces this deployment exported. */
5689
+ enabled: z.boolean().optional(),
5690
+ /** Returns observation input, output and metadata in the record inspector. */
5691
+ showInputOutput: z.boolean().optional(),
5692
+ /**
5693
+ * Names the tools of each tool round from the tracing backend's own record of the round, at the
5694
+ * cost of further backend reads per listed page, which carry each round's input and output.
5695
+ * Off, a round is named only when the chat's messages can be matched to the trace.
5696
+ */
5697
+ showToolNames: z.boolean().optional(),
5698
+ /** Observations read from the tracing backend per request. */
5699
+ maxRecords: boundedIntegerSchema("maxRecords"),
5700
+ /** Characters kept from each input, output and metadata value before truncation. */
5701
+ maxContentLength: boundedIntegerSchema("maxContentLength"),
5702
+ /** Trace reads one user may start per minute. */
5703
+ requestsPerMinute: boundedIntegerSchema("requestsPerMinute"),
5704
+ /** Budget for each round trip to the tracing backend, in milliseconds. */
5705
+ requestTimeoutMs: boundedIntegerSchema("requestTimeoutMs")
5706
+ });
5707
+ function boundedInteger(value, field) {
5708
+ const { min, max } = traceViewerLimits[field];
5709
+ return typeof value === "number" && Number.isSafeInteger(value) && value >= min ? Math.min(value, max) : traceViewerDefaults[field];
5710
+ }
5711
+ /**
5712
+ * Fills unset or invalid `interface.traceViewer` fields from
5713
+ * {@link traceViewerDefaults}. Admin config overrides reach runtime without
5714
+ * schema validation, so every consumer reads the section through this.
5715
+ */
5716
+ function resolveTraceViewerConfig(config) {
5717
+ return {
5718
+ enabled: config?.enabled === true,
5719
+ showInputOutput: config?.showInputOutput === true,
5720
+ showToolNames: config?.showToolNames === true,
5721
+ maxRecords: boundedInteger(config?.maxRecords, "maxRecords"),
5722
+ maxContentLength: boundedInteger(config?.maxContentLength, "maxContentLength"),
5723
+ requestsPerMinute: boundedInteger(config?.requestsPerMinute, "requestsPerMinute"),
5724
+ requestTimeoutMs: boundedInteger(config?.requestTimeoutMs, "requestTimeoutMs")
5725
+ };
5726
+ }
5129
5727
  let RetentionMode = /* @__PURE__ */ function(RetentionMode) {
5130
5728
  RetentionMode["ALL"] = "all";
5131
5729
  RetentionMode["TEMPORARY"] = "temporary";
@@ -5140,6 +5738,8 @@ const interfaceSchema = z.object({
5140
5738
  customWelcome: z.string().optional(),
5141
5739
  mcpServers: mcpServersSchema.optional(),
5142
5740
  modelSelect: z.boolean().optional(),
5741
+ /** Milliseconds between syntax highlights while a code block streams. */
5742
+ codeHighlightThrottleMs: z.number().int().min(0).max(6e4).default(300),
5143
5743
  parameters: z.boolean().optional(),
5144
5744
  multiConvo: z.boolean().optional(),
5145
5745
  bookmarks: z.boolean().optional(),
@@ -5159,6 +5759,7 @@ const interfaceSchema = z.object({
5159
5759
  })]).optional(),
5160
5760
  temporaryChat: z.boolean().optional(),
5161
5761
  temporaryChatRetention: z.number().min(1).max(8760).optional(),
5762
+ generalChatRetention: z.number().min(1).max(8760).optional(),
5162
5763
  autoSubmitFromUrl: z.boolean().optional(),
5163
5764
  retentionMode: z.nativeEnum(RetentionMode).default("temporary"),
5164
5765
  retainAgentFiles: z.boolean().optional(),
@@ -5179,6 +5780,7 @@ const interfaceSchema = z.object({
5179
5780
  marketplace: z.object({ use: z.boolean().optional() }).optional(),
5180
5781
  fileSearch: z.boolean().optional(),
5181
5782
  fileCitations: z.boolean().optional(),
5783
+ traceViewer: traceViewerSchema.optional(),
5182
5784
  /** Tool keys (and `'mcp'` or an MCP server name) pinned to the prompt bar by default */
5183
5785
  defaultPinnedTools: z.array(z.string()).optional(),
5184
5786
  buildInfo: z.boolean().optional(),
@@ -5207,7 +5809,10 @@ const interfaceSchema = z.object({
5207
5809
  maxPerUser: z.number().int().min(0).optional(),
5208
5810
  minIntervalMinutes: z.number().int().min(1).optional(),
5209
5811
  autoDisableAfterFailures: z.number().int().min(1).optional(),
5812
+ admissionConcurrency: z.number().int().min(1).max(100).optional(),
5210
5813
  fireConcurrency: z.number().int().min(1).optional(),
5814
+ mcpPreflightConcurrency: z.number().int().min(1).max(10).optional(),
5815
+ mcpPreflightTimeoutMs: z.number().int().min(1e3).max(6e5).optional(),
5211
5816
  /** Refuse schedules that are not filed under a chat project. Enforced on
5212
5817
  * create/update AND at every fire, so raising it later stops schedules
5213
5818
  * that predate the policy instead of grandfathering them. */
@@ -5220,6 +5825,7 @@ const interfaceSchema = z.object({
5220
5825
  })]).optional()
5221
5826
  }).default({
5222
5827
  modelSelect: true,
5828
+ codeHighlightThrottleMs: 300,
5223
5829
  parameters: true,
5224
5830
  presets: true,
5225
5831
  multiConvo: true,
@@ -5476,7 +6082,8 @@ const balanceSchema = z.object({
5476
6082
  autoRefillEnabled: z.boolean().optional().default(false),
5477
6083
  refillIntervalValue: z.number().optional().default(30),
5478
6084
  refillIntervalUnit: z.enum(REFILL_INTERVAL_UNITS).optional().default("days"),
5479
- refillAmount: z.number().optional().default(1e4)
6085
+ refillAmount: z.number().optional().default(1e4),
6086
+ reservationTtlMs: z.number().int().min(MIN_BALANCE_RESERVATION_TTL_MS).optional().default(DEFAULT_BALANCE_RESERVATION_TTL_MS)
5480
6087
  });
5481
6088
  const transactionsSchema = z.object({ enabled: z.boolean().optional().default(true) });
5482
6089
  const DEFAULT_MEMORY_MAX_INPUT_TOKENS = 12e3;
@@ -5600,6 +6207,57 @@ const messageFilterPiiSchema = z.object({
5600
6207
  });
5601
6208
  });
5602
6209
  const messageFilterSchema = z.object({ pii: messageFilterPiiSchema.optional() });
6210
+ /** User fields a deployment may select as the Langfuse trace `userId`. */
6211
+ const LANGFUSE_TRACE_USER_ID_FIELDS = [
6212
+ "id",
6213
+ "email",
6214
+ "username",
6215
+ "name",
6216
+ "openidId",
6217
+ "samlId",
6218
+ "ldapId",
6219
+ "googleId",
6220
+ "githubId",
6221
+ "discordId",
6222
+ "appleId",
6223
+ "facebookId"
6224
+ ];
6225
+ /** User fields a deployment may copy into Langfuse trace metadata. */
6226
+ const LANGFUSE_TRACE_USER_METADATA_FIELDS = [
6227
+ ...LANGFUSE_TRACE_USER_ID_FIELDS,
6228
+ "role",
6229
+ "provider"
6230
+ ];
6231
+ /** Request fields a deployment may copy into Langfuse trace metadata. */
6232
+ const LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS = [
6233
+ "conversationId",
6234
+ "endpoint",
6235
+ "endpointType",
6236
+ "provider",
6237
+ "model",
6238
+ "modelLabel",
6239
+ "spec"
6240
+ ];
6241
+ /**
6242
+ * What a deployment attaches to every Langfuse trace beyond the defaults.
6243
+ * Nothing here is exported unless explicitly listed, so the default trace
6244
+ * carries only the internal user id and no user or request metadata.
6245
+ */
6246
+ const langfuseTraceConfigSchema = z.object({
6247
+ /**
6248
+ * Which user field becomes the trace `userId`. Defaults to the internal user
6249
+ * id; a user with no value for the chosen field keeps the internal id.
6250
+ */
6251
+ userIdField: z.enum(LANGFUSE_TRACE_USER_ID_FIELDS).optional(),
6252
+ /** User fields exported as `librechat.user.<field>` trace metadata. */
6253
+ userMetadataFields: z.array(z.enum(LANGFUSE_TRACE_USER_METADATA_FIELDS)).optional(),
6254
+ /**
6255
+ * Request fields exported as trace metadata: `librechat.conversation.id`,
6256
+ * `librechat.endpoint`, `librechat.endpoint.type`, `librechat.provider`,
6257
+ * `librechat.model`, `librechat.model.label`, and `librechat.spec`.
6258
+ */
6259
+ conversationMetadataFields: z.array(z.enum(LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS)).optional()
6260
+ });
5603
6261
  const langfuseConfigSchema = z.object({
5604
6262
  enabled: z.boolean().optional(),
5605
6263
  publicKey: z.string().optional(),
@@ -5631,10 +6289,21 @@ const langfuseConfigSchema = z.object({
5631
6289
  * schema does not yet express — and note the fanout collector forwards only
5632
6290
  * `Authorization` upstream regardless.
5633
6291
  */
5634
- headers: z.record(z.string()).optional()
6292
+ headers: z.record(z.string()).optional(),
6293
+ /** Trace user identity and allowlisted user/request metadata. */
6294
+ trace: langfuseTraceConfigSchema.optional()
6295
+ });
6296
+ const openIdDiscoverySchema = z.object({
6297
+ /** Discovery attempts made before startup continues; `0` retries only in the background. */
6298
+ startupAttempts: z.number().int().min(0).max(100).default(1),
6299
+ /** Milliseconds between startup and background discovery attempts. */
6300
+ retryDelayMs: z.number().int().min(100).max(36e5).default(5e3)
5635
6301
  });
6302
+ /** Maximum CAS attempts per ACL document, including the initial attempt. */
6303
+ const permissionWriteAttemptsSchema = z.number().int().min(1).max(100).default(3);
5636
6304
  const configSchema = z.object({
5637
6305
  version: z.string(),
6306
+ permissions: z.object({ maxWriteAttempts: permissionWriteAttemptsSchema }).optional(),
5638
6307
  cache: z.boolean().default(true),
5639
6308
  ocr: ocrSchema.optional(),
5640
6309
  webSearch: webSearchSchema.optional(),
@@ -5649,7 +6318,35 @@ const configSchema = z.object({
5649
6318
  mcpServers: MCPServersSchema.optional(),
5650
6319
  mcpSettings: z.object({
5651
6320
  allowedDomains: z.array(z.string()).optional(),
5652
- allowedAddresses: allowedAddressesSchema
6321
+ allowedAddresses: allowedAddressesSchema,
6322
+ catalogRecovery: z.object({
6323
+ discoveryBackoffMs: z.array(z.number().int().positive().max(1440 * 6e4)).min(1).max(8).default([
6324
+ 5 * 6e4,
6325
+ 10 * 6e4,
6326
+ 20 * 6e4,
6327
+ 30 * 6e4
6328
+ ]),
6329
+ discoveryTimeoutMs: z.number().int().positive().max(5 * 6e4).default(3e3),
6330
+ /** How long past `discoveryTimeoutMs` a stalled discovery may hold its catalog slot and
6331
+ * coalesced requests. It is never cancelled, so OAuth tokens it redeemed still persist,
6332
+ * and no other discovery for the same server state starts until it settles. */
6333
+ discoverySettleGraceMs: z.number().int().nonnegative().max(5 * 6e4).default(1e4),
6334
+ reauthRetryMs: z.number().int().positive().max(1440 * 6e4).default(30 * 6e4),
6335
+ maxStateEntries: z.number().int().positive().max(1e6).default(1e4),
6336
+ /** Process-wide: how many discoveries released past `discoverySettleGraceMs` may still be
6337
+ * running before recovery starts no new discovery until one settles. The default matches
6338
+ * the three catalog slots a stalled dependency could hold before discoveries were released. */
6339
+ maxDetachedDiscoveries: z.number().int().positive().max(1e3).default(3),
6340
+ generationReadTimeoutMs: z.number().int().positive().max(1e4).default(500),
6341
+ authorizationFenceRetryMs: z.array(z.number().int().nonnegative().max(6e4)).min(1).max(8).default([
6342
+ 0,
6343
+ 50,
6344
+ 200
6345
+ ]),
6346
+ authorizationFenceTimeoutMs: z.number().int().positive().max(3e4).default(1e3),
6347
+ authorizationFenceRetryIntervalMs: z.number().int().positive().max(60 * 6e4).default(3e4),
6348
+ authorizationFenceRetryBatchSize: z.number().int().positive().max(1e4).default(100)
6349
+ }).default({})
5653
6350
  }).optional(),
5654
6351
  interface: interfaceSchema,
5655
6352
  turnstile: turnstileSchema.optional(),
@@ -5662,7 +6359,11 @@ const configSchema = z.object({
5662
6359
  }).optional(),
5663
6360
  registration: z.object({
5664
6361
  socialLogins: z.array(z.string()).optional(),
5665
- allowedDomains: z.array(z.string()).optional()
6362
+ allowedDomains: z.array(z.string()).optional(),
6363
+ /** Milliseconds a started social login may take to reach its callback; defaults to `DEFAULT_OAUTH_STATE_TTL_MS`. */
6364
+ oauthStateTtlMs: z.number().int().min(6e4).max(36e5).optional(),
6365
+ /** OpenID discovery retries; an unset field falls back to its `OPENID_DISCOVERY_RETRY_*` env var, then the schema default. */
6366
+ openidDiscovery: openIdDiscoverySchema.partial().optional()
5666
6367
  }).default({ socialLogins: defaultSocialLogins }),
5667
6368
  balance: balanceSchema.optional(),
5668
6369
  transactions: transactionsSchema.optional(),
@@ -5695,7 +6396,9 @@ const configSchema = z.object({
5695
6396
  ["agents"]: agentsEndpointSchema.optional(),
5696
6397
  ["custom"]: customEndpointsSchema.optional(),
5697
6398
  ["bedrock"]: bedrockEndpointSchema.optional()
5698
- }).strict().refine((data) => Object.keys(data).length > 0, { message: "At least one `endpoints` field must be provided." }).optional()
6399
+ }).strict().refine((data) => Object.keys(data).length > 0, { message: "At least one `endpoints` field must be provided." }).optional(),
6400
+ /** Serve the OpenAPI spec and docs for the public Agents API. Off by default. */
6401
+ openapi: z.object({ enabled: z.boolean().optional() }).optional()
5699
6402
  });
5700
6403
  const getConfigDefaults = () => getSchemaDefaults(configSchema);
5701
6404
  let KnownEndpoints = /* @__PURE__ */ function(KnownEndpoints) {
@@ -5708,6 +6411,7 @@ let KnownEndpoints = /* @__PURE__ */ function(KnownEndpoints) {
5708
6411
  KnownEndpoints["groq"] = "groq";
5709
6412
  KnownEndpoints["helicone"] = "helicone";
5710
6413
  KnownEndpoints["huggingface"] = "huggingface";
6414
+ KnownEndpoints["lemonade"] = "lemonade";
5711
6415
  KnownEndpoints["mistral"] = "mistral";
5712
6416
  KnownEndpoints["mlx"] = "mlx";
5713
6417
  KnownEndpoints["ollama"] = "ollama";
@@ -5746,6 +6450,7 @@ const alternateName = {
5746
6450
  ["anthropic"]: "Anthropic",
5747
6451
  ["custom"]: "Custom",
5748
6452
  ["bedrock"]: "AWS Bedrock",
6453
+ ["lemonade"]: "AMD Lemonade",
5749
6454
  ["ollama"]: "Ollama",
5750
6455
  ["deepseek"]: "DeepSeek",
5751
6456
  ["moonshot"]: "Moonshot",
@@ -5753,6 +6458,17 @@ const alternateName = {
5753
6458
  ["vercel"]: "Vercel",
5754
6459
  ["helicone"]: "Helicone"
5755
6460
  };
6461
+ /**
6462
+ * Models the Assistants endpoints cannot run. GPT-6 Astra serves tool calls only
6463
+ * from the Responses API, and the Assistants surface does not route through
6464
+ * `getOpenAILLMConfig`, so listing it there would offer a configuration the
6465
+ * provider rejects. Kept out of `sharedOpenAIModels`, which both Assistants
6466
+ * catalogs consume.
6467
+ */
6468
+ const responsesOnlyOpenAIModels = ["gpt-6-astra"];
6469
+ /** Tool calls with Sol/Luna's default reasoning require Responses. Do not offer
6470
+ * these on Assistants, which cannot use the native request-routing path. */
6471
+ const responsesReasoningOpenAIModels = ["gpt-6-sol", "gpt-6-luna"];
5756
6472
  const sharedOpenAIModels = [
5757
6473
  "gpt-5.6",
5758
6474
  "gpt-5.6-terra",
@@ -5782,6 +6498,7 @@ const sharedOpenAIModels = [
5782
6498
  const sharedAnthropicModels = [
5783
6499
  "claude-fable-5-1",
5784
6500
  "claude-fable-5",
6501
+ "claude-opus-5-5",
5785
6502
  "claude-opus-5",
5786
6503
  "claude-opus-4-8",
5787
6504
  "claude-opus-4-7",
@@ -5817,6 +6534,7 @@ const sharedAnthropicModels = [
5817
6534
  const bedrockModels = [
5818
6535
  "global.anthropic.claude-fable-5-1",
5819
6536
  "global.anthropic.claude-fable-5",
6537
+ "global.anthropic.claude-opus-5-5",
5820
6538
  "global.anthropic.claude-opus-5",
5821
6539
  "global.anthropic.claude-opus-4-8",
5822
6540
  "global.anthropic.claude-opus-4-7",
@@ -5848,7 +6566,11 @@ const bedrockModels = [
5848
6566
  const defaultModels = {
5849
6567
  ["azureAssistants"]: sharedOpenAIModels,
5850
6568
  ["assistants"]: [...sharedOpenAIModels, "chatgpt-4o-latest"],
5851
- ["agents"]: sharedOpenAIModels,
6569
+ ["agents"]: [
6570
+ ...responsesOnlyOpenAIModels,
6571
+ ...responsesReasoningOpenAIModels,
6572
+ ...sharedOpenAIModels
6573
+ ],
5852
6574
  ["google"]: [
5853
6575
  "gemini-3.8-flash",
5854
6576
  "gemini-3.7-flash",
@@ -5866,6 +6588,8 @@ const defaultModels = {
5866
6588
  ],
5867
6589
  ["anthropic"]: sharedAnthropicModels,
5868
6590
  ["openAI"]: [
6591
+ ...responsesOnlyOpenAIModels,
6592
+ ...responsesReasoningOpenAIModels,
5869
6593
  ...sharedOpenAIModels,
5870
6594
  "chatgpt-4o-latest",
5871
6595
  "gpt-4-vision-preview",
@@ -5878,12 +6602,18 @@ const fitlerAssistantModels = (str) => {
5878
6602
  return /gpt-4|gpt-3\\.5/i.test(str) && !/vision|instruct/i.test(str);
5879
6603
  };
5880
6604
  const openAIModels = defaultModels["openAI"];
6605
+ /**
6606
+ * Preserve Azure's fallback default selection when the OpenAI catalog gains
6607
+ * Responses-preferred models. Configured Azure deployments supply their own
6608
+ * model list, including Astra when deployed.
6609
+ */
6610
+ const nonResponsesOnlyOpenAIModels = openAIModels.filter((model) => !responsesOnlyOpenAIModels.includes(model) && !responsesReasoningOpenAIModels.includes(model));
5881
6611
  const initialModelsConfig = {
5882
6612
  initial: [],
5883
6613
  ["openAI"]: openAIModels,
5884
6614
  ["assistants"]: openAIModels.filter(fitlerAssistantModels),
5885
6615
  ["agents"]: openAIModels,
5886
- ["azureOpenAI"]: openAIModels,
6616
+ ["azureOpenAI"]: nonResponsesOnlyOpenAIModels,
5887
6617
  ["google"]: defaultModels["google"],
5888
6618
  ["anthropic"]: defaultModels["anthropic"],
5889
6619
  ["bedrock"]: defaultModels["bedrock"]
@@ -5918,6 +6648,8 @@ const visionModels = [
5918
6648
  "grok-vision",
5919
6649
  "grok-2-vision",
5920
6650
  "grok-3",
6651
+ "grok-4.7",
6652
+ "grok-4-7",
5921
6653
  "gpt-4o-mini",
5922
6654
  "gpt-4o",
5923
6655
  "gpt-4-turbo",
@@ -6181,6 +6913,10 @@ let ViolationTypes = /* @__PURE__ */ function(ViolationTypes) {
6181
6913
  * Registration violations.
6182
6914
  */
6183
6915
  ViolationTypes["REGISTRATIONS"] = "registrations";
6916
+ /**
6917
+ * Shared link retrieval limit violations.
6918
+ */
6919
+ ViolationTypes["SHARE_LIMIT"] = "share_limit";
6184
6920
  return ViolationTypes;
6185
6921
  }({});
6186
6922
  /**
@@ -6248,6 +6984,10 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
6248
6984
  */
6249
6985
  ErrorTypes["STATEFUL_CODE_ENVIRONMENT_NOT_ALLOWED"] = "stateful_code_environment_not_allowed";
6250
6986
  /**
6987
+ * A conversation's selected attached workspace cannot be used as requested.
6988
+ */
6989
+ ErrorTypes["CODE_WORKSPACE_UNAVAILABLE"] = "code_workspace_unavailable";
6990
+ /**
6251
6991
  * Invalid Agent Provider (excluded by Admin)
6252
6992
  */
6253
6993
  ErrorTypes["INVALID_AGENT_PROVIDER"] = "invalid_agent_provider";
@@ -6276,6 +7016,10 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
6276
7016
  */
6277
7017
  ErrorTypes["AUTH_BANNED"] = "auth_banned";
6278
7018
  /**
7019
+ * Authentication request was not sent from this application's origin
7020
+ */
7021
+ ErrorTypes["AUTH_CROSS_ORIGIN"] = "auth_cross_origin";
7022
+ /**
6279
7023
  * Model refused to respond (content policy violation)
6280
7024
  */
6281
7025
  ErrorTypes["REFUSAL"] = "refusal";
@@ -6291,6 +7035,26 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
6291
7035
  * Provider throttled or refused the request for exceeding a rate/spend allowance
6292
7036
  */
6293
7037
  ErrorTypes["MODEL_RATE_LIMIT"] = "model_rate_limit";
7038
+ /**
7039
+ * An agent model provider failed and the run could not recover.
7040
+ */
7041
+ ErrorTypes["UPSTREAM_MODEL_ERROR"] = "upstream_model_error";
7042
+ /**
7043
+ * Context pruning removed every message; nothing fits the configured context window
7044
+ */
7045
+ ErrorTypes["EMPTY_MESSAGES"] = "empty_messages";
7046
+ /**
7047
+ * Formatted provider payload exceeded the context budget before invocation
7048
+ */
7049
+ ErrorTypes["FINAL_CONTEXT_OVERFLOW"] = "final_context_overflow";
7050
+ /**
7051
+ * A manual compaction the graph could not attempt; `reason` says why
7052
+ */
7053
+ ErrorTypes["COMPACTION_SKIPPED"] = "compaction_skipped";
7054
+ /**
7055
+ * A manual compaction whose summarizer produced nothing; history is untouched
7056
+ */
7057
+ ErrorTypes["COMPACTION_FAILED"] = "compaction_failed";
6294
7058
  return ErrorTypes;
6295
7059
  }({});
6296
7060
  /**
@@ -6422,7 +7186,7 @@ let TTSProviders = /* @__PURE__ */ function(TTSProviders) {
6422
7186
  /** Enum for app-wide constants */
6423
7187
  let Constants = /* @__PURE__ */ function(Constants) {
6424
7188
  /**
6425
- * Key for the app's version. The placeholder `v0.8.8-rc2` is
7189
+ * Key for the app's version. The placeholder `v0.8.8-rc4` is
6426
7190
  * swapped in by `@rollup/plugin-replace` during `npm run build:data-provider`
6427
7191
  * using the value of the root `package.json`'s `version` field. Consumers
6428
7192
  * always import this via the built dist bundle (see `main` field in
@@ -6430,9 +7194,9 @@ let Constants = /* @__PURE__ */ function(Constants) {
6430
7194
  * substituted value. Only tests that import the TypeScript source directly
6431
7195
  * would observe the raw placeholder.
6432
7196
  */
6433
- Constants["VERSION"] = "v0.8.8-rc2";
7197
+ Constants["VERSION"] = "v0.8.8-rc4";
6434
7198
  /** Key for the Custom Config's version (librechat.yaml). */
6435
- Constants["CONFIG_VERSION"] = "1.3.15";
7199
+ Constants["CONFIG_VERSION"] = "1.3.17";
6436
7200
  /** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
6437
7201
  Constants["NO_PARENT"] = "00000000-0000-0000-0000-000000000000";
6438
7202
  /** Standard value to use whatever the submission prelim. `responseMessageId` is */
@@ -6765,6 +7529,8 @@ let LocalStorageKeys = /* @__PURE__ */ function(LocalStorageKeys) {
6765
7529
  LocalStorageKeys["PIN_WEB_SEARCH_"] = "PIN_WEB_SEARCH_";
6766
7530
  /** Pin state for Code Interpreter per conversation ID */
6767
7531
  LocalStorageKeys["PIN_CODE_INTERPRETER_"] = "PIN_CODE_INTERPRETER_";
7532
+ /** Key for the last selected code approval mode */
7533
+ LocalStorageKeys["LAST_CODE_APPROVAL_MODE"] = "lastCodeApprovalMode";
6768
7534
  return LocalStorageKeys;
6769
7535
  }({});
6770
7536
  let ForkOptions = /* @__PURE__ */ function(ForkOptions) {
@@ -6857,6 +7623,57 @@ function getDefaultParamsEndpoint(endpointsConfig, endpoint) {
6857
7623
  return endpointsConfig[endpoint]?.customParams?.defaultParamsEndpoint;
6858
7624
  }
6859
7625
  //#endregion
7626
+ //#region src/types/assistants.ts
7627
+ let RunStatus = /* @__PURE__ */ function(RunStatus) {
7628
+ RunStatus["QUEUED"] = "queued";
7629
+ RunStatus["IN_PROGRESS"] = "in_progress";
7630
+ RunStatus["REQUIRES_ACTION"] = "requires_action";
7631
+ RunStatus["CANCELLING"] = "cancelling";
7632
+ RunStatus["CANCELLED"] = "cancelled";
7633
+ RunStatus["FAILED"] = "failed";
7634
+ RunStatus["COMPLETED"] = "completed";
7635
+ RunStatus["EXPIRED"] = "expired";
7636
+ return RunStatus;
7637
+ }({});
7638
+ let FilePurpose = /* @__PURE__ */ function(FilePurpose) {
7639
+ FilePurpose["Vision"] = "vision";
7640
+ FilePurpose["FineTune"] = "fine-tune";
7641
+ FilePurpose["FineTuneResults"] = "fine-tune-results";
7642
+ FilePurpose["Assistants"] = "assistants";
7643
+ FilePurpose["AssistantsOutput"] = "assistants_output";
7644
+ return FilePurpose;
7645
+ }({});
7646
+ const defaultOrderQuery = {
7647
+ order: "desc",
7648
+ limit: 100
7649
+ };
7650
+ let AssistantStreamEvents = /* @__PURE__ */ function(AssistantStreamEvents) {
7651
+ AssistantStreamEvents["ThreadCreated"] = "thread.created";
7652
+ AssistantStreamEvents["ThreadRunCreated"] = "thread.run.created";
7653
+ AssistantStreamEvents["ThreadRunQueued"] = "thread.run.queued";
7654
+ AssistantStreamEvents["ThreadRunInProgress"] = "thread.run.in_progress";
7655
+ AssistantStreamEvents["ThreadRunRequiresAction"] = "thread.run.requires_action";
7656
+ AssistantStreamEvents["ThreadRunCompleted"] = "thread.run.completed";
7657
+ AssistantStreamEvents["ThreadRunFailed"] = "thread.run.failed";
7658
+ AssistantStreamEvents["ThreadRunCancelling"] = "thread.run.cancelling";
7659
+ AssistantStreamEvents["ThreadRunCancelled"] = "thread.run.cancelled";
7660
+ AssistantStreamEvents["ThreadRunExpired"] = "thread.run.expired";
7661
+ AssistantStreamEvents["ThreadRunStepCreated"] = "thread.run.step.created";
7662
+ AssistantStreamEvents["ThreadRunStepInProgress"] = "thread.run.step.in_progress";
7663
+ AssistantStreamEvents["ThreadRunStepCompleted"] = "thread.run.step.completed";
7664
+ AssistantStreamEvents["ThreadRunStepFailed"] = "thread.run.step.failed";
7665
+ AssistantStreamEvents["ThreadRunStepCancelled"] = "thread.run.step.cancelled";
7666
+ AssistantStreamEvents["ThreadRunStepExpired"] = "thread.run.step.expired";
7667
+ AssistantStreamEvents["ThreadRunStepDelta"] = "thread.run.step.delta";
7668
+ AssistantStreamEvents["ThreadMessageCreated"] = "thread.message.created";
7669
+ AssistantStreamEvents["ThreadMessageInProgress"] = "thread.message.in_progress";
7670
+ AssistantStreamEvents["ThreadMessageCompleted"] = "thread.message.completed";
7671
+ AssistantStreamEvents["ThreadMessageIncomplete"] = "thread.message.incomplete";
7672
+ AssistantStreamEvents["ThreadMessageDelta"] = "thread.message.delta";
7673
+ AssistantStreamEvents["ErrorEvent"] = "error";
7674
+ return AssistantStreamEvents;
7675
+ }({});
7676
+ //#endregion
6860
7677
  //#region src/accessPermissions.ts
6861
7678
  /**
6862
7679
  * Granular Permission System Types for Agent Sharing
@@ -6909,6 +7726,8 @@ let PermissionBits = /* @__PURE__ */ function(PermissionBits) {
6909
7726
  PermissionBits[PermissionBits["DELETE"] = 4] = "DELETE";
6910
7727
  /** 1000 - Can share agent with others (future) */
6911
7728
  PermissionBits[PermissionBits["SHARE"] = 8] = "SHARE";
7729
+ /** 10000 - Can view Insights data for an agent when VIEW is also present */
7730
+ PermissionBits[PermissionBits["VIEW_INSIGHTS"] = 16] = "VIEW_INSIGHTS";
6912
7731
  return PermissionBits;
6913
7732
  }({});
6914
7733
  /**
@@ -6950,6 +7769,8 @@ const principalSchema = z.object({
6950
7769
  description: z.string().optional(),
6951
7770
  idOnTheSource: z.string().optional(),
6952
7771
  accessRoleId: z.nativeEnum(AccessRoleIds).optional(),
7772
+ viewInsights: z.boolean().optional(),
7773
+ isAdmin: z.boolean().optional(),
6953
7774
  memberCount: z.number().optional()
6954
7775
  });
6955
7776
  /**
@@ -7083,6 +7904,9 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
7083
7904
  QueryKeys["searchEnabled"] = "searchEnabled";
7084
7905
  QueryKeys["langfuseConnection"] = "langfuseConnection";
7085
7906
  QueryKeys["langfuseSessionLink"] = "langfuseSessionLink";
7907
+ QueryKeys["conversationTraceAvailability"] = "conversationTraceAvailability";
7908
+ QueryKeys["conversationTraceRecords"] = "conversationTraceRecords";
7909
+ QueryKeys["conversationTraceRecord"] = "conversationTraceRecord";
7086
7910
  QueryKeys["user"] = "user";
7087
7911
  QueryKeys["name"] = "name";
7088
7912
  QueryKeys["models"] = "models";
@@ -7159,13 +7983,26 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
7159
7983
  QueryKeys["subagentThread"] = "subagentThread";
7160
7984
  QueryKeys["codeEnvironments"] = "codeEnvironments";
7161
7985
  QueryKeys["agentQueuedTurns"] = "agentQueuedTurns";
7986
+ QueryKeys["pinnedOrder"] = "pinnedOrder";
7162
7987
  return QueryKeys;
7163
7988
  }({});
7164
- const DynamicQueryKeys = { agentFiles: (agentId) => ["agentFiles", agentId] };
7989
+ const DynamicQueryKeys = {
7990
+ agentFiles: (agentId) => ["agentFiles", agentId],
7991
+ codeEnvironmentStatus: (id) => [
7992
+ "codeEnvironments",
7993
+ id,
7994
+ "status"
7995
+ ]
7996
+ };
7165
7997
  let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
7166
7998
  MutationKeys["subagentControl"] = "subagentControl";
7167
7999
  MutationKeys["enqueueAgentQueuedTurn"] = "enqueueAgentQueuedTurn";
7168
8000
  MutationKeys["cancelAgentQueuedTurn"] = "cancelAgentQueuedTurn";
8001
+ /** Whole-array favorites write, keyed so every hook instance's write is
8002
+ * visible to the others through the query client. */
8003
+ MutationKeys["updateFavorites"] = "updateFavorites";
8004
+ /** Pinned-section display order write, keyed for the same reason. */
8005
+ MutationKeys["updatePinnedOrder"] = "updatePinnedOrder";
7169
8006
  MutationKeys["updateLangfuseConnection"] = "updateLangfuseConnection";
7170
8007
  MutationKeys["testLangfuseConnection"] = "testLangfuseConnection";
7171
8008
  MutationKeys["createAgentApiKey"] = "createAgentApiKey";
@@ -7211,6 +8048,7 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
7211
8048
  MutationKeys["pairCodeEnvironment"] = "pairCodeEnvironment";
7212
8049
  MutationKeys["updateCodeEnvironmentSettings"] = "updateCodeEnvironmentSettings";
7213
8050
  MutationKeys["deleteCodeEnvironment"] = "deleteCodeEnvironment";
8051
+ MutationKeys["moveConversationCodeEnvironment"] = "moveConversationCodeEnvironment";
7214
8052
  return MutationKeys;
7215
8053
  }({});
7216
8054
  //#endregion
@@ -7687,10 +8525,14 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
7687
8525
  getAvailableTools: () => getAvailableTools,
7688
8526
  getBanner: () => getBanner,
7689
8527
  getCategories: () => getCategories,
8528
+ getCodeEnvironmentStatus: () => getCodeEnvironmentStatus,
7690
8529
  getCodeEnvironments: () => getCodeEnvironments,
7691
8530
  getCodeOutputDownload: () => getCodeOutputDownload,
7692
8531
  getConversationById: () => getConversationById,
7693
8532
  getConversationTags: () => getConversationTags,
8533
+ getConversationTraceAvailability: () => getConversationTraceAvailability,
8534
+ getConversationTraceRecord: () => getConversationTraceRecord,
8535
+ getConversationTraceRecords: () => getConversationTraceRecords,
7694
8536
  getConversations: () => getConversations,
7695
8537
  getCustomConfigSpeech: () => getCustomConfigSpeech,
7696
8538
  getDomainServerBaseUrl: () => getDomainServerBaseUrl,
@@ -7722,6 +8564,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
7722
8564
  getMessagesByConvoId: () => getMessagesByConvoId,
7723
8565
  getModels: () => getModels,
7724
8566
  getParentSubagents: () => getParentSubagents,
8567
+ getPinnedOrder: () => getPinnedOrder,
7725
8568
  getPresets: () => getPresets,
7726
8569
  getProjectById: () => getProjectById,
7727
8570
  getPrompt: () => getPrompt,
@@ -7771,6 +8614,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
7771
8614
  logout: () => logout,
7772
8615
  makePromptProduction: () => makePromptProduction,
7773
8616
  markFilesUsage: () => markFilesUsage,
8617
+ moveConversationCodeEnvironment: () => moveConversationCodeEnvironment,
7774
8618
  pairCodeEnvironment: () => pairCodeEnvironment,
7775
8619
  pinConversation: () => pinConversation,
7776
8620
  rebuildConversationTags: () => rebuildConversationTags,
@@ -7813,6 +8657,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
7813
8657
  updateMessage: () => updateMessage,
7814
8658
  updateMessageContent: () => updateMessageContent,
7815
8659
  updatePeoplePickerPermissions: () => updatePeoplePickerPermissions,
8660
+ updatePinnedOrder: () => updatePinnedOrder,
7816
8661
  updatePreset: () => updatePreset,
7817
8662
  updateProject: () => updateProject,
7818
8663
  updatePromptGroup: () => updatePromptGroup,
@@ -7844,13 +8689,23 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
7844
8689
  });
7845
8690
  function getInsights(params = {}) {
7846
8691
  const query = new URLSearchParams();
7847
- for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== "") query.set(key, String(value));
8692
+ for (const [key, value] of Object.entries(params)) if (Array.isArray(value)) value.forEach((item) => query.append(key, String(item)));
8693
+ else if (value !== void 0 && value !== null && value !== "") query.set(key, String(value));
7848
8694
  const suffix = query.toString() ? `?${query.toString()}` : "";
7849
8695
  return request_default.get(`${insights()}${suffix}`);
7850
8696
  }
7851
8697
  function getInsightsAccess() {
7852
8698
  return request_default.get(insightsAccess());
7853
8699
  }
8700
+ function getConversationTraceAvailability(conversationId) {
8701
+ return request_default.get(conversationTraceAvailability(conversationId));
8702
+ }
8703
+ function getConversationTraceRecords({ conversationId, cursor }, signal) {
8704
+ return request_default.get(conversationTraceRecords(conversationId, cursor), signal ? { signal } : void 0);
8705
+ }
8706
+ function getConversationTraceRecord({ conversationId, recordId, messageId, sourceId }, signal) {
8707
+ return request_default.get(conversationTraceRecord(conversationId, recordId, messageId, sourceId), signal ? { signal } : void 0);
8708
+ }
7854
8709
  function getLangfuseConnection() {
7855
8710
  return request_default.get(adminLangfuseConnection());
7856
8711
  }
@@ -7875,6 +8730,15 @@ function deleteUser(payload) {
7875
8730
  function getCodeEnvironments() {
7876
8731
  return request_default.get(codeEnvironments());
7877
8732
  }
8733
+ function getCodeEnvironmentStatus(id) {
8734
+ return request_default.get(codeEnvironmentStatus(id));
8735
+ }
8736
+ function moveConversationCodeEnvironment({ conversationId, from, to }) {
8737
+ return request_default.patch(codeEnvironmentConversationDecision(conversationId), {
8738
+ from,
8739
+ to
8740
+ });
8741
+ }
7878
8742
  function pairCodeEnvironment(payload) {
7879
8743
  return request_default.post(codeEnvironmentPairings(), payload);
7880
8744
  }
@@ -7890,6 +8754,13 @@ function getFavorites() {
7890
8754
  function updateFavorites(favorites) {
7891
8755
  return request_default.post(`${apiBaseUrl()}/api/user/settings/favorites`, { favorites });
7892
8756
  }
8757
+ /** Combined Pinned-section display order: favorite and pinned-chat entry keys interleaved. */
8758
+ function getPinnedOrder() {
8759
+ return request_default.get(pinnedOrder());
8760
+ }
8761
+ function updatePinnedOrder(pinnedOrder$1) {
8762
+ return request_default.post(pinnedOrder(), { pinnedOrder: pinnedOrder$1 });
8763
+ }
7893
8764
  /** Tool favorites — starred marketplace items (builtins, tools, MCP servers, skills). */
7894
8765
  function getToolFavorites() {
7895
8766
  return request_default.get(toolFavorites());
@@ -8738,6 +9609,6 @@ const getActiveJobs = () => {
8738
9609
  return request_default.get(activeJobs());
8739
9610
  };
8740
9611
  //#endregion
8741
- export { permissionEntrySchema as $, googleSchema as $a, BedrockReasoningConfig as $i, specialVariables as $n, feedbackSchema as $o, defaultTextMimeTypes as $r, normalizeEndpointName as $s, azureGroupConfigsSchema as $t, updateResourcePermissions as A, defaultAgentFormValues as Aa, materializeModelSpecEndpoints as Ai, imageGenTools as An, tQueryParamsSchema as Ao, isProcessMCPServerField as Ar, feedbackFilterFieldSchema as As, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH as At, MutationKeys as B, eReasoningResponseKeySchema as Ba, getMaxSubagents as Bi, modularEndpoints as Bn, actionDelimiter as Bo, registerPage as Br, hasActivePiiPatterns as Bs, SettingsViews as Bt, resetPassword as C, authTypeSchema as Ca, setFileConfigRegexCompiler as Ci, fileSourceSchema as Cn, tConvoUpdateSchema as Co, MCP_USER_INPUT_FIELDS as Cr, SKILL_FILTER_FIELDS as Cs, MAX_SUBAGENT_DEPTH as Ct, updateFeedback as D, compactAgentsSchema as Da, videoMimeTypes as Di, getDefaultParamsEndpoint as Dn, tPluginAuthConfigSchema as Do, WebSocketOptionsSchema as Dr, agentInstructionFilterFieldSchema as Ds, RateLimitPrefix as Dt, searchPrincipals as E, compactAgentsBaseSchema as Ea, textMimeTypes as Ei, getConfigDefaults as En, tModelSpecPresetSchema as Eo, StreamableHTTPOptionsSchema as Er, actionMetadataFilterFieldSchema as Es, OCRStrategy as Et, request_default as F, eModelEndpointSchema as Fa, MAX_CHAT_PROJECT_DESCRIPTION_LENGTH as Fi, langfuseConfigSchema as Fn, FilePurpose as Fo, FileSources as Fr, filterPiiStarterPatternSchema as Fs, SafeSearchTypes as Ft, PrincipalType as G, endpointSettings as Ga, clampSettingRange as Gi, paramDefinitionSchema as Gn, isActionTool as Go, bedrockDocumentFormats as Gr, skillFilterFieldSchema as Gs, VisionModes as Gt, AccessRoleIds as H, eThinkingDisplaySchema as Ha, ComponentTypes as Hi, normalizeSearxngEngines as Hn, defaultOrderQuery as Ho, applicationMimeTypes as Hr, messageFilterFieldSchema as Hs, TTSProviders as Ht, getTokenHeader as I, eReasoningContextSchema as Ia, MAX_CHAT_PROJECT_NAME_LENGTH as Ii, memorySchema as In, MessageContentTypes as Io, checkOpenAIStorage as Ir, filtersConfigSchema as Is, ScraperProviders as It, accessRoleToPermBits as J, getGoogleThinkingBudgetMax as Ja, generateOpenAISchema as Ji, resolveEndpointType as Jn, resolveStatefulCodeEnvironment as Jo, codeInterpreterMimeTypesList as Jr, userSubmittedMessageFieldPathSchema as Js, alternateName as Jt, ResourceType as K, extendedModelEndpointSchema as Ka, generateDynamicSchema as Ki, providerEndpointMap as Kn, STATEFUL_CODE_ENVIRONMENTS as Ko, bedrockDocumentMimeTypes as Kr, toolArgumentFilterFieldSchema as Ks, agentsEndpointSchema as Kt, setAcceptLanguageHeader as L, eReasoningEffortSchema as La, MAX_GRAPH_SUBAGENT_MEMBERS as Li, messageFilterPiiSchema as Ln, RunStatus as Lo, apiBaseUrl as Lr, getPiiRegexProgramSize as Ls, SearchCategories as Lt, updateUserKey as M, documentSupportedProviders as Ma, resolveModelSpecEndpoint as Mi, interfaceSchema as Mn, AnnotationTypes as Mo, AuthorizationTypeEnum as Mr, filterPiiActionSchema as Ms, SKILL_SYNC_MAX_INTERVAL_MINUTES as Mt, updateUserPlugins as N, eAnthropicEffortSchema as Na, specsConfigSchema as Ni, isRemoteOidcUrlAllowed as Nn, AssistantStreamEvents as No, TokenExchangeMethodEnum as Nr, filterPiiCustomPatternSchema as Ns, SKILL_SYNC_MIN_INTERVAL_MINUTES as Nt, updateMessage as O, compactAssistantSchema as Oa, REFILL_INTERVAL_UNITS as Oi, getEndpointField as On, tPluginSchema as Oo, hasProcessMCPServerConfig as Or, conversationStarterFilterFieldSchema as Os, RerankerTypes as Ot, userKeyQuery as P, eImageDetailSchema as Pa, tModelSpecSchema as Pi, isSecureCodeEnvironmentControlURL as Pn, EToolResources as Po, FileContext as Pr, filterPiiRegexSchema as Ps, STTProviders as Pt, permBitsToAccessLevel as Q, googleGenConfigSchema as Qa, BedrockProviders as Qi, skillSyncGitHubSourceSchema as Qn, feedbackRatingSchema as Qo, defaultSTTMimeTypes as Qr, isSensitiveEnvVar as Qs, azureEndpointSchema as Qt, setTokenHeader as R, eReasoningModeSchema as Ra, MAX_SUBAGENTS as Ri, messageFilterSchema as Rn, StepStatus as Ro, buildLoginRedirectUrl as Rr, hasActiveFiltersConfig as Rs, SearchProviders as Rt, requestPasswordReset as S, assistantSchema as Sa, retrievalMimeTypesList as Si, excludedKeys as Sn, tConversationTagSchema as So, MCP_SERVER_TITLE_PATTERN as Sr, PROMPT_FILTER_FIELDS as Ss, LocalStorageKeys as St, revokeUserKey as T, coerceNumber as Ta, supportsFiles as Ti, fileStrategiesSchema as Tn, tMessageSchema as To, StdioOptionsSchema as Tr, TOOL_ARGUMENT_FILTER_FIELDS as Ts, MAX_SUBAGENT_RUN_CONFIGS as Tt, PermissionBits as U, eThinkingLevelSchema as Ua, OptionTypes as Ui, normalizeServerName as Un, hostImageIdSuffix as Uo, audioMimeTypes as Ur, modelParameterFilterFieldSchema as Us, Time as Ut, QueryKeys as V, eReasoningSummarySchema as Va, setMaxSubagents as Vi, normalizeMCPToolKey as Vn, actionDomainSeparator as Vo, sharedFileDownload as Vr, memoryFilterFieldSchema as Vs, SystemCategories as Vt, PrincipalModel as W, eVerbositySchema as Wa, SettingTypes as Wi, ocrSchema as Wn, hostImageNamePrefix as Wo, bedrockDocumentExtensions as Wr, promptFilterFieldSchema as Ws, ViolationTypes as Wt, getResourcePermissionsResponseSchema as X, getSettingsKeys as Xa, AnthropicEffort as Xi, setMessageFilterRegexValidator as Xn, FEEDBACK_REASON_KEYS as Xo, convertStringsToRegex as Xr, extractEnvVariable as Xs, assistantEndpointSchema as Xt, effectivePermissionsResponseSchema as Y, getModelKey as Ya, validateSettingDefinitions as Yi, retainRecentConfigSchema as Yn, FEEDBACK_RATINGS as Yo, codeTypeMapping as Yr, envVarRegex as Ys, anthropicEndpointSchema as Yt, hasPermissions as Z, googleBaseSchema as Za, AuthType as Zi, skillSyncConfigSchema as Zn, FEEDBACK_TAGS as Zo, defaultOCRMimeTypes as Zr, extractVariableName as Zs, azureBaseSchema as Zt, getResourcePermissions as _, agentsSchema as _a, mbToBytes as _i, defaultEndpoints as _n, removeNullishValues as _o, webSearchSchema as _r, MAX_PII_PATTERN_LABEL_LENGTH as _s, FetchTokenConfig as _t, data_service_exports as a, Providers as aa, fileConfigSchema as ai, bedrockModels as an, isAssistantsEndpoint as ao, summarizationTriggerSchema as ar, AGENT_INSTRUCTION_FILTER_FIELDS as as, AgentCapabilities as at, register as b, anthropicSchema as ba, mimeTypeAliases as bi, defaultSocialLogins as bn, tBannerSchema as bo, MCPServersSchema as br, MESSAGE_FILTER_FIELDS as bs, InfiniteCollections as bt, getAccessRoles as c, ReasoningMode as ca, getEndpointFileConfig as ci, checkpointerTypeSchema as cn, isMythosClassModel as co, toolApprovalModeSchema as cr, FEEDBACK_FILTER_FIELDS as cs, BASE_PRINCIPAL_CONFIG_SECTIONS as ct, getAvailablePlugins as d, ReasoningSummary as da, imageTypeMapping as di, codeEnvironmentUserConfigSchema as dn, isUUID as do, turnstileOptionsSchema as dr, HITL_MESSAGE_FILTER_FIELDS as ds, CohereConstants as dt, EModelEndpoint as ea, documentParserMimeTypes as ei, azureGroupSchema as en, googleSettings as eo, splitMCPToolKey as er, feedbackTagKeySchema as es, principalSchema as et, getConversationById as f, SkillsScope as fa, inferMimeType as fi, codeEnvironmentUserSettingsSchema as fn, openAIBaseSchema as fo, turnstileSchema as fr, MAX_PII_CUSTOM_PATTERNS_TOTAL as fs, Constants as ft, getModels as g, agentsBaseSchema as ga, isPermissiveMimeConfig as gi, defaultAssistantsVersion as gn, paramEndpoints as go, visionModels as gr, MAX_PII_PATTERN_ID_LENGTH as gs, ErrorTypes as gt, getMCPServerConnectionStatus as h, Verbosity as ha, isBedrockDocumentType as hi, defaultAgentCapabilities as hn, openRouterSchema as ho, vertexModelConfigSchema as hr, MAX_PII_PATTERNS_PER_SOURCE as hs, EndpointURLs as ht, createPreset as i, MemoryScope as ia, fileConfig as ii, bedrockGuardrailConfigSchema as in, isAgentsEndpoint as io, summarizationConfigSchema as ir, ACTION_METADATA_FILTER_FIELDS as is, AUTH_USER_DOC_BY_ID_PREFIX as it, updateTokenCount as j, defaultAssistantFormValues as ja, modelSpecSubagentsSchema as ji, initialModelsConfig as jn, tSharedLinkSchema as jo, AuthTypeEnum as jr, fileFilterFieldSchema as js, SKILL_SYNC_MAX_DISCOVERY_DEPTH as jt, updateMessageContent as k, compactGoogleSchema as ka, getRefillEligibilityDate as ki, getSchemaDefaults as kn, tPresetSchema as ko, isProcessMCPServerConfig as kr, conversationTitleFilterFieldSchema as ks, RetentionMode as kt, getAgentApiKeys as l, ReasoningParameterFormat as la, imageExtRegex as li, cloudfrontConfigSchema as ln, isOpenAILikeProvider as lo, toolApprovalPolicySchema as lr, FILE_FILTER_FIELDS as ls, CacheKeys as lt, getEffectivePermissions as m, ThinkingLevel as ma, isAnthropicTextDocumentType as mi, contextPruningSchema as mn, openAISettings as mo, vertexAISchema as mr, MAX_PII_CUSTOM_REGEX_INSTRUCTIONS as ms, EImageOutputType as mt, clearAllConversations as n, ImageVisionTool as na, excelFileTypes as ni, baseEndpointSchema as nn, imageDetailValue as no, stripServerNamePrefix as nr, getTagsForRating as ns, updateResourcePermissionsRequestSchema as nt, deleteAgentApiKey as o, ReasoningContext as oa, fullMimeTypesList as oi, buildServerNameAliases as on, isDocumentSupportedProvider as oo, supportsBalanceCheck as or, CONVERSATION_STARTER_FILTER_FIELDS as os, AuthKeys as ot, getCustomConfigSpeech as p, ThinkingDisplay as pa, isAnthropicDocumentType as pi, configSchema as pn, openAISchema as po, validateVisionModel as pr, MAX_PII_CUSTOM_REGEX_CHARACTERS as ps, DEFAULT_MEMORY_MAX_INPUT_TOKENS as pt, accessRoleSchema as q, getGoogleThinkingBudgetBounds as qa, generateGoogleSchema as qi, rateLimitSchema as qn, resolveAllowedStatefulCodeEnvironments as qo, codeInterpreterMimeTypes as qr, unattributedAssistantContentSchema as qs, allowedAddressesSchema as qt, createAgentApiKey as r, MYTHOS_CLASS_FAMILIES as ra, excelMimeTypes as ri, bedrockEndpointSchema as rn, inputTokensIncludesCache as ro, stripServerNamePrefixes as rr, toMinimalFeedback as rs, updateResourcePermissionsResponseSchema as rt, deletePreset as s, ReasoningEffort as sa, getConfiguredMimeAccept as si, checkpointerSchema as sn, isImageVisionTool as so, toolApprovalHookConfigSchema as sr, CONVERSATION_TITLE_FILTER_FIELDS as ss, BASE_ONLY_CONFIG_SECTIONS as st, cancelMCPOAuth as t, ImageDetail as ta, endpointFileConfigSchema as ti, balanceSchema as tn, imageDetailNumeric as to, splitToolCallName as tr, getTagByKey as ts, resourcePermissionsResponseSchema as tt, getAllEffectivePermissions as u, ReasoningResponseKey as ua, imageMimeTypes as ui, codeEnvironmentPermissionDecisionSchema as un, isParamEndpoint as uo, transactionsSchema as ur, FILTER_PII_STARTER_PATTERNS as us, Capabilities as ut, getSharedLink as v, agentsSettings as va, megabyte as vi, defaultModels as vn, resolveAgentSkillsScope as vo, MCPOptionsSchema as vr, MAX_PII_PATTERN_LENGTH as vs, ForkOptions as vt, revokeAllUserKeys as w, cacheSubsetProviders as wa, supportedMimeTypes as wi, fileStorageSchema as wn, tExampleSchema as wo, SSEOptionsSchema as wr, STORED_MESSAGE_FILTER_FIELDS as ws, MAX_SUBAGENT_GRAPH_NODES as wt, reinitializeMCPServer as x, anthropicSettings as xa, retrievalMimeTypes as xi, endpointSchema as xn, tConversationSchema as xo, MCP_SERVER_TITLE_ERROR as xr, MODEL_PARAMETER_FILTER_FIELDS as xs, KnownEndpoints as xt, getSharedMessages as y, anthropicBaseSchema as ya, mergeFileConfig as yi, defaultRetrievalModels as yn, subagentThreadLineageSchema as yo, MCPServerUserInputSchema as yr, MEMORY_FILTER_FIELDS as ys, ImageDetailCost as yt, DynamicQueryKeys as z, eReasoningParameterFormatSchema as za, MAX_SUBAGENTS_CEILING as zi, modelConfigSchema as zn, Tools as zo, loginPage as zr, hasActivePiiFields as zs, SettingsTabValues as zt };
9612
+ export { permissionEntrySchema as $, Providers as $a, envVarRegex as $c, isResponsesApiUpload as $i, isSpeechProviderConfigured as $n, isAssistantsEndpoint as $o, SSEOptionsSchema as $r, CODE_WORKSPACE_MAX_COUNT as $s, SearchCategories as $t, updateResourcePermissions as A, validateSettingDefinitions as Aa, actionMetadataFilterFieldSchema as Ac, defaultOCRMimeTypes as Ai, codeEnvironmentUserSettingsSchema as An, eReasoningContextSchema as Ao, summarizationTriggerSchema as Ar, Tools as As, FetchTokenConfig as At, MutationKeys as B, DEFAULT_BALANCE_RESERVATION_TTL_MS as Ba, filtersConfigSchema as Bc, getConfiguredMimeAccept as Bi, excludedKeys as Bn, extendedModelEndpointSchema as Bo, validateVisionModel as Br, FEEDBACK_REASON_KEYS as Bs, MAX_SUBAGENT_GRAPH_NODES as Bt, resetPassword as C, ComponentTypes as Ca, MEMORY_FILTER_FIELDS as Cc, bedrockDocumentFormats as Ci, bedrockModels as Cn, compactGoogleSchema as Co, skillSyncGitHubSourceSchema as Cr, tModelSpecPresetSchema as Cs, DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS as Ct, updateFeedback as D, generateDynamicSchema as Da, SKILL_FILTER_FIELDS as Dc, codeTypeMapping as Di, cloudfrontConfigSchema as Dn, eAnthropicEffortSchema as Do, stripServerNamePrefix as Dr, tQueryParamsSchema as Ds, EImageOutputType as Dt, searchPrincipals as E, clampSettingRange as Ea, PROMPT_FILTER_FIELDS as Ec, codeInterpreterMimeTypesList as Ei, checkpointerTypeSchema as En, documentSupportedProviders as Eo, splitToolCallName as Er, tPresetSchema as Es, DEFAULT_OAUTH_STATE_TTL_MS as Et, request_default as F, MAX_GRAPH_SUBAGENT_MEMBERS as Fa, fileFilterFieldSchema as Fc, excelFileTypes as Fi, defaultEndpoints as Fn, eReasoningSummarySchema as Fo, traceViewerDefaults as Fr, CodeApprovalModeError as Fs, LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS as Ft, PrincipalType as G, AuthType as Ga, memoryFilterFieldSchema as Gc, imageTypeMapping as Gi, getDefaultParamsEndpoint as Gn, googleBaseSchema as Go, MAX_MCP_ICON_PATH_LENGTH as Gr, getTagByKey as Gs, RetentionMode as Gt, AccessRoleIds as H, REFILL_INTERVAL_UNITS as Ha, hasActiveFiltersConfig as Hc, getEndpointFileConfig as Hi, fileStorageSchema as Hn, getGoogleThinkingBudgetMax as Ho, vertexModelConfigSchema as Hr, feedbackRatingSchema as Hs, OCRStrategy as Ht, getTokenHeader as I, MAX_SUBAGENTS as Ia, filterPiiActionSchema as Ic, excelMimeTypes as Ii, defaultModels as In, eThinkingDisplaySchema as Io, traceViewerLimits as Ir, getAllowedCodeApprovalModes as Is, LANGFUSE_TRACE_USER_ID_FIELDS as It, accessRoleToPermBits as J, EModelEndpoint as Ja, promptFilterFieldSchema as Jc, isAnthropicTextDocumentType as Ji, imageGenTools as Jn, googleSettings as Jo, MCPServerUserInputSchema as Jr, CODE_ENVIRONMENT_DECISION_VERSION as Js, SKILL_SYNC_MAX_INTERVAL_MINUTES as Jt, ResourceType as K, BedrockProviders as Ka, messageFilterFieldSchema as Kc, inferMimeType as Ki, getEndpointField as Kn, googleGenConfigSchema as Ko, MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS as Kr, getTagsForRating as Ks, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH as Kt, setAcceptLanguageHeader as L, MAX_SUBAGENTS_CEILING as La, filterPiiCustomPatternSchema as Lc, fileConfig as Li, defaultRetrievalModels as Ln, eThinkingLevelSchema as Lo, transactionsSchema as Lr, resolveCodeApprovalMode as Ls, LANGFUSE_TRACE_USER_METADATA_FIELDS as Lt, updateUserKey as M, DEFAULT_RETAINED_ANSWER_TOKENS as Ma, conversationStarterFilterFieldSchema as Mc, defaultTextMimeTypes as Mi, contextPruningSchema as Mn, eReasoningModeSchema as Mo, toolApprovalHookConfigSchema as Mr, actionDomainSeparator as Ms, ImageDetailCost as Mt, updateUserPlugins as N, MAX_CHAT_PROJECT_DESCRIPTION_LENGTH as Na, conversationTitleFilterFieldSchema as Nc, documentParserMimeTypes as Ni, defaultAgentCapabilities as Nn, eReasoningParameterFormatSchema as No, toolApprovalModeSchema as Nr, isActionTool as Ns, InfiniteCollections as Nt, updateMessage as O, generateGoogleSchema as Oa, STORED_MESSAGE_FILTER_FIELDS as Oc, convertStringsToRegex as Oi, codeEnvironmentPermissionDecisionSchema as On, eImageDetailSchema as Oo, stripServerNamePrefixes as Or, tSharedLinkSchema as Os, EndpointURLs as Ot, userKeyQuery as P, MAX_CHAT_PROJECT_NAME_LENGTH as Pa, feedbackFilterFieldSchema as Pc, endpointFileConfigSchema as Pi, defaultAssistantsVersion as Pn, eReasoningResponseKeySchema as Po, toolApprovalPolicySchema as Pr, CODE_APPROVAL_MODES as Ps, KnownEndpoints as Pt, permBitsToAccessLevel as Q, MemoryScope as Qa, userSubmittedMessageFieldPathSchema as Qc, isPermissiveMimeConfig as Qi, isSecureCodeEnvironmentControlURL as Qn, isAgentsEndpoint as Qo, MCP_USER_INPUT_FIELDS as Qr, CODE_WORKSPACE_INSTANCE_TYPES as Qs, ScraperProviders as Qt, setTokenHeader as R, getMaxSubagents as Ra, filterPiiRegexSchema as Rc, fileConfigSchema as Ri, defaultSocialLogins as Rn, eVerbositySchema as Ro, turnstileOptionsSchema as Rr, resolveCodePermissionDecision as Rs, LocalStorageKeys as Rt, requestPasswordReset as S, resolveStatefulCodeEnvironment as Sa, MAX_PII_PATTERN_LENGTH as Sc, bedrockDocumentExtensions as Si, bedrockGuardrailConfigSchema as Sn, compactAssistantSchema as So, skillSyncConfigSchema as Sr, tMessageSchema as Ss, DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS as St, revokeUserKey as T, SettingTypes as Ta, MODEL_PARAMETER_FILTER_FIELDS as Tc, codeInterpreterMimeTypes as Ti, checkpointerSchema as Tn, defaultAssistantFormValues as To, splitMCPToolKey as Tr, tPluginSchema as Ts, DEFAULT_MEMORY_MAX_INPUT_TOKENS as Tt, PermissionBits as U, getRefillEligibilityDate as Ua, hasActivePiiFields as Uc, imageExtRegex as Ui, fileStrategiesSchema as Un, getModelKey as Uo, visionModels as Ur, feedbackSchema as Us, RateLimitPrefix as Ut, QueryKeys as V, MIN_BALANCE_RESERVATION_TTL_MS as Va, getPiiRegexProgramSize as Vc, getDocumentFileExtension as Vi, fileSourceSchema as Vn, getGoogleThinkingBudgetBounds as Vo, vertexAISchema as Vr, FEEDBACK_TAGS as Vs, MAX_SUBAGENT_RUN_CONFIGS as Vt, PrincipalModel as W, AnthropicEffort as Wa, hasActivePiiPatterns as Wc, imageMimeTypes as Wi, getConfigDefaults as Wn, getSettingsKeys as Wo, webSearchSchema as Wr, feedbackTagKeySchema as Ws, RerankerTypes as Wt, getResourcePermissionsResponseSchema as X, ImageVisionTool as Xa, toolArgumentFilterFieldSchema as Xc, isExplicitMimeConfig as Xi, interfaceSchema as Xn, imageDetailValue as Xo, MCP_SERVER_TITLE_ERROR as Xr, CODE_ENVIRONMENT_MOVE_VERSION as Xs, STTProviders as Xt, effectivePermissionsResponseSchema as Y, ImageDetail as Ya, skillFilterFieldSchema as Yc, isBedrockDocumentType as Yi, initialModelsConfig as Yn, imageDetailNumeric as Yo, MCPServersSchema as Yr, CODE_ENVIRONMENT_MODES as Ys, SKILL_SYNC_MIN_INTERVAL_MINUTES as Yt, hasPermissions as Z, MYTHOS_CLASS_FAMILIES as Za, unattributedAssistantContentSchema as Zc, isMessageFileUpload as Zi, isRemoteOidcUrlAllowed as Zn, inputTokensIncludesCache as Zo, MCP_SERVER_TITLE_PATTERN as Zr, CODE_WORKSPACE_ID_PATTERN as Zs, SafeSearchTypes as Zt, getResourcePermissions as _, resolveModelSpecEndpoint as _a, MAX_PII_CUSTOM_REGEX_CHARACTERS as _c, sharedFileDownload as _i, azureGroupConfigsSchema as _n, authTypeSchema as _o, rateLimitSchema as _r, tBannerSchema as _s, CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS as _t, data_service_exports as a, resolveEffectiveUseResponsesApi as aa, isCodeWorkspaceSelectionErrorReason as ac, isProcessMCPServerField as ai, Time as an, ReasoningSummary as ao, messageFilterPiiSchema as ar, isOpenAILikeProvider as as, FilePurpose as at, register as b, STATEFUL_CODE_ENVIRONMENTS as ba, MAX_PII_PATTERN_ID_LENGTH as bc, applicationMimeTypes as bi, baseEndpointSchema as bn, compactAgentsBaseSchema as bo, retainRecentConfigSchema as br, tConvoUpdateSchema as bs, CohereConstants as bt, getAccessRoles as c, retrievalMimeTypes as ca, ACTION_METADATA_FILTER_FIELDS as cc, TokenExchangeMethodEnum as ci, agentsEndpointSchema as cn, ThinkingLevel as co, modularEndpoints as cr, mediaSupportedProviders as cs, AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT as ct, getAvailablePlugins as d, supportedMimeTypes as da, CONVERSATION_TITLE_FILTER_FIELDS as dc, FileSources as di, anthropicEndpointSchema as dn, agentsSchema as do, normalizeServerName as dr, openAISettings as ds, AgentCapabilities as dt, mbToBytes as ea, CODE_WORKSPACE_OPERATIONS as ec, StdioOptionsSchema as ei, extractEnvVariable as el, SearchProviders as en, ReasoningContext as eo, langfuseConfigSchema as er, isDocumentSupportedProvider as es, principalSchema as et, getConversationById as f, supportsFiles as fa, FEEDBACK_FILTER_FIELDS as fc, checkOpenAIStorage as fi, askUserQuestionConfigSchema as fn, agentsSettings as fo, ocrSchema as fr, openRouterSchema as fs, AuthKeys as ft, getModels as g, modelSpecSubagentsSchema as ga, MAX_PII_CUSTOM_PATTERNS_TOTAL as gc, registerPage as gi, azureEndpointSchema as gn, assistantSchema as go, providerEndpointMap as gr, subagentThreadLineageSchema as gs, CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS as gt, getMCPServerConnectionStatus as h, materializeModelSpecEndpoints as ha, HITL_MESSAGE_FILTER_FIELDS as hc, loginPage as hi, azureBaseSchema as hn, anthropicSettings as ho, permissionWriteAttemptsSchema as hr, resolveAgentSkillsScope as hs, CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS as ht, createPreset as i, prefersResponsesApiByModel as ia, isCodeWorkspaceSelection as ic, isProcessMCPServerConfig as ii, TTSProviders as in, ReasoningResponseKey as io, memorySchema as ir, isMythosClassModel as is, AssistantStreamEvents as it, updateTokenCount as j, DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS as ja, agentInstructionFilterFieldSchema as jc, defaultSTTMimeTypes as ji, configSchema as jn, eReasoningEffortSchema as jo, supportsBalanceCheck as jr, actionDelimiter as js, ForkOptions as jt, updateMessageContent as k, generateOpenAISchema as ka, TOOL_ARGUMENT_FILTER_FIELDS as kc, defaultLLMDeliveryPathSchema as ki, codeEnvironmentUserConfigSchema as kn, eModelEndpointSchema as ko, summarizationConfigSchema as kr, EToolResources as ks, ErrorTypes as kt, getAgentApiKeys as l, retrievalMimeTypesList as la, AGENT_INSTRUCTION_FILTER_FIELDS as lc, agentGitIdentitySchema as li, allowedAddressesSchema as ln, Verbosity as lo, normalizeMCPToolKey as lr, openAIBaseSchema as ls, AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX as lt, getEffectivePermissions as m, videoMimeTypes as ma, FILTER_PII_STARTER_PATTERNS as mc, buildLoginRedirectUrl as mi, assistantEndpointSchema as mn, anthropicSchema as mo, paramDefinitionSchema as mr, removeNullishValues as ms, BASE_PRINCIPAL_CONFIG_SECTIONS as mt, clearAllConversations as n, mergeFileConfig as na, isCodeEnvironmentMode as nc, WebSocketOptionsSchema as ni, isSensitiveEnvVar as nl, SettingsViews as nn, ReasoningMode as no, listConfiguredSpeechProviders as nr, isKnownProviderIdentifier as ns, updateResourcePermissionsRequestSchema as nt, deleteAgentApiKey as o, resolveSandboxFilename as oa, isCodeWorkspaceSelections as oc, AuthTypeEnum as oi, ViolationTypes as on, SkillsScope as oo, messageFilterSchema as or, isParamEndpoint as os, RunStatus as ot, getCustomConfigSpeech as p, textMimeTypes as pa, FILE_FILTER_FIELDS as pc, apiBaseUrl as pi, askUserQuestionRetainedAnswersSchema as pn, anthropicBaseSchema as po, openIdDiscoverySchema as pr, paramEndpoints as ps, BASE_ONLY_CONFIG_SECTIONS as pt, accessRoleSchema as q, BedrockReasoningConfig as qa, modelParameterFilterFieldSchema as qc, isAnthropicDocumentType as qi, getSchemaDefaults as qn, googleSchema as qo, MCPOptionsSchema as qr, toMinimalFeedback as qs, SKILL_SYNC_MAX_DISCOVERY_DEPTH as qt, createAgentApiKey as r, mimeTypeAliases as ra, isCodeWorkspaceEnvironment as rc, hasProcessMCPServerConfig as ri, normalizeEndpointName as rl, SystemCategories as rn, ReasoningParameterFormat as ro, mcpRefreshDefaults as rr, isMediaSupportedProvider as rs, updateResourcePermissionsResponseSchema as rt, deletePreset as s, resolveUseResponsesApi as sa, isRepositoryInstructionDescriptor as sc, AuthorizationTypeEnum as si, VisionModes as sn, ThinkingDisplay as so, modelConfigSchema as sr, isUUID as ss, defaultOrderQuery as st, cancelMCPOAuth as t, megabyte as ta, CODE_WORKSPACE_SELECTION_ERROR_REASONS as tc, StreamableHTTPOptionsSchema as ti, extractVariableName as tl, SettingsTabValues as tn, ReasoningEffort as to, langfuseTraceConfigSchema as tr, isImageVisionTool as ts, resourcePermissionsResponseSchema as tt, getAllEffectivePermissions as u, setFileConfigRegexCompiler as ua, CONVERSATION_STARTER_FILTER_FIELDS as uc, FileContext as ui, alternateName as un, agentsBaseSchema as uo, normalizeSearxngEngines as ur, openAISchema as us, AUTH_USER_DOC_BY_ID_PREFIX as ut, getSharedLink as v, specsConfigSchema as va, MAX_PII_CUSTOM_REGEX_INSTRUCTIONS as vc, DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY as vi, azureGroupSchema as vn, cacheSubsetProviders as vo, resolveEndpointType as vr, tConversationSchema as vs, CacheKeys as vt, revokeAllUserKeys as w, OptionTypes as wa, MESSAGE_FILTER_FIELDS as wc, bedrockDocumentMimeTypes as wi, buildServerNameAliases as wn, defaultAgentFormValues as wo, specialVariables as wr, tPluginAuthConfigSchema as ws, DEFAULT_MAX_PROVIDER_ERROR_CHARS as wt, reinitializeMCPServer as x, resolveAllowedStatefulCodeEnvironments as xa, MAX_PII_PATTERN_LABEL_LENGTH as xc, audioMimeTypes as xi, bedrockEndpointSchema as xn, compactAgentsSchema as xo, setMessageFilterRegexValidator as xr, tExampleSchema as xs, Constants as xt, getSharedMessages as y, tModelSpecSchema as ya, MAX_PII_PATTERNS_PER_SOURCE as yc, DefaultLLMDeliveryPath as yi, balanceSchema as yn, coerceNumber as yo, resolveTraceViewerConfig as yr, tConversationTagSchema as ys, Capabilities as yt, DynamicQueryKeys as z, setMaxSubagents as za, filterPiiStarterPatternSchema as zc, fullMimeTypesList as zi, endpointSchema as zn, endpointSettings as zo, turnstileSchema as zr, FEEDBACK_RATINGS as zs, MAX_SUBAGENT_DEPTH as zt };
8742
9613
 
8743
- //# sourceMappingURL=data-service-CaB7saTP.mjs.map
9614
+ //# sourceMappingURL=data-service-B-WUVvTH.mjs.map