librechat-data-provider 0.8.523 → 0.8.524

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/{data-service-Bx6IFaSa.mjs → data-service-B-WUVvTH.mjs} +434 -174
  2. package/dist/data-service-B-WUVvTH.mjs.map +1 -0
  3. package/dist/{data-service-CTX0tVO5.js → data-service-CUG1qdeC.js} +577 -203
  4. package/dist/data-service-CUG1qdeC.js.map +1 -0
  5. package/dist/index.js +346 -72
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +307 -68
  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/actions.d.ts +1 -1
  12. package/dist/types/agentToolOptions.d.ts +1 -1
  13. package/dist/types/api-endpoints.d.ts +1 -0
  14. package/dist/types/backgroundResults.d.ts +13 -0
  15. package/dist/types/balance.d.ts +4 -0
  16. package/dist/types/bedrock.d.ts +77 -70
  17. package/dist/types/code/workspace.d.ts +22 -0
  18. package/dist/types/config.d.ts +5362 -4206
  19. package/dist/types/data-service.d.ts +14 -12
  20. package/dist/types/file-config.d.ts +81 -42
  21. package/dist/types/filters.d.ts +205 -205
  22. package/dist/types/footer.d.ts +20 -0
  23. package/dist/types/generate.d.ts +28 -28
  24. package/dist/types/index.d.ts +4 -0
  25. package/dist/types/keys.d.ts +2 -1
  26. package/dist/types/limits.d.ts +8 -0
  27. package/dist/types/mcp.d.ts +999 -352
  28. package/dist/types/messages.d.ts +12 -7
  29. package/dist/types/models.d.ts +429 -429
  30. package/dist/types/parameterSettings.d.ts +2 -1
  31. package/dist/types/parsers.d.ts +25 -1
  32. package/dist/types/resolve-llm-delivery-path.d.ts +97 -4
  33. package/dist/types/schemas.d.ts +646 -643
  34. package/dist/types/types/agents.d.ts +233 -2
  35. package/dist/types/types/assistants.d.ts +2 -641
  36. package/dist/types/types/content.d.ts +286 -0
  37. package/dist/types/types/files.d.ts +14 -1
  38. package/dist/types/types/mutations.d.ts +3 -2
  39. package/dist/types/types/queuedTurns.d.ts +124 -90
  40. package/dist/types/types/runs.d.ts +9 -0
  41. package/dist/types/types/schedules.d.ts +10 -10
  42. package/dist/types/types/skills.d.ts +43 -0
  43. package/dist/types/types/tools.d.ts +132 -0
  44. package/dist/types/types/traces.d.ts +49 -0
  45. package/dist/types/types.d.ts +31 -1
  46. package/package.json +1 -1
  47. package/dist/data-service-Bx6IFaSa.mjs.map +0 -1
  48. package/dist/data-service-CTX0tVO5.js.map +0 -1
@@ -356,6 +356,8 @@ const CODE_WORKSPACE_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
356
356
  const CODE_WORKSPACE_MAX_COUNT = 32;
357
357
  /** API/client protocol for immutable conversation-owned environment decisions. */
358
358
  const CODE_ENVIRONMENT_DECISION_VERSION = 1;
359
+ /** API/client protocol for an owner's explicit move of a sealed environment decision. */
360
+ const CODE_ENVIRONMENT_MOVE_VERSION = 1;
359
361
  const CODE_WORKSPACE_OPERATIONS = [
360
362
  "read_file",
361
363
  "search_text",
@@ -365,6 +367,7 @@ const CODE_WORKSPACE_OPERATIONS = [
365
367
  "edit_file",
366
368
  "execute_command"
367
369
  ];
370
+ const CODE_WORKSPACE_INSTANCE_TYPES = ["git_worktree"];
368
371
  const CODE_WORKSPACE_SELECTION_ERROR_REASONS = [
369
372
  "required",
370
373
  "invalid",
@@ -374,6 +377,26 @@ const CODE_WORKSPACE_SELECTION_ERROR_REASONS = [
374
377
  "locked"
375
378
  ];
376
379
  const CODE_ENVIRONMENT_MODES = ["attached", "without_attached"];
380
+ function isRepositoryInstructionDescriptor(value) {
381
+ if (value == null || typeof value !== "object") return false;
382
+ const descriptor = value;
383
+ return Object.keys(descriptor).every((key) => [
384
+ "path",
385
+ "bytes",
386
+ "sha256",
387
+ "truncated"
388
+ ].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";
389
+ }
390
+ function isCodeWorkspaceEnvironment(value) {
391
+ if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
392
+ const environment = value;
393
+ return Object.keys(environment).every((key) => [
394
+ "fingerprint",
395
+ "repo",
396
+ "ref",
397
+ "actions"
398
+ ].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;
399
+ }
377
400
  function isCodeEnvironmentMode(value) {
378
401
  return CODE_ENVIRONMENT_MODES.some((mode) => mode === value);
379
402
  }
@@ -562,26 +585,7 @@ function resolveCodePermissionDecision({ mode, category, decision }) {
562
585
  return MODE_PERMISSIONS[mode][category];
563
586
  }
564
587
  //#endregion
565
- //#region src/stateful-code.ts
566
- const STATEFUL_CODE_ENVIRONMENTS = [
567
- "user",
568
- "agent-user",
569
- "conversation"
570
- ];
571
- /** Resolve a deployment allowlist in stable UI order. An omitted value preserves
572
- * the backward-compatible behavior where every environment is available. */
573
- function resolveAllowedStatefulCodeEnvironments(configured) {
574
- if (configured == null) return [...STATEFUL_CODE_ENVIRONMENTS];
575
- const configuredSet = new Set(configured);
576
- return STATEFUL_CODE_ENVIRONMENTS.filter((environment) => configuredSet.has(environment));
577
- }
578
- /** Keep an allowed preference, otherwise select the first deployment-allowed scope. */
579
- function resolveStatefulCodeEnvironment(preferred, configured) {
580
- const allowed = resolveAllowedStatefulCodeEnvironments(configured);
581
- return preferred != null && allowed.includes(preferred) ? preferred : allowed[0];
582
- }
583
- //#endregion
584
- //#region src/types/assistants.ts
588
+ //#region src/types/tools.ts
585
589
  let Tools = /* @__PURE__ */ function(Tools) {
586
590
  Tools["execute_code"] = "execute_code";
587
591
  Tools["code_interpreter"] = "code_interpreter";
@@ -605,39 +609,6 @@ let EToolResources = /* @__PURE__ */ function(EToolResources) {
605
609
  EToolResources["ocr"] = "ocr";
606
610
  return EToolResources;
607
611
  }({});
608
- const agentGitIdentitySchema = zod.z.object({
609
- name: zod.z.string().trim().min(1).max(128).refine((value) => !/[\0\r\n]/.test(value)),
610
- email: zod.z.string().trim().email().max(254).refine((value) => !/[\0\r\n]/.test(value))
611
- }).optional();
612
- let AnnotationTypes = /* @__PURE__ */ function(AnnotationTypes) {
613
- AnnotationTypes["FILE_CITATION"] = "file_citation";
614
- AnnotationTypes["FILE_PATH"] = "file_path";
615
- return AnnotationTypes;
616
- }({});
617
- let StepStatus = /* @__PURE__ */ function(StepStatus) {
618
- StepStatus["IN_PROGRESS"] = "in_progress";
619
- StepStatus["CANCELLED"] = "cancelled";
620
- StepStatus["FAILED"] = "failed";
621
- StepStatus["COMPLETED"] = "completed";
622
- StepStatus["EXPIRED"] = "expired";
623
- return StepStatus;
624
- }({});
625
- let MessageContentTypes = /* @__PURE__ */ function(MessageContentTypes) {
626
- MessageContentTypes["TEXT"] = "text";
627
- MessageContentTypes["IMAGE_FILE"] = "image_file";
628
- return MessageContentTypes;
629
- }({});
630
- let RunStatus = /* @__PURE__ */ function(RunStatus) {
631
- RunStatus["QUEUED"] = "queued";
632
- RunStatus["IN_PROGRESS"] = "in_progress";
633
- RunStatus["REQUIRES_ACTION"] = "requires_action";
634
- RunStatus["CANCELLING"] = "cancelling";
635
- RunStatus["CANCELLED"] = "cancelled";
636
- RunStatus["FAILED"] = "failed";
637
- RunStatus["COMPLETED"] = "completed";
638
- RunStatus["EXPIRED"] = "expired";
639
- return RunStatus;
640
- }({});
641
612
  const actionDelimiter = "_action_";
642
613
  const actionDomainSeparator = "---";
643
614
  /** Mirrors `Constants.mcp_delimiter`; duplicated here to avoid a circular import from `config.ts`. */
@@ -665,46 +636,6 @@ function isActionTool(toolName) {
665
636
  const mcpIdx = toolName.indexOf(mcpDelimiter);
666
637
  return mcpIdx < 0 || mcpIdx < actionIdx;
667
638
  }
668
- const hostImageIdSuffix = "_host_copy";
669
- const hostImageNamePrefix = "host_copy_";
670
- let FilePurpose = /* @__PURE__ */ function(FilePurpose) {
671
- FilePurpose["Vision"] = "vision";
672
- FilePurpose["FineTune"] = "fine-tune";
673
- FilePurpose["FineTuneResults"] = "fine-tune-results";
674
- FilePurpose["Assistants"] = "assistants";
675
- FilePurpose["AssistantsOutput"] = "assistants_output";
676
- return FilePurpose;
677
- }({});
678
- const defaultOrderQuery = {
679
- order: "desc",
680
- limit: 100
681
- };
682
- let AssistantStreamEvents = /* @__PURE__ */ function(AssistantStreamEvents) {
683
- AssistantStreamEvents["ThreadCreated"] = "thread.created";
684
- AssistantStreamEvents["ThreadRunCreated"] = "thread.run.created";
685
- AssistantStreamEvents["ThreadRunQueued"] = "thread.run.queued";
686
- AssistantStreamEvents["ThreadRunInProgress"] = "thread.run.in_progress";
687
- AssistantStreamEvents["ThreadRunRequiresAction"] = "thread.run.requires_action";
688
- AssistantStreamEvents["ThreadRunCompleted"] = "thread.run.completed";
689
- AssistantStreamEvents["ThreadRunFailed"] = "thread.run.failed";
690
- AssistantStreamEvents["ThreadRunCancelling"] = "thread.run.cancelling";
691
- AssistantStreamEvents["ThreadRunCancelled"] = "thread.run.cancelled";
692
- AssistantStreamEvents["ThreadRunExpired"] = "thread.run.expired";
693
- AssistantStreamEvents["ThreadRunStepCreated"] = "thread.run.step.created";
694
- AssistantStreamEvents["ThreadRunStepInProgress"] = "thread.run.step.in_progress";
695
- AssistantStreamEvents["ThreadRunStepCompleted"] = "thread.run.step.completed";
696
- AssistantStreamEvents["ThreadRunStepFailed"] = "thread.run.step.failed";
697
- AssistantStreamEvents["ThreadRunStepCancelled"] = "thread.run.step.cancelled";
698
- AssistantStreamEvents["ThreadRunStepExpired"] = "thread.run.step.expired";
699
- AssistantStreamEvents["ThreadRunStepDelta"] = "thread.run.step.delta";
700
- AssistantStreamEvents["ThreadMessageCreated"] = "thread.message.created";
701
- AssistantStreamEvents["ThreadMessageInProgress"] = "thread.message.in_progress";
702
- AssistantStreamEvents["ThreadMessageCompleted"] = "thread.message.completed";
703
- AssistantStreamEvents["ThreadMessageIncomplete"] = "thread.message.incomplete";
704
- AssistantStreamEvents["ThreadMessageDelta"] = "thread.message.delta";
705
- AssistantStreamEvents["ErrorEvent"] = "error";
706
- return AssistantStreamEvents;
707
- }({});
708
639
  //#endregion
709
640
  //#region src/schemas.ts
710
641
  const isUUID = zod.z.string().uuid();
@@ -1032,6 +963,7 @@ const defaultAgentFormValues = {
1032
963
  stateful_code_environment: "user",
1033
964
  code_environment_id: void 0,
1034
965
  code_workspace_id: void 0,
966
+ repositoryInstructions: void 0,
1035
967
  category: "general",
1036
968
  support_contact: {
1037
969
  name: "",
@@ -2009,6 +1941,72 @@ const compactAgentsBaseSchema = tConversationSchema.pick({
2009
1941
  });
2010
1942
  const compactAgentsSchema = compactAgentsBaseSchema.transform((obj) => removeNullishValues(obj)).catch(() => ({}));
2011
1943
  //#endregion
1944
+ //#region src/balance.ts
1945
+ const REFILL_INTERVAL_UNITS = [
1946
+ "seconds",
1947
+ "minutes",
1948
+ "hours",
1949
+ "days",
1950
+ "weeks",
1951
+ "months"
1952
+ ];
1953
+ /** How long an unreleased in-flight balance reservation keeps counting against the balance. */
1954
+ const DEFAULT_BALANCE_RESERVATION_TTL_MS = 1800 * 1e3;
1955
+ /** Shortest reservation TTL; a live reservation is renewed every half TTL. */
1956
+ const MIN_BALANCE_RESERVATION_TTL_MS = 10 * 1e3;
1957
+ function getRefillEligibilityDate(lastRefill, value, unit) {
1958
+ const result = new Date(lastRefill);
1959
+ switch (unit) {
1960
+ case "seconds":
1961
+ result.setSeconds(result.getSeconds() + value);
1962
+ return result;
1963
+ case "minutes":
1964
+ result.setMinutes(result.getMinutes() + value);
1965
+ return result;
1966
+ case "hours":
1967
+ result.setHours(result.getHours() + value);
1968
+ return result;
1969
+ case "days":
1970
+ result.setDate(result.getDate() + value);
1971
+ return result;
1972
+ case "weeks":
1973
+ result.setDate(result.getDate() + value * 7);
1974
+ return result;
1975
+ case "months":
1976
+ result.setMonth(result.getMonth() + value);
1977
+ return result;
1978
+ default: return result;
1979
+ }
1980
+ }
1981
+ //#endregion
1982
+ //#region src/limits.ts
1983
+ /** Maximum number of explicit subagents per parent agent. UI + Zod schema share this. */
1984
+ const MAX_SUBAGENTS = 10;
1985
+ /** Hard upper bound for `endpoints.agents.maxSubagents`, keeping the request-validation
1986
+ * cap bounded no matter what the config file says. */
1987
+ const MAX_SUBAGENTS_CEILING = 50;
1988
+ let maxSubagents = 10;
1989
+ /** Effective subagents-per-agent cap; initialized from `endpoints.agents.maxSubagents` at startup. */
1990
+ const getMaxSubagents = () => maxSubagents;
1991
+ /** Applies a configured cap; any missing or out-of-range value resets to the default. */
1992
+ const setMaxSubagents = (value) => {
1993
+ maxSubagents = typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 50 ? value : 10;
1994
+ };
1995
+ /** Chat project field limits. The dialogs and the persistence layer share these,
1996
+ * so the inputs stop at the same point the server would otherwise truncate. */
1997
+ const MAX_CHAT_PROJECT_NAME_LENGTH = 100;
1998
+ const MAX_CHAT_PROJECT_DESCRIPTION_LENGTH = 1e3;
1999
+ /** Mirrors the bounded graph-child member limit in `@librechat/agents`. */
2000
+ const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
2001
+ /** Characters of retained tool output one stopped turn may be tokenized for, so the
2002
+ * context gauge can add an exact figure instead of an estimate. The schema default
2003
+ * and the save path share it; tokenizing runs ~60 ms/MB, once per stopped turn. */
2004
+ const DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS = 8 * 1024 * 1024;
2005
+ /** Token ceiling for the block of Ask User answers carried verbatim in an agent's
2006
+ * user context (`endpoints.agents.askUserQuestion.retainedAnswers.maxTokens`).
2007
+ * Older answers drop first once the block exceeds it; the newest set is always kept. */
2008
+ const DEFAULT_RETAINED_ANSWER_TOKENS = 4096;
2009
+ //#endregion
2012
2010
  //#region src/generate.ts
2013
2011
  let ComponentTypes = /* @__PURE__ */ function(ComponentTypes) {
2014
2012
  ComponentTypes["Input"] = "input";
@@ -2407,25 +2405,24 @@ const generateGoogleSchema = (customGoogle) => {
2407
2405
  }));
2408
2406
  };
2409
2407
  //#endregion
2410
- //#region src/limits.ts
2411
- /** Maximum number of explicit subagents per parent agent. UI + Zod schema share this. */
2412
- const MAX_SUBAGENTS = 10;
2413
- /** Hard upper bound for `endpoints.agents.maxSubagents`, keeping the request-validation
2414
- * cap bounded no matter what the config file says. */
2415
- const MAX_SUBAGENTS_CEILING = 50;
2416
- let maxSubagents = 10;
2417
- /** Effective subagents-per-agent cap; initialized from `endpoints.agents.maxSubagents` at startup. */
2418
- const getMaxSubagents = () => maxSubagents;
2419
- /** Applies a configured cap; any missing or out-of-range value resets to the default. */
2420
- const setMaxSubagents = (value) => {
2421
- maxSubagents = typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 50 ? value : 10;
2422
- };
2423
- /** Chat project field limits. The dialogs and the persistence layer share these,
2424
- * so the inputs stop at the same point the server would otherwise truncate. */
2425
- const MAX_CHAT_PROJECT_NAME_LENGTH = 100;
2426
- const MAX_CHAT_PROJECT_DESCRIPTION_LENGTH = 1e3;
2427
- /** Mirrors the bounded graph-child member limit in `@librechat/agents`. */
2428
- const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
2408
+ //#region src/stateful-code.ts
2409
+ const STATEFUL_CODE_ENVIRONMENTS = [
2410
+ "user",
2411
+ "agent-user",
2412
+ "conversation"
2413
+ ];
2414
+ /** Resolve a deployment allowlist in stable UI order. An omitted value preserves
2415
+ * the backward-compatible behavior where every environment is available. */
2416
+ function resolveAllowedStatefulCodeEnvironments(configured) {
2417
+ if (configured == null) return [...STATEFUL_CODE_ENVIRONMENTS];
2418
+ const configuredSet = new Set(configured);
2419
+ return STATEFUL_CODE_ENVIRONMENTS.filter((environment) => configuredSet.has(environment));
2420
+ }
2421
+ /** Keep an allowed preference, otherwise select the first deployment-allowed scope. */
2422
+ function resolveStatefulCodeEnvironment(preferred, configured) {
2423
+ const allowed = resolveAllowedStatefulCodeEnvironments(configured);
2424
+ return preferred != null && allowed.includes(preferred) ? preferred : allowed[0];
2425
+ }
2429
2426
  //#endregion
2430
2427
  //#region src/models.ts
2431
2428
  const modelSpecSubagentsSchema = zod.z.object({
@@ -2525,41 +2522,9 @@ const specsConfigSchema = zod.z.object({
2525
2522
  addedEndpoints: zod.z.array(zod.z.union([zod.z.string(), eModelEndpointSchema])).optional()
2526
2523
  });
2527
2524
  //#endregion
2528
- //#region src/balance.ts
2529
- const REFILL_INTERVAL_UNITS = [
2530
- "seconds",
2531
- "minutes",
2532
- "hours",
2533
- "days",
2534
- "weeks",
2535
- "months"
2536
- ];
2537
- function getRefillEligibilityDate(lastRefill, value, unit) {
2538
- const result = new Date(lastRefill);
2539
- switch (unit) {
2540
- case "seconds":
2541
- result.setSeconds(result.getSeconds() + value);
2542
- return result;
2543
- case "minutes":
2544
- result.setMinutes(result.getMinutes() + value);
2545
- return result;
2546
- case "hours":
2547
- result.setHours(result.getHours() + value);
2548
- return result;
2549
- case "days":
2550
- result.setDate(result.getDate() + value);
2551
- return result;
2552
- case "weeks":
2553
- result.setDate(result.getDate() + value * 7);
2554
- return result;
2555
- case "months":
2556
- result.setMonth(result.getMonth() + value);
2557
- return result;
2558
- default: return result;
2559
- }
2560
- }
2561
- //#endregion
2562
2525
  //#region src/file-config.ts
2526
+ /** Parallel storage deletions during rollback of a failed skill archive import. */
2527
+ const DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY = 8;
2563
2528
  const supportsFiles = {
2564
2529
  ["openAI"]: true,
2565
2530
  ["google"]: true,
@@ -2756,6 +2721,25 @@ const resolveSandboxFilename = (filename, mimeType) => {
2756
2721
  * re-resolved to text it has no extraction for.
2757
2722
  */
2758
2723
  const resolveUseResponsesApi = (agentValue, conversationValue) => agentValue ?? conversationValue ?? void 0;
2724
+ /** Models whose native OpenAI and Azure execution defaults to Responses. Keep
2725
+ * this shared with client upload routing so documents follow the API that the
2726
+ * backend will actually invoke. Explicit false remains an opt-out. */
2727
+ const prefersResponsesApiByModel = (model) => typeof model === "string" && /^gpt-6-(?:astra|sol|luna)(?:-|$)/i.test(model);
2728
+ /** The server has transport and administrator settings the browser cannot see.
2729
+ * Missing policy never enables model-based uploads (including during upgrades). */
2730
+ const resolveEffectiveUseResponsesApi = ({ value, endpoint, model, routing, webSearch }) => {
2731
+ if (endpoint !== "openAI" && endpoint !== "azureOpenAI") return value ?? void 0;
2732
+ let policy = model ? routing?.[model] : void 0;
2733
+ if (!policy && model && prefersResponsesApiByModel(model)) {
2734
+ const family = /^gpt-6-(?:astra|sol|luna)(?=-|$)/i.exec(model)?.[0].toLowerCase();
2735
+ policy = family ? routing?.[`${family}-*`] : void 0;
2736
+ }
2737
+ policy ??= routing?.["*"];
2738
+ if (!policy) return value ?? void 0;
2739
+ if (webSearch && policy.withWebSearch) policy = policy.withWebSearch;
2740
+ if (value == null) return policy.default;
2741
+ return value ? policy.on : policy.off;
2742
+ };
2759
2743
  const isBedrockDocumentType = (mimeType) => mimeType != null && mimeType in bedrockDocumentFormats;
2760
2744
  /** MIME types Bedrock's Converse document path can send to the model (mirrors `bedrockDocumentFormats`). */
2761
2745
  const bedrockDocumentMimeTypes = Object.keys(bedrockDocumentFormats);
@@ -3018,7 +3002,10 @@ const fileConfig = {
3018
3002
  disabled: false
3019
3003
  }
3020
3004
  },
3021
- skills: { fileSizeLimit: defaultSkillImportSizeLimit },
3005
+ skills: {
3006
+ fileSizeLimit: defaultSkillImportSizeLimit,
3007
+ importCleanupConcurrency: 8
3008
+ },
3022
3009
  serverFileSizeLimit: defaultSizeLimit,
3023
3010
  avatarSizeLimit: mbToBytes(2),
3024
3011
  fileTokenLimit: defaultTokenLimit,
@@ -3038,7 +3025,16 @@ const fileConfig = {
3038
3025
  return supportedTypes.some((regex) => regex.test(fileType));
3039
3026
  }
3040
3027
  };
3041
- const supportedMimeTypesSchema = zod.z.array(zod.z.string()).optional();
3028
+ const supportedMimeTypesSchema = zod.z.array(zod.z.string().superRefine((pattern, context) => {
3029
+ try {
3030
+ compileMimeRegex(pattern);
3031
+ } catch {
3032
+ context.addIssue({
3033
+ code: zod.z.ZodIssueCode.custom,
3034
+ message: "Invalid MIME type regex: not supported by the configured regex engine"
3035
+ });
3036
+ }
3037
+ })).optional();
3042
3038
  const DefaultLLMDeliveryPath = zod.z.enum([
3043
3039
  "provider",
3044
3040
  "text",
@@ -3055,9 +3051,13 @@ const endpointFileConfigSchema = zod.z.object({
3055
3051
  totalSizeLimit: zod.z.number().min(0).optional(),
3056
3052
  supportedMimeTypes: supportedMimeTypesSchema.optional(),
3057
3053
  defaultLLMDeliveryPath: defaultLLMDeliveryPathSchema.optional(),
3058
- legacyFileUploadUX: zod.z.boolean().optional()
3054
+ legacyFileUploadUX: zod.z.boolean().optional(),
3055
+ textFallbackWithoutTools: zod.z.boolean().optional()
3056
+ });
3057
+ const skillFileConfigSchema = zod.z.object({
3058
+ fileSizeLimit: zod.z.number().min(0).optional(),
3059
+ importCleanupConcurrency: zod.z.number().int().positive().optional()
3059
3060
  });
3060
- const skillFileConfigSchema = zod.z.object({ fileSizeLimit: zod.z.number().min(0).optional() });
3061
3061
  const fileConfigSchema = zod.z.object({
3062
3062
  endpoints: zod.z.record(endpointFileConfigSchema).optional(),
3063
3063
  skills: skillFileConfigSchema.optional(),
@@ -3080,7 +3080,8 @@ const fileConfigSchema = zod.z.object({
3080
3080
  ocr: zod.z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
3081
3081
  text: zod.z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
3082
3082
  defaultLLMDeliveryPath: defaultLLMDeliveryPathSchema.optional(),
3083
- legacyFileUploadUX: zod.z.boolean().optional()
3083
+ legacyFileUploadUX: zod.z.boolean().optional(),
3084
+ textFallbackWithoutTools: zod.z.boolean().optional()
3084
3085
  });
3085
3086
  /**
3086
3087
  * Compiler for admin-supplied MIME patterns. Defaults to native `RegExp`, which browser
@@ -3117,6 +3118,15 @@ const isPermissiveMimeConfig = (types) => {
3117
3118
  if (!types || types.length === 0) return false;
3118
3119
  return types.some((regex) => regex.test("x-librechat/x-probe"));
3119
3120
  };
3121
+ /**
3122
+ * Detects whether an endpoint's `supportedMimeTypes` were set by the admin rather than inherited
3123
+ * from the built-in default list. Inheritance is signaled by referential identity with
3124
+ * `supportedMimeTypes`, which `mergeWithDefault` preserves for unconfigured endpoints.
3125
+ */
3126
+ const isExplicitMimeConfig = (types) => {
3127
+ if (!types || types.length === 0) return false;
3128
+ return types !== supportedMimeTypes;
3129
+ };
3120
3130
  /** Media categories that collapse to a wildcard `accept` token when any member type is allowed. */
3121
3131
  const mimeAcceptCategories = [
3122
3132
  {
@@ -3317,7 +3327,8 @@ function mergeWithDefault(endpointConfig, defaultConfig, endpoint) {
3317
3327
  totalSizeLimit: endpointConfig.totalSizeLimit ?? defaultConfig.totalSizeLimit,
3318
3328
  supportedMimeTypes: endpointConfig.supportedMimeTypes ?? defaultMimeTypes,
3319
3329
  defaultLLMDeliveryPath: mergeDeliveryPathConfig(endpointConfig.defaultLLMDeliveryPath, defaultConfig.defaultLLMDeliveryPath),
3320
- legacyFileUploadUX: endpointConfig.legacyFileUploadUX ?? defaultConfig.legacyFileUploadUX
3330
+ legacyFileUploadUX: endpointConfig.legacyFileUploadUX ?? defaultConfig.legacyFileUploadUX,
3331
+ textFallbackWithoutTools: endpointConfig.textFallbackWithoutTools ?? defaultConfig.textFallbackWithoutTools
3321
3332
  };
3322
3333
  }
3323
3334
  /**
@@ -3364,7 +3375,8 @@ function getEndpointFileConfig(params) {
3364
3375
  const globalDefaultConfig = {
3365
3376
  ...baseDefaultConfig,
3366
3377
  defaultLLMDeliveryPath: mergeDeliveryPathConfig(mergedFileConfig.defaultLLMDeliveryPath, baseDefaultConfig.defaultLLMDeliveryPath),
3367
- legacyFileUploadUX: mergedFileConfig.legacyFileUploadUX ?? baseDefaultConfig.legacyFileUploadUX
3378
+ legacyFileUploadUX: mergedFileConfig.legacyFileUploadUX ?? baseDefaultConfig.legacyFileUploadUX,
3379
+ textFallbackWithoutTools: mergedFileConfig.textFallbackWithoutTools ?? baseDefaultConfig.textFallbackWithoutTools
3368
3380
  };
3369
3381
  const userDefaultConfig = mergedFileConfig.endpoints.default;
3370
3382
  const defaultConfig = userDefaultConfig ? mergeWithDefault(userDefaultConfig, globalDefaultConfig, "default") : globalDefaultConfig;
@@ -3424,11 +3436,16 @@ function mergeFileConfig(dynamic) {
3424
3436
  if (!dynamic) return mergedConfig;
3425
3437
  if (dynamic.defaultLLMDeliveryPath !== void 0) mergedConfig.defaultLLMDeliveryPath = dynamic.defaultLLMDeliveryPath;
3426
3438
  if (dynamic.legacyFileUploadUX !== void 0) mergedConfig.legacyFileUploadUX = dynamic.legacyFileUploadUX;
3439
+ if (dynamic.textFallbackWithoutTools !== void 0) mergedConfig.textFallbackWithoutTools = dynamic.textFallbackWithoutTools;
3427
3440
  if (dynamic.serverFileSizeLimit !== void 0) mergedConfig.serverFileSizeLimit = mbToBytes(dynamic.serverFileSizeLimit);
3428
3441
  if (dynamic.avatarSizeLimit !== void 0) mergedConfig.avatarSizeLimit = mbToBytes(dynamic.avatarSizeLimit);
3429
3442
  if (dynamic.fileTokenLimit !== void 0) mergedConfig.fileTokenLimit = dynamic.fileTokenLimit;
3430
3443
  if (dynamic.fileContextSizeLimit !== void 0) mergedConfig.fileContextSizeLimit = mbToBytes(dynamic.fileContextSizeLimit);
3431
3444
  if (dynamic.fileContextCharLimit !== void 0) mergedConfig.fileContextCharLimit = dynamic.fileContextCharLimit;
3445
+ if (dynamic.skills?.importCleanupConcurrency !== void 0) mergedConfig.skills = {
3446
+ ...mergedConfig.skills,
3447
+ importCleanupConcurrency: dynamic.skills.importCleanupConcurrency
3448
+ };
3432
3449
  if (dynamic.skills?.fileSizeLimit !== void 0) mergedConfig.skills = {
3433
3450
  ...mergedConfig.skills,
3434
3451
  fileSizeLimit: mbToBytes(dynamic.skills.fileSizeLimit)
@@ -3478,6 +3495,7 @@ function mergeFileConfig(dynamic) {
3478
3495
  if (dynamicEndpoint.supportedMimeTypes) mergedEndpoint.supportedMimeTypes = convertStringsToRegex(dynamicEndpoint.supportedMimeTypes);
3479
3496
  if (dynamicEndpoint.defaultLLMDeliveryPath !== void 0) mergedEndpoint.defaultLLMDeliveryPath = dynamicEndpoint.defaultLLMDeliveryPath;
3480
3497
  if (dynamicEndpoint.legacyFileUploadUX !== void 0) mergedEndpoint.legacyFileUploadUX = dynamicEndpoint.legacyFileUploadUX;
3498
+ if (dynamicEndpoint.textFallbackWithoutTools !== void 0) mergedEndpoint.textFallbackWithoutTools = dynamicEndpoint.textFallbackWithoutTools;
3481
3499
  }
3482
3500
  return mergedConfig;
3483
3501
  }
@@ -3508,6 +3526,7 @@ const codeEnvironmentPairings = () => `${codeEnvironments()}/pairings`;
3508
3526
  const codeEnvironmentById = (id) => `${codeEnvironments()}/${encodeURIComponent(id)}`;
3509
3527
  const codeEnvironmentSettings = (id) => `${codeEnvironmentById(id)}/settings`;
3510
3528
  const codeEnvironmentStatus = (id) => `${codeEnvironmentById(id)}/status`;
3529
+ const codeEnvironmentConversationDecision = (conversationId) => `${codeEnvironments()}/conversations/${encodeURIComponent(conversationId)}/decision`;
3511
3530
  const messagesRoot = `${BASE_URL}/api/messages`;
3512
3531
  const messages = (params) => {
3513
3532
  const { conversationId, messageId, ...rest } = params;
@@ -3838,6 +3857,10 @@ let TokenExchangeMethodEnum = /* @__PURE__ */ function(TokenExchangeMethodEnum)
3838
3857
  TokenExchangeMethodEnum["BasicAuthHeader"] = "basic_auth_header";
3839
3858
  return TokenExchangeMethodEnum;
3840
3859
  }({});
3860
+ const agentGitIdentitySchema = zod.z.object({
3861
+ name: zod.z.string().trim().min(1).max(128).refine((value) => !/[\0\r\n]/.test(value)),
3862
+ email: zod.z.string().trim().email().max(254).refine((value) => !/[\0\r\n]/.test(value))
3863
+ }).optional();
3841
3864
  //#endregion
3842
3865
  //#region src/mcp.ts
3843
3866
  /**
@@ -3846,6 +3869,8 @@ let TokenExchangeMethodEnum = /* @__PURE__ */ function(TokenExchangeMethodEnum)
3846
3869
  * stored icon predates the cap clears the icon instead of rejecting the update.
3847
3870
  */
3848
3871
  const MAX_MCP_ICON_PATH_LENGTH = 256 * 1024;
3872
+ /** Keep persistence admission waits below the shared lease's 15-minute lifetime. */
3873
+ const MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS = 14 * 6e4;
3849
3874
  const validateOAuthClientCredentials = (oauth, ctx) => {
3850
3875
  if (oauth.client_secret && !oauth.client_id) ctx.addIssue({
3851
3876
  code: zod.z.ZodIssueCode.custom,
@@ -3920,6 +3945,27 @@ const OAuthOptionsBaseSchema = zod.z.object({
3920
3945
  * Ignored when `audience` itself is not configured.
3921
3946
  */
3922
3947
  forward_audience_on_refresh: zod.z.boolean().optional(),
3948
+ /**
3949
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
3950
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
3951
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
3952
+ * (RFC 9728), never an operator-supplied string.
3953
+ *
3954
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
3955
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
3956
+ * fails an `/authorize` request carrying both `resource` and `scope` with
3957
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
3958
+ * `audience` above) to obtain an API-scoped token.
3959
+ *
3960
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
3961
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
3962
+ * still recorded on the stored client binding, so scope discovery, authorization
3963
+ * server discovery and re-authentication checks are unaffected.
3964
+ *
3965
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
3966
+ * from user-managed servers.
3967
+ */
3968
+ send_resource_parameter: zod.z.boolean().optional(),
3923
3969
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
3924
3970
  revocation_endpoint: zod.z.string().transform((val) => extractEnvVariable(val)).pipe(zod.z.string().url()).optional(),
3925
3971
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -3938,14 +3984,16 @@ const userOAuthEndpointUrlSchema = zod.z.string().refine((val) => !envVarPattern
3938
3984
  }, { message: "OAuth endpoint URLs cannot include audience or resource query parameters" });
3939
3985
  const UserOAuthOptionsSchema = OAuthOptionsBaseSchema.omit({
3940
3986
  audience: true,
3941
- forward_audience_on_refresh: true
3987
+ forward_audience_on_refresh: true,
3988
+ send_resource_parameter: true
3942
3989
  }).extend({
3943
3990
  authorization_url: userOAuthEndpointUrlSchema.optional(),
3944
3991
  token_url: userOAuthEndpointUrlSchema.optional(),
3945
3992
  redirect_uri: userOAuthEndpointUrlSchema.optional(),
3946
3993
  revocation_endpoint: userOAuthEndpointUrlSchema.optional(),
3947
3994
  audience: zod.z.never().optional(),
3948
- forward_audience_on_refresh: zod.z.never().optional()
3995
+ forward_audience_on_refresh: zod.z.never().optional(),
3996
+ send_resource_parameter: zod.z.never().optional()
3949
3997
  }).superRefine(validateOAuthClientCredentials);
3950
3998
  const OboOptionsSchema = zod.z.object({
3951
3999
  /** Scopes to request for the downstream MCP server (e.g., "api://<client-id>/Mcp.Tools.ReadWrite") */
@@ -3970,6 +4018,21 @@ const BaseOptionsSchema = zod.z.object({
3970
4018
  sseReadTimeout: zod.z.number().int().positive().optional(),
3971
4019
  initTimeout: zod.z.number().int().nonnegative().optional(),
3972
4020
  /**
4021
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
4022
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
4023
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
4024
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
4025
+ *
4026
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
4027
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
4028
+ * common case this wait exists to serve. Omit the field to take the default.
4029
+ */
4030
+ oauthRefreshWaitTimeout: zod.z.number().int().positive().optional(),
4031
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
4032
+ oauthRefreshCoordination: zod.z.boolean().optional(),
4033
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
4034
+ oauthPersistenceWaitTimeout: zod.z.number().int().positive().max(MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS).optional(),
4035
+ /**
3973
4036
  * Whether the server is offered in chat.
3974
4037
  *
3975
4038
  * `false` hides it from the chat dropdown (MCPSelect) AND bars it from the
@@ -4103,6 +4166,13 @@ const SSEOptionsSchema = BaseOptionsSchema.extend({
4103
4166
  type: zod.z.literal("sse").default("sse"),
4104
4167
  headers: zod.z.record(zod.z.string(), zod.z.string()).optional(),
4105
4168
  /**
4169
+ * Headers resolved from the live chat request and merged over `headers`.
4170
+ * Omitted during catalog discovery, which has no request context, so a
4171
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
4172
+ * On a duplicate header name the resolved `requestHeaders` value wins.
4173
+ */
4174
+ requestHeaders: zod.z.record(zod.z.string(), zod.z.string()).optional(),
4175
+ /**
4106
4176
  * On-Behalf-Of (OBO) token exchange configuration.
4107
4177
  * When configured, LibreChat exchanges the logged-in user's federated access token
4108
4178
  * for a token scoped to this MCP server via the OAuth 2.0 OBO flow (jwt-bearer grant).
@@ -4121,6 +4191,13 @@ const StreamableHTTPOptionsSchema = BaseOptionsSchema.extend({
4121
4191
  type: zod.z.union([zod.z.literal("streamable-http"), zod.z.literal("http")]),
4122
4192
  headers: zod.z.record(zod.z.string(), zod.z.string()).optional(),
4123
4193
  /**
4194
+ * Headers resolved from the live chat request and merged over `headers`.
4195
+ * Omitted during catalog discovery, which has no request context, so a
4196
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
4197
+ * On a duplicate header name the resolved `requestHeaders` value wins.
4198
+ */
4199
+ requestHeaders: zod.z.record(zod.z.string(), zod.z.string()).optional(),
4200
+ /**
4124
4201
  * On-Behalf-Of (OBO) token exchange configuration.
4125
4202
  * When configured, LibreChat exchanges the logged-in user's federated access token
4126
4203
  * for a token scoped to this MCP server via the OAuth 2.0 OBO flow (jwt-bearer grant).
@@ -4150,6 +4227,9 @@ const omitServerManagedFields = (schema) => schema.omit({
4150
4227
  timeout: true,
4151
4228
  sseReadTimeout: true,
4152
4229
  initTimeout: true,
4230
+ oauthRefreshWaitTimeout: true,
4231
+ oauthRefreshCoordination: true,
4232
+ oauthPersistenceWaitTimeout: true,
4153
4233
  chatMenu: true,
4154
4234
  serverInstructions: true,
4155
4235
  requiresOAuth: true,
@@ -4216,6 +4296,8 @@ const MCP_USER_INPUT_FIELDS = (() => {
4216
4296
  })();
4217
4297
  //#endregion
4218
4298
  //#region src/config.ts
4299
+ const AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT = 24 * 1024;
4300
+ const AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX = 64 * 1024;
4219
4301
  const defaultSocialLogins = [
4220
4302
  "google",
4221
4303
  "facebook",
@@ -4224,6 +4306,8 @@ const defaultSocialLogins = [
4224
4306
  "discord",
4225
4307
  "saml"
4226
4308
  ];
4309
+ /** How long a started social login may take to return to its callback before its `state` expires. */
4310
+ const DEFAULT_OAUTH_STATE_TTL_MS = 600 * 1e3;
4227
4311
  const BASE_ONLY_CONFIG_SECTIONS = ["filters"];
4228
4312
  /** Sections that may be stored in the tenant's base config document but must
4229
4313
  * not be overridden or tombstoned by role, group, or user config documents. */
@@ -4795,7 +4879,21 @@ const managementClientBindingSchema = zod.z.object({
4795
4879
  tenantId: zod.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"),
4796
4880
  enabled: zod.z.boolean().default(true)
4797
4881
  }).strict();
4798
- const managementApiOidcSchema = oidcAccessTokenSchema.strict().superRefine(validateEnabledOidc);
4882
+ const managementApiOidcSchema = oidcAccessTokenSchema.extend({
4883
+ tokenUse: zod.z.literal("access").optional(),
4884
+ requiredScopes: zod.z.array(zod.z.string().trim().min(1).max(256).regex(/^\S+$/, "must be a single scope token")).min(1).max(20).optional()
4885
+ }).strict().superRefine((oidc, ctx) => {
4886
+ if (oidc.enabled === true && !oidc.issuer) ctx.addIssue({
4887
+ code: zod.z.ZodIssueCode.custom,
4888
+ path: ["issuer"],
4889
+ message: "issuer is required when OIDC auth is enabled"
4890
+ });
4891
+ if (oidc.enabled === true && !oidc.audience && (oidc.tokenUse !== "access" || !oidc.requiredScopes?.length)) ctx.addIssue({
4892
+ code: zod.z.ZodIssueCode.custom,
4893
+ path: ["requiredScopes"],
4894
+ message: "audience or access-token validation with required scopes is required when OIDC auth is enabled"
4895
+ });
4896
+ });
4799
4897
  const managementApiAuthSchema = zod.z.object({
4800
4898
  oidc: managementApiOidcSchema,
4801
4899
  clients: zod.z.array(managementClientBindingSchema).max(100).default([])
@@ -4894,6 +4992,24 @@ const toolApprovalPolicySchema = zod.z.object({
4894
4992
  */
4895
4993
  hooks: zod.z.array(toolApprovalHookConfigSchema).optional()
4896
4994
  }).optional();
4995
+ const askUserQuestionRetainedAnswersSchema = zod.z.object({
4996
+ /** `false` stops carrying answers forward; they then live only in the messages. */
4997
+ enabled: zod.z.boolean().optional(),
4998
+ /** Token ceiling for the carried block. Older answers drop first once it is
4999
+ * exceeded; the newest set is always kept. Defaults to
5000
+ * `DEFAULT_RETAINED_ANSWER_TOKENS` (4096). */
5001
+ maxTokens: zod.z.number().int().positive().optional()
5002
+ });
5003
+ /**
5004
+ * Behavior of the `ask_user_question` tool beyond the admin kill switch
5005
+ * (`filteredTools` / `includedTools`).
5006
+ *
5007
+ * `retainedAnswers`: every answer the user gave to an agent's question is
5008
+ * quoted verbatim in the run's user context, so it survives after the
5009
+ * messages that carried it were summarized, pruned or dropped from the context
5010
+ * window. On by default.
5011
+ */
5012
+ const askUserQuestionConfigSchema = zod.z.object({ retainedAnswers: askUserQuestionRetainedAnswersSchema.optional() }).optional();
4897
5013
  /**
4898
5014
  * Durable checkpointer backing human-in-the-loop resume.
4899
5015
  *
@@ -4964,6 +5080,12 @@ const CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS = 3e4;
4964
5080
  /** Protocol-level ceiling; deployments may only lower this value. */
4965
5081
  const CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS = 5 * 6e4;
4966
5082
  /**
5083
+ * Client retry horizon across Code API admission windows. Also the hard cap:
5084
+ * deployments may only lower it. `0` disables client retries, not the server's
5085
+ * initial admission wait or an already-admitted operation's execution budget.
5086
+ */
5087
+ const CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS = 5 * 6e4;
5088
+ /**
4967
5089
  * Typed user-tunable surface for one attached code environment. Omitted fields
4968
5090
  * remain fixed at LibreChat's safe baseline. Isolation, networking, mounts,
4969
5091
  * privileged execution, and secrets are deliberately not representable here.
@@ -4973,18 +5095,35 @@ const codeEnvironmentUserConfigSchema = zod.z.object({
4973
5095
  fileWrite: codeEnvironmentPermissionFieldSchema.optional(),
4974
5096
  commandExecution: codeEnvironmentPermissionFieldSchema.optional()
4975
5097
  }).strict().optional(),
4976
- limits: zod.z.object({
4977
- /** Maximum timeout a Bash invocation may request. Omission preserves
4978
- * the historical 30-second command budget. */
4979
- maxCommandTimeoutMs: zod.z.number().int().min(1).max(CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS).optional() }).strict().optional()
5098
+ limits: zod.z.object({
5099
+ /** Maximum timeout a Bash invocation may request. Omission preserves
5100
+ * the historical 30-second command budget. */
5101
+ maxCommandTimeoutMs: zod.z.number().int().min(1).max(CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS).optional(),
5102
+ /** Client retry horizon for capacity expirations, shared by preview/edit.
5103
+ * Omission keeps five minutes; `0` makes each required operation try once.
5104
+ * An in-flight request retains Code API's admission/execution budgets and
5105
+ * can finish after this horizon. This is not a server admission timeout. */
5106
+ maxQueueWaitMs: zod.z.number().int().min(0).max(CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS).optional()
5107
+ }).strict().optional()
4980
5108
  }).strict();
4981
5109
  const codeEnvironmentUserSettingsSchema = zod.z.object({ permissions: zod.z.object({
4982
5110
  fileWrite: codeEnvironmentPermissionDecisionSchema.optional(),
4983
5111
  commandExecution: codeEnvironmentPermissionDecisionSchema.optional()
4984
5112
  }).strict().optional() }).strict();
5113
+ const DEFAULT_MAX_PROVIDER_ERROR_CHARS = 2e3;
5114
+ const DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS = 9e5;
5115
+ const DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS = 3e5;
4985
5116
  const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zod.z.object({
5117
+ /** Maximum provider error characters retained in unprotected terminal failures. */
5118
+ maxProviderErrorChars: zod.z.number().int().min(0).max(1e6).default(DEFAULT_MAX_PROVIDER_ERROR_CHARS),
5119
+ /** Maximum inactivity between provider response body chunks; 0 disables the idle timeout. */
5120
+ modelResponseBodyTimeoutMs: zod.z.number().int().min(0).max(864e5).default(DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS),
5121
+ /** Maximum wait for provider response headers; 0 disables the header timeout. */
5122
+ modelResponseHeadersTimeoutMs: zod.z.number().int().min(0).max(864e5).default(DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS),
4986
5123
  recursionLimit: zod.z.number().optional(),
4987
5124
  disableBuilder: zod.z.boolean().optional().default(false),
5125
+ /** Optional workspace guidance acquisition budget, separate from command execution. */
5126
+ repositoryInstructions: zod.z.object({ timeoutMs: zod.z.number().int().min(100).max(3e4).optional().default(2e3) }).optional(),
4988
5127
  maxRecursionLimit: zod.z.number().optional(),
4989
5128
  /** Max cumulative bytes a single streamed tool call's arguments may reach before the run
4990
5129
  * aborts. Defaults to 64 KiB in the agents SDK; `0` disables the guard. */
@@ -4995,6 +5134,13 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zo
4995
5134
  * disables the guard for that tool only. Merged over LibreChat's shipped default of
4996
5135
  * `{ create_file: 131072 }`. */
4997
5136
  maxToolCallArgBytesByTool: zod.z.record(zod.z.number()).optional(),
5137
+ /** Characters of retained tool output the save path may tokenize exactly for the
5138
+ * context gauge when a turn stops at the tool-call limit (see
5139
+ * `retainedToolTokens`). Tokenizing costs ~60 ms/MB and runs once per stopped
5140
+ * turn; past this ceiling the figure is withdrawn rather than estimated, so the
5141
+ * gauge under-reports that turn instead of blocking the save. Raise it for
5142
+ * deployments whose tools legitimately return more, lower it on slow hardware. */
5143
+ maxRetainedToolCountChars: zod.z.number().int().min(0).optional().default(DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS),
4998
5144
  maxCitations: zod.z.number().min(1).max(50).optional().default(30),
4999
5145
  maxCitationsPerFile: zod.z.number().min(1).max(10).optional().default(7),
5000
5146
  minRelevanceScore: zod.z.number().min(0).max(1).optional().default(.45),
@@ -5028,6 +5174,9 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zo
5028
5174
  /** Defaults to five. Zero disables enrollment; existing machines remain usable. */
5029
5175
  maxPerUser: zod.z.number().int().min(0).max(Number.MAX_SAFE_INTEGER).optional()
5030
5176
  }).optional(),
5177
+ /** Server-only policy letting a conversation's owner move its sealed attached decision
5178
+ * onto the environments its agents now use. Omit to keep sealed decisions immovable. */
5179
+ conversationMoves: zod.z.object({ enabled: zod.z.boolean().optional() }).optional(),
5031
5180
  /** Operator-managed execution environments. Attached entries route to a
5032
5181
  * Code API deployment backed by an outbound librechat-code worker. */
5033
5182
  environments: zod.z.array(zod.z.object({
@@ -5136,6 +5285,12 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zo
5136
5285
  * enabled unless an administrator explicitly restores poll-only behavior. */
5137
5286
  backgroundTasks: zod.z.object({
5138
5287
  completionWakeups: zod.z.boolean().optional().default(true),
5288
+ /** Maximum terminal output copied into the private completion receipt.
5289
+ * Generated files remain governed by their separate attachment policy. */
5290
+ completionResultMaxChars: zod.z.number().int().min(1).max(AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX).optional().default(AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT),
5291
+ /** Maximum message-backed sibling results in one continuation.
5292
+ * Independent receipts retain task-local delivery ownership. */
5293
+ completionResultBatchSize: zod.z.number().int().min(1).max(16).optional().default(8),
5139
5294
  /** Cooperative cancellation for process-local ordinary tools. Off
5140
5295
  * by default so existing deployments opt into the new control. */
5141
5296
  ordinaryToolCancellation: zod.z.boolean().optional().default(false)
@@ -5145,6 +5300,8 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zo
5145
5300
  remoteApi: remoteApiSchema.optional(),
5146
5301
  /** Human-in-the-loop tool approval policy. Off by default. */
5147
5302
  toolApproval: toolApprovalPolicySchema,
5303
+ /** Ask User question behavior; see {@link askUserQuestionConfigSchema}. */
5304
+ askUserQuestion: askUserQuestionConfigSchema,
5148
5305
  /** Durable checkpointer backing tool-approval and Ask User resume.
5149
5306
  * Defaults to the app's MongoDB when either flow needs it. */
5150
5307
  checkpointer: checkpointerSchema
@@ -5521,6 +5678,7 @@ const mcpServersSchema = zod.z.object({
5521
5678
  const traceViewerDefaults = {
5522
5679
  enabled: false,
5523
5680
  showInputOutput: false,
5681
+ showToolNames: false,
5524
5682
  maxRecords: 1e3,
5525
5683
  maxContentLength: 5e4,
5526
5684
  requestsPerMinute: 30,
@@ -5551,6 +5709,12 @@ const traceViewerSchema = zod.z.object({
5551
5709
  enabled: zod.z.boolean().optional(),
5552
5710
  /** Returns observation input, output and metadata in the record inspector. */
5553
5711
  showInputOutput: zod.z.boolean().optional(),
5712
+ /**
5713
+ * Names the tools of each tool round from the tracing backend's own record of the round, at the
5714
+ * cost of further backend reads per listed page, which carry each round's input and output.
5715
+ * Off, a round is named only when the chat's messages can be matched to the trace.
5716
+ */
5717
+ showToolNames: zod.z.boolean().optional(),
5554
5718
  /** Observations read from the tracing backend per request. */
5555
5719
  maxRecords: boundedIntegerSchema("maxRecords"),
5556
5720
  /** Characters kept from each input, output and metadata value before truncation. */
@@ -5573,6 +5737,7 @@ function resolveTraceViewerConfig(config) {
5573
5737
  return {
5574
5738
  enabled: config?.enabled === true,
5575
5739
  showInputOutput: config?.showInputOutput === true,
5740
+ showToolNames: config?.showToolNames === true,
5576
5741
  maxRecords: boundedInteger(config?.maxRecords, "maxRecords"),
5577
5742
  maxContentLength: boundedInteger(config?.maxContentLength, "maxContentLength"),
5578
5743
  requestsPerMinute: boundedInteger(config?.requestsPerMinute, "requestsPerMinute"),
@@ -5593,6 +5758,8 @@ const interfaceSchema = zod.z.object({
5593
5758
  customWelcome: zod.z.string().optional(),
5594
5759
  mcpServers: mcpServersSchema.optional(),
5595
5760
  modelSelect: zod.z.boolean().optional(),
5761
+ /** Milliseconds between syntax highlights while a code block streams. */
5762
+ codeHighlightThrottleMs: zod.z.number().int().min(0).max(6e4).default(300),
5596
5763
  parameters: zod.z.boolean().optional(),
5597
5764
  multiConvo: zod.z.boolean().optional(),
5598
5765
  bookmarks: zod.z.boolean().optional(),
@@ -5678,6 +5845,7 @@ const interfaceSchema = zod.z.object({
5678
5845
  })]).optional()
5679
5846
  }).default({
5680
5847
  modelSelect: true,
5848
+ codeHighlightThrottleMs: 300,
5681
5849
  parameters: true,
5682
5850
  presets: true,
5683
5851
  multiConvo: true,
@@ -5934,7 +6102,8 @@ const balanceSchema = zod.z.object({
5934
6102
  autoRefillEnabled: zod.z.boolean().optional().default(false),
5935
6103
  refillIntervalValue: zod.z.number().optional().default(30),
5936
6104
  refillIntervalUnit: zod.z.enum(REFILL_INTERVAL_UNITS).optional().default("days"),
5937
- refillAmount: zod.z.number().optional().default(1e4)
6105
+ refillAmount: zod.z.number().optional().default(1e4),
6106
+ reservationTtlMs: zod.z.number().int().min(MIN_BALANCE_RESERVATION_TTL_MS).optional().default(DEFAULT_BALANCE_RESERVATION_TTL_MS)
5938
6107
  });
5939
6108
  const transactionsSchema = zod.z.object({ enabled: zod.z.boolean().optional().default(true) });
5940
6109
  const DEFAULT_MEMORY_MAX_INPUT_TOKENS = 12e3;
@@ -6144,8 +6313,17 @@ const langfuseConfigSchema = zod.z.object({
6144
6313
  /** Trace user identity and allowlisted user/request metadata. */
6145
6314
  trace: langfuseTraceConfigSchema.optional()
6146
6315
  });
6316
+ const openIdDiscoverySchema = zod.z.object({
6317
+ /** Discovery attempts made before startup continues; `0` retries only in the background. */
6318
+ startupAttempts: zod.z.number().int().min(0).max(100).default(1),
6319
+ /** Milliseconds between startup and background discovery attempts. */
6320
+ retryDelayMs: zod.z.number().int().min(100).max(36e5).default(5e3)
6321
+ });
6322
+ /** Maximum CAS attempts per ACL document, including the initial attempt. */
6323
+ const permissionWriteAttemptsSchema = zod.z.number().int().min(1).max(100).default(3);
6147
6324
  const configSchema = zod.z.object({
6148
6325
  version: zod.z.string(),
6326
+ permissions: zod.z.object({ maxWriteAttempts: permissionWriteAttemptsSchema }).optional(),
6149
6327
  cache: zod.z.boolean().default(true),
6150
6328
  ocr: ocrSchema.optional(),
6151
6329
  webSearch: webSearchSchema.optional(),
@@ -6201,7 +6379,11 @@ const configSchema = zod.z.object({
6201
6379
  }).optional(),
6202
6380
  registration: zod.z.object({
6203
6381
  socialLogins: zod.z.array(zod.z.string()).optional(),
6204
- allowedDomains: zod.z.array(zod.z.string()).optional()
6382
+ allowedDomains: zod.z.array(zod.z.string()).optional(),
6383
+ /** Milliseconds a started social login may take to reach its callback; defaults to `DEFAULT_OAUTH_STATE_TTL_MS`. */
6384
+ oauthStateTtlMs: zod.z.number().int().min(6e4).max(36e5).optional(),
6385
+ /** OpenID discovery retries; an unset field falls back to its `OPENID_DISCOVERY_RETRY_*` env var, then the schema default. */
6386
+ openidDiscovery: openIdDiscoverySchema.partial().optional()
6205
6387
  }).default({ socialLogins: defaultSocialLogins }),
6206
6388
  balance: balanceSchema.optional(),
6207
6389
  transactions: transactionsSchema.optional(),
@@ -6234,7 +6416,9 @@ const configSchema = zod.z.object({
6234
6416
  ["agents"]: agentsEndpointSchema.optional(),
6235
6417
  ["custom"]: customEndpointsSchema.optional(),
6236
6418
  ["bedrock"]: bedrockEndpointSchema.optional()
6237
- }).strict().refine((data) => Object.keys(data).length > 0, { message: "At least one `endpoints` field must be provided." }).optional()
6419
+ }).strict().refine((data) => Object.keys(data).length > 0, { message: "At least one `endpoints` field must be provided." }).optional(),
6420
+ /** Serve the OpenAPI spec and docs for the public Agents API. Off by default. */
6421
+ openapi: zod.z.object({ enabled: zod.z.boolean().optional() }).optional()
6238
6422
  });
6239
6423
  const getConfigDefaults = () => getSchemaDefaults(configSchema);
6240
6424
  let KnownEndpoints = /* @__PURE__ */ function(KnownEndpoints) {
@@ -6302,6 +6486,9 @@ const alternateName = {
6302
6486
  * catalogs consume.
6303
6487
  */
6304
6488
  const responsesOnlyOpenAIModels = ["gpt-6-astra"];
6489
+ /** Tool calls with Sol/Luna's default reasoning require Responses. Do not offer
6490
+ * these on Assistants, which cannot use the native request-routing path. */
6491
+ const responsesReasoningOpenAIModels = ["gpt-6-sol", "gpt-6-luna"];
6305
6492
  const sharedOpenAIModels = [
6306
6493
  "gpt-5.6",
6307
6494
  "gpt-5.6-terra",
@@ -6331,6 +6518,7 @@ const sharedOpenAIModels = [
6331
6518
  const sharedAnthropicModels = [
6332
6519
  "claude-fable-5-1",
6333
6520
  "claude-fable-5",
6521
+ "claude-opus-5-5",
6334
6522
  "claude-opus-5",
6335
6523
  "claude-opus-4-8",
6336
6524
  "claude-opus-4-7",
@@ -6366,6 +6554,7 @@ const sharedAnthropicModels = [
6366
6554
  const bedrockModels = [
6367
6555
  "global.anthropic.claude-fable-5-1",
6368
6556
  "global.anthropic.claude-fable-5",
6557
+ "global.anthropic.claude-opus-5-5",
6369
6558
  "global.anthropic.claude-opus-5",
6370
6559
  "global.anthropic.claude-opus-4-8",
6371
6560
  "global.anthropic.claude-opus-4-7",
@@ -6397,7 +6586,11 @@ const bedrockModels = [
6397
6586
  const defaultModels = {
6398
6587
  ["azureAssistants"]: sharedOpenAIModels,
6399
6588
  ["assistants"]: [...sharedOpenAIModels, "chatgpt-4o-latest"],
6400
- ["agents"]: [...responsesOnlyOpenAIModels, ...sharedOpenAIModels],
6589
+ ["agents"]: [
6590
+ ...responsesOnlyOpenAIModels,
6591
+ ...responsesReasoningOpenAIModels,
6592
+ ...sharedOpenAIModels
6593
+ ],
6401
6594
  ["google"]: [
6402
6595
  "gemini-3.8-flash",
6403
6596
  "gemini-3.7-flash",
@@ -6416,6 +6609,7 @@ const defaultModels = {
6416
6609
  ["anthropic"]: sharedAnthropicModels,
6417
6610
  ["openAI"]: [
6418
6611
  ...responsesOnlyOpenAIModels,
6612
+ ...responsesReasoningOpenAIModels,
6419
6613
  ...sharedOpenAIModels,
6420
6614
  "chatgpt-4o-latest",
6421
6615
  "gpt-4-vision-preview",
@@ -6429,12 +6623,11 @@ const fitlerAssistantModels = (str) => {
6429
6623
  };
6430
6624
  const openAIModels = defaultModels["openAI"];
6431
6625
  /**
6432
- * The OpenAI catalog without the models only the first-party OpenAI endpoint
6433
- * can run. Azure OpenAI shares this list, but Astra is neither routed to the
6434
- * Responses API nor given its request constraints there, and listing it first
6435
- * would let it become the default selection.
6626
+ * Preserve Azure's fallback default selection when the OpenAI catalog gains
6627
+ * Responses-preferred models. Configured Azure deployments supply their own
6628
+ * model list, including Astra when deployed.
6436
6629
  */
6437
- const nonResponsesOnlyOpenAIModels = openAIModels.filter((model) => !responsesOnlyOpenAIModels.includes(model));
6630
+ const nonResponsesOnlyOpenAIModels = openAIModels.filter((model) => !responsesOnlyOpenAIModels.includes(model) && !responsesReasoningOpenAIModels.includes(model));
6438
6631
  const initialModelsConfig = {
6439
6632
  initial: [],
6440
6633
  ["openAI"]: openAIModels,
@@ -6475,6 +6668,8 @@ const visionModels = [
6475
6668
  "grok-vision",
6476
6669
  "grok-2-vision",
6477
6670
  "grok-3",
6671
+ "grok-4.7",
6672
+ "grok-4-7",
6478
6673
  "gpt-4o-mini",
6479
6674
  "gpt-4o",
6480
6675
  "gpt-4-turbo",
@@ -6841,6 +7036,10 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
6841
7036
  */
6842
7037
  ErrorTypes["AUTH_BANNED"] = "auth_banned";
6843
7038
  /**
7039
+ * Authentication request was not sent from this application's origin
7040
+ */
7041
+ ErrorTypes["AUTH_CROSS_ORIGIN"] = "auth_cross_origin";
7042
+ /**
6844
7043
  * Model refused to respond (content policy violation)
6845
7044
  */
6846
7045
  ErrorTypes["REFUSAL"] = "refusal";
@@ -7007,7 +7206,7 @@ let TTSProviders = /* @__PURE__ */ function(TTSProviders) {
7007
7206
  /** Enum for app-wide constants */
7008
7207
  let Constants = /* @__PURE__ */ function(Constants) {
7009
7208
  /**
7010
- * Key for the app's version. The placeholder `v0.8.8-rc3` is
7209
+ * Key for the app's version. The placeholder `v0.8.8-rc4` is
7011
7210
  * swapped in by `@rollup/plugin-replace` during `npm run build:data-provider`
7012
7211
  * using the value of the root `package.json`'s `version` field. Consumers
7013
7212
  * always import this via the built dist bundle (see `main` field in
@@ -7015,9 +7214,9 @@ let Constants = /* @__PURE__ */ function(Constants) {
7015
7214
  * substituted value. Only tests that import the TypeScript source directly
7016
7215
  * would observe the raw placeholder.
7017
7216
  */
7018
- Constants["VERSION"] = "v0.8.8-rc3";
7217
+ Constants["VERSION"] = "v0.8.8-rc4";
7019
7218
  /** Key for the Custom Config's version (librechat.yaml). */
7020
- Constants["CONFIG_VERSION"] = "1.3.16";
7219
+ Constants["CONFIG_VERSION"] = "1.3.17";
7021
7220
  /** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
7022
7221
  Constants["NO_PARENT"] = "00000000-0000-0000-0000-000000000000";
7023
7222
  /** Standard value to use whatever the submission prelim. `responseMessageId` is */
@@ -7350,6 +7549,8 @@ let LocalStorageKeys = /* @__PURE__ */ function(LocalStorageKeys) {
7350
7549
  LocalStorageKeys["PIN_WEB_SEARCH_"] = "PIN_WEB_SEARCH_";
7351
7550
  /** Pin state for Code Interpreter per conversation ID */
7352
7551
  LocalStorageKeys["PIN_CODE_INTERPRETER_"] = "PIN_CODE_INTERPRETER_";
7552
+ /** Key for the last selected code approval mode */
7553
+ LocalStorageKeys["LAST_CODE_APPROVAL_MODE"] = "lastCodeApprovalMode";
7353
7554
  return LocalStorageKeys;
7354
7555
  }({});
7355
7556
  let ForkOptions = /* @__PURE__ */ function(ForkOptions) {
@@ -7442,6 +7643,57 @@ function getDefaultParamsEndpoint(endpointsConfig, endpoint) {
7442
7643
  return endpointsConfig[endpoint]?.customParams?.defaultParamsEndpoint;
7443
7644
  }
7444
7645
  //#endregion
7646
+ //#region src/types/assistants.ts
7647
+ let RunStatus = /* @__PURE__ */ function(RunStatus) {
7648
+ RunStatus["QUEUED"] = "queued";
7649
+ RunStatus["IN_PROGRESS"] = "in_progress";
7650
+ RunStatus["REQUIRES_ACTION"] = "requires_action";
7651
+ RunStatus["CANCELLING"] = "cancelling";
7652
+ RunStatus["CANCELLED"] = "cancelled";
7653
+ RunStatus["FAILED"] = "failed";
7654
+ RunStatus["COMPLETED"] = "completed";
7655
+ RunStatus["EXPIRED"] = "expired";
7656
+ return RunStatus;
7657
+ }({});
7658
+ let FilePurpose = /* @__PURE__ */ function(FilePurpose) {
7659
+ FilePurpose["Vision"] = "vision";
7660
+ FilePurpose["FineTune"] = "fine-tune";
7661
+ FilePurpose["FineTuneResults"] = "fine-tune-results";
7662
+ FilePurpose["Assistants"] = "assistants";
7663
+ FilePurpose["AssistantsOutput"] = "assistants_output";
7664
+ return FilePurpose;
7665
+ }({});
7666
+ const defaultOrderQuery = {
7667
+ order: "desc",
7668
+ limit: 100
7669
+ };
7670
+ let AssistantStreamEvents = /* @__PURE__ */ function(AssistantStreamEvents) {
7671
+ AssistantStreamEvents["ThreadCreated"] = "thread.created";
7672
+ AssistantStreamEvents["ThreadRunCreated"] = "thread.run.created";
7673
+ AssistantStreamEvents["ThreadRunQueued"] = "thread.run.queued";
7674
+ AssistantStreamEvents["ThreadRunInProgress"] = "thread.run.in_progress";
7675
+ AssistantStreamEvents["ThreadRunRequiresAction"] = "thread.run.requires_action";
7676
+ AssistantStreamEvents["ThreadRunCompleted"] = "thread.run.completed";
7677
+ AssistantStreamEvents["ThreadRunFailed"] = "thread.run.failed";
7678
+ AssistantStreamEvents["ThreadRunCancelling"] = "thread.run.cancelling";
7679
+ AssistantStreamEvents["ThreadRunCancelled"] = "thread.run.cancelled";
7680
+ AssistantStreamEvents["ThreadRunExpired"] = "thread.run.expired";
7681
+ AssistantStreamEvents["ThreadRunStepCreated"] = "thread.run.step.created";
7682
+ AssistantStreamEvents["ThreadRunStepInProgress"] = "thread.run.step.in_progress";
7683
+ AssistantStreamEvents["ThreadRunStepCompleted"] = "thread.run.step.completed";
7684
+ AssistantStreamEvents["ThreadRunStepFailed"] = "thread.run.step.failed";
7685
+ AssistantStreamEvents["ThreadRunStepCancelled"] = "thread.run.step.cancelled";
7686
+ AssistantStreamEvents["ThreadRunStepExpired"] = "thread.run.step.expired";
7687
+ AssistantStreamEvents["ThreadRunStepDelta"] = "thread.run.step.delta";
7688
+ AssistantStreamEvents["ThreadMessageCreated"] = "thread.message.created";
7689
+ AssistantStreamEvents["ThreadMessageInProgress"] = "thread.message.in_progress";
7690
+ AssistantStreamEvents["ThreadMessageCompleted"] = "thread.message.completed";
7691
+ AssistantStreamEvents["ThreadMessageIncomplete"] = "thread.message.incomplete";
7692
+ AssistantStreamEvents["ThreadMessageDelta"] = "thread.message.delta";
7693
+ AssistantStreamEvents["ErrorEvent"] = "error";
7694
+ return AssistantStreamEvents;
7695
+ }({});
7696
+ //#endregion
7445
7697
  //#region src/accessPermissions.ts
7446
7698
  /**
7447
7699
  * Granular Permission System Types for Agent Sharing
@@ -7816,6 +8068,7 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
7816
8068
  MutationKeys["pairCodeEnvironment"] = "pairCodeEnvironment";
7817
8069
  MutationKeys["updateCodeEnvironmentSettings"] = "updateCodeEnvironmentSettings";
7818
8070
  MutationKeys["deleteCodeEnvironment"] = "deleteCodeEnvironment";
8071
+ MutationKeys["moveConversationCodeEnvironment"] = "moveConversationCodeEnvironment";
7819
8072
  return MutationKeys;
7820
8073
  }({});
7821
8074
  //#endregion
@@ -8381,6 +8634,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
8381
8634
  logout: () => logout,
8382
8635
  makePromptProduction: () => makePromptProduction,
8383
8636
  markFilesUsage: () => markFilesUsage,
8637
+ moveConversationCodeEnvironment: () => moveConversationCodeEnvironment,
8384
8638
  pairCodeEnvironment: () => pairCodeEnvironment,
8385
8639
  pinConversation: () => pinConversation,
8386
8640
  rebuildConversationTags: () => rebuildConversationTags,
@@ -8499,6 +8753,12 @@ function getCodeEnvironments() {
8499
8753
  function getCodeEnvironmentStatus(id) {
8500
8754
  return request_default.get(codeEnvironmentStatus(id));
8501
8755
  }
8756
+ function moveConversationCodeEnvironment({ conversationId, from, to }) {
8757
+ return request_default.patch(codeEnvironmentConversationDecision(conversationId), {
8758
+ from,
8759
+ to
8760
+ });
8761
+ }
8502
8762
  function pairCodeEnvironment(payload) {
8503
8763
  return request_default.post(codeEnvironmentPairings(), payload);
8504
8764
  }
@@ -9375,6 +9635,18 @@ Object.defineProperty(exports, "ACTION_METADATA_FILTER_FIELDS", {
9375
9635
  return ACTION_METADATA_FILTER_FIELDS;
9376
9636
  }
9377
9637
  });
9638
+ Object.defineProperty(exports, "AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT", {
9639
+ enumerable: true,
9640
+ get: function() {
9641
+ return AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT;
9642
+ }
9643
+ });
9644
+ Object.defineProperty(exports, "AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX", {
9645
+ enumerable: true,
9646
+ get: function() {
9647
+ return AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX;
9648
+ }
9649
+ });
9378
9650
  Object.defineProperty(exports, "AGENT_INSTRUCTION_FILTER_FIELDS", {
9379
9651
  enumerable: true,
9380
9652
  get: function() {
@@ -9399,12 +9671,6 @@ Object.defineProperty(exports, "AgentCapabilities", {
9399
9671
  return AgentCapabilities;
9400
9672
  }
9401
9673
  });
9402
- Object.defineProperty(exports, "AnnotationTypes", {
9403
- enumerable: true,
9404
- get: function() {
9405
- return AnnotationTypes;
9406
- }
9407
- });
9408
9674
  Object.defineProperty(exports, "AnthropicEffort", {
9409
9675
  enumerable: true,
9410
9676
  get: function() {
@@ -9495,12 +9761,30 @@ Object.defineProperty(exports, "CODE_ENVIRONMENT_MODES", {
9495
9761
  return CODE_ENVIRONMENT_MODES;
9496
9762
  }
9497
9763
  });
9764
+ Object.defineProperty(exports, "CODE_ENVIRONMENT_MOVE_VERSION", {
9765
+ enumerable: true,
9766
+ get: function() {
9767
+ return CODE_ENVIRONMENT_MOVE_VERSION;
9768
+ }
9769
+ });
9770
+ Object.defineProperty(exports, "CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS", {
9771
+ enumerable: true,
9772
+ get: function() {
9773
+ return CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS;
9774
+ }
9775
+ });
9498
9776
  Object.defineProperty(exports, "CODE_WORKSPACE_ID_PATTERN", {
9499
9777
  enumerable: true,
9500
9778
  get: function() {
9501
9779
  return CODE_WORKSPACE_ID_PATTERN;
9502
9780
  }
9503
9781
  });
9782
+ Object.defineProperty(exports, "CODE_WORKSPACE_INSTANCE_TYPES", {
9783
+ enumerable: true,
9784
+ get: function() {
9785
+ return CODE_WORKSPACE_INSTANCE_TYPES;
9786
+ }
9787
+ });
9504
9788
  Object.defineProperty(exports, "CODE_WORKSPACE_MAX_COUNT", {
9505
9789
  enumerable: true,
9506
9790
  get: function() {
@@ -9567,12 +9851,60 @@ Object.defineProperty(exports, "Constants", {
9567
9851
  return Constants;
9568
9852
  }
9569
9853
  });
9854
+ Object.defineProperty(exports, "DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS", {
9855
+ enumerable: true,
9856
+ get: function() {
9857
+ return DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS;
9858
+ }
9859
+ });
9860
+ Object.defineProperty(exports, "DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS", {
9861
+ enumerable: true,
9862
+ get: function() {
9863
+ return DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS;
9864
+ }
9865
+ });
9866
+ Object.defineProperty(exports, "DEFAULT_BALANCE_RESERVATION_TTL_MS", {
9867
+ enumerable: true,
9868
+ get: function() {
9869
+ return DEFAULT_BALANCE_RESERVATION_TTL_MS;
9870
+ }
9871
+ });
9872
+ Object.defineProperty(exports, "DEFAULT_MAX_PROVIDER_ERROR_CHARS", {
9873
+ enumerable: true,
9874
+ get: function() {
9875
+ return DEFAULT_MAX_PROVIDER_ERROR_CHARS;
9876
+ }
9877
+ });
9878
+ Object.defineProperty(exports, "DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS", {
9879
+ enumerable: true,
9880
+ get: function() {
9881
+ return DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS;
9882
+ }
9883
+ });
9570
9884
  Object.defineProperty(exports, "DEFAULT_MEMORY_MAX_INPUT_TOKENS", {
9571
9885
  enumerable: true,
9572
9886
  get: function() {
9573
9887
  return DEFAULT_MEMORY_MAX_INPUT_TOKENS;
9574
9888
  }
9575
9889
  });
9890
+ Object.defineProperty(exports, "DEFAULT_OAUTH_STATE_TTL_MS", {
9891
+ enumerable: true,
9892
+ get: function() {
9893
+ return DEFAULT_OAUTH_STATE_TTL_MS;
9894
+ }
9895
+ });
9896
+ Object.defineProperty(exports, "DEFAULT_RETAINED_ANSWER_TOKENS", {
9897
+ enumerable: true,
9898
+ get: function() {
9899
+ return DEFAULT_RETAINED_ANSWER_TOKENS;
9900
+ }
9901
+ });
9902
+ Object.defineProperty(exports, "DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY", {
9903
+ enumerable: true,
9904
+ get: function() {
9905
+ return DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY;
9906
+ }
9907
+ });
9576
9908
  Object.defineProperty(exports, "DefaultLLMDeliveryPath", {
9577
9909
  enumerable: true,
9578
9910
  get: function() {
@@ -9765,6 +10097,12 @@ Object.defineProperty(exports, "MAX_MCP_ICON_PATH_LENGTH", {
9765
10097
  return MAX_MCP_ICON_PATH_LENGTH;
9766
10098
  }
9767
10099
  });
10100
+ Object.defineProperty(exports, "MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS", {
10101
+ enumerable: true,
10102
+ get: function() {
10103
+ return MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS;
10104
+ }
10105
+ });
9768
10106
  Object.defineProperty(exports, "MAX_PII_CUSTOM_PATTERNS_TOTAL", {
9769
10107
  enumerable: true,
9770
10108
  get: function() {
@@ -9885,6 +10223,12 @@ Object.defineProperty(exports, "MESSAGE_FILTER_FIELDS", {
9885
10223
  return MESSAGE_FILTER_FIELDS;
9886
10224
  }
9887
10225
  });
10226
+ Object.defineProperty(exports, "MIN_BALANCE_RESERVATION_TTL_MS", {
10227
+ enumerable: true,
10228
+ get: function() {
10229
+ return MIN_BALANCE_RESERVATION_TTL_MS;
10230
+ }
10231
+ });
9888
10232
  Object.defineProperty(exports, "MODEL_PARAMETER_FILTER_FIELDS", {
9889
10233
  enumerable: true,
9890
10234
  get: function() {
@@ -9903,12 +10247,6 @@ Object.defineProperty(exports, "MemoryScope", {
9903
10247
  return MemoryScope;
9904
10248
  }
9905
10249
  });
9906
- Object.defineProperty(exports, "MessageContentTypes", {
9907
- enumerable: true,
9908
- get: function() {
9909
- return MessageContentTypes;
9910
- }
9911
- });
9912
10250
  Object.defineProperty(exports, "MutationKeys", {
9913
10251
  enumerable: true,
9914
10252
  get: function() {
@@ -10143,12 +10481,6 @@ Object.defineProperty(exports, "StdioOptionsSchema", {
10143
10481
  return StdioOptionsSchema;
10144
10482
  }
10145
10483
  });
10146
- Object.defineProperty(exports, "StepStatus", {
10147
- enumerable: true,
10148
- get: function() {
10149
- return StepStatus;
10150
- }
10151
- });
10152
10484
  Object.defineProperty(exports, "StreamableHTTPOptionsSchema", {
10153
10485
  enumerable: true,
10154
10486
  get: function() {
@@ -10347,6 +10679,18 @@ Object.defineProperty(exports, "applicationMimeTypes", {
10347
10679
  return applicationMimeTypes;
10348
10680
  }
10349
10681
  });
10682
+ Object.defineProperty(exports, "askUserQuestionConfigSchema", {
10683
+ enumerable: true,
10684
+ get: function() {
10685
+ return askUserQuestionConfigSchema;
10686
+ }
10687
+ });
10688
+ Object.defineProperty(exports, "askUserQuestionRetainedAnswersSchema", {
10689
+ enumerable: true,
10690
+ get: function() {
10691
+ return askUserQuestionRetainedAnswersSchema;
10692
+ }
10693
+ });
10350
10694
  Object.defineProperty(exports, "assistantEndpointSchema", {
10351
10695
  enumerable: true,
10352
10696
  get: function() {
@@ -11211,18 +11555,6 @@ Object.defineProperty(exports, "hasProcessMCPServerConfig", {
11211
11555
  return hasProcessMCPServerConfig;
11212
11556
  }
11213
11557
  });
11214
- Object.defineProperty(exports, "hostImageIdSuffix", {
11215
- enumerable: true,
11216
- get: function() {
11217
- return hostImageIdSuffix;
11218
- }
11219
- });
11220
- Object.defineProperty(exports, "hostImageNamePrefix", {
11221
- enumerable: true,
11222
- get: function() {
11223
- return hostImageNamePrefix;
11224
- }
11225
- });
11226
11558
  Object.defineProperty(exports, "imageDetailNumeric", {
11227
11559
  enumerable: true,
11228
11560
  get: function() {
@@ -11325,6 +11657,12 @@ Object.defineProperty(exports, "isCodeEnvironmentMode", {
11325
11657
  return isCodeEnvironmentMode;
11326
11658
  }
11327
11659
  });
11660
+ Object.defineProperty(exports, "isCodeWorkspaceEnvironment", {
11661
+ enumerable: true,
11662
+ get: function() {
11663
+ return isCodeWorkspaceEnvironment;
11664
+ }
11665
+ });
11328
11666
  Object.defineProperty(exports, "isCodeWorkspaceSelection", {
11329
11667
  enumerable: true,
11330
11668
  get: function() {
@@ -11349,6 +11687,12 @@ Object.defineProperty(exports, "isDocumentSupportedProvider", {
11349
11687
  return isDocumentSupportedProvider;
11350
11688
  }
11351
11689
  });
11690
+ Object.defineProperty(exports, "isExplicitMimeConfig", {
11691
+ enumerable: true,
11692
+ get: function() {
11693
+ return isExplicitMimeConfig;
11694
+ }
11695
+ });
11352
11696
  Object.defineProperty(exports, "isImageVisionTool", {
11353
11697
  enumerable: true,
11354
11698
  get: function() {
@@ -11415,6 +11759,12 @@ Object.defineProperty(exports, "isRemoteOidcUrlAllowed", {
11415
11759
  return isRemoteOidcUrlAllowed;
11416
11760
  }
11417
11761
  });
11762
+ Object.defineProperty(exports, "isRepositoryInstructionDescriptor", {
11763
+ enumerable: true,
11764
+ get: function() {
11765
+ return isRepositoryInstructionDescriptor;
11766
+ }
11767
+ });
11418
11768
  Object.defineProperty(exports, "isResponsesApiUpload", {
11419
11769
  enumerable: true,
11420
11770
  get: function() {
@@ -11613,6 +11963,12 @@ Object.defineProperty(exports, "openAISettings", {
11613
11963
  return openAISettings;
11614
11964
  }
11615
11965
  });
11966
+ Object.defineProperty(exports, "openIdDiscoverySchema", {
11967
+ enumerable: true,
11968
+ get: function() {
11969
+ return openIdDiscoverySchema;
11970
+ }
11971
+ });
11616
11972
  Object.defineProperty(exports, "openRouterSchema", {
11617
11973
  enumerable: true,
11618
11974
  get: function() {
@@ -11643,6 +11999,18 @@ Object.defineProperty(exports, "permissionEntrySchema", {
11643
11999
  return permissionEntrySchema;
11644
12000
  }
11645
12001
  });
12002
+ Object.defineProperty(exports, "permissionWriteAttemptsSchema", {
12003
+ enumerable: true,
12004
+ get: function() {
12005
+ return permissionWriteAttemptsSchema;
12006
+ }
12007
+ });
12008
+ Object.defineProperty(exports, "prefersResponsesApiByModel", {
12009
+ enumerable: true,
12010
+ get: function() {
12011
+ return prefersResponsesApiByModel;
12012
+ }
12013
+ });
11646
12014
  Object.defineProperty(exports, "principalSchema", {
11647
12015
  enumerable: true,
11648
12016
  get: function() {
@@ -11733,6 +12101,12 @@ Object.defineProperty(exports, "resolveCodePermissionDecision", {
11733
12101
  return resolveCodePermissionDecision;
11734
12102
  }
11735
12103
  });
12104
+ Object.defineProperty(exports, "resolveEffectiveUseResponsesApi", {
12105
+ enumerable: true,
12106
+ get: function() {
12107
+ return resolveEffectiveUseResponsesApi;
12108
+ }
12109
+ });
11736
12110
  Object.defineProperty(exports, "resolveEndpointType", {
11737
12111
  enumerable: true,
11738
12112
  get: function() {
@@ -12196,4 +12570,4 @@ Object.defineProperty(exports, "webSearchSchema", {
12196
12570
  }
12197
12571
  });
12198
12572
 
12199
- //# sourceMappingURL=data-service-CTX0tVO5.js.map
12573
+ //# sourceMappingURL=data-service-CUG1qdeC.js.map