librechat-data-provider 0.8.521 → 0.8.523

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/{data-service-pwrlWjJs.mjs → data-service-Bx6IFaSa.mjs} +1770 -51
  2. package/dist/data-service-Bx6IFaSa.mjs.map +1 -0
  3. package/dist/{data-service-DOIF4BkW.js → data-service-CTX0tVO5.js} +2509 -112
  4. package/dist/data-service-CTX0tVO5.js.map +1 -0
  5. package/dist/index.js +1503 -54
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +1314 -55
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react-query/index.js +2 -1
  10. package/dist/react-query/index.js.map +1 -1
  11. package/dist/react-query/index.mjs +2 -1
  12. package/dist/react-query/index.mjs.map +1 -1
  13. package/dist/types/accessPermissions.d.ts +58 -1
  14. package/dist/types/actions.d.ts +2 -2
  15. package/dist/types/agentToolOptions.d.ts +11 -0
  16. package/dist/types/api-endpoints.d.ts +24 -0
  17. package/dist/types/bedrock.d.ts +238 -10
  18. package/dist/types/cadence.d.ts +33 -0
  19. package/dist/types/code/approval.d.ts +26 -0
  20. package/dist/types/code/worker.d.ts +10 -0
  21. package/dist/types/code/workspace.d.ts +28 -0
  22. package/dist/types/codeEnvRef.d.ts +26 -0
  23. package/dist/types/config.d.ts +13180 -3021
  24. package/dist/types/data-service.d.ts +48 -2
  25. package/dist/types/errors.d.ts +2 -0
  26. package/dist/types/file-config.d.ts +138 -9
  27. package/dist/types/filters.d.ts +1422 -0
  28. package/dist/types/generate.d.ts +103 -1
  29. package/dist/types/index.d.ts +17 -0
  30. package/dist/types/keys.d.ts +33 -2
  31. package/dist/types/langchain.d.ts +4 -0
  32. package/dist/types/limits.d.ts +13 -0
  33. package/dist/types/mcp.d.ts +555 -460
  34. package/dist/types/messages.d.ts +24 -0
  35. package/dist/types/models.d.ts +1112 -319
  36. package/dist/types/parameterSettings.d.ts +13 -1
  37. package/dist/types/parsers.d.ts +10 -0
  38. package/dist/types/permissions.d.ts +42 -1
  39. package/dist/types/providers.d.ts +37 -0
  40. package/dist/types/request.d.ts +2 -2
  41. package/dist/types/resolve-llm-delivery-path.d.ts +68 -0
  42. package/dist/types/roles.d.ts +34 -0
  43. package/dist/types/runSteps.d.ts +59 -0
  44. package/dist/types/schemas.d.ts +1724 -248
  45. package/dist/types/stateful-code.d.ts +7 -0
  46. package/dist/types/svg.d.ts +34 -0
  47. package/dist/types/types/agents.d.ts +116 -7
  48. package/dist/types/types/assistants.d.ts +121 -6
  49. package/dist/types/types/files.d.ts +46 -2
  50. package/dist/types/types/index.d.ts +2 -0
  51. package/dist/types/types/insights.d.ts +71 -0
  52. package/dist/types/types/mutations.d.ts +1 -0
  53. package/dist/types/types/queries.d.ts +37 -2
  54. package/dist/types/types/queuedTurns.d.ts +870 -0
  55. package/dist/types/types/runs.d.ts +119 -9
  56. package/dist/types/types/schedules.d.ts +339 -0
  57. package/dist/types/types/skills.d.ts +9 -0
  58. package/dist/types/types/subagents.d.ts +159 -0
  59. package/dist/types/types/traces.d.ts +85 -0
  60. package/dist/types/types/web.d.ts +12 -2
  61. package/dist/types/types.d.ts +101 -1
  62. package/package.json +5 -3
  63. package/dist/data-service-DOIF4BkW.js.map +0 -1
  64. package/dist/data-service-pwrlWjJs.mjs.map +0 -1
@@ -1,4 +1,5 @@
1
1
  import { ZodArray, ZodError, ZodIssueCode, z } from "zod";
2
+ import { RE2JS } from "re2js";
2
3
  import axios from "axios";
3
4
  //#region \0rolldown/runtime.js
4
5
  var __defProp = Object.defineProperty;
@@ -77,6 +78,304 @@ function normalizeEndpointName(name = "") {
77
78
  return name.toLowerCase() === "ollama" ? "ollama" : name;
78
79
  }
79
80
  //#endregion
81
+ //#region src/filters.ts
82
+ const FILTER_PII_STARTER_PATTERNS = [
83
+ "sk_prefix",
84
+ "bearer_header",
85
+ "api_key_header"
86
+ ];
87
+ const MAX_PII_PATTERNS_PER_SOURCE = 256;
88
+ const MAX_PII_PATTERN_LENGTH = 512;
89
+ const MAX_PII_PATTERN_ID_LENGTH = 256;
90
+ const MAX_PII_PATTERN_LABEL_LENGTH = 512;
91
+ const MAX_PII_CUSTOM_REGEX_CHARACTERS = 8192;
92
+ const MAX_PII_CUSTOM_REGEX_INSTRUCTIONS = 8192;
93
+ const MAX_PII_CUSTOM_PATTERNS_TOTAL = 256;
94
+ const MAX_PII_REGEX_SIZE_CACHE_ENTRIES = 512;
95
+ const PII_REGEX_PROGRAM_SIZE_CACHE = /* @__PURE__ */ new Map();
96
+ function getPiiRegexProgramSize(pattern) {
97
+ if (PII_REGEX_PROGRAM_SIZE_CACHE.has(pattern)) return PII_REGEX_PROGRAM_SIZE_CACHE.get(pattern) ?? null;
98
+ let programSize = null;
99
+ let compiled;
100
+ try {
101
+ compiled = RE2JS.compile(pattern);
102
+ const candidate = compiled.programSize();
103
+ if (Number.isSafeInteger(candidate) && candidate > 0) programSize = candidate;
104
+ } catch {
105
+ programSize = null;
106
+ } finally {
107
+ compiled?.reset();
108
+ }
109
+ if (PII_REGEX_PROGRAM_SIZE_CACHE.size >= MAX_PII_REGEX_SIZE_CACHE_ENTRIES) PII_REGEX_PROGRAM_SIZE_CACHE.clear();
110
+ PII_REGEX_PROGRAM_SIZE_CACHE.set(pattern, programSize);
111
+ return programSize;
112
+ }
113
+ const MESSAGE_FILTER_FIELDS = [
114
+ "name",
115
+ "text",
116
+ "summary",
117
+ "quote",
118
+ "answer",
119
+ "decision_response",
120
+ "decision_reason",
121
+ "content_part",
122
+ "attachment_reference",
123
+ "assembled_context"
124
+ ];
125
+ const HITL_MESSAGE_FILTER_FIELDS = [
126
+ "answer",
127
+ "decision_response",
128
+ "decision_reason"
129
+ ];
130
+ const REQUEST_ONLY_MESSAGE_FILTER_FIELDS = new Set(HITL_MESSAGE_FILTER_FIELDS);
131
+ /** Message fields structurally recoverable without exact semantic provenance. */
132
+ const STORED_MESSAGE_FILTER_FIELDS = MESSAGE_FILTER_FIELDS.filter((field) => !REQUEST_ONLY_MESSAGE_FILTER_FIELDS.has(field));
133
+ const PROMPT_FILTER_FIELDS = [
134
+ "name",
135
+ "description",
136
+ "oneliner",
137
+ "category",
138
+ "command",
139
+ "text",
140
+ "preset_text",
141
+ "system",
142
+ "context",
143
+ "instructions",
144
+ "additional_instructions",
145
+ "greeting",
146
+ "example_input",
147
+ "example_output"
148
+ ];
149
+ const AGENT_INSTRUCTION_FILTER_FIELDS = [
150
+ "name",
151
+ "category",
152
+ "description",
153
+ "instructions",
154
+ "additional_instructions",
155
+ "edge_description",
156
+ "edge_prompt",
157
+ "edge_prompt_key",
158
+ "artifacts",
159
+ "support_contact_name",
160
+ "support_contact_email"
161
+ ];
162
+ const CONVERSATION_STARTER_FILTER_FIELDS = ["text"];
163
+ const CONVERSATION_TITLE_FILTER_FIELDS = ["title"];
164
+ const FEEDBACK_FILTER_FIELDS = ["text"];
165
+ const SKILL_FILTER_FIELDS = [
166
+ "name",
167
+ "display_title",
168
+ "description",
169
+ "category",
170
+ "frontmatter",
171
+ "instructions",
172
+ "imported_text",
173
+ "file_name",
174
+ "file_text"
175
+ ];
176
+ const MEMORY_FILTER_FIELDS = [
177
+ "key",
178
+ "value",
179
+ "summary"
180
+ ];
181
+ const FILE_FILTER_FIELDS = [
182
+ "name",
183
+ "content",
184
+ "extracted_text",
185
+ "transcript",
186
+ "uri"
187
+ ];
188
+ const TOOL_ARGUMENT_FILTER_FIELDS = [
189
+ "name",
190
+ "arguments",
191
+ "output"
192
+ ];
193
+ const MODEL_PARAMETER_FILTER_FIELDS = [
194
+ "stop",
195
+ "request_fields",
196
+ "response_format",
197
+ "metadata"
198
+ ];
199
+ const ACTION_METADATA_FILTER_FIELDS = [
200
+ "raw_spec",
201
+ "domain",
202
+ "privacy_policy_url",
203
+ "authorization_type",
204
+ "custom_auth_header",
205
+ "authorization_content_type",
206
+ "authorization_url",
207
+ "client_url",
208
+ "scope",
209
+ "token_exchange_method",
210
+ "api_key",
211
+ "oauth_client_id",
212
+ "oauth_client_secret"
213
+ ];
214
+ const messageFilterFieldSchema = z.enum(MESSAGE_FILTER_FIELDS);
215
+ const promptFilterFieldSchema = z.enum(PROMPT_FILTER_FIELDS);
216
+ const agentInstructionFilterFieldSchema = z.enum(AGENT_INSTRUCTION_FILTER_FIELDS);
217
+ const conversationStarterFilterFieldSchema = z.enum(CONVERSATION_STARTER_FILTER_FIELDS);
218
+ const conversationTitleFilterFieldSchema = z.enum(CONVERSATION_TITLE_FILTER_FIELDS);
219
+ const feedbackFilterFieldSchema = z.enum(FEEDBACK_FILTER_FIELDS);
220
+ const skillFilterFieldSchema = z.enum(SKILL_FILTER_FIELDS);
221
+ const memoryFilterFieldSchema = z.enum(MEMORY_FILTER_FIELDS);
222
+ const fileFilterFieldSchema = z.enum(FILE_FILTER_FIELDS);
223
+ const toolArgumentFilterFieldSchema = z.enum(TOOL_ARGUMENT_FILTER_FIELDS);
224
+ const modelParameterFilterFieldSchema = z.enum(MODEL_PARAMETER_FILTER_FIELDS);
225
+ const filterPiiStarterPatternSchema = z.enum(FILTER_PII_STARTER_PATTERNS);
226
+ const filterPiiActionSchema = z.enum(["block", "audit"]);
227
+ const actionMetadataFilterFieldSchema = z.enum(ACTION_METADATA_FILTER_FIELDS);
228
+ const unattributedAssistantContentSchema = z.enum(["model_output", "inspect"]);
229
+ const userSubmittedMessageFieldPathSchema = z.object({
230
+ path: z.string().startsWith("/").max(2048),
231
+ field: z.enum(HITL_MESSAGE_FILTER_FIELDS)
232
+ }).strict();
233
+ const UNINSPECTABLE_FILE_FIELDS = new Set([
234
+ "content",
235
+ "extracted_text",
236
+ "transcript"
237
+ ]);
238
+ /**
239
+ * An omitted starter selection enables the built-in catalog. An explicit
240
+ * empty selection disables it, so a source is active only when custom rules
241
+ * remain. This mirrors the documented filter semantics without compiling
242
+ * regular expressions.
243
+ */
244
+ function hasActivePiiPatterns(config) {
245
+ return config != null && (config.starterPatterns == null || config.starterPatterns.length > 0 || (config.customPatterns?.length ?? 0) > 0);
246
+ }
247
+ /** Returns whether an active PII rule can inspect at least one candidate field. */
248
+ function hasActivePiiFields(config, candidates) {
249
+ return hasActivePiiPatterns(config) && (config?.fields == null || candidates.some((field) => config.fields?.includes(field)));
250
+ }
251
+ /**
252
+ * Returns whether a parsed source-aware config can enforce any rule. An
253
+ * explicit fail-close file policy remains active even without text patterns.
254
+ */
255
+ function hasActiveFiltersConfig(filters) {
256
+ if (filters == null) return false;
257
+ if (filters.messages?.unattributedAssistantContent === "inspect") return true;
258
+ if ([
259
+ filters.messages?.pii,
260
+ filters.prompts?.pii,
261
+ filters.agentInstructions?.pii,
262
+ filters.conversationStarters?.pii,
263
+ filters.conversationTitles?.pii,
264
+ filters.feedback?.pii,
265
+ filters.skills?.pii,
266
+ filters.memories?.pii,
267
+ filters.files?.pii,
268
+ filters.toolArguments?.pii,
269
+ filters.modelParameters?.pii,
270
+ filters.actionMetadata?.pii
271
+ ].some(hasActivePiiPatterns)) return true;
272
+ const filePii = filters.files?.pii;
273
+ return filePii?.uninspectable === "block" && (filePii.fields == null || filePii.fields.some((field) => UNINSPECTABLE_FILE_FIELDS.has(field)));
274
+ }
275
+ const filterPiiRegexSchema = z.string().min(1).max(512).refine((value) => getPiiRegexProgramSize(value) != null, { message: "Regex must use supported linear-time syntax" });
276
+ const filterPiiCustomPatternSchema = z.object({
277
+ id: z.string().min(1).max(256),
278
+ label: z.string().min(1).max(512),
279
+ regex: filterPiiRegexSchema
280
+ }).strict();
281
+ function createPiiFilterSchema(fieldSchema) {
282
+ return z.object({
283
+ action: filterPiiActionSchema.optional(),
284
+ fields: z.array(fieldSchema).min(1).max(256).optional(),
285
+ starterPatterns: z.array(filterPiiStarterPatternSchema).max(256).optional(),
286
+ customPatterns: z.array(filterPiiCustomPatternSchema).max(256).optional()
287
+ }).strict();
288
+ }
289
+ function createSourceFilterSchema(fieldSchema) {
290
+ return z.object({ pii: createPiiFilterSchema(fieldSchema).optional() }).strict();
291
+ }
292
+ const messageSourceFilterSchema = z.object({
293
+ pii: createPiiFilterSchema(messageFilterFieldSchema).optional(),
294
+ unattributedAssistantContent: unattributedAssistantContentSchema.optional()
295
+ }).strict();
296
+ const fileSourceFilterSchema = z.object({ pii: createPiiFilterSchema(fileFilterFieldSchema).extend({ uninspectable: z.enum(["allow", "block"]).optional() }).optional() }).strict();
297
+ const filtersConfigSchema = z.object({
298
+ messages: messageSourceFilterSchema.optional(),
299
+ prompts: createSourceFilterSchema(promptFilterFieldSchema).optional(),
300
+ agentInstructions: createSourceFilterSchema(agentInstructionFilterFieldSchema).optional(),
301
+ conversationStarters: createSourceFilterSchema(conversationStarterFilterFieldSchema).optional(),
302
+ conversationTitles: createSourceFilterSchema(conversationTitleFilterFieldSchema).optional(),
303
+ feedback: createSourceFilterSchema(feedbackFilterFieldSchema).optional(),
304
+ skills: createSourceFilterSchema(skillFilterFieldSchema).optional(),
305
+ memories: createSourceFilterSchema(memoryFilterFieldSchema).optional(),
306
+ files: fileSourceFilterSchema.optional(),
307
+ toolArguments: createSourceFilterSchema(toolArgumentFilterFieldSchema).optional(),
308
+ modelParameters: createSourceFilterSchema(modelParameterFilterFieldSchema).optional(),
309
+ actionMetadata: createSourceFilterSchema(actionMetadataFilterFieldSchema).optional()
310
+ }).strict().superRefine((filters, context) => {
311
+ let customPatterns = 0;
312
+ let regexCharacters = 0;
313
+ let regexInstructions = 0;
314
+ for (const source of Object.values(filters)) for (const pattern of source?.pii?.customPatterns ?? []) {
315
+ customPatterns++;
316
+ regexCharacters += pattern.regex.length;
317
+ regexInstructions += getPiiRegexProgramSize(pattern.regex) ?? 0;
318
+ }
319
+ if (customPatterns > 256) context.addIssue({
320
+ code: z.ZodIssueCode.custom,
321
+ message: `At most 256 custom PII patterns may be configured in total`
322
+ });
323
+ if (regexCharacters > 8192) context.addIssue({
324
+ code: z.ZodIssueCode.custom,
325
+ message: `Custom PII regexes may contain at most ${MAX_PII_CUSTOM_REGEX_CHARACTERS} characters in total`
326
+ });
327
+ if (regexInstructions > 8192) context.addIssue({
328
+ code: z.ZodIssueCode.custom,
329
+ message: `Custom PII regexes may compile to at most ${MAX_PII_CUSTOM_REGEX_INSTRUCTIONS} instructions in total`
330
+ });
331
+ });
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
+ const CODE_WORKSPACE_OPERATIONS = [
340
+ "read_file",
341
+ "search_text",
342
+ "list_files",
343
+ "write_file",
344
+ "preview_edit",
345
+ "edit_file",
346
+ "execute_command"
347
+ ];
348
+ const CODE_WORKSPACE_SELECTION_ERROR_REASONS = [
349
+ "required",
350
+ "invalid",
351
+ "worker_unavailable",
352
+ "unsupported",
353
+ "missing",
354
+ "locked"
355
+ ];
356
+ const CODE_ENVIRONMENT_MODES = ["attached", "without_attached"];
357
+ function isCodeEnvironmentMode(value) {
358
+ return CODE_ENVIRONMENT_MODES.some((mode) => mode === value);
359
+ }
360
+ function isCodeWorkspaceSelectionErrorReason(value) {
361
+ return CODE_WORKSPACE_SELECTION_ERROR_REASONS.some((reason) => reason === value);
362
+ }
363
+ function isCodeWorkspaceSelection(value) {
364
+ if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
365
+ const selection = value;
366
+ 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);
367
+ }
368
+ /** One exact workspace per attached environment used by a conversation. */
369
+ function isCodeWorkspaceSelections(value) {
370
+ if (!Array.isArray(value)) return false;
371
+ const environmentIds = /* @__PURE__ */ new Set();
372
+ return value.every((selection) => {
373
+ if (!isCodeWorkspaceSelection(selection) || environmentIds.has(selection.environmentId)) return false;
374
+ environmentIds.add(selection.environmentId);
375
+ return true;
376
+ });
377
+ }
378
+ //#endregion
80
379
  //#region src/feedback.ts
81
380
  const FEEDBACK_RATINGS = ["thumbsUp", "thumbsDown"];
82
381
  const FEEDBACK_REASON_KEYS = [
@@ -186,6 +485,82 @@ function getTagByKey(key) {
186
485
  return FEEDBACK_TAGS.find((tag) => tag.key === key);
187
486
  }
188
487
  //#endregion
488
+ //#region src/code/approval.ts
489
+ const CODE_APPROVAL_MODES = [
490
+ "ask",
491
+ "acceptEdits",
492
+ "fullAccess"
493
+ ];
494
+ const MODE_PERMISSIONS = {
495
+ ask: {
496
+ fileWrite: "ask",
497
+ commandExecution: "ask"
498
+ },
499
+ acceptEdits: {
500
+ fileWrite: "allow",
501
+ commandExecution: "ask"
502
+ },
503
+ fullAccess: {
504
+ fileWrite: "allow",
505
+ commandExecution: "allow"
506
+ }
507
+ };
508
+ /** Omitted deployment configuration never grants unattended execution. */
509
+ function getAllowedCodeApprovalModes({ enabled, allowedModes, configSchema, settings, environment }) {
510
+ if (enabled === false) return [];
511
+ const permitted = new Set(allowedModes ?? ["ask"]);
512
+ return CODE_APPROVAL_MODES.filter((mode) => {
513
+ if (!permitted.has(mode)) return false;
514
+ if (environment === "managed") return true;
515
+ for (const category of ["fileWrite", "commandExecution"]) {
516
+ if (MODE_PERMISSIONS[mode][category] !== "allow") continue;
517
+ const field = configSchema?.permissions?.[category];
518
+ const configured = settings?.permissions?.[category];
519
+ if ((configured != null && field?.allowed.includes(configured) === true ? configured : field?.default ?? "ask") === "deny" || field?.allowed.includes("allow") !== true) return false;
520
+ }
521
+ return true;
522
+ });
523
+ }
524
+ var CodeApprovalModeError = class extends Error {
525
+ constructor() {
526
+ super("The selected code approval mode is not permitted by the current policy.");
527
+ this.code = "CODE_APPROVAL_MODE_NOT_ALLOWED";
528
+ this.name = "CodeApprovalModeError";
529
+ }
530
+ };
531
+ /** Validate untrusted request state again at admission, including after policy changes. */
532
+ function resolveCodeApprovalMode(requested, constraints) {
533
+ if (requested == null) return void 0;
534
+ const selected = getAllowedCodeApprovalModes(constraints).find((mode) => mode === requested);
535
+ if (selected == null) throw new CodeApprovalModeError();
536
+ return selected;
537
+ }
538
+ /** Apply a turn preference without modifying machine settings or overriding an existing deny. */
539
+ function resolveCodePermissionDecision({ mode, category, decision }) {
540
+ if (mode == null || decision === "deny") return decision;
541
+ if (MODE_PERMISSIONS[mode] == null) throw new CodeApprovalModeError();
542
+ return MODE_PERMISSIONS[mode][category];
543
+ }
544
+ //#endregion
545
+ //#region src/stateful-code.ts
546
+ const STATEFUL_CODE_ENVIRONMENTS = [
547
+ "user",
548
+ "agent-user",
549
+ "conversation"
550
+ ];
551
+ /** Resolve a deployment allowlist in stable UI order. An omitted value preserves
552
+ * the backward-compatible behavior where every environment is available. */
553
+ function resolveAllowedStatefulCodeEnvironments(configured) {
554
+ if (configured == null) return [...STATEFUL_CODE_ENVIRONMENTS];
555
+ const configuredSet = new Set(configured);
556
+ return STATEFUL_CODE_ENVIRONMENTS.filter((environment) => configuredSet.has(environment));
557
+ }
558
+ /** Keep an allowed preference, otherwise select the first deployment-allowed scope. */
559
+ function resolveStatefulCodeEnvironment(preferred, configured) {
560
+ const allowed = resolveAllowedStatefulCodeEnvironments(configured);
561
+ return preferred != null && allowed.includes(preferred) ? preferred : allowed[0];
562
+ }
563
+ //#endregion
189
564
  //#region src/types/assistants.ts
190
565
  let Tools = /* @__PURE__ */ function(Tools) {
191
566
  Tools["execute_code"] = "execute_code";
@@ -210,6 +585,10 @@ let EToolResources = /* @__PURE__ */ function(EToolResources) {
210
585
  EToolResources["ocr"] = "ocr";
211
586
  return EToolResources;
212
587
  }({});
588
+ const agentGitIdentitySchema = z.object({
589
+ name: z.string().trim().min(1).max(128).refine((value) => !/[\0\r\n]/.test(value)),
590
+ email: z.string().trim().email().max(254).refine((value) => !/[\0\r\n]/.test(value))
591
+ }).optional();
213
592
  let AnnotationTypes = /* @__PURE__ */ function(AnnotationTypes) {
214
593
  AnnotationTypes["FILE_CITATION"] = "file_citation";
215
594
  AnnotationTypes["FILE_PATH"] = "file_path";
@@ -401,7 +780,35 @@ const inputTokensIncludesCache = (provider) => {
401
780
  return cacheSubsetProviders.has(provider ?? "");
402
781
  };
403
782
  const isDocumentSupportedProvider = (provider) => {
404
- return documentSupportedProviders.has(provider ?? "");
783
+ const normalized = provider?.toLowerCase() ?? "";
784
+ return Array.from(documentSupportedProviders).some((candidate) => candidate.toLowerCase() === normalized);
785
+ };
786
+ /**
787
+ * Endpoints whose encoders actually build native audio/video payloads. Narrower than
788
+ * `documentSupportedProviders`: a provider can accept PDFs and still emit nothing for
789
+ * media, in which case the upload has to fall back to text/STT.
790
+ */
791
+ const mediaSupportedProviders = new Set([
792
+ "google",
793
+ "vertexai",
794
+ "openrouter"
795
+ ]);
796
+ const isMediaSupportedProvider = (provider) => {
797
+ return mediaSupportedProviders.has(provider?.toLowerCase() ?? "");
798
+ };
799
+ /**
800
+ * Built-in endpoint and provider identifiers. A name outside this set is a custom
801
+ * endpoint whose real provider is resolved at request time, so its capabilities
802
+ * cannot be judged from the name alone.
803
+ */
804
+ const knownProviderIdentifiers = new Set([
805
+ ...Object.values(EModelEndpoint),
806
+ ...Object.values(Providers),
807
+ ...Object.values(EModelEndpoint).map((provider) => provider.toLowerCase()),
808
+ ...Object.values(Providers).map((provider) => provider.toLowerCase())
809
+ ]);
810
+ const isKnownProviderIdentifier = (provider) => {
811
+ return knownProviderIdentifiers.has(provider?.toLowerCase() ?? "");
405
812
  };
406
813
  const paramEndpoints = new Set([
407
814
  "agents",
@@ -602,6 +1009,9 @@ const defaultAgentFormValues = {
602
1009
  ["file_search"]: false,
603
1010
  ["web_search"]: false,
604
1011
  ["memory"]: false,
1012
+ stateful_code_environment: "user",
1013
+ code_environment_id: void 0,
1014
+ code_workspace_id: void 0,
605
1015
  category: "general",
606
1016
  support_contact: {
607
1017
  name: "",
@@ -613,6 +1023,10 @@ const defaultAgentFormValues = {
613
1023
  /** Master toggle for skill use on this agent. `true` activates skills
614
1024
  * (full catalog unless `skills` narrows it). Anything else = inactive. */
615
1025
  skills_enabled: void 0,
1026
+ /** Enables runtime skill creation without exposing an existing skill catalog. */
1027
+ skill_authoring_enabled: void 0,
1028
+ /** Explicit catalog scope. Missing preserves the legacy enabled + empty = all behavior. */
1029
+ skills_scope: void 0,
616
1030
  /** `undefined` = feature disabled by default (no subagent tool injected). */
617
1031
  subagents: void 0,
618
1032
  /** Memory partition: 'agent' isolates memories per (user, agent); default shared pool */
@@ -630,6 +1044,8 @@ const ImageVisionTool = {
630
1044
  }
631
1045
  }
632
1046
  };
1047
+ /** Structural on purpose: accepts assistants tools/tool calls and agents function tool
1048
+ * calls alike — the check only ever reads `type` and `function.name`. */
633
1049
  const isImageVisionTool = (tool) => tool.type === "function" && tool.function?.name === ImageVisionTool.function?.name;
634
1050
  const openAISettings = {
635
1051
  model: { default: "gpt-4o-mini" },
@@ -688,8 +1104,45 @@ const getGoogleMaxOutputTokens = (modelName) => {
688
1104
  }
689
1105
  return GOOGLE_LEGACY_MAX_OUTPUT;
690
1106
  };
1107
+ /**
1108
+ * Per-model thinking budget bounds, documented in
1109
+ * `com_endpoint_google_thinking_budget`: Gemini 2.5 Pro accepts 128-32,768,
1110
+ * Flash accepts 0-24,576, and Flash Lite accepts 512-24,576. The generic
1111
+ * 32,000 in the shared definition both under-limits Pro and lets invalid
1112
+ * Flash values through.
1113
+ *
1114
+ * `-1` remains the "decide automatically" sentinel and is not part of these
1115
+ * floors. Callers must keep `range.min` at -1 and apply `min` only to
1116
+ * non-negative values.
1117
+ */
1118
+ const GOOGLE_THINKING_BUDGET_PRO_MAX = 32768;
1119
+ const GOOGLE_THINKING_BUDGET_FLASH_MAX = 24576;
1120
+ const GOOGLE_THINKING_BUDGET_PRO_MIN = 128;
1121
+ const GOOGLE_THINKING_BUDGET_FLASH_MIN = 0;
1122
+ const GOOGLE_THINKING_BUDGET_FLASH_LITE_MIN = 512;
1123
+ const getGoogleThinkingBudgetBounds = (modelName) => {
1124
+ if (!/gemini-2\.5/i.test(modelName)) return;
1125
+ if (/flash[-_.]?lite/i.test(modelName)) return {
1126
+ min: GOOGLE_THINKING_BUDGET_FLASH_LITE_MIN,
1127
+ max: GOOGLE_THINKING_BUDGET_FLASH_MAX
1128
+ };
1129
+ if (/flash/i.test(modelName)) return {
1130
+ min: GOOGLE_THINKING_BUDGET_FLASH_MIN,
1131
+ max: GOOGLE_THINKING_BUDGET_FLASH_MAX
1132
+ };
1133
+ if (/pro/i.test(modelName)) return {
1134
+ min: GOOGLE_THINKING_BUDGET_PRO_MIN,
1135
+ max: GOOGLE_THINKING_BUDGET_PRO_MAX
1136
+ };
1137
+ };
1138
+ const getGoogleThinkingBudgetMax = (modelName) => getGoogleThinkingBudgetBounds(modelName)?.max;
691
1139
  const googleSettings = {
692
1140
  model: { default: "gemini-1.5-flash-latest" },
1141
+ maxContextTokens: {
1142
+ min: 10,
1143
+ max: 2e6,
1144
+ step: 1e3
1145
+ },
693
1146
  maxOutputTokens: {
694
1147
  min: 1,
695
1148
  max: GOOGLE_MAX_OUTPUT,
@@ -908,12 +1361,21 @@ const tPluginSchema = z.object({
908
1361
  authenticated: z.boolean().optional(),
909
1362
  chatMenu: z.boolean().optional(),
910
1363
  isButton: z.boolean().optional(),
911
- toolkit: z.boolean().optional()
1364
+ toolkit: z.boolean().optional(),
1365
+ /** Raw upstream tool name when the model-facing key stripped a redundant
1366
+ * server-name prefix — proves upstream identity for legacy id migration. */
1367
+ serverToolName: z.string().optional()
912
1368
  });
913
1369
  const tExampleSchema = z.object({
914
1370
  input: z.object({ content: z.string() }),
915
1371
  output: z.object({ content: z.string() })
916
1372
  });
1373
+ /** Compact context-fading tier persisted beside a message's calibration ratio. */
1374
+ const agentFadingTierSchema = z.object({
1375
+ v: z.literal(1),
1376
+ budgetTokens: z.number().positive(),
1377
+ masked: z.boolean()
1378
+ });
917
1379
  const tMessageSchema = z.object({
918
1380
  messageId: z.string(),
919
1381
  endpoint: z.string().optional(),
@@ -930,6 +1392,12 @@ const tMessageSchema = z.object({
930
1392
  /** @deprecated */
931
1393
  generation: z.string().nullable().optional(),
932
1394
  isCreatedByUser: z.boolean(),
1395
+ /** True when the complete stored row came from outside the model. */
1396
+ isUserSubmitted: z.boolean().optional(),
1397
+ /** JSON pointers to caller-authored fields in an otherwise mixed model response. */
1398
+ userSubmittedPaths: z.array(z.string().startsWith("/")).optional(),
1399
+ /** Exact HITL message-field identity for caller-authored values stored in mixed responses. */
1400
+ userSubmittedMessageFieldPaths: z.array(userSubmittedMessageFieldPathSchema).optional(),
933
1401
  isTemporary: z.boolean().optional(),
934
1402
  expiredAt: z.string().nullable().optional(),
935
1403
  error: z.boolean().optional(),
@@ -949,7 +1417,9 @@ const tMessageSchema = z.object({
949
1417
  tokenCount: z.number().optional(),
950
1418
  contextMeta: z.object({
951
1419
  calibrationRatio: z.number().optional().describe("EMA ratio of provider-reported vs local token estimates; seeds the pruner on subsequent runs"),
952
- encoding: z.string().optional().describe("Tokenizer encoding used when this ratio was computed (e.g. \"claude\", \"o200k_base\")")
1420
+ encoding: z.string().optional().describe("Tokenizer encoding used when this ratio was computed (e.g. \"claude\", \"o200k_base\")"),
1421
+ fading: agentFadingTierSchema.optional().describe("Latched context-fading tier of the default agent; seeds the next run so the provider projection of history keeps the same bytes"),
1422
+ fadingTiers: z.array(agentFadingTierSchema.extend({ agentId: z.string().min(1) })).optional().describe("Latched context-fading tiers keyed by agent ID, stored as entries")
953
1423
  }).optional(),
954
1424
  /**
955
1425
  * Skill names the user invoked manually via the `$` popover on this turn.
@@ -987,6 +1457,19 @@ let MemoryScope = /* @__PURE__ */ function(MemoryScope) {
987
1457
  MemoryScope["agent"] = "agent";
988
1458
  return MemoryScope;
989
1459
  }({});
1460
+ /** Catalog exposure for a persisted agent with skills enabled. */
1461
+ let SkillsScope = /* @__PURE__ */ function(SkillsScope) {
1462
+ SkillsScope["all"] = "all";
1463
+ SkillsScope["selected"] = "selected";
1464
+ SkillsScope["none"] = "none";
1465
+ return SkillsScope;
1466
+ }({});
1467
+ /** Resolves explicit and legacy persisted-agent skill catalog states. */
1468
+ function resolveAgentSkillsScope(skills, enabled, scope) {
1469
+ if (enabled !== true) return "none";
1470
+ if (scope !== void 0) return scope;
1471
+ return (skills ?? []).length > 0 ? "selected" : "all";
1472
+ }
990
1473
  const coerceNumber = z.union([z.number(), z.string()]).transform((val) => {
991
1474
  if (typeof val === "string") return val.trim() === "" ? void 0 : parseFloat(val);
992
1475
  return val;
@@ -999,14 +1482,32 @@ const DocumentType = z.lazy(() => z.union([
999
1482
  z.array(z.lazy(() => DocumentType)),
1000
1483
  z.record(z.lazy(() => DocumentType))
1001
1484
  ]));
1485
+ const subagentThreadLineageSchema = z.object({
1486
+ rootConversationId: z.string().min(1),
1487
+ parentConversationId: z.string().min(1),
1488
+ parentMessageId: z.string().min(1),
1489
+ parentToolCallId: z.string().min(1),
1490
+ parentAgentId: z.string().min(1).optional(),
1491
+ subagentType: z.string().min(1),
1492
+ subagentKind: z.enum(["agent", "graph"]),
1493
+ depth: z.number().int().positive()
1494
+ });
1002
1495
  const tConversationSchema = z.object({
1003
1496
  conversationId: z.string().nullable(),
1004
1497
  endpoint: eModelEndpointSchema.nullable(),
1005
1498
  endpointType: eModelEndpointSchema.nullable().optional(),
1006
1499
  isArchived: z.boolean().optional(),
1500
+ /** When the chat was archived; absent on chats archived before this was recorded. */
1501
+ archivedAt: z.string().nullable().optional(),
1007
1502
  pinned: z.boolean().optional(),
1008
1503
  /** Server-derived: an active shared link exists for this conversation. Not persisted. */
1009
1504
  isShared: z.boolean().optional(),
1505
+ codeApprovalMode: z.enum(CODE_APPROVAL_MODES).optional(),
1506
+ codeEnvironmentMode: z.enum(CODE_ENVIRONMENT_MODES).optional(),
1507
+ codeWorkspaces: z.array(z.object({
1508
+ environmentId: z.string().regex(CODE_WORKSPACE_ID_PATTERN),
1509
+ workspaceId: z.string().regex(CODE_WORKSPACE_ID_PATTERN)
1510
+ }).strict()).optional(),
1010
1511
  title: z.string().nullable().or(z.literal("New Chat")).default("New Chat"),
1011
1512
  user: z.string().optional(),
1012
1513
  messages: z.array(z.string()).optional(),
@@ -1055,6 +1556,8 @@ const tConversationSchema = z.object({
1055
1556
  disableStreaming: z.boolean().optional(),
1056
1557
  assistant_id: z.string().optional(),
1057
1558
  agent_id: z.string().optional(),
1559
+ /** Durable parent/child navigation for a subagent thread. */
1560
+ subagentThread: subagentThreadLineageSchema.optional(),
1058
1561
  region: z.string().optional(),
1059
1562
  maxTokens: coerceNumber.optional(),
1060
1563
  additionalModelRequestFields: DocumentType.optional(),
@@ -1210,6 +1713,26 @@ const tModelSpecPresetSchema = tPresetSchema.omit({
1210
1713
  chatGptLabel: true,
1211
1714
  presetOverride: true,
1212
1715
  spec: true
1716
+ }).merge(z.object({
1717
+ /**
1718
+ * Optional here, unlike `tPresetSchema`, where the key is required (though
1719
+ * nullable). A preset naming an `agent_id` has an unambiguous endpoint, so
1720
+ * config may omit it and `resolveModelSpecEndpoint` infers `agents` when
1721
+ * specs are materialized at config load.
1722
+ */
1723
+ endpoint: extendedModelEndpointSchema.nullish() })).superRefine((preset, ctx) => {
1724
+ /**
1725
+ * Omission is only legal when the endpoint is inferable, which requires a
1726
+ * NON-EMPTY `agent_id` — form-backed writers persist untouched fields as
1727
+ * `''`, which names no agent. An explicit `endpoint: null` stays accepted:
1728
+ * it validated before the key became optional, so rejecting it now would
1729
+ * break previously valid configs.
1730
+ */
1731
+ if (preset.endpoint === void 0 && !preset.agent_id) ctx.addIssue({
1732
+ code: z.ZodIssueCode.custom,
1733
+ path: ["endpoint"],
1734
+ message: "endpoint is required unless the preset names a non-empty agent_id (the agents endpoint is then inferred)"
1735
+ });
1213
1736
  });
1214
1737
  const tSharedLinkSchema = z.object({
1215
1738
  conversationId: z.string(),
@@ -1238,6 +1761,7 @@ const googleBaseSchema = tConversationSchema.pick({
1238
1761
  examples: true,
1239
1762
  temperature: true,
1240
1763
  maxOutputTokens: true,
1764
+ resendFiles: true,
1241
1765
  artifacts: true,
1242
1766
  topP: true,
1243
1767
  topK: true,
@@ -1496,15 +2020,39 @@ const requiredSettingFields = [
1496
2020
  "type",
1497
2021
  "component"
1498
2022
  ];
2023
+ function clampSettingRange(value, range) {
2024
+ if (range.positiveMin != null) {
2025
+ /** The minimum carries its own meaning here (Google's -1 for automatic),
2026
+ * and the schema admits it outright, so it survives rather than being
2027
+ * lifted to the floor. It need not be negative to be the sentinel. */
2028
+ if (value === range.min) return range.min;
2029
+ /** Below the sentinel there is nothing admissible to lift to, so the value
2030
+ * resolves to it. Between the sentinel and the floor, the floor is the
2031
+ * nearest value the generated schema accepts. */
2032
+ if (value < Math.max(range.min, 0)) return range.min;
2033
+ return Math.min(Math.max(value, range.positiveMin), range.max);
2034
+ }
2035
+ return Math.min(Math.max(value, range.min), range.max);
2036
+ }
1499
2037
  function generateDynamicSchema(settings) {
1500
2038
  const schemaFields = {};
1501
2039
  for (const setting of settings) {
1502
2040
  const { key, type, default: defaultValue, range, options, minText, maxText, minTags, maxTags } = setting;
1503
2041
  if (type === "number") {
1504
- let schema = z.number();
2042
+ let numberSchema = z.number();
1505
2043
  if (range) {
1506
- schema = schema.min(range.min);
1507
- schema = schema.max(range.max);
2044
+ numberSchema = numberSchema.min(range.min);
2045
+ numberSchema = numberSchema.max(range.max);
2046
+ }
2047
+ /** Widened deliberately: refine returns ZodEffects, not ZodNumber, and
2048
+ * the number-specific chaining is already done above. */
2049
+ let schema = numberSchema;
2050
+ if (range?.positiveMin != null) {
2051
+ /** Mirrors clampSettingRange so the generated schema and the clamp
2052
+ * agree: `min` only admits the sentinel, and any non-negative value
2053
+ * must clear the documented floor. */
2054
+ const { positiveMin, min } = range;
2055
+ schema = numberSchema.refine((value) => value === min || value >= positiveMin, `Expected ${min} or a value of at least ${positiveMin}`);
1508
2056
  }
1509
2057
  if (typeof defaultValue === "number") schemaFields[key] = schema.default(defaultValue);
1510
2058
  else schemaFields[key] = schema;
@@ -1646,7 +2194,14 @@ function validateSettingDefinitions(settings) {
1646
2194
  setting.includeInput = setting.type === "number" ? setting.includeInput ?? true : false;
1647
2195
  }
1648
2196
  if (setting.component === "slider" && setting.type === "number") {
1649
- if (setting.default === void 0 && setting.range) setting.default = Math.round((setting.range.min + setting.range.max) / 2);
2197
+ if (setting.default === void 0 && setting.range) {
2198
+ /** The midpoint of the admissible interval, which a positive floor
2199
+ * narrows: the span between the sentinel and that floor holds no value
2200
+ * the generated schema accepts, so a midpoint taken across it would
2201
+ * fail the validation below. */
2202
+ const floor = Math.max(setting.range.min, setting.range.positiveMin ?? setting.range.min);
2203
+ setting.default = Math.round((floor + setting.range.max) / 2);
2204
+ }
1650
2205
  }
1651
2206
  if (setting.component === "checkbox" || setting.component === "switch") {
1652
2207
  if (setting.options && setting.options.length > 2) errors.push({
@@ -1724,6 +2279,16 @@ function validateSettingDefinitions(settings) {
1724
2279
  message: `Invalid default value for setting ${setting.key}. Must be within the range [${setting.range.min}, ${setting.range.max}].`,
1725
2280
  path: ["default"]
1726
2281
  });
2282
+ if (setting.type === "number" && setting.range?.positiveMin != null && setting.range.positiveMin > setting.range.max) errors.push({
2283
+ code: ZodIssueCode.custom,
2284
+ message: `Invalid range for setting ${setting.key}. positiveMin (${setting.range.positiveMin}) cannot exceed max (${setting.range.max}).`,
2285
+ path: ["range"]
2286
+ });
2287
+ if (setting.type === "number" && setting.range?.positiveMin != null && typeof setting.default === "number" && setting.default !== setting.range.min && setting.default < setting.range.positiveMin) errors.push({
2288
+ code: ZodIssueCode.custom,
2289
+ message: `Invalid default value for setting ${setting.key}. Must be ${setting.range.min} or at least ${setting.range.positiveMin}.`,
2290
+ path: ["default"]
2291
+ });
1727
2292
  if (setting.enumMappings && setting.type === "enum" && setting.options) {
1728
2293
  for (const option of setting.options) if (!(option in setting.enumMappings)) errors.push({
1729
2294
  code: ZodIssueCode.custom,
@@ -1825,13 +2390,84 @@ const generateGoogleSchema = (customGoogle) => {
1825
2390
  //#region src/limits.ts
1826
2391
  /** Maximum number of explicit subagents per parent agent. UI + Zod schema share this. */
1827
2392
  const MAX_SUBAGENTS = 10;
2393
+ /** Hard upper bound for `endpoints.agents.maxSubagents`, keeping the request-validation
2394
+ * cap bounded no matter what the config file says. */
2395
+ const MAX_SUBAGENTS_CEILING = 50;
2396
+ let maxSubagents = 10;
2397
+ /** Effective subagents-per-agent cap; initialized from `endpoints.agents.maxSubagents` at startup. */
2398
+ const getMaxSubagents = () => maxSubagents;
2399
+ /** Applies a configured cap; any missing or out-of-range value resets to the default. */
2400
+ const setMaxSubagents = (value) => {
2401
+ maxSubagents = typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 50 ? value : 10;
2402
+ };
2403
+ /** Chat project field limits. The dialogs and the persistence layer share these,
2404
+ * so the inputs stop at the same point the server would otherwise truncate. */
2405
+ const MAX_CHAT_PROJECT_NAME_LENGTH = 100;
2406
+ const MAX_CHAT_PROJECT_DESCRIPTION_LENGTH = 1e3;
2407
+ /** Mirrors the bounded graph-child member limit in `@librechat/agents`. */
2408
+ const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
1828
2409
  //#endregion
1829
2410
  //#region src/models.ts
1830
2411
  const modelSpecSubagentsSchema = z.object({
1831
2412
  enabled: z.boolean().optional(),
1832
2413
  allowSelf: z.boolean().optional(),
1833
- agent_ids: z.array(z.string()).max(10).optional()
2414
+ shareFiles: z.boolean().optional(),
2415
+ agent_ids: z.array(z.string()).optional()
2416
+ }).superRefine((subagents, ctx) => {
2417
+ const maxSubagents = getMaxSubagents();
2418
+ if ((subagents.agent_ids?.length ?? 0) > maxSubagents) ctx.addIssue({
2419
+ code: z.ZodIssueCode.custom,
2420
+ path: ["agent_ids"],
2421
+ message: `agent_ids must contain at most ${maxSubagents} item(s)`
2422
+ });
1834
2423
  });
2424
+ function resolveModelSpecEndpoint(modelSpec) {
2425
+ const preset = modelSpec?.preset;
2426
+ if (preset?.endpoint != null) return preset.endpoint;
2427
+ /**
2428
+ * An explicit `endpoint: null` is a statement, not an omission — such specs
2429
+ * validated (and were skipped downstream) before inference existed, so
2430
+ * inferring here would silently activate them. Only an absent key infers,
2431
+ * and only from a non-empty `agent_id`: form-backed writers persist
2432
+ * untouched fields as `''`, which names no agent.
2433
+ */
2434
+ if (preset?.endpoint === null) return;
2435
+ return preset?.agent_id ? "agents" : void 0;
2436
+ }
2437
+ /**
2438
+ * Writes each spec's resolved endpoint back onto its preset so every consumer —
2439
+ * endpoint matching, the selector, access filters, startup presets, provider-key
2440
+ * reachability — reads a complete spec instead of re-deriving it. Apply once
2441
+ * where the effective config is assembled (YAML load and DB-override merge);
2442
+ * downstream code then needs no awareness of inference.
2443
+ *
2444
+ * Returns the original object, and the original spec objects, when nothing
2445
+ * needs filling in, so cached configs and memoized consumers see no new
2446
+ * identities.
2447
+ */
2448
+ function materializeModelSpecEndpoints(modelSpecs) {
2449
+ const list = modelSpecs?.list;
2450
+ if (!list?.length) return modelSpecs;
2451
+ let changed = false;
2452
+ const materialized = list.map((spec) => {
2453
+ if (spec?.preset == null || spec.preset.endpoint != null) return spec;
2454
+ const endpoint = resolveModelSpecEndpoint(spec);
2455
+ if (endpoint == null) return spec;
2456
+ changed = true;
2457
+ return {
2458
+ ...spec,
2459
+ preset: {
2460
+ ...spec.preset,
2461
+ endpoint
2462
+ }
2463
+ };
2464
+ });
2465
+ if (!changed) return modelSpecs;
2466
+ return {
2467
+ ...modelSpecs,
2468
+ list: materialized
2469
+ };
2470
+ }
1835
2471
  const tModelSpecSchema = z.object({
1836
2472
  name: z.string(),
1837
2473
  label: z.string(),
@@ -2057,6 +2693,49 @@ const bedrockDocumentFormats = {
2057
2693
  "text/plain": "txt",
2058
2694
  "text/markdown": "md"
2059
2695
  };
2696
+ /**
2697
+ * Whether an upload belongs to the conversation rather than to the agent. The value
2698
+ * arrives from multipart form data, so it can be the string "false", which is truthy.
2699
+ * Shared so the route, the authorization check and processing cannot disagree about it.
2700
+ */
2701
+ const isMessageFileUpload = (value) => value === true || value === "true";
2702
+ /**
2703
+ * Whether the upload's conversation uses the Responses API, which decides whether Azure
2704
+ * can carry a document natively. Multipart form data has no booleans, so it arrives as
2705
+ * the string "true".
2706
+ */
2707
+ const isResponsesApiUpload = (value) => value === true || value === "true";
2708
+ /**
2709
+ * The name a file carries inside the code sandbox.
2710
+ *
2711
+ * Image uploads are converted to the configured output type while the record keeps the
2712
+ * original filename, so the extension has to follow the stored bytes or the sandbox
2713
+ * decoder is handed a mismatch. Provisioning and priming both resolve the mount path
2714
+ * from here: deriving it twice under different rules leaves a later turn advertising a
2715
+ * path that does not exist in the sandbox.
2716
+ */
2717
+ const resolveSandboxFilename = (filename, mimeType) => {
2718
+ if (!mimeType?.startsWith("image/")) return filename;
2719
+ const subtype = mimeType.slice(6);
2720
+ if (![
2721
+ "webp",
2722
+ "png",
2723
+ "jpeg",
2724
+ "gif"
2725
+ ].includes(subtype)) return filename;
2726
+ const accepted = subtype === "jpeg" ? [".jpg", ".jpeg"] : [`.${subtype}`];
2727
+ const lastDot = filename.lastIndexOf(".");
2728
+ const currentExt = lastDot > 0 ? filename.slice(lastDot).toLowerCase() : "";
2729
+ if (accepted.includes(currentExt)) return filename;
2730
+ return `${lastDot > 0 ? filename.slice(0, lastDot) : filename}${accepted[0]}`;
2731
+ };
2732
+ /**
2733
+ * The Responses setting a turn actually runs on. A saved agent's own record wins, since
2734
+ * execution reads its model parameters; a conversation only answers for itself. Upload
2735
+ * and delivery must agree here, or a document is stored as raw provider content and then
2736
+ * re-resolved to text it has no extraction for.
2737
+ */
2738
+ const resolveUseResponsesApi = (agentValue, conversationValue) => agentValue ?? conversationValue ?? void 0;
2060
2739
  const isBedrockDocumentType = (mimeType) => mimeType != null && mimeType in bedrockDocumentFormats;
2061
2740
  /** MIME types Bedrock's Converse document path can send to the model (mirrors `bedrockDocumentFormats`). */
2062
2741
  const bedrockDocumentMimeTypes = Object.keys(bedrockDocumentFormats);
@@ -2290,6 +2969,8 @@ const mbToBytes = (mb) => mb * megabyte;
2290
2969
  const defaultSizeLimit = mbToBytes(512);
2291
2970
  const defaultSkillImportSizeLimit = mbToBytes(50);
2292
2971
  const defaultTokenLimit = 1e5;
2972
+ const defaultContextSizeLimit = mbToBytes(128);
2973
+ const defaultContextCharLimit = 1e6;
2293
2974
  const assistantsFileConfig = {
2294
2975
  fileLimit: 10,
2295
2976
  fileSizeLimit: defaultSizeLimit,
@@ -2321,11 +3002,14 @@ const fileConfig = {
2321
3002
  serverFileSizeLimit: defaultSizeLimit,
2322
3003
  avatarSizeLimit: mbToBytes(2),
2323
3004
  fileTokenLimit: defaultTokenLimit,
3005
+ fileContextSizeLimit: defaultContextSizeLimit,
3006
+ fileContextCharLimit: defaultContextCharLimit,
2324
3007
  clientImageResize: {
2325
3008
  enabled: false,
2326
3009
  maxWidth: 1900,
2327
3010
  maxHeight: 1900,
2328
- quality: .92
3011
+ quality: .92,
3012
+ enforced: false
2329
3013
  },
2330
3014
  ocr: { supportedMimeTypes: defaultOCRMimeTypes },
2331
3015
  text: { supportedMimeTypes: defaultTextMimeTypes },
@@ -2335,12 +3019,23 @@ const fileConfig = {
2335
3019
  }
2336
3020
  };
2337
3021
  const supportedMimeTypesSchema = z.array(z.string()).optional();
3022
+ const DefaultLLMDeliveryPath = z.enum([
3023
+ "provider",
3024
+ "text",
3025
+ "none"
3026
+ ]);
3027
+ const defaultLLMDeliveryPathSchema = z.object({
3028
+ fallback: DefaultLLMDeliveryPath.optional(),
3029
+ overrides: z.record(DefaultLLMDeliveryPath).optional()
3030
+ });
2338
3031
  const endpointFileConfigSchema = z.object({
2339
3032
  disabled: z.boolean().optional(),
2340
3033
  fileLimit: z.number().min(0).optional(),
2341
3034
  fileSizeLimit: z.number().min(0).optional(),
2342
3035
  totalSizeLimit: z.number().min(0).optional(),
2343
- supportedMimeTypes: supportedMimeTypesSchema.optional()
3036
+ supportedMimeTypes: supportedMimeTypesSchema.optional(),
3037
+ defaultLLMDeliveryPath: defaultLLMDeliveryPathSchema.optional(),
3038
+ legacyFileUploadUX: z.boolean().optional()
2344
3039
  });
2345
3040
  const skillFileConfigSchema = z.object({ fileSizeLimit: z.number().min(0).optional() });
2346
3041
  const fileConfigSchema = z.object({
@@ -2349,18 +3044,23 @@ const fileConfigSchema = z.object({
2349
3044
  serverFileSizeLimit: z.number().min(0).optional(),
2350
3045
  avatarSizeLimit: z.number().min(0).optional(),
2351
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(),
2352
3050
  imageGeneration: z.object({
2353
3051
  percentage: z.number().min(0).max(100).optional(),
2354
3052
  px: z.number().min(0).optional()
2355
3053
  }).optional(),
2356
3054
  clientImageResize: z.object({
2357
3055
  enabled: z.boolean().optional(),
2358
- maxWidth: z.number().min(0).optional(),
2359
- maxHeight: z.number().min(0).optional(),
3056
+ maxWidth: z.number().min(1).optional(),
3057
+ maxHeight: z.number().min(1).optional(),
2360
3058
  quality: z.number().min(0).max(1).optional()
2361
3059
  }).optional(),
2362
3060
  ocr: z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
2363
- text: z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional()
3061
+ text: z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
3062
+ defaultLLMDeliveryPath: defaultLLMDeliveryPathSchema.optional(),
3063
+ legacyFileUploadUX: z.boolean().optional()
2364
3064
  });
2365
3065
  /**
2366
3066
  * Compiler for admin-supplied MIME patterns. Defaults to native `RegExp`, which browser
@@ -2496,6 +3196,12 @@ const documentMimeExtensions = [
2496
3196
  ["text/calendar", [".ics"]],
2497
3197
  ["message/rfc822", [".eml"]]
2498
3198
  ];
3199
+ /** Preferred extension for a known document MIME type, including its leading dot. */
3200
+ function getDocumentFileExtension(mimeType) {
3201
+ const normalized = mimeType?.split(";", 1)[0].trim().toLowerCase();
3202
+ const canonical = normalized === "text/comma-separated-values" ? "text/csv" : normalized;
3203
+ return documentMimeExtensions.find(([type]) => type === canonical)?.[1][0];
3204
+ }
2499
3205
  const documentMimeSet = new Set(documentMimeExtensions.map(([mimeType]) => mimeType));
2500
3206
  /** Every MIME type LibreChat may accept, used to detect patterns that reach beyond the representable set. */
2501
3207
  const knownMimeUniverse = Array.from(new Set([
@@ -2589,7 +3295,45 @@ function mergeWithDefault(endpointConfig, defaultConfig, endpoint) {
2589
3295
  fileLimit: endpointConfig.fileLimit ?? defaultConfig.fileLimit,
2590
3296
  fileSizeLimit: endpointConfig.fileSizeLimit ?? defaultConfig.fileSizeLimit,
2591
3297
  totalSizeLimit: endpointConfig.totalSizeLimit ?? defaultConfig.totalSizeLimit,
2592
- supportedMimeTypes: endpointConfig.supportedMimeTypes ?? defaultMimeTypes
3298
+ supportedMimeTypes: endpointConfig.supportedMimeTypes ?? defaultMimeTypes,
3299
+ defaultLLMDeliveryPath: mergeDeliveryPathConfig(endpointConfig.defaultLLMDeliveryPath, defaultConfig.defaultLLMDeliveryPath),
3300
+ legacyFileUploadUX: endpointConfig.legacyFileUploadUX ?? defaultConfig.legacyFileUploadUX
3301
+ };
3302
+ }
3303
+ /**
3304
+ * Deep-merges delivery-path config so an endpoint that supplies only one override
3305
+ * still inherits the default's fallback and shared overrides. Whole-object
3306
+ * replacement would silently drop the inherited routing.
3307
+ */
3308
+ function mergeDeliveryPathConfig(endpointValue, defaultValue) {
3309
+ if (!endpointValue) return defaultValue;
3310
+ if (!defaultValue) return endpointValue;
3311
+ if (endpointValue.fallback != null) return endpointValue;
3312
+ const hasOverrides = endpointValue.overrides != null || defaultValue.overrides != null;
3313
+ return {
3314
+ ...defaultValue.fallback != null ? { fallback: defaultValue.fallback } : {},
3315
+ ...hasOverrides ? { overrides: { ...shadowByWildcard(defaultValue.overrides, endpointValue.overrides) } } : {}
3316
+ };
3317
+ }
3318
+ /**
3319
+ * Flattens two override layers into one map that still resolves like the layered chain.
3320
+ * Resolution reads exact keys before wildcards, so a plain spread would let a lower
3321
+ * layer's `image/png` outrank the upper layer's `image/*`. Dropping the entries an
3322
+ * upper wildcard covers restores precedence without changing how lookups work.
3323
+ */
3324
+ function shadowByWildcard(lower, upper) {
3325
+ if (!lower) return { ...upper };
3326
+ const upperWildcards = /* @__PURE__ */ new Set();
3327
+ for (const key in upper) if (key.endsWith("/*")) upperWildcards.add(key.slice(0, -1));
3328
+ if (upperWildcards.size === 0) return {
3329
+ ...lower,
3330
+ ...upper
3331
+ };
3332
+ const retained = {};
3333
+ for (const key in lower) if (!(!key.endsWith("/*") && upperWildcards.has(key.slice(0, key.indexOf("/") + 1)) && upper?.[key] == null)) retained[key] = lower[key];
3334
+ return {
3335
+ ...retained,
3336
+ ...upper
2593
3337
  };
2594
3338
  }
2595
3339
  function getEndpointFileConfig(params) {
@@ -2597,8 +3341,13 @@ function getEndpointFileConfig(params) {
2597
3341
  if (!mergedFileConfig?.endpoints) return fileConfig.endpoints.default;
2598
3342
  /** Compute an effective default by merging user-configured default over the base default */
2599
3343
  const baseDefaultConfig = fileConfig.endpoints.default;
3344
+ const globalDefaultConfig = {
3345
+ ...baseDefaultConfig,
3346
+ defaultLLMDeliveryPath: mergeDeliveryPathConfig(mergedFileConfig.defaultLLMDeliveryPath, baseDefaultConfig.defaultLLMDeliveryPath),
3347
+ legacyFileUploadUX: mergedFileConfig.legacyFileUploadUX ?? baseDefaultConfig.legacyFileUploadUX
3348
+ };
2600
3349
  const userDefaultConfig = mergedFileConfig.endpoints.default;
2601
- const defaultConfig = userDefaultConfig ? mergeWithDefault(userDefaultConfig, baseDefaultConfig, "default") : baseDefaultConfig;
3350
+ const defaultConfig = userDefaultConfig ? mergeWithDefault(userDefaultConfig, globalDefaultConfig, "default") : globalDefaultConfig;
2602
3351
  const normalizedEndpoint = normalizeEndpointName(endpoint ?? "");
2603
3352
  const standardEndpoints = new Set([
2604
3353
  "default",
@@ -2653,16 +3402,21 @@ function mergeFileConfig(dynamic) {
2653
3402
  }
2654
3403
  };
2655
3404
  if (!dynamic) return mergedConfig;
3405
+ if (dynamic.defaultLLMDeliveryPath !== void 0) mergedConfig.defaultLLMDeliveryPath = dynamic.defaultLLMDeliveryPath;
3406
+ if (dynamic.legacyFileUploadUX !== void 0) mergedConfig.legacyFileUploadUX = dynamic.legacyFileUploadUX;
2656
3407
  if (dynamic.serverFileSizeLimit !== void 0) mergedConfig.serverFileSizeLimit = mbToBytes(dynamic.serverFileSizeLimit);
2657
3408
  if (dynamic.avatarSizeLimit !== void 0) mergedConfig.avatarSizeLimit = mbToBytes(dynamic.avatarSizeLimit);
2658
3409
  if (dynamic.fileTokenLimit !== void 0) mergedConfig.fileTokenLimit = dynamic.fileTokenLimit;
3410
+ if (dynamic.fileContextSizeLimit !== void 0) mergedConfig.fileContextSizeLimit = mbToBytes(dynamic.fileContextSizeLimit);
3411
+ if (dynamic.fileContextCharLimit !== void 0) mergedConfig.fileContextCharLimit = dynamic.fileContextCharLimit;
2659
3412
  if (dynamic.skills?.fileSizeLimit !== void 0) mergedConfig.skills = {
2660
3413
  ...mergedConfig.skills,
2661
3414
  fileSizeLimit: mbToBytes(dynamic.skills.fileSizeLimit)
2662
3415
  };
2663
3416
  if (dynamic.clientImageResize !== void 0) mergedConfig.clientImageResize = {
2664
3417
  ...mergedConfig.clientImageResize,
2665
- ...dynamic.clientImageResize
3418
+ ...dynamic.clientImageResize,
3419
+ enforced: dynamic.clientImageResize.enabled !== void 0
2666
3420
  };
2667
3421
  if (dynamic.ocr !== void 0) {
2668
3422
  const { supportedMimeTypes: ocrMimeTypes, ...ocrRest } = dynamic.ocr;
@@ -2702,6 +3456,8 @@ function mergeFileConfig(dynamic) {
2702
3456
  });
2703
3457
  if (dynamicEndpoint.disabled !== void 0) mergedEndpoint.disabled = dynamicEndpoint.disabled;
2704
3458
  if (dynamicEndpoint.supportedMimeTypes) mergedEndpoint.supportedMimeTypes = convertStringsToRegex(dynamicEndpoint.supportedMimeTypes);
3459
+ if (dynamicEndpoint.defaultLLMDeliveryPath !== void 0) mergedEndpoint.defaultLLMDeliveryPath = dynamicEndpoint.defaultLLMDeliveryPath;
3460
+ if (dynamicEndpoint.legacyFileUploadUX !== void 0) mergedEndpoint.legacyFileUploadUX = dynamicEndpoint.legacyFileUploadUX;
2705
3461
  }
2706
3462
  return mergedConfig;
2707
3463
  }
@@ -2723,9 +3479,15 @@ const buildQuery = (params) => {
2723
3479
  };
2724
3480
  const health = () => `${BASE_URL}/health`;
2725
3481
  const user = () => `${BASE_URL}/api/user`;
3482
+ const userPreferences = () => `${user()}/preferences`;
2726
3483
  const balance = () => `${BASE_URL}/api/balance`;
2727
3484
  const userPlugins = () => `${BASE_URL}/api/user/plugins`;
2728
3485
  const deleteUser$1 = () => `${BASE_URL}/api/user/delete`;
3486
+ const codeEnvironments = () => `${BASE_URL}/api/code-environments`;
3487
+ const codeEnvironmentPairings = () => `${codeEnvironments()}/pairings`;
3488
+ const codeEnvironmentById = (id) => `${codeEnvironments()}/${encodeURIComponent(id)}`;
3489
+ const codeEnvironmentSettings = (id) => `${codeEnvironmentById(id)}/settings`;
3490
+ const codeEnvironmentStatus = (id) => `${codeEnvironmentById(id)}/status`;
2729
3491
  const messagesRoot = `${BASE_URL}/api/messages`;
2730
3492
  const messages = (params) => {
2731
3493
  const { conversationId, messageId, ...rest } = params;
@@ -2766,9 +3528,17 @@ const conversations = (params) => {
2766
3528
  return `${conversationsRoot}${buildQuery(params)}`;
2767
3529
  };
2768
3530
  const conversationById = (id) => `${conversationsRoot}/${id}`;
3531
+ const parentSubagents = (parentConversationId) => `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents`;
3532
+ const subagentThread = (parentConversationId, threadId, taskId, cursor) => {
3533
+ const endpoint = `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents/${encodeURIComponent(threadId)}`;
3534
+ if (taskId != null) return `${endpoint}?taskId=${encodeURIComponent(taskId)}`;
3535
+ return cursor == null ? endpoint : `${endpoint}?cursor=${encodeURIComponent(cursor)}`;
3536
+ };
3537
+ const subagentControl = (parentConversationId, threadId) => `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents/${encodeURIComponent(threadId)}/control`;
2769
3538
  const genTitle$1 = (conversationId) => `${conversationsRoot}/gen_title/${encodeURIComponent(conversationId)}`;
2770
3539
  const updateConversation$1 = () => `${conversationsRoot}/update`;
2771
3540
  const archiveConversation$1 = () => `${conversationsRoot}/archive`;
3541
+ const archiveAllConversations$1 = () => `${conversationsRoot}/archive/all`;
2772
3542
  const pinConversation$1 = () => `${conversationsRoot}/pin`;
2773
3543
  const deleteConversation$1 = () => `${conversationsRoot}`;
2774
3544
  const deleteAllConversation = () => `${conversationsRoot}/all`;
@@ -2853,6 +3623,14 @@ const agents = ({ path = "", options }) => {
2853
3623
  return url;
2854
3624
  };
2855
3625
  const activeJobs = () => `${BASE_URL}/api/agents/chat/active`;
3626
+ const agentQueuedTurnsRoot = `${BASE_URL}/api/agents/chat/queued-turns`;
3627
+ const agentQueuedTurns = () => agentQueuedTurnsRoot;
3628
+ const agentQueuedTurnsByConversation = (conversationId, clientRequestIds = []) => {
3629
+ const uniqueIds = Array.from(new Set(clientRequestIds)).slice(0, 100);
3630
+ const knownIds = uniqueIds.length > 0 ? `&${uniqueIds.map((id) => `clientRequestIds=${encodeURIComponent(id)}`).join("&")}` : "";
3631
+ return `${agentQueuedTurnsRoot}?conversationId=${encodeURIComponent(conversationId)}${knownIds}`;
3632
+ };
3633
+ const agentQueuedTurn = (queuedTurnId) => `${agentQueuedTurnsRoot}/${encodeURIComponent(queuedTurnId)}`;
2856
3634
  const mcp = {
2857
3635
  tools: `${BASE_URL}/api/mcp/tools`,
2858
3636
  servers: `${BASE_URL}/api/mcp/servers`
@@ -2906,6 +3684,9 @@ const deletePrompt$1 = ({ _id, groupId }) => {
2906
3684
  };
2907
3685
  const getCategories$1 = () => `${BASE_URL}/api/categories`;
2908
3686
  const getAllPromptGroups$1 = () => `${prompts()}/all`;
3687
+ const schedules = () => `${BASE_URL}/api/schedules`;
3688
+ const schedule = (id) => `${schedules()}/${encodeURIComponent(id)}`;
3689
+ const runSchedule = (id) => `${schedule(id)}/run`;
2909
3690
  const skills = () => `${BASE_URL}/api/skills`;
2910
3691
  const importSkill$1 = () => `${skills()}/import`;
2911
3692
  const getSkill$1 = (id) => `${skills()}/${encodeURIComponent(id)}`;
@@ -2919,6 +3700,15 @@ const listSkillsWithFilters = (filter) => {
2919
3700
  };
2920
3701
  const skillFiles = (id) => `${getSkill$1(id)}/files`;
2921
3702
  const skillFile = (id, relativePath) => `${skillFiles(id)}/${encodeURIComponent(relativePath)}`;
3703
+ const insights = () => `${BASE_URL}/api/insights`;
3704
+ const insightsAccess = () => `${insights()}/access`;
3705
+ const conversationTrace = (conversationId) => `${BASE_URL}/api/traces/${encodeURIComponent(conversationId)}`;
3706
+ const conversationTraceAvailability = (conversationId) => `${conversationTrace(conversationId)}/availability`;
3707
+ const conversationTraceRecords = (conversationId, cursor) => `${conversationTrace(conversationId)}/records${cursor ? `?${new URLSearchParams({ cursor }).toString()}` : ""}`;
3708
+ const conversationTraceRecord = (conversationId, recordId, messageId, sourceId) => `${conversationTrace(conversationId)}/records/${encodeURIComponent(recordId)}?${new URLSearchParams({
3709
+ message: messageId,
3710
+ ...sourceId ? { source: sourceId } : {}
3711
+ }).toString()}`;
2922
3712
  const adminSkillsSync = () => `${BASE_URL}/api/admin/skills/sync`;
2923
3713
  const adminSkillsSyncStatus = () => `${adminSkillsSync()}/status`;
2924
3714
  const adminSkillsSyncRun = () => `${adminSkillsSync()}/run`;
@@ -2927,6 +3717,7 @@ const skillStates = () => `${BASE_URL}/api/user/settings/skills/active`;
2927
3717
  const adminLangfuseConnection = () => `${BASE_URL}/api/admin/langfuse/connection`;
2928
3718
  const adminLangfuseConnectionTest = () => `${adminLangfuseConnection()}/test`;
2929
3719
  const adminLangfuseSessionLink = (conversationId) => `${adminLangfuseConnection()}/session/${encodeURIComponent(conversationId)}`;
3720
+ const pinnedOrder = () => `${BASE_URL}/api/user/settings/pinned-order`;
2930
3721
  const toolFavorites = () => `${BASE_URL}/api/user/settings/favorites/tools`;
2931
3722
  const toolFavorite = (itemType, itemId) => `${toolFavorites()}/${itemType}/${encodeURIComponent(itemId)}`;
2932
3723
  const roles = () => `${BASE_URL}/api/roles`;
@@ -2954,6 +3745,7 @@ const regenerateBackupCodes$1 = () => `${BASE_URL}/api/auth/2fa/backup/regenerat
2954
3745
  const verifyTwoFactorTemp$1 = () => `${BASE_URL}/api/auth/2fa/verify-temp`;
2955
3746
  const memories = () => `${BASE_URL}/api/memories`;
2956
3747
  const memory = (key, agentId) => `${memories()}/${encodeURIComponent(key)}${agentId ? `?agentId=${encodeURIComponent(agentId)}` : ""}`;
3748
+ const memoryById = (id, agentId) => `${memories()}/id/${encodeURIComponent(id)}${agentId ? `?agentId=${encodeURIComponent(agentId)}` : ""}`;
2957
3749
  const memoryPreferences = () => `${memories()}/preferences`;
2958
3750
  const searchPrincipals$1 = (params) => {
2959
3751
  const { q: query, limit, types } = params;
@@ -2997,6 +3789,7 @@ let FileContext = /* @__PURE__ */ function(FileContext) {
2997
3789
  FileContext["image_generation"] = "image_generation";
2998
3790
  FileContext["assistants_output"] = "assistants_output";
2999
3791
  FileContext["message_attachment"] = "message_attachment";
3792
+ FileContext["run_artifact"] = "run_artifact";
3000
3793
  FileContext["skill_file"] = "skill_file";
3001
3794
  FileContext["filename"] = "filename";
3002
3795
  FileContext["updatedAt"] = "updatedAt";
@@ -3027,6 +3820,12 @@ let TokenExchangeMethodEnum = /* @__PURE__ */ function(TokenExchangeMethodEnum)
3027
3820
  }({});
3028
3821
  //#endregion
3029
3822
  //#region src/mcp.ts
3823
+ /**
3824
+ * Upper bound on a stored MCP `iconPath` (URL or data URI). Enforced by
3825
+ * `sanitizeMcpIconPath`, not a schema `.max()`, so re-submitting a server whose
3826
+ * stored icon predates the cap clears the icon instead of rejecting the update.
3827
+ */
3828
+ const MAX_MCP_ICON_PATH_LENGTH = 256 * 1024;
3030
3829
  const validateOAuthClientCredentials = (oauth, ctx) => {
3031
3830
  if (oauth.client_secret && !oauth.client_id) ctx.addIssue({
3032
3831
  code: z.ZodIssueCode.custom,
@@ -3131,9 +3930,11 @@ const UserOAuthOptionsSchema = OAuthOptionsBaseSchema.omit({
3131
3930
  const OboOptionsSchema = z.object({
3132
3931
  /** Scopes to request for the downstream MCP server (e.g., "api://<client-id>/Mcp.Tools.ReadWrite") */
3133
3932
  scopes: z.string().min(1) });
3933
+ const MCP_SERVER_TITLE_PATTERN = /* @__PURE__ */ new RegExp("^[\\p{L}\\p{N}][\\p{L}\\p{N}\\p{M}'’ -]*$", "u");
3934
+ const MCP_SERVER_TITLE_ERROR = "Title must start with a letter or number and can include spaces, hyphens, and apostrophes";
3134
3935
  const BaseOptionsSchema = z.object({
3135
- /** Display name for the MCP server - only letters, numbers, and spaces allowed */
3136
- title: z.string().regex(/^[a-zA-Z0-9 ]+$/, "Title can only contain letters, numbers, and spaces").optional(),
3936
+ /** Display name for the MCP server */
3937
+ title: z.string().regex(MCP_SERVER_TITLE_PATTERN, MCP_SERVER_TITLE_ERROR).optional(),
3137
3938
  /** Description of the MCP server */
3138
3939
  description: z.string().optional(),
3139
3940
  /**
@@ -3148,7 +3949,14 @@ const BaseOptionsSchema = z.object({
3148
3949
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
3149
3950
  sseReadTimeout: z.number().int().positive().optional(),
3150
3951
  initTimeout: z.number().int().nonnegative().optional(),
3151
- /** Controls visibility in chat dropdown menu (MCPSelect) */
3952
+ /**
3953
+ * Whether the server is offered in chat.
3954
+ *
3955
+ * `false` hides it from the chat dropdown (MCPSelect) AND bars it from the
3956
+ * chat selection a request carries, so a stale or hand-written request cannot
3957
+ * reach it either. It does not restrict agents, nor a server a model spec
3958
+ * pins through `mcpServers` — both are the operator's own choice.
3959
+ */
3152
3960
  chatMenu: z.boolean().optional(),
3153
3961
  /**
3154
3962
  * Controls server instruction behavior:
@@ -3204,6 +4012,26 @@ const ProxyUrlSchema = z.string().transform((val) => extractEnvVariable(val)).pi
3204
4012
  const protocol = new URL(val).protocol;
3205
4013
  return protocol === "http:" || protocol === "https:" || protocol === "socks:" || protocol === "socks5:";
3206
4014
  }, { message: "Proxy URL must use http://, https://, socks://, or socks5://" });
4015
+ const PROCESS_MCP_SERVER_FIELDS = new Set([
4016
+ "command",
4017
+ "args",
4018
+ "env",
4019
+ "cwd",
4020
+ "stderr"
4021
+ ]);
4022
+ function isProcessMCPServerField(field) {
4023
+ return PROCESS_MCP_SERVER_FIELDS.has(field);
4024
+ }
4025
+ function isProcessMCPServerConfig(value) {
4026
+ if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
4027
+ const config = value;
4028
+ if (config.type === "stdio") return true;
4029
+ return Object.keys(config).some(isProcessMCPServerField);
4030
+ }
4031
+ function hasProcessMCPServerConfig(value) {
4032
+ if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
4033
+ return Object.values(value).some(isProcessMCPServerConfig);
4034
+ }
3207
4035
  const StdioOptionsSchema = BaseOptionsSchema.extend({
3208
4036
  type: z.literal("stdio").default("stdio"),
3209
4037
  obo: z.undefined().optional(),
@@ -3376,7 +4204,7 @@ const defaultSocialLogins = [
3376
4204
  "discord",
3377
4205
  "saml"
3378
4206
  ];
3379
- const BASE_ONLY_CONFIG_SECTIONS = [];
4207
+ const BASE_ONLY_CONFIG_SECTIONS = ["filters"];
3380
4208
  /** Sections that may be stored in the tenant's base config document but must
3381
4209
  * not be overridden or tombstoned by role, group, or user config documents. */
3382
4210
  const BASE_PRINCIPAL_CONFIG_SECTIONS = ["langfuse"];
@@ -3404,6 +4232,14 @@ const defaultRetrievalModels = [
3404
4232
  ];
3405
4233
  const excludedKeys = new Set([
3406
4234
  "conversationId",
4235
+ "agentEventBinding",
4236
+ "agentEventActor",
4237
+ "agentEventActorCleanup",
4238
+ "agentEventActorSuspension",
4239
+ "agentEventActorReconciliations",
4240
+ "agentEventActorEpoch",
4241
+ "agentEventActorLegacyTurn",
4242
+ "subagentThread",
3407
4243
  "title",
3408
4244
  "iconURL",
3409
4245
  "greeting",
@@ -3415,6 +4251,8 @@ const excludedKeys = new Set([
3415
4251
  "isTemporary",
3416
4252
  "messages",
3417
4253
  "isArchived",
4254
+ "pinned",
4255
+ "archivedAt",
3418
4256
  "tags",
3419
4257
  "user",
3420
4258
  "__v",
@@ -3804,6 +4642,22 @@ const baseEndpointSchema = z.object({
3804
4642
  activityPhasePrompt: z.string().optional(),
3805
4643
  /** Cost cap: maximum phase summaries generated per run. Default 5. */
3806
4644
  activityPhaseMaxPerRun: z.number().int().positive().optional(),
4645
+ /** Generates a live orientation label for sufficiently long top-level response reasoning. */
4646
+ reasoningLabel: z.boolean().optional(),
4647
+ /** Model used for reasoning labels. Defaults to activityModel, titleModel, then run model. */
4648
+ reasoningLabelModel: z.string().optional(),
4649
+ /** Endpoint receiving the bounded visible-reasoning snapshot. Defaults to activityEndpoint. */
4650
+ reasoningLabelEndpoint: z.string().optional(),
4651
+ /** Overrides the dedicated reasoning-label system prompt. */
4652
+ reasoningLabelPrompt: z.string().optional(),
4653
+ /** Characters required before the first reasoning label. Default 500. */
4654
+ reasoningLabelMinChars: z.number().int().positive().optional(),
4655
+ /** New characters required between streaming revisions. Default 400. */
4656
+ reasoningLabelUpdateChars: z.number().int().positive().optional(),
4657
+ /** Minimum milliseconds between streaming revisions. Default 3000. */
4658
+ reasoningLabelUpdateIntervalMs: z.number().int().nonnegative().optional(),
4659
+ /** Cost cap: maximum reasoning-label provider calls attempted per run. Default 8. */
4660
+ reasoningLabelMaxPerRun: z.number().int().positive().optional(),
3807
4661
  /** Maximum characters allowed in a single tool result before truncation. */
3808
4662
  maxToolResultChars: z.number().positive().optional()
3809
4663
  });
@@ -3890,13 +4744,13 @@ function isRemoteOidcUrlAllowed(value) {
3890
4744
  }
3891
4745
  const remoteApiOidcUrlSchema = z.string().url().refine(isRemoteOidcUrlAllowed, { message: "must use https:// unless targeting localhost" });
3892
4746
  const remoteApiOidcScopeSchema = z.string().refine((scope) => !scope.includes(","), { message: "scopes must be space-separated" });
3893
- const remoteApiOidcSchema = z.object({
4747
+ const oidcAccessTokenSchema = z.object({
3894
4748
  enabled: z.boolean().default(false),
3895
4749
  issuer: remoteApiOidcUrlSchema.optional(),
3896
4750
  audience: z.string().min(1).optional(),
3897
- jwksUri: remoteApiOidcUrlSchema.optional(),
3898
- scope: remoteApiOidcScopeSchema.optional()
3899
- }).superRefine((oidc, ctx) => {
4751
+ jwksUri: remoteApiOidcUrlSchema.optional()
4752
+ });
4753
+ function validateEnabledOidc(oidc, ctx) {
3900
4754
  if (oidc.enabled === true && !oidc.issuer) ctx.addIssue({
3901
4755
  code: z.ZodIssueCode.custom,
3902
4756
  path: ["issuer"],
@@ -3907,12 +4761,46 @@ const remoteApiOidcSchema = z.object({
3907
4761
  path: ["audience"],
3908
4762
  message: "audience is required when OIDC auth is enabled"
3909
4763
  });
3910
- });
4764
+ }
4765
+ const remoteApiOidcSchema = oidcAccessTokenSchema.extend({ scope: remoteApiOidcScopeSchema.optional() }).superRefine(validateEnabledOidc);
3911
4766
  const remoteApiAuthSchema = z.object({
3912
4767
  apiKey: z.object({ enabled: z.boolean().default(true) }).optional(),
3913
4768
  oidc: remoteApiOidcSchema.optional()
3914
4769
  });
3915
4770
  const remoteApiSchema = z.object({ auth: remoteApiAuthSchema.optional() });
4771
+ const managementClientBindingSchema = z.object({
4772
+ clientId: z.string().trim().min(1).max(128),
4773
+ subject: z.string().trim().min(1).max(512).optional(),
4774
+ userId: z.string().trim().regex(/^[a-f\d]{24}$/i, "must be a MongoDB ObjectId").transform((userId) => userId.toLowerCase()),
4775
+ 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"),
4776
+ enabled: z.boolean().default(true)
4777
+ }).strict();
4778
+ const managementApiOidcSchema = oidcAccessTokenSchema.strict().superRefine(validateEnabledOidc);
4779
+ const managementApiAuthSchema = z.object({
4780
+ oidc: managementApiOidcSchema,
4781
+ clients: z.array(managementClientBindingSchema).max(100).default([])
4782
+ }).strict().superRefine((auth, ctx) => {
4783
+ if (auth.oidc.enabled === true && auth.clients.length === 0) ctx.addIssue({
4784
+ code: z.ZodIssueCode.custom,
4785
+ path: ["clients"],
4786
+ message: "at least one client binding is required when management auth is enabled"
4787
+ });
4788
+ const clientIds = /* @__PURE__ */ new Set();
4789
+ for (let index = 0; index < auth.clients.length; index++) {
4790
+ const client = auth.clients[index];
4791
+ if (clientIds.has(client.clientId)) ctx.addIssue({
4792
+ code: z.ZodIssueCode.custom,
4793
+ path: [
4794
+ "clients",
4795
+ index,
4796
+ "clientId"
4797
+ ],
4798
+ message: "client IDs must be unique"
4799
+ });
4800
+ clientIds.add(client.clientId);
4801
+ }
4802
+ });
4803
+ const managementApiSchema = z.object({ auth: managementApiAuthSchema.optional() }).strict();
3916
4804
  /**
3917
4805
  * Permission mode applied to a tool call. Mirrors `@librechat/agents`'s
3918
4806
  * `ToolPolicyMode` 1:1.
@@ -3935,7 +4823,7 @@ const toolApprovalModeSchema = z.enum([
3935
4823
  *
3936
4824
  * Shape mirrors `@librechat/agents`'s `ToolPolicyConfig` so the host can map it
3937
4825
  * directly into `createToolPolicyHook(config)`. The SDK does the evaluation
3938
- * (`deny → bypass → allow → ask → dontAsk → fallthrough(ask)`); this config
4826
+ * (`deny → ask → allow → bypass → dontAsk → fallthrough(ask)`); this config
3939
4827
  * just describes the surface.
3940
4828
  *
3941
4829
  * Conventions:
@@ -4018,6 +4906,62 @@ const checkpointerSchema = z.object({
4018
4906
  checkpointCollectionName: z.string().optional(),
4019
4907
  checkpointWritesCollectionName: z.string().optional()
4020
4908
  }).optional();
4909
+ const codeEnvironmentBaseURLSchema = z.string().trim().url().refine((value) => {
4910
+ try {
4911
+ const url = new URL(value);
4912
+ return (url.protocol === "http:" || url.protocol === "https:") && !value.includes("?") && !value.includes("#") && url.search.length === 0 && url.hash.length === 0;
4913
+ } catch {
4914
+ return false;
4915
+ }
4916
+ }, { message: "Code environment baseURL must be an HTTP(S) base URL without query or fragment" });
4917
+ function isSecureCodeEnvironmentControlURL(baseURL) {
4918
+ try {
4919
+ const url = new URL(baseURL.trim());
4920
+ if (url.protocol === "https:") return true;
4921
+ if (url.protocol !== "http:") return false;
4922
+ return url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "[::1]";
4923
+ } catch {
4924
+ return false;
4925
+ }
4926
+ }
4927
+ const codeEnvironmentPermissionDecisionSchema = z.enum([
4928
+ "allow",
4929
+ "ask",
4930
+ "deny"
4931
+ ]);
4932
+ const codeEnvironmentPermissionFieldSchema = z.object({
4933
+ allowed: z.array(codeEnvironmentPermissionDecisionSchema).min(1),
4934
+ default: codeEnvironmentPermissionDecisionSchema.optional().default("ask")
4935
+ }).strict().superRefine((field, context) => {
4936
+ if (!field.allowed.includes(field.default)) context.addIssue({
4937
+ code: z.ZodIssueCode.custom,
4938
+ path: ["default"],
4939
+ message: "Permission default must be included in allowed values"
4940
+ });
4941
+ });
4942
+ /** Existing attached commands used a fixed 30-second execution budget. */
4943
+ const CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS = 3e4;
4944
+ /** Protocol-level ceiling; deployments may only lower this value. */
4945
+ const CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS = 5 * 6e4;
4946
+ /**
4947
+ * Typed user-tunable surface for one attached code environment. Omitted fields
4948
+ * remain fixed at LibreChat's safe baseline. Isolation, networking, mounts,
4949
+ * privileged execution, and secrets are deliberately not representable here.
4950
+ */
4951
+ const codeEnvironmentUserConfigSchema = z.object({
4952
+ permissions: z.object({
4953
+ fileWrite: codeEnvironmentPermissionFieldSchema.optional(),
4954
+ commandExecution: codeEnvironmentPermissionFieldSchema.optional()
4955
+ }).strict().optional(),
4956
+ limits: z.object({
4957
+ /** Maximum timeout a Bash invocation may request. Omission preserves
4958
+ * the historical 30-second command budget. */
4959
+ maxCommandTimeoutMs: z.number().int().min(1).max(CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS).optional() }).strict().optional()
4960
+ }).strict();
4961
+ const codeEnvironmentUserSettingsSchema = z.object({ permissions: z.object({
4962
+ fileWrite: codeEnvironmentPermissionDecisionSchema.optional(),
4963
+ commandExecution: codeEnvironmentPermissionDecisionSchema.optional()
4964
+ }).strict().optional() }).strict();
4021
4965
  const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.object({
4022
4966
  recursionLimit: z.number().optional(),
4023
4967
  disableBuilder: z.boolean().optional().default(false),
@@ -4034,9 +4978,150 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.
4034
4978
  maxCitations: z.number().min(1).max(50).optional().default(30),
4035
4979
  maxCitationsPerFile: z.number().min(1).max(10).optional().default(7),
4036
4980
  minRelevanceScore: z.number().min(0).max(1).optional().default(.45),
4981
+ /** Maximum explicit subagents per agent (`agent_ids` and `graphs`); raised from
4982
+ * the shipped default of 10 for orchestration-heavy deployments, bounded by
4983
+ * `MAX_SUBAGENTS_CEILING`. */
4984
+ maxSubagents: z.number().int().min(1).max(50).optional().default(10),
4985
+ /** Run-scoped file access for explicitly opted-in subagent delegations. */
4986
+ fileSharing: z.object({
4987
+ enabled: z.boolean().optional().default(false),
4988
+ allowSiblingSharing: z.boolean().optional().default(false),
4989
+ maxFiles: z.number().int().min(1).max(1e3).optional().default(100),
4990
+ /** Aggregate disk budget for private output versions retained during a run. */
4991
+ maxPrivateBytes: z.number().int().min(1).max(10737418240).optional().default(268435456),
4992
+ ttlMs: z.number().int().min(1).max(864e5).optional().default(36e5)
4993
+ }).optional(),
4994
+ /** Maximum concurrent Code API uploads per route and authenticated principal. */
4995
+ codeApiUploadConcurrency: z.number().int().min(1).max(100).optional().default(3),
4996
+ /** Maximum wall-clock time spent waiting on Code API rate limits per operation. */
4997
+ codeApiMaxRetryWaitMs: z.number().int().min(0).max(3e5).optional().default(2e4),
4037
4998
  allowedProviders: z.array(z.union([z.string(), eModelEndpointSchema])).optional(),
4038
4999
  capabilities: z.array(z.nativeEnum(AgentCapabilities)).optional().default(defaultAgentCapabilities),
5000
+ /** Controls which workspace-sharing scopes users may select for stateful code sessions.
5001
+ * Omit this block to preserve the legacy behavior of allowing every scope. */
5002
+ statefulCodeSessions: z.object({
5003
+ allowedEnvironments: z.array(z.enum(STATEFUL_CODE_ENVIRONMENTS)).min(1),
5004
+ /** Server-only personal worker enrollment policy. Effective principal
5005
+ * policy may tighten, but never raise, the deployment ceiling. */
5006
+ principalWorkers: z.object({
5007
+ enabled: z.boolean().optional(),
5008
+ /** Defaults to five. Zero disables enrollment; existing machines remain usable. */
5009
+ maxPerUser: z.number().int().min(0).max(Number.MAX_SAFE_INTEGER).optional()
5010
+ }).optional(),
5011
+ /** Operator-managed execution environments. Attached entries route to a
5012
+ * Code API deployment backed by an outbound librechat-code worker. */
5013
+ environments: z.array(z.object({
5014
+ id: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/),
5015
+ name: z.string().min(1).max(100),
5016
+ type: z.enum(["managed", "attached"]),
5017
+ baseURL: codeEnvironmentBaseURLSchema,
5018
+ default: z.boolean().optional(),
5019
+ /** Server-only outbound worker route. Removed from public config. */
5020
+ workerId: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/).optional(),
5021
+ /** Distinguishes operator policy from a principal-authorized
5022
+ * environment merged into request-scoped server config. */
5023
+ owner: z.enum(["deployment", "principal"]).optional().default("deployment"),
5024
+ /** Administrator-controlled user-tunable settings. Only fields
5025
+ * represented here may be changed by a principal. */
5026
+ configSchema: codeEnvironmentUserConfigSchema.optional(),
5027
+ /** Request-scoped effective settings for a principal-owned environment.
5028
+ * Deployment config should define defaults through configSchema instead. */
5029
+ settings: codeEnvironmentUserSettingsSchema.optional(),
5030
+ /** Server-only enrollment metadata. `tokenEnv` names an
5031
+ * environment variable and never contains the token itself. */
5032
+ pairing: z.object({
5033
+ workerId: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/).optional(),
5034
+ allowPrincipalWorkers: z.boolean().optional().default(false),
5035
+ tokenEnv: z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/)
5036
+ }).superRefine((pairing, pairingContext) => {
5037
+ if (pairing.workerId != null || pairing.allowPrincipalWorkers === true) return;
5038
+ pairingContext.addIssue({
5039
+ code: z.ZodIssueCode.custom,
5040
+ message: "Pairing requires a workerId or principal workers"
5041
+ });
5042
+ }).optional()
5043
+ })).optional()
5044
+ }).superRefine((value, context) => {
5045
+ if (!value?.environments) return;
5046
+ const ids = /* @__PURE__ */ new Set();
5047
+ let defaults = 0;
5048
+ let executableEnvironments = 0;
5049
+ for (const environment of value.environments) {
5050
+ const pairingOnly = environment.pairing?.allowPrincipalWorkers === true && environment.pairing.workerId == null && environment.workerId == null;
5051
+ if (environment.pairing != null && environment.type !== "attached") context.addIssue({
5052
+ code: z.ZodIssueCode.custom,
5053
+ message: "Only attached code environments may configure pairing",
5054
+ path: [
5055
+ "environments",
5056
+ environment.id,
5057
+ "pairing"
5058
+ ]
5059
+ });
5060
+ if (environment.pairing != null && environment.owner !== "deployment") context.addIssue({
5061
+ code: z.ZodIssueCode.custom,
5062
+ message: "Only deployment-owned code environments may configure pairing",
5063
+ path: [
5064
+ "environments",
5065
+ environment.id,
5066
+ "pairing"
5067
+ ]
5068
+ });
5069
+ if (environment.pairing != null && !isSecureCodeEnvironmentControlURL(environment.baseURL)) context.addIssue({
5070
+ code: z.ZodIssueCode.custom,
5071
+ message: "Paired code environments require HTTPS outside loopback development",
5072
+ path: [
5073
+ "environments",
5074
+ environment.id,
5075
+ "baseURL"
5076
+ ]
5077
+ });
5078
+ if (environment.workerId != null && environment.pairing?.workerId != null && environment.workerId !== environment.pairing.workerId) context.addIssue({
5079
+ code: z.ZodIssueCode.custom,
5080
+ message: "Code environment workerId must match pairing.workerId",
5081
+ path: [
5082
+ "environments",
5083
+ environment.id,
5084
+ "workerId"
5085
+ ]
5086
+ });
5087
+ if (pairingOnly && environment.default === true) context.addIssue({
5088
+ code: z.ZodIssueCode.custom,
5089
+ message: "Pairing-only code control planes cannot be execution defaults",
5090
+ path: [
5091
+ "environments",
5092
+ environment.id,
5093
+ "default"
5094
+ ]
5095
+ });
5096
+ if (ids.has(environment.id)) context.addIssue({
5097
+ code: z.ZodIssueCode.custom,
5098
+ message: `Duplicate code environment id: ${environment.id}`,
5099
+ path: ["environments"]
5100
+ });
5101
+ ids.add(environment.id);
5102
+ if (!pairingOnly) {
5103
+ executableEnvironments += 1;
5104
+ if (environment.default === true) defaults += 1;
5105
+ }
5106
+ }
5107
+ if (executableEnvironments > 0 && defaults !== 1) context.addIssue({
5108
+ code: z.ZodIssueCode.custom,
5109
+ message: "Exactly one stateful code environment must be the default",
5110
+ path: ["environments"]
5111
+ });
5112
+ }).optional(),
5113
+ /** Optional trusted origin for in-process agent event delivery. */
5114
+ eventDriven: z.object({ selfUrl: z.string().url().optional() }).optional(),
5115
+ /** Conversational background-task delivery policy. Automatic completion wakeups are
5116
+ * enabled unless an administrator explicitly restores poll-only behavior. */
5117
+ backgroundTasks: z.object({
5118
+ completionWakeups: z.boolean().optional().default(true),
5119
+ /** Cooperative cancellation for process-local ordinary tools. Off
5120
+ * by default so existing deployments opt into the new control. */
5121
+ ordinaryToolCancellation: z.boolean().optional().default(false)
5122
+ }).optional(),
4039
5123
  skills: z.object({ maxCatalogSkills: z.number().int().min(1).max(100).optional() }).optional(),
5124
+ managementApi: managementApiSchema.optional(),
4040
5125
  remoteApi: remoteApiSchema.optional(),
4041
5126
  /** Human-in-the-loop tool approval policy. Off by default. */
4042
5127
  toolApproval: toolApprovalPolicySchema,
@@ -4048,7 +5133,8 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.
4048
5133
  capabilities: defaultAgentCapabilities,
4049
5134
  maxCitations: 30,
4050
5135
  maxCitationsPerFile: 7,
4051
- minRelevanceScore: .45
5136
+ minRelevanceScore: .45,
5137
+ maxSubagents: 10
4052
5138
  });
4053
5139
  const paramDefinitionSchema = z.object({
4054
5140
  key: z.string(),
@@ -4066,7 +5152,11 @@ const paramDefinitionSchema = z.object({
4066
5152
  range: z.object({
4067
5153
  min: z.number(),
4068
5154
  max: z.number(),
4069
- step: z.number().optional()
5155
+ step: z.number().optional(),
5156
+ positiveMin: z.number().optional()
5157
+ }).refine((value) => value.positiveMin == null || value.positiveMin <= value.max, {
5158
+ message: "range.positiveMin cannot exceed range.max",
5159
+ path: ["positiveMin"]
4070
5160
  }).optional(),
4071
5161
  enumMappings: z.record(z.union([
4072
5162
  z.number(),
@@ -4177,7 +5267,15 @@ const azureEndpointSchema = z.object({
4177
5267
  activityPhaseModel: true,
4178
5268
  activityPhaseEndpoint: true,
4179
5269
  activityPhasePrompt: true,
4180
- activityPhaseMaxPerRun: true
5270
+ activityPhaseMaxPerRun: true,
5271
+ reasoningLabel: true,
5272
+ reasoningLabelModel: true,
5273
+ reasoningLabelEndpoint: true,
5274
+ reasoningLabelPrompt: true,
5275
+ reasoningLabelMinChars: true,
5276
+ reasoningLabelUpdateChars: true,
5277
+ reasoningLabelUpdateIntervalMs: true,
5278
+ reasoningLabelMaxPerRun: true
4181
5279
  }).partial()
4182
5280
  );
4183
5281
  /**
@@ -4281,6 +5379,21 @@ const sttSchema = z.object({
4281
5379
  openai: sttOpenaiSchema.optional(),
4282
5380
  azureOpenAI: sttAzureOpenAISchema.optional()
4283
5381
  });
5382
+ /**
5383
+ * The speech providers a schema actually configures. `allowedAddresses` is transport
5384
+ * policy rather than a provider, and a provider key present but empty configures
5385
+ * nothing. The speech services accept a schema only when exactly one survives here, so
5386
+ * the upload router reads availability from the same list and never routes audio to a
5387
+ * transcription that cannot run.
5388
+ */
5389
+ function listConfiguredSpeechProviders(schema) {
5390
+ if (schema == null) return [];
5391
+ return Object.entries(schema).filter(([key, value]) => key !== "allowedAddresses" && value != null && typeof value === "object" && Object.keys(value).length > 0);
5392
+ }
5393
+ /** Whether a speech schema names exactly one usable provider. */
5394
+ function isSpeechProviderConfigured(schema) {
5395
+ return listConfiguredSpeechProviders(schema).length === 1;
5396
+ }
4284
5397
  const speechTab = z.object({
4285
5398
  conversationMode: z.boolean().optional(),
4286
5399
  advancedMode: z.boolean().optional(),
@@ -4322,6 +5435,10 @@ let RateLimitPrefix = /* @__PURE__ */ function(RateLimitPrefix) {
4322
5435
  return RateLimitPrefix;
4323
5436
  }({});
4324
5437
  const rateLimitSchema = z.object({
5438
+ agentEvents: z.object({
5439
+ userMax: z.number().int().positive().optional(),
5440
+ userWindowInMinutes: z.number().positive().optional()
5441
+ }).optional(),
4325
5442
  fileUploads: z.object({
4326
5443
  ipMax: z.number().optional(),
4327
5444
  ipWindowInMinutes: z.number().optional(),
@@ -4361,7 +5478,14 @@ const termsOfServiceSchema = z.object({
4361
5478
  modalContent: z.string().or(z.array(z.string())).optional()
4362
5479
  });
4363
5480
  const localizedStringSchema = z.union([z.string(), z.record(z.string())]);
5481
+ const mcpRefreshDefaults = {
5482
+ toolsRefreshInterval: 300 * 1e3,
5483
+ statusRefreshInterval: 30 * 1e3
5484
+ };
4364
5485
  const mcpServersSchema = z.object({
5486
+ /** Foreground polling intervals in milliseconds; 0 disables polling. */
5487
+ toolsRefreshInterval: z.number().int().nonnegative().max(2147483647).optional(),
5488
+ statusRefreshInterval: z.number().int().nonnegative().max(2147483647).optional(),
4365
5489
  placeholder: z.string().optional(),
4366
5490
  use: z.boolean().optional(),
4367
5491
  create: z.boolean().optional(),
@@ -4373,6 +5497,68 @@ const mcpServersSchema = z.object({
4373
5497
  subLabel: localizedStringSchema.optional()
4374
5498
  }).optional()
4375
5499
  }).optional();
5500
+ /** Values the trace viewer uses for any `interface.traceViewer` field left unset. */
5501
+ const traceViewerDefaults = {
5502
+ enabled: false,
5503
+ showInputOutput: false,
5504
+ maxRecords: 1e3,
5505
+ maxContentLength: 5e4,
5506
+ requestsPerMinute: 30,
5507
+ requestTimeoutMs: 1e4
5508
+ };
5509
+ /** Inclusive bounds for the numeric `interface.traceViewer` fields. */
5510
+ const traceViewerLimits = {
5511
+ maxRecords: {
5512
+ min: 1,
5513
+ max: 1e4
5514
+ },
5515
+ maxContentLength: {
5516
+ min: 1,
5517
+ max: 1e6
5518
+ },
5519
+ requestsPerMinute: {
5520
+ min: 1,
5521
+ max: 1e3
5522
+ },
5523
+ requestTimeoutMs: {
5524
+ min: 1e3,
5525
+ max: 3e5
5526
+ }
5527
+ };
5528
+ const boundedIntegerSchema = (field) => z.number().int().min(traceViewerLimits[field].min).max(traceViewerLimits[field].max).optional();
5529
+ const traceViewerSchema = z.object({
5530
+ /** Shows the conversation trace control for traces this deployment exported. */
5531
+ enabled: z.boolean().optional(),
5532
+ /** Returns observation input, output and metadata in the record inspector. */
5533
+ showInputOutput: z.boolean().optional(),
5534
+ /** Observations read from the tracing backend per request. */
5535
+ maxRecords: boundedIntegerSchema("maxRecords"),
5536
+ /** Characters kept from each input, output and metadata value before truncation. */
5537
+ maxContentLength: boundedIntegerSchema("maxContentLength"),
5538
+ /** Trace reads one user may start per minute. */
5539
+ requestsPerMinute: boundedIntegerSchema("requestsPerMinute"),
5540
+ /** Budget for each round trip to the tracing backend, in milliseconds. */
5541
+ requestTimeoutMs: boundedIntegerSchema("requestTimeoutMs")
5542
+ });
5543
+ function boundedInteger(value, field) {
5544
+ const { min, max } = traceViewerLimits[field];
5545
+ return typeof value === "number" && Number.isSafeInteger(value) && value >= min ? Math.min(value, max) : traceViewerDefaults[field];
5546
+ }
5547
+ /**
5548
+ * Fills unset or invalid `interface.traceViewer` fields from
5549
+ * {@link traceViewerDefaults}. Admin config overrides reach runtime without
5550
+ * schema validation, so every consumer reads the section through this.
5551
+ */
5552
+ function resolveTraceViewerConfig(config) {
5553
+ return {
5554
+ enabled: config?.enabled === true,
5555
+ showInputOutput: config?.showInputOutput === true,
5556
+ maxRecords: boundedInteger(config?.maxRecords, "maxRecords"),
5557
+ maxContentLength: boundedInteger(config?.maxContentLength, "maxContentLength"),
5558
+ requestsPerMinute: boundedInteger(config?.requestsPerMinute, "requestsPerMinute"),
5559
+ requestTimeoutMs: boundedInteger(config?.requestTimeoutMs, "requestTimeoutMs")
5560
+ };
5561
+ }
4376
5562
  let RetentionMode = /* @__PURE__ */ function(RetentionMode) {
4377
5563
  RetentionMode["ALL"] = "all";
4378
5564
  RetentionMode["TEMPORARY"] = "temporary";
@@ -4406,6 +5592,7 @@ const interfaceSchema = z.object({
4406
5592
  })]).optional(),
4407
5593
  temporaryChat: z.boolean().optional(),
4408
5594
  temporaryChatRetention: z.number().min(1).max(8760).optional(),
5595
+ generalChatRetention: z.number().min(1).max(8760).optional(),
4409
5596
  autoSubmitFromUrl: z.boolean().optional(),
4410
5597
  retentionMode: z.nativeEnum(RetentionMode).default("temporary"),
4411
5598
  retainAgentFiles: z.boolean().optional(),
@@ -4413,6 +5600,7 @@ const interfaceSchema = z.object({
4413
5600
  webSearch: z.boolean().optional(),
4414
5601
  contextUsage: z.boolean().optional(),
4415
5602
  contextCost: z.boolean().optional(),
5603
+ feedback: z.boolean().optional(),
4416
5604
  currency: z.object({
4417
5605
  code: z.string(),
4418
5606
  rate: z.number().positive()
@@ -4425,6 +5613,7 @@ const interfaceSchema = z.object({
4425
5613
  marketplace: z.object({ use: z.boolean().optional() }).optional(),
4426
5614
  fileSearch: z.boolean().optional(),
4427
5615
  fileCitations: z.boolean().optional(),
5616
+ traceViewer: traceViewerSchema.optional(),
4428
5617
  /** Tool keys (and `'mcp'` or an MCP server name) pinned to the prompt bar by default */
4429
5618
  defaultPinnedTools: z.array(z.string()).optional(),
4430
5619
  buildInfo: z.boolean().optional(),
@@ -4446,6 +5635,26 @@ const interfaceSchema = z.object({
4446
5635
  share: z.boolean().optional(),
4447
5636
  public: z.boolean().optional(),
4448
5637
  snapshotFiles: z.boolean().optional()
5638
+ })]).optional(),
5639
+ schedules: z.union([z.boolean(), z.object({
5640
+ use: z.boolean().optional(),
5641
+ create: z.boolean().optional(),
5642
+ maxPerUser: z.number().int().min(0).optional(),
5643
+ minIntervalMinutes: z.number().int().min(1).optional(),
5644
+ autoDisableAfterFailures: z.number().int().min(1).optional(),
5645
+ admissionConcurrency: z.number().int().min(1).max(100).optional(),
5646
+ fireConcurrency: z.number().int().min(1).optional(),
5647
+ mcpPreflightConcurrency: z.number().int().min(1).max(10).optional(),
5648
+ mcpPreflightTimeoutMs: z.number().int().min(1e3).max(6e5).optional(),
5649
+ /** Refuse schedules that are not filed under a chat project. Enforced on
5650
+ * create/update AND at every fire, so raising it later stops schedules
5651
+ * that predate the policy instead of grandfathering them. */
5652
+ requireProject: z.boolean().optional(),
5653
+ /** Pins every scheduled run to ONE chat project, ignoring any client
5654
+ * choice. Implies `requireProject`. The project must belong to the
5655
+ * schedule's owner, so a deployment-wide value only makes sense with a
5656
+ * per-user/per-role config override. */
5657
+ projectId: z.string().trim().min(1).optional()
4449
5658
  })]).optional()
4450
5659
  }).default({
4451
5660
  modelSelect: true,
@@ -4472,6 +5681,7 @@ const interfaceSchema = z.object({
4472
5681
  webSearch: true,
4473
5682
  contextUsage: true,
4474
5683
  contextCost: false,
5684
+ feedback: true,
4475
5685
  peoplePicker: {
4476
5686
  users: true,
4477
5687
  groups: true,
@@ -4541,12 +5751,14 @@ let SearchProviders = /* @__PURE__ */ function(SearchProviders) {
4541
5751
  SearchProviders["SERPER"] = "serper";
4542
5752
  SearchProviders["SEARXNG"] = "searxng";
4543
5753
  SearchProviders["TAVILY"] = "tavily";
5754
+ SearchProviders["KEENABLE"] = "keenable";
4544
5755
  return SearchProviders;
4545
5756
  }({});
4546
5757
  let ScraperProviders = /* @__PURE__ */ function(ScraperProviders) {
4547
5758
  ScraperProviders["FIRECRAWL"] = "firecrawl";
4548
5759
  ScraperProviders["SERPER"] = "serper";
4549
5760
  ScraperProviders["TAVILY"] = "tavily";
5761
+ ScraperProviders["KEENABLE"] = "keenable";
4550
5762
  return ScraperProviders;
4551
5763
  }({});
4552
5764
  let RerankerTypes = /* @__PURE__ */ function(RerankerTypes) {
@@ -4561,6 +5773,17 @@ let SafeSearchTypes = /* @__PURE__ */ function(SafeSearchTypes) {
4561
5773
  SafeSearchTypes[SafeSearchTypes["STRICT"] = 2] = "STRICT";
4562
5774
  return SafeSearchTypes;
4563
5775
  }({});
5776
+ /**
5777
+ * Normalizes a SearXNG engine list into the comma-separated form the API expects.
5778
+ * Accepts the YAML list or comma-separated string an operator may write, and is
5779
+ * applied both at the schema boundary and when loading the runtime config, since
5780
+ * `loadCustomConfig` returns the raw YAML object rather than the parsed result.
5781
+ */
5782
+ function normalizeSearxngEngines(engines) {
5783
+ if (engines == null) return;
5784
+ const normalized = (Array.isArray(engines) ? engines : engines.split(",")).map((engine) => engine.trim()).filter(Boolean);
5785
+ return normalized.length ? normalized.join(",") : void 0;
5786
+ }
4564
5787
  const webSearchSchema = z.object({
4565
5788
  allowedAddresses: allowedAddressesSchema,
4566
5789
  serperApiKey: z.string().optional().default("${SERPER_API_KEY}"),
@@ -4576,6 +5799,8 @@ const webSearchSchema = z.object({
4576
5799
  tavilyApiKeyPreview: apiKeyPreviewSchema,
4577
5800
  tavilySearchUrl: z.string().optional().default("${TAVILY_SEARCH_URL}"),
4578
5801
  tavilyExtractUrl: z.string().optional().default("${TAVILY_EXTRACT_URL}"),
5802
+ keenableApiKey: z.string().optional().default("${KEENABLE_API_KEY}"),
5803
+ keenableApiUrl: z.string().optional().default("${KEENABLE_API_URL}"),
4579
5804
  jinaApiKey: z.string().optional().default("${JINA_API_KEY}"),
4580
5805
  jinaApiKeyPreview: apiKeyPreviewSchema,
4581
5806
  jinaApiUrl: z.string().optional().default("${JINA_API_URL}"),
@@ -4613,6 +5838,16 @@ const webSearchSchema = z.object({
4613
5838
  tag: z.string().nullable().optional()
4614
5839
  }).optional()
4615
5840
  }).optional(),
5841
+ searxngSearchOptions: z.object({
5842
+ engines: z.union([z.string(), z.array(z.string())]).transform(normalizeSearxngEngines).optional(),
5843
+ language: z.string().optional(),
5844
+ timeRange: z.enum([
5845
+ "day",
5846
+ "month",
5847
+ "year"
5848
+ ]).optional(),
5849
+ timeout: z.number().int().positive().max(12e4).optional()
5850
+ }).optional(),
4616
5851
  tavilySearchOptions: z.object({
4617
5852
  searchDepth: z.enum([
4618
5853
  "basic",
@@ -4653,6 +5888,16 @@ const webSearchSchema = z.object({
4653
5888
  includeFavicon: z.boolean().optional(),
4654
5889
  format: z.enum(["markdown", "text"]).optional(),
4655
5890
  timeout: z.number().int().nonnegative().max(12e4).optional()
5891
+ }).optional(),
5892
+ keenableSearchOptions: z.object({
5893
+ maxResults: z.number().int().min(1).max(20).optional(),
5894
+ site: z.string().optional(),
5895
+ attributionTitle: z.string().optional(),
5896
+ timeout: z.number().int().nonnegative().max(12e4).optional()
5897
+ }).optional(),
5898
+ keenableScraperOptions: z.object({
5899
+ attributionTitle: z.string().optional(),
5900
+ timeout: z.number().int().nonnegative().max(12e4).optional()
4656
5901
  }).optional()
4657
5902
  });
4658
5903
  const ocrSchema = z.object({
@@ -4740,13 +5985,6 @@ const summarizationConfigSchema = z.object({
4740
5985
  retainRecent: retainRecentConfigSchema.optional()
4741
5986
  });
4742
5987
  const customEndpointsSchema = z.array(endpointSchema.partial()).optional();
4743
- /**
4744
- * Validates a messageFilter PII regex at config load. Defaults to native RegExp so browser
4745
- * builds add no extra engine; the server injects a check backed by the linear-time runtime
4746
- * engine (RE2) via setMessageFilterRegexValidator, so a pattern the runtime cannot compile
4747
- * (backreferences, lookaround, control escapes, and so on) is rejected at load rather than
4748
- * silently dropped at request time.
4749
- */
4750
5988
  let messageFilterRegexValidator = (value) => {
4751
5989
  try {
4752
5990
  new RegExp(value, "g");
@@ -4759,15 +5997,98 @@ const setMessageFilterRegexValidator = (validate) => {
4759
5997
  messageFilterRegexValidator = validate;
4760
5998
  };
4761
5999
  const messageFilterPiiCustomPatternSchema = z.object({
4762
- id: z.string().min(1),
4763
- label: z.string().min(1),
4764
- regex: z.string().min(1).refine((value) => messageFilterRegexValidator(value), { message: "Unsupported regex: not compatible with the RE2 engine (no backreferences, lookaround, or control escapes)" })
6000
+ id: z.string().min(1).max(256),
6001
+ label: z.string().min(1).max(512),
6002
+ regex: z.string().min(1).max(512)
4765
6003
  });
4766
6004
  const messageFilterPiiSchema = z.object({
4767
- starterPatterns: z.array(z.string()).optional(),
4768
- customPatterns: z.array(messageFilterPiiCustomPatternSchema).optional()
6005
+ starterPatterns: z.array(z.string().max(256)).max(256).optional(),
6006
+ customPatterns: z.array(messageFilterPiiCustomPatternSchema).max(256).optional()
6007
+ }).superRefine((pii, context) => {
6008
+ let regexCharacters = 0;
6009
+ let regexInstructions = 0;
6010
+ for (let index = 0; index < (pii.customPatterns?.length ?? 0); index++) {
6011
+ const pattern = pii.customPatterns?.[index];
6012
+ if (pattern == null) continue;
6013
+ regexCharacters += pattern.regex.length;
6014
+ const result = messageFilterRegexValidator(pattern.regex);
6015
+ if (!(typeof result === "boolean" ? result : result.supported)) {
6016
+ context.addIssue({
6017
+ code: z.ZodIssueCode.custom,
6018
+ path: [
6019
+ "customPatterns",
6020
+ index,
6021
+ "regex"
6022
+ ],
6023
+ message: "Unsupported regex: not compatible with the RE2 engine (no backreferences, lookaround, or control escapes)"
6024
+ });
6025
+ continue;
6026
+ }
6027
+ if (typeof result !== "boolean" && result.programSize != null) regexInstructions += result.programSize;
6028
+ }
6029
+ if (regexCharacters > 8192) context.addIssue({
6030
+ code: z.ZodIssueCode.custom,
6031
+ path: ["customPatterns"],
6032
+ message: `Custom PII regexes may contain at most ${MAX_PII_CUSTOM_REGEX_CHARACTERS} characters in total`
6033
+ });
6034
+ if (regexInstructions > 8192) context.addIssue({
6035
+ code: z.ZodIssueCode.custom,
6036
+ path: ["customPatterns"],
6037
+ message: `Custom PII regexes may compile to at most ${MAX_PII_CUSTOM_REGEX_INSTRUCTIONS} instructions in total`
6038
+ });
4769
6039
  });
4770
6040
  const messageFilterSchema = z.object({ pii: messageFilterPiiSchema.optional() });
6041
+ /** User fields a deployment may select as the Langfuse trace `userId`. */
6042
+ const LANGFUSE_TRACE_USER_ID_FIELDS = [
6043
+ "id",
6044
+ "email",
6045
+ "username",
6046
+ "name",
6047
+ "openidId",
6048
+ "samlId",
6049
+ "ldapId",
6050
+ "googleId",
6051
+ "githubId",
6052
+ "discordId",
6053
+ "appleId",
6054
+ "facebookId"
6055
+ ];
6056
+ /** User fields a deployment may copy into Langfuse trace metadata. */
6057
+ const LANGFUSE_TRACE_USER_METADATA_FIELDS = [
6058
+ ...LANGFUSE_TRACE_USER_ID_FIELDS,
6059
+ "role",
6060
+ "provider"
6061
+ ];
6062
+ /** Request fields a deployment may copy into Langfuse trace metadata. */
6063
+ const LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS = [
6064
+ "conversationId",
6065
+ "endpoint",
6066
+ "endpointType",
6067
+ "provider",
6068
+ "model",
6069
+ "modelLabel",
6070
+ "spec"
6071
+ ];
6072
+ /**
6073
+ * What a deployment attaches to every Langfuse trace beyond the defaults.
6074
+ * Nothing here is exported unless explicitly listed, so the default trace
6075
+ * carries only the internal user id and no user or request metadata.
6076
+ */
6077
+ const langfuseTraceConfigSchema = z.object({
6078
+ /**
6079
+ * Which user field becomes the trace `userId`. Defaults to the internal user
6080
+ * id; a user with no value for the chosen field keeps the internal id.
6081
+ */
6082
+ userIdField: z.enum(LANGFUSE_TRACE_USER_ID_FIELDS).optional(),
6083
+ /** User fields exported as `librechat.user.<field>` trace metadata. */
6084
+ userMetadataFields: z.array(z.enum(LANGFUSE_TRACE_USER_METADATA_FIELDS)).optional(),
6085
+ /**
6086
+ * Request fields exported as trace metadata: `librechat.conversation.id`,
6087
+ * `librechat.endpoint`, `librechat.endpoint.type`, `librechat.provider`,
6088
+ * `librechat.model`, `librechat.model.label`, and `librechat.spec`.
6089
+ */
6090
+ conversationMetadataFields: z.array(z.enum(LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS)).optional()
6091
+ });
4771
6092
  const langfuseConfigSchema = z.object({
4772
6093
  enabled: z.boolean().optional(),
4773
6094
  publicKey: z.string().optional(),
@@ -4778,7 +6099,30 @@ const langfuseConfigSchema = z.object({
4778
6099
  * admin reads can show which secret key is configured without returning the secret. */
4779
6100
  secretKeyPreview: z.string().optional(),
4780
6101
  /** Routing key for one of the deployment-configured tenant Langfuse destinations. */
4781
- destination: z.string().optional()
6102
+ destination: z.string().optional(),
6103
+ /**
6104
+ * Custom request headers sent on every outbound Langfuse request — trace and
6105
+ * media export, feedback scores, and credential verification — for
6106
+ * self-hosted instances behind an authenticating proxy or gateway. Values
6107
+ * support `${ENV_VAR}` interpolation.
6108
+ *
6109
+ * Deployment-level only. Trace export batches spans from every user through
6110
+ * one exporter, so unlike endpoint headers these cannot carry per-user
6111
+ * placeholders. Headers referencing an unset variable, naming an
6112
+ * infrastructure secret, or carrying an invalid HTTP field name are dropped
6113
+ * with a warning rather than sent.
6114
+ *
6115
+ * Sent only when the deployment configures exactly one Langfuse origin, and
6116
+ * only to that origin. The map cannot say which endpoint it authenticates
6117
+ * to, so with several configured origins any choice of recipient would risk
6118
+ * disclosing a gateway credential to the others; a warning is logged instead.
6119
+ * Multi-destination deployments need per-destination headers, which this
6120
+ * schema does not yet express — and note the fanout collector forwards only
6121
+ * `Authorization` upstream regardless.
6122
+ */
6123
+ headers: z.record(z.string()).optional(),
6124
+ /** Trace user identity and allowlisted user/request metadata. */
6125
+ trace: langfuseTraceConfigSchema.optional()
4782
6126
  });
4783
6127
  const configSchema = z.object({
4784
6128
  version: z.string(),
@@ -4796,7 +6140,35 @@ const configSchema = z.object({
4796
6140
  mcpServers: MCPServersSchema.optional(),
4797
6141
  mcpSettings: z.object({
4798
6142
  allowedDomains: z.array(z.string()).optional(),
4799
- allowedAddresses: allowedAddressesSchema
6143
+ allowedAddresses: allowedAddressesSchema,
6144
+ catalogRecovery: z.object({
6145
+ discoveryBackoffMs: z.array(z.number().int().positive().max(1440 * 6e4)).min(1).max(8).default([
6146
+ 5 * 6e4,
6147
+ 10 * 6e4,
6148
+ 20 * 6e4,
6149
+ 30 * 6e4
6150
+ ]),
6151
+ discoveryTimeoutMs: z.number().int().positive().max(5 * 6e4).default(3e3),
6152
+ /** How long past `discoveryTimeoutMs` a stalled discovery may hold its catalog slot and
6153
+ * coalesced requests. It is never cancelled, so OAuth tokens it redeemed still persist,
6154
+ * and no other discovery for the same server state starts until it settles. */
6155
+ discoverySettleGraceMs: z.number().int().nonnegative().max(5 * 6e4).default(1e4),
6156
+ reauthRetryMs: z.number().int().positive().max(1440 * 6e4).default(30 * 6e4),
6157
+ maxStateEntries: z.number().int().positive().max(1e6).default(1e4),
6158
+ /** Process-wide: how many discoveries released past `discoverySettleGraceMs` may still be
6159
+ * running before recovery starts no new discovery until one settles. The default matches
6160
+ * the three catalog slots a stalled dependency could hold before discoveries were released. */
6161
+ maxDetachedDiscoveries: z.number().int().positive().max(1e3).default(3),
6162
+ generationReadTimeoutMs: z.number().int().positive().max(1e4).default(500),
6163
+ authorizationFenceRetryMs: z.array(z.number().int().nonnegative().max(6e4)).min(1).max(8).default([
6164
+ 0,
6165
+ 50,
6166
+ 200
6167
+ ]),
6168
+ authorizationFenceTimeoutMs: z.number().int().positive().max(3e4).default(1e3),
6169
+ authorizationFenceRetryIntervalMs: z.number().int().positive().max(60 * 6e4).default(3e4),
6170
+ authorizationFenceRetryBatchSize: z.number().int().positive().max(1e4).default(100)
6171
+ }).default({})
4800
6172
  }).optional(),
4801
6173
  interface: interfaceSchema,
4802
6174
  turnstile: turnstileSchema.optional(),
@@ -4821,6 +6193,7 @@ const configSchema = z.object({
4821
6193
  rateLimits: rateLimitSchema.optional(),
4822
6194
  fileConfig: fileConfigSchema.optional(),
4823
6195
  modelSpecs: specsConfigSchema.optional(),
6196
+ filters: filtersConfigSchema.optional(),
4824
6197
  messageFilter: messageFilterSchema.optional(),
4825
6198
  endpoints: z.object({
4826
6199
  allowedAddresses: allowedAddressesSchema,
@@ -4854,6 +6227,7 @@ let KnownEndpoints = /* @__PURE__ */ function(KnownEndpoints) {
4854
6227
  KnownEndpoints["groq"] = "groq";
4855
6228
  KnownEndpoints["helicone"] = "helicone";
4856
6229
  KnownEndpoints["huggingface"] = "huggingface";
6230
+ KnownEndpoints["lemonade"] = "lemonade";
4857
6231
  KnownEndpoints["mistral"] = "mistral";
4858
6232
  KnownEndpoints["mlx"] = "mlx";
4859
6233
  KnownEndpoints["ollama"] = "ollama";
@@ -4892,6 +6266,7 @@ const alternateName = {
4892
6266
  ["anthropic"]: "Anthropic",
4893
6267
  ["custom"]: "Custom",
4894
6268
  ["bedrock"]: "AWS Bedrock",
6269
+ ["lemonade"]: "AMD Lemonade",
4895
6270
  ["ollama"]: "Ollama",
4896
6271
  ["deepseek"]: "DeepSeek",
4897
6272
  ["moonshot"]: "Moonshot",
@@ -4899,6 +6274,14 @@ const alternateName = {
4899
6274
  ["vercel"]: "Vercel",
4900
6275
  ["helicone"]: "Helicone"
4901
6276
  };
6277
+ /**
6278
+ * Models the Assistants endpoints cannot run. GPT-6 Astra serves tool calls only
6279
+ * from the Responses API, and the Assistants surface does not route through
6280
+ * `getOpenAILLMConfig`, so listing it there would offer a configuration the
6281
+ * provider rejects. Kept out of `sharedOpenAIModels`, which both Assistants
6282
+ * catalogs consume.
6283
+ */
6284
+ const responsesOnlyOpenAIModels = ["gpt-6-astra"];
4902
6285
  const sharedOpenAIModels = [
4903
6286
  "gpt-5.6",
4904
6287
  "gpt-5.6-terra",
@@ -4926,6 +6309,7 @@ const sharedOpenAIModels = [
4926
6309
  "gpt-4o"
4927
6310
  ];
4928
6311
  const sharedAnthropicModels = [
6312
+ "claude-fable-5-1",
4929
6313
  "claude-fable-5",
4930
6314
  "claude-opus-5",
4931
6315
  "claude-opus-4-8",
@@ -4960,6 +6344,7 @@ const sharedAnthropicModels = [
4960
6344
  * availability); Opus 4.1 has no global profile, so it uses `us.`.
4961
6345
  */
4962
6346
  const bedrockModels = [
6347
+ "global.anthropic.claude-fable-5-1",
4963
6348
  "global.anthropic.claude-fable-5",
4964
6349
  "global.anthropic.claude-opus-5",
4965
6350
  "global.anthropic.claude-opus-4-8",
@@ -4992,8 +6377,9 @@ const bedrockModels = [
4992
6377
  const defaultModels = {
4993
6378
  ["azureAssistants"]: sharedOpenAIModels,
4994
6379
  ["assistants"]: [...sharedOpenAIModels, "chatgpt-4o-latest"],
4995
- ["agents"]: sharedOpenAIModels,
6380
+ ["agents"]: [...responsesOnlyOpenAIModels, ...sharedOpenAIModels],
4996
6381
  ["google"]: [
6382
+ "gemini-3.8-flash",
4997
6383
  "gemini-3.7-flash",
4998
6384
  "gemini-3.6-flash",
4999
6385
  "gemini-3.5-flash",
@@ -5009,6 +6395,7 @@ const defaultModels = {
5009
6395
  ],
5010
6396
  ["anthropic"]: sharedAnthropicModels,
5011
6397
  ["openAI"]: [
6398
+ ...responsesOnlyOpenAIModels,
5012
6399
  ...sharedOpenAIModels,
5013
6400
  "chatgpt-4o-latest",
5014
6401
  "gpt-4-vision-preview",
@@ -5021,12 +6408,19 @@ const fitlerAssistantModels = (str) => {
5021
6408
  return /gpt-4|gpt-3\\.5/i.test(str) && !/vision|instruct/i.test(str);
5022
6409
  };
5023
6410
  const openAIModels = defaultModels["openAI"];
6411
+ /**
6412
+ * The OpenAI catalog without the models only the first-party OpenAI endpoint
6413
+ * can run. Azure OpenAI shares this list, but Astra is neither routed to the
6414
+ * Responses API nor given its request constraints there, and listing it first
6415
+ * would let it become the default selection.
6416
+ */
6417
+ const nonResponsesOnlyOpenAIModels = openAIModels.filter((model) => !responsesOnlyOpenAIModels.includes(model));
5024
6418
  const initialModelsConfig = {
5025
6419
  initial: [],
5026
6420
  ["openAI"]: openAIModels,
5027
6421
  ["assistants"]: openAIModels.filter(fitlerAssistantModels),
5028
6422
  ["agents"]: openAIModels,
5029
- ["azureOpenAI"]: openAIModels,
6423
+ ["azureOpenAI"]: nonResponsesOnlyOpenAIModels,
5030
6424
  ["google"]: defaultModels["google"],
5031
6425
  ["anthropic"]: defaultModels["anthropic"],
5032
6426
  ["bedrock"]: defaultModels["bedrock"]
@@ -5161,6 +6555,10 @@ let CacheKeys = /* @__PURE__ */ function(CacheKeys) {
5161
6555
  */
5162
6556
  CacheKeys["USER_PRINCIPALS"] = "USER_PRINCIPALS";
5163
6557
  /**
6558
+ * Key for cached prompt group access ID sets (accessible, public, owned).
6559
+ */
6560
+ CacheKeys["PROMPT_GROUPS_ACCESS"] = "PROMPT_GROUPS_ACCESS";
6561
+ /**
5164
6562
  * Key for per-conversation stateful code sandbox prewarm/warm state.
5165
6563
  */
5166
6564
  CacheKeys["SANDBOX_PREWARM"] = "SANDBOX_PREWARM";
@@ -5320,6 +6718,10 @@ let ViolationTypes = /* @__PURE__ */ function(ViolationTypes) {
5320
6718
  * Registration violations.
5321
6719
  */
5322
6720
  ViolationTypes["REGISTRATIONS"] = "registrations";
6721
+ /**
6722
+ * Shared link retrieval limit violations.
6723
+ */
6724
+ ViolationTypes["SHARE_LIMIT"] = "share_limit";
5323
6725
  return ViolationTypes;
5324
6726
  }({});
5325
6727
  /**
@@ -5383,6 +6785,14 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
5383
6785
  */
5384
6786
  ErrorTypes["RESOURCE_RECOVERY_REQUIRED"] = "resource_recovery_required";
5385
6787
  /**
6788
+ * Agent selected a stateful Code API workspace scope disabled by the deployment.
6789
+ */
6790
+ ErrorTypes["STATEFUL_CODE_ENVIRONMENT_NOT_ALLOWED"] = "stateful_code_environment_not_allowed";
6791
+ /**
6792
+ * A conversation's selected attached workspace cannot be used as requested.
6793
+ */
6794
+ ErrorTypes["CODE_WORKSPACE_UNAVAILABLE"] = "code_workspace_unavailable";
6795
+ /**
5386
6796
  * Invalid Agent Provider (excluded by Admin)
5387
6797
  */
5388
6798
  ErrorTypes["INVALID_AGENT_PROVIDER"] = "invalid_agent_provider";
@@ -5403,6 +6813,14 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
5403
6813
  */
5404
6814
  ErrorTypes["AUTH_FAILED"] = "auth_failed";
5405
6815
  /**
6816
+ * Authentication rejected by a rate limiter
6817
+ */
6818
+ ErrorTypes["AUTH_RATE_LIMITED"] = "auth_rate_limited";
6819
+ /**
6820
+ * Authentication rejected because the account or IP is banned
6821
+ */
6822
+ ErrorTypes["AUTH_BANNED"] = "auth_banned";
6823
+ /**
5406
6824
  * Model refused to respond (content policy violation)
5407
6825
  */
5408
6826
  ErrorTypes["REFUSAL"] = "refusal";
@@ -5410,6 +6828,34 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
5410
6828
  * SSE stream 404 — job completed, expired, or was deleted before the subscriber connected
5411
6829
  */
5412
6830
  ErrorTypes["STREAM_EXPIRED"] = "stream_expired";
6831
+ /**
6832
+ * Provider does not serve the requested model
6833
+ */
6834
+ ErrorTypes["MODEL_NOT_FOUND"] = "model_not_found";
6835
+ /**
6836
+ * Provider throttled or refused the request for exceeding a rate/spend allowance
6837
+ */
6838
+ ErrorTypes["MODEL_RATE_LIMIT"] = "model_rate_limit";
6839
+ /**
6840
+ * An agent model provider failed and the run could not recover.
6841
+ */
6842
+ ErrorTypes["UPSTREAM_MODEL_ERROR"] = "upstream_model_error";
6843
+ /**
6844
+ * Context pruning removed every message; nothing fits the configured context window
6845
+ */
6846
+ ErrorTypes["EMPTY_MESSAGES"] = "empty_messages";
6847
+ /**
6848
+ * Formatted provider payload exceeded the context budget before invocation
6849
+ */
6850
+ ErrorTypes["FINAL_CONTEXT_OVERFLOW"] = "final_context_overflow";
6851
+ /**
6852
+ * A manual compaction the graph could not attempt; `reason` says why
6853
+ */
6854
+ ErrorTypes["COMPACTION_SKIPPED"] = "compaction_skipped";
6855
+ /**
6856
+ * A manual compaction whose summarizer produced nothing; history is untouched
6857
+ */
6858
+ ErrorTypes["COMPACTION_FAILED"] = "compaction_failed";
5413
6859
  return ErrorTypes;
5414
6860
  }({});
5415
6861
  /**
@@ -5541,7 +6987,7 @@ let TTSProviders = /* @__PURE__ */ function(TTSProviders) {
5541
6987
  /** Enum for app-wide constants */
5542
6988
  let Constants = /* @__PURE__ */ function(Constants) {
5543
6989
  /**
5544
- * Key for the app's version. The placeholder `v0.8.8-rc1` is
6990
+ * Key for the app's version. The placeholder `v0.8.8-rc3` is
5545
6991
  * swapped in by `@rollup/plugin-replace` during `npm run build:data-provider`
5546
6992
  * using the value of the root `package.json`'s `version` field. Consumers
5547
6993
  * always import this via the built dist bundle (see `main` field in
@@ -5549,9 +6995,9 @@ let Constants = /* @__PURE__ */ function(Constants) {
5549
6995
  * substituted value. Only tests that import the TypeScript source directly
5550
6996
  * would observe the raw placeholder.
5551
6997
  */
5552
- Constants["VERSION"] = "v0.8.8-rc1";
6998
+ Constants["VERSION"] = "v0.8.8-rc3";
5553
6999
  /** Key for the Custom Config's version (librechat.yaml). */
5554
- Constants["CONFIG_VERSION"] = "1.3.14";
7000
+ Constants["CONFIG_VERSION"] = "1.3.16";
5555
7001
  /** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
5556
7002
  Constants["NO_PARENT"] = "00000000-0000-0000-0000-000000000000";
5557
7003
  /** Standard value to use whatever the submission prelim. `responseMessageId` is */
@@ -5605,6 +7051,15 @@ let Constants = /* @__PURE__ */ function(Constants) {
5605
7051
  Constants["SUBAGENT"] = "subagent";
5606
7052
  /** Poll tool for retrieving the status/result of a backgrounded tool call. */
5607
7053
  Constants["CHECK_BACKGROUND_TASK"] = "check_background_task";
7054
+ /**
7055
+ * `finish_reason` stamped on an assistant message whose turn ended because the
7056
+ * agent exhausted its per-turn graph step budget (`recursionLimit`) rather than
7057
+ * because the model chose to stop. Distinct from a user abort: nothing failed and
7058
+ * nothing was cancelled, the turn simply ran out of room. The UI keys its
7059
+ * "tool call limit reached" notice off this value. The hover Continue control
7060
+ * is withheld for this reason because the notice already offers the way forward.
7061
+ */
7062
+ Constants["TOOL_CALL_LIMIT_FINISH_REASON"] = "tool_call_limit";
5608
7063
  return Constants;
5609
7064
  }({});
5610
7065
  /**
@@ -5691,6 +7146,95 @@ function normalizeMCPToolKey(toolKey, rawServerNames) {
5691
7146
  if (normalized === matched) return toolKey;
5692
7147
  return `${toolKey.slice(0, toolKey.length - matched.length)}${normalized}`;
5693
7148
  }
7149
+ /**
7150
+ * Strips a redundant leading server-name prefix from a raw upstream tool name
7151
+ * before it is embedded into a model-facing key, so the key doesn't carry the
7152
+ * server twice (`acme_trace_..._mcp_acme`) and push long tool names
7153
+ * past provider function-name limits (64 chars). The match is case-insensitive
7154
+ * because display-cased server names ("Acme") conventionally prefix their
7155
+ * tools in lowercase. Ingestion that strips must record the original name
7156
+ * (`serverToolName` on the cached definition) — tool calls send THAT name back
7157
+ * to the server, never the stripped one. Catalog producers must not call this
7158
+ * directly: only {@link stripServerNamePrefixes} sees the whole sibling set and
7159
+ * can keep colliding results apart.
7160
+ */
7161
+ function stripServerNamePrefix(toolName, normalizedServerName) {
7162
+ const prefixLength = normalizedServerName.length + 1;
7163
+ if (toolName.length <= prefixLength) return toolName;
7164
+ if (toolName.slice(0, prefixLength).toLowerCase() !== `${normalizedServerName.toLowerCase()}_`) return toolName;
7165
+ const stripped = toolName.slice(prefixLength);
7166
+ if (isReservedMCPToolName(stripped)) return toolName;
7167
+ /** `isActionTool` classifies keys by the RELATIVE position of `_action_`
7168
+ * and `_mcp_`; stripping moves the first `_mcp_` earlier, so a server
7169
+ * whose normalized name contains `_action_` could see a real MCP tool
7170
+ * reclassified as an OpenAPI action (bypassing MCP authorization). Never
7171
+ * produce a key whose classification differs from the raw key's. */
7172
+ const keySuffix = `_mcp_${normalizedServerName}`;
7173
+ if (isActionTool(`${stripped}${keySuffix}`) !== isActionTool(`${toolName}${keySuffix}`)) return toolName;
7174
+ return stripped;
7175
+ }
7176
+ /**
7177
+ * Synthetic markers consumed by prefix (`isMCPAllPlaceholder`, the server-pin
7178
+ * skip, the client's OAuth stream classification), so each reserves BOTH its
7179
+ * exact name and its `${marker}${mcp_delimiter}` namespace: a stripped
7180
+ * remainder inside any of them would turn a real upstream tool into the
7181
+ * server-wide wildcard, the UI pin placeholder, or a synthetic OAuth call.
7182
+ */
7183
+ const RESERVED_MCP_TOOL_MARKERS = [
7184
+ `sys__all__sys`,
7185
+ `sys__server__sys`,
7186
+ "oauth"
7187
+ ];
7188
+ function isReservedMCPToolName(toolName) {
7189
+ /** `mcp_` opens the server-scoped pluginKey namespace (`mcp_${serverName}`),
7190
+ * and `lc_transfer_to_` opens the agent-handoff namespace (the client
7191
+ * renders such calls as handoffs; the background and intent passes exclude
7192
+ * them) — pre-strip tool keys could never enter either, since they always
7193
+ * began with the server name itself. */
7194
+ if (toolName.startsWith(`mcp_`) || toolName.startsWith(`lc_transfer_to_`)) return true;
7195
+ return RESERVED_MCP_TOOL_MARKERS.some((marker) => toolName === marker || toolName.startsWith(`${marker}_mcp_`));
7196
+ }
7197
+ /**
7198
+ * Maps every raw tool name in a server's catalog to its model-facing name,
7199
+ * stripping redundant server-name prefixes collision-free: when two names
7200
+ * yield the same result — a bare `foo` next to `<server>_foo`, or the
7201
+ * case-variant pair `<server>_Foo` / `<Server>_Foo` under the case-insensitive
7202
+ * prefix match — every collider keeps its raw name, so two distinct upstream
7203
+ * tools can never collapse onto one key. Unprefixed names count against the
7204
+ * result set through their identity mapping, which is what makes the bare-name
7205
+ * case fall out of the same counter.
7206
+ */
7207
+ function stripServerNamePrefixes(toolNames, normalizedServerName) {
7208
+ const rawNames = new Set(toolNames);
7209
+ const finalNames = new Map(toolNames.map((name) => {
7210
+ const stripped = stripServerNamePrefix(name, normalizedServerName);
7211
+ /** Every sibling's RAW name is reserved even when that sibling itself
7212
+ * strips away: keys persisted BEFORE stripping embed raw names, so a
7213
+ * stripped result landing on another sibling's raw name would route
7214
+ * that sibling's legacy references to the wrong upstream tool. */
7215
+ return [name, stripped !== name && rawNames.has(stripped) ? name : stripped];
7216
+ }));
7217
+ /** Reverting a collider to its raw name can itself collide with ANOTHER
7218
+ * sibling's stripped result (`foo` / `acme_foo` / `acme_acme_foo`), so the
7219
+ * guard iterates to a fixpoint. Each pass converts at least one stripped
7220
+ * result back to its unique raw name, so it terminates within the catalog
7221
+ * size. */
7222
+ let changed = true;
7223
+ while (changed) {
7224
+ changed = false;
7225
+ const counts = /* @__PURE__ */ new Map();
7226
+ finalNames.forEach((result) => {
7227
+ counts.set(result, (counts.get(result) ?? 0) + 1);
7228
+ });
7229
+ finalNames.forEach((result, raw) => {
7230
+ if (result !== raw && (counts.get(result) ?? 0) > 1) {
7231
+ finalNames.set(raw, raw);
7232
+ changed = true;
7233
+ }
7234
+ });
7235
+ }
7236
+ return finalNames;
7237
+ }
5694
7238
  function splitMCPToolKey(toolKey, knownServerNames) {
5695
7239
  if (knownServerNames?.length) {
5696
7240
  let matched;
@@ -5910,6 +7454,7 @@ let PrincipalModel = /* @__PURE__ */ function(PrincipalModel) {
5910
7454
  */
5911
7455
  let ResourceType = /* @__PURE__ */ function(ResourceType) {
5912
7456
  ResourceType["AGENT"] = "agent";
7457
+ ResourceType["CODE_ENVIRONMENT"] = "codeEnvironment";
5913
7458
  ResourceType["PROMPTGROUP"] = "promptGroup";
5914
7459
  ResourceType["MCPSERVER"] = "mcpServer";
5915
7460
  ResourceType["REMOTE_AGENT"] = "remoteAgent";
@@ -5929,6 +7474,8 @@ let PermissionBits = /* @__PURE__ */ function(PermissionBits) {
5929
7474
  PermissionBits[PermissionBits["DELETE"] = 4] = "DELETE";
5930
7475
  /** 1000 - Can share agent with others (future) */
5931
7476
  PermissionBits[PermissionBits["SHARE"] = 8] = "SHARE";
7477
+ /** 10000 - Can view Insights data for an agent when VIEW is also present */
7478
+ PermissionBits[PermissionBits["VIEW_INSIGHTS"] = 16] = "VIEW_INSIGHTS";
5932
7479
  return PermissionBits;
5933
7480
  }({});
5934
7481
  /**
@@ -5938,6 +7485,9 @@ let AccessRoleIds = /* @__PURE__ */ function(AccessRoleIds) {
5938
7485
  AccessRoleIds["AGENT_VIEWER"] = "agent_viewer";
5939
7486
  AccessRoleIds["AGENT_EDITOR"] = "agent_editor";
5940
7487
  AccessRoleIds["AGENT_OWNER"] = "agent_owner";
7488
+ AccessRoleIds["CODE_ENVIRONMENT_VIEWER"] = "codeEnvironment_viewer";
7489
+ AccessRoleIds["CODE_ENVIRONMENT_EDITOR"] = "codeEnvironment_editor";
7490
+ AccessRoleIds["CODE_ENVIRONMENT_OWNER"] = "codeEnvironment_owner";
5941
7491
  AccessRoleIds["PROMPTGROUP_VIEWER"] = "promptGroup_viewer";
5942
7492
  AccessRoleIds["PROMPTGROUP_EDITOR"] = "promptGroup_editor";
5943
7493
  AccessRoleIds["PROMPTGROUP_OWNER"] = "promptGroup_owner";
@@ -5967,6 +7517,8 @@ const principalSchema = z.object({
5967
7517
  description: z.string().optional(),
5968
7518
  idOnTheSource: z.string().optional(),
5969
7519
  accessRoleId: z.nativeEnum(AccessRoleIds).optional(),
7520
+ viewInsights: z.boolean().optional(),
7521
+ isAdmin: z.boolean().optional(),
5970
7522
  memberCount: z.number().optional()
5971
7523
  });
5972
7524
  /**
@@ -6054,17 +7606,20 @@ function permBitsToAccessLevel(permBits) {
6054
7606
  function accessRoleToPermBits(accessRoleId) {
6055
7607
  switch (accessRoleId) {
6056
7608
  case "agent_viewer":
7609
+ case "codeEnvironment_viewer":
6057
7610
  case "promptGroup_viewer":
6058
7611
  case "mcpServer_viewer":
6059
7612
  case "remoteAgent_viewer":
6060
7613
  case "skill_viewer":
6061
7614
  case "sharedLink_viewer": return 1;
6062
7615
  case "agent_editor":
7616
+ case "codeEnvironment_editor":
6063
7617
  case "promptGroup_editor":
6064
7618
  case "mcpServer_editor":
6065
7619
  case "remoteAgent_editor":
6066
7620
  case "skill_editor": return 3;
6067
7621
  case "agent_owner":
7622
+ case "codeEnvironment_owner":
6068
7623
  case "promptGroup_owner":
6069
7624
  case "mcpServer_owner":
6070
7625
  case "remoteAgent_owner":
@@ -6091,11 +7646,15 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
6091
7646
  QueryKeys["sharedLinks"] = "sharedLinks";
6092
7647
  QueryKeys["allConversations"] = "allConversations";
6093
7648
  QueryKeys["archivedConversations"] = "archivedConversations";
7649
+ QueryKeys["pinnedConversations"] = "pinnedConversations";
6094
7650
  QueryKeys["searchConversations"] = "searchConversations";
6095
7651
  QueryKeys["conversation"] = "conversation";
6096
7652
  QueryKeys["searchEnabled"] = "searchEnabled";
6097
7653
  QueryKeys["langfuseConnection"] = "langfuseConnection";
6098
7654
  QueryKeys["langfuseSessionLink"] = "langfuseSessionLink";
7655
+ QueryKeys["conversationTraceAvailability"] = "conversationTraceAvailability";
7656
+ QueryKeys["conversationTraceRecords"] = "conversationTraceRecords";
7657
+ QueryKeys["conversationTraceRecord"] = "conversationTraceRecord";
6099
7658
  QueryKeys["user"] = "user";
6100
7659
  QueryKeys["name"] = "name";
6101
7660
  QueryKeys["models"] = "models";
@@ -6107,6 +7666,8 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
6107
7666
  QueryKeys["tokenCount"] = "tokenCount";
6108
7667
  QueryKeys["availablePlugins"] = "availablePlugins";
6109
7668
  QueryKeys["startupConfig"] = "startupConfig";
7669
+ QueryKeys["insights"] = "insights";
7670
+ QueryKeys["insightsAccess"] = "insightsAccess";
6110
7671
  QueryKeys["assistants"] = "assistants";
6111
7672
  QueryKeys["assistant"] = "assistant";
6112
7673
  QueryKeys["agents"] = "agents";
@@ -6164,10 +7725,32 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
6164
7725
  QueryKeys["toolFavorites"] = "toolFavorites";
6165
7726
  QueryKeys["skillStates"] = "skillStates";
6166
7727
  QueryKeys["favorites"] = "favorites";
7728
+ QueryKeys["schedules"] = "schedules";
7729
+ QueryKeys["schedule"] = "schedule";
7730
+ QueryKeys["parentSubagents"] = "parentSubagents";
7731
+ QueryKeys["subagentThread"] = "subagentThread";
7732
+ QueryKeys["codeEnvironments"] = "codeEnvironments";
7733
+ QueryKeys["agentQueuedTurns"] = "agentQueuedTurns";
7734
+ QueryKeys["pinnedOrder"] = "pinnedOrder";
6167
7735
  return QueryKeys;
6168
7736
  }({});
6169
- const DynamicQueryKeys = { agentFiles: (agentId) => ["agentFiles", agentId] };
7737
+ const DynamicQueryKeys = {
7738
+ agentFiles: (agentId) => ["agentFiles", agentId],
7739
+ codeEnvironmentStatus: (id) => [
7740
+ "codeEnvironments",
7741
+ id,
7742
+ "status"
7743
+ ]
7744
+ };
6170
7745
  let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
7746
+ MutationKeys["subagentControl"] = "subagentControl";
7747
+ MutationKeys["enqueueAgentQueuedTurn"] = "enqueueAgentQueuedTurn";
7748
+ MutationKeys["cancelAgentQueuedTurn"] = "cancelAgentQueuedTurn";
7749
+ /** Whole-array favorites write, keyed so every hook instance's write is
7750
+ * visible to the others through the query client. */
7751
+ MutationKeys["updateFavorites"] = "updateFavorites";
7752
+ /** Pinned-section display order write, keyed for the same reason. */
7753
+ MutationKeys["updatePinnedOrder"] = "updatePinnedOrder";
6171
7754
  MutationKeys["updateLangfuseConnection"] = "updateLangfuseConnection";
6172
7755
  MutationKeys["testLangfuseConnection"] = "testLangfuseConnection";
6173
7756
  MutationKeys["createAgentApiKey"] = "createAgentApiKey";
@@ -6191,6 +7774,7 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
6191
7774
  MutationKeys["deleteAgentAction"] = "deleteAgentAction";
6192
7775
  MutationKeys["revertAgentVersion"] = "revertAgentVersion";
6193
7776
  MutationKeys["deleteUser"] = "deleteUser";
7777
+ MutationKeys["updateUserPreferences"] = "updateUserPreferences";
6194
7778
  MutationKeys["updateRole"] = "updateRole";
6195
7779
  MutationKeys["enableTwoFactor"] = "enableTwoFactor";
6196
7780
  MutationKeys["verifyTwoFactor"] = "verifyTwoFactor";
@@ -6204,6 +7788,14 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
6204
7788
  MutationKeys["deleteSkillNode"] = "deleteSkillNode";
6205
7789
  MutationKeys["updateSkillNodeContent"] = "updateSkillNodeContent";
6206
7790
  MutationKeys["convoPin"] = "convoPin";
7791
+ MutationKeys["archiveAllConversations"] = "archiveAllConversations";
7792
+ MutationKeys["createSchedule"] = "createSchedule";
7793
+ MutationKeys["updateSchedule"] = "updateSchedule";
7794
+ MutationKeys["deleteSchedule"] = "deleteSchedule";
7795
+ MutationKeys["runSchedule"] = "runSchedule";
7796
+ MutationKeys["pairCodeEnvironment"] = "pairCodeEnvironment";
7797
+ MutationKeys["updateCodeEnvironmentSettings"] = "updateCodeEnvironmentSettings";
7798
+ MutationKeys["deleteCodeEnvironment"] = "deleteCodeEnvironment";
6207
7799
  return MutationKeys;
6208
7800
  }({});
6209
7801
  //#endregion
@@ -6605,15 +8197,18 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6605
8197
  addPromptToGroup: () => addPromptToGroup,
6606
8198
  addTagToConversation: () => addTagToConversation,
6607
8199
  addToolFavorite: () => addToolFavorite,
8200
+ archiveAllConversations: () => archiveAllConversations,
6608
8201
  archiveConversation: () => archiveConversation,
6609
8202
  assignConversationToProject: () => assignConversationToProject,
6610
8203
  bindActionOAuth: () => bindActionOAuth,
6611
8204
  bindMCPOAuth: () => bindMCPOAuth,
6612
8205
  branchMessage: () => branchMessage,
6613
8206
  callTool: () => callTool,
8207
+ cancelAgentQueuedTurn: () => cancelAgentQueuedTurn,
6614
8208
  cancelMCPOAuth: () => cancelMCPOAuth,
6615
8209
  clearAllConversations: () => clearAllConversations,
6616
8210
  confirmTwoFactor: () => confirmTwoFactor,
8211
+ controlSubagentTask: () => controlSubagentTask,
6617
8212
  createAgent: () => createAgent,
6618
8213
  createAgentApiKey: () => createAgentApiKey,
6619
8214
  createAssistant: () => createAssistant,
@@ -6623,6 +8218,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6623
8218
  createPreset: () => createPreset,
6624
8219
  createProject: () => createProject,
6625
8220
  createPrompt: () => createPrompt,
8221
+ createSchedule: () => createSchedule,
6626
8222
  createSharedLink: () => createSharedLink,
6627
8223
  createSkill: () => createSkill,
6628
8224
  createSkillNode: () => createSkillNode,
@@ -6631,16 +8227,19 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6631
8227
  deleteAgentAction: () => deleteAgentAction,
6632
8228
  deleteAgentApiKey: () => deleteAgentApiKey,
6633
8229
  deleteAssistant: () => deleteAssistant,
8230
+ deleteCodeEnvironment: () => deleteCodeEnvironment,
6634
8231
  deleteConversation: () => deleteConversation,
6635
8232
  deleteConversationTag: () => deleteConversationTag,
6636
8233
  deleteFiles: () => deleteFiles,
6637
8234
  deleteGitHubSkillSyncCredential: () => deleteGitHubSkillSyncCredential,
6638
8235
  deleteMCPServer: () => deleteMCPServer,
6639
8236
  deleteMemory: () => deleteMemory,
8237
+ deleteMemoryById: () => deleteMemoryById,
6640
8238
  deletePreset: () => deletePreset,
6641
8239
  deleteProject: () => deleteProject,
6642
8240
  deletePrompt: () => deletePrompt,
6643
8241
  deletePromptGroup: () => deletePromptGroup,
8242
+ deleteSchedule: () => deleteSchedule,
6644
8243
  deleteSharedLink: () => deleteSharedLink,
6645
8244
  deleteSkill: () => deleteSkill,
6646
8245
  deleteSkillFile: () => deleteSkillFile,
@@ -6651,6 +8250,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6651
8250
  duplicateConversation: () => duplicateConversation,
6652
8251
  editArtifact: () => editArtifact,
6653
8252
  enableTwoFactor: () => enableTwoFactor,
8253
+ enqueueAgentQueuedTurn: () => enqueueAgentQueuedTurn,
6654
8254
  forkConversation: () => forkConversation,
6655
8255
  forkSharedConversation: () => forkSharedConversation,
6656
8256
  genTitle: () => genTitle,
@@ -6672,9 +8272,14 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6672
8272
  getAvailableTools: () => getAvailableTools,
6673
8273
  getBanner: () => getBanner,
6674
8274
  getCategories: () => getCategories,
8275
+ getCodeEnvironmentStatus: () => getCodeEnvironmentStatus,
8276
+ getCodeEnvironments: () => getCodeEnvironments,
6675
8277
  getCodeOutputDownload: () => getCodeOutputDownload,
6676
8278
  getConversationById: () => getConversationById,
6677
8279
  getConversationTags: () => getConversationTags,
8280
+ getConversationTraceAvailability: () => getConversationTraceAvailability,
8281
+ getConversationTraceRecord: () => getConversationTraceRecord,
8282
+ getConversationTraceRecords: () => getConversationTraceRecords,
6678
8283
  getConversations: () => getConversations,
6679
8284
  getCustomConfigSpeech: () => getCustomConfigSpeech,
6680
8285
  getDomainServerBaseUrl: () => getDomainServerBaseUrl,
@@ -6688,6 +8293,8 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6688
8293
  getFiles: () => getFiles,
6689
8294
  getGitHubSkillSyncStatus: () => getGitHubSkillSyncStatus,
6690
8295
  getGraphApiToken: () => getGraphApiToken,
8296
+ getInsights: () => getInsights,
8297
+ getInsightsAccess: () => getInsightsAccess,
6691
8298
  getLangfuseConnection: () => getLangfuseConnection,
6692
8299
  getLangfuseSessionLink: () => getLangfuseSessionLink,
6693
8300
  getLoginGoogle: () => getLoginGoogle,
@@ -6700,8 +8307,11 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6700
8307
  getMCPTools: () => getMCPTools,
6701
8308
  getMarketplaceAgents: () => getMarketplaceAgents,
6702
8309
  getMemories: () => getMemories,
8310
+ getMessageById: () => getMessageById,
6703
8311
  getMessagesByConvoId: () => getMessagesByConvoId,
6704
8312
  getModels: () => getModels,
8313
+ getParentSubagents: () => getParentSubagents,
8314
+ getPinnedOrder: () => getPinnedOrder,
6705
8315
  getPresets: () => getPresets,
6706
8316
  getProjectById: () => getProjectById,
6707
8317
  getPrompt: () => getPrompt,
@@ -6711,6 +8321,8 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6711
8321
  getRandomPrompts: () => getRandomPrompts,
6712
8322
  getResourcePermissions: () => getResourcePermissions,
6713
8323
  getRole: () => getRole,
8324
+ getSchedule: () => getSchedule,
8325
+ getSchedules: () => getSchedules,
6714
8326
  getSearchEnabled: () => getSearchEnabled,
6715
8327
  getSharedFileDownload: () => getSharedFileDownload,
6716
8328
  getSharedFilePreview: () => getSharedFilePreview,
@@ -6723,6 +8335,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6723
8335
  getSkillStates: () => getSkillStates,
6724
8336
  getSkillTree: () => getSkillTree,
6725
8337
  getStartupConfig: () => getStartupConfig,
8338
+ getSubagentThread: () => getSubagentThread,
6726
8339
  getTokenConfig: () => getTokenConfig,
6727
8340
  getToolCalls: () => getToolCalls,
6728
8341
  getToolFavorites: () => getToolFavorites,
@@ -6734,6 +8347,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6734
8347
  healthCheck: () => healthCheck,
6735
8348
  importConversationsFile: () => importConversationsFile,
6736
8349
  importSkill: () => importSkill,
8350
+ listAgentQueuedTurns: () => listAgentQueuedTurns,
6737
8351
  listAgents: () => listAgents,
6738
8352
  listAssistants: () => listAssistants,
6739
8353
  listConversations: () => listConversations,
@@ -6747,6 +8361,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6747
8361
  logout: () => logout,
6748
8362
  makePromptProduction: () => makePromptProduction,
6749
8363
  markFilesUsage: () => markFilesUsage,
8364
+ pairCodeEnvironment: () => pairCodeEnvironment,
6750
8365
  pinConversation: () => pinConversation,
6751
8366
  rebuildConversationTags: () => rebuildConversationTags,
6752
8367
  recordPromptGroupUsage: () => recordPromptGroupUsage,
@@ -6761,6 +8376,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6761
8376
  revokeAllUserKeys: () => revokeAllUserKeys,
6762
8377
  revokeUserKey: () => revokeUserKey,
6763
8378
  runGitHubSkillSync: () => runGitHubSkillSync,
8379
+ runScheduleNow: () => runScheduleNow,
6764
8380
  searchPrincipals: () => searchPrincipals,
6765
8381
  setGitHubSkillSyncCredential: () => setGitHubSkillSyncCredential,
6766
8382
  speechToText: () => speechToText,
@@ -6771,6 +8387,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6771
8387
  updateAgentAction: () => updateAgentAction,
6772
8388
  updateAgentPermissions: () => updateAgentPermissions,
6773
8389
  updateAssistant: () => updateAssistant,
8390
+ updateCodeEnvironmentSettings: () => updateCodeEnvironmentSettings,
6774
8391
  updateConversation: () => updateConversation,
6775
8392
  updateConversationTag: () => updateConversationTag,
6776
8393
  updateFavorites: () => updateFavorites,
@@ -6780,11 +8397,13 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6780
8397
  updateMCPServersPermissions: () => updateMCPServersPermissions,
6781
8398
  updateMarketplacePermissions: () => updateMarketplacePermissions,
6782
8399
  updateMemory: () => updateMemory,
8400
+ updateMemoryById: () => updateMemoryById,
6783
8401
  updateMemoryPermissions: () => updateMemoryPermissions,
6784
8402
  updateMemoryPreferences: () => updateMemoryPreferences,
6785
8403
  updateMessage: () => updateMessage,
6786
8404
  updateMessageContent: () => updateMessageContent,
6787
8405
  updatePeoplePickerPermissions: () => updatePeoplePickerPermissions,
8406
+ updatePinnedOrder: () => updatePinnedOrder,
6788
8407
  updatePreset: () => updatePreset,
6789
8408
  updateProject: () => updateProject,
6790
8409
  updatePromptGroup: () => updatePromptGroup,
@@ -6792,6 +8411,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6792
8411
  updatePromptPermissions: () => updatePromptPermissions,
6793
8412
  updateRemoteAgentsPermissions: () => updateRemoteAgentsPermissions,
6794
8413
  updateResourcePermissions: () => updateResourcePermissions,
8414
+ updateSchedule: () => updateSchedule,
6795
8415
  updateSharedLink: () => updateSharedLink,
6796
8416
  updateSkill: () => updateSkill,
6797
8417
  updateSkillNode: () => updateSkillNode,
@@ -6801,6 +8421,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6801
8421
  updateTokenCount: () => updateTokenCount,
6802
8422
  updateUserKey: () => updateUserKey,
6803
8423
  updateUserPlugins: () => updateUserPlugins,
8424
+ updateUserPreferences: () => updateUserPreferences,
6804
8425
  uploadAgentAvatar: () => uploadAgentAvatar,
6805
8426
  uploadAssistantAvatar: () => uploadAssistantAvatar,
6806
8427
  uploadAvatar: () => uploadAvatar,
@@ -6812,6 +8433,25 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
6812
8433
  verifyTwoFactor: () => verifyTwoFactor,
6813
8434
  verifyTwoFactorTemp: () => verifyTwoFactorTemp
6814
8435
  });
8436
+ function getInsights(params = {}) {
8437
+ const query = new URLSearchParams();
8438
+ for (const [key, value] of Object.entries(params)) if (Array.isArray(value)) value.forEach((item) => query.append(key, String(item)));
8439
+ else if (value !== void 0 && value !== null && value !== "") query.set(key, String(value));
8440
+ const suffix = query.toString() ? `?${query.toString()}` : "";
8441
+ return request_default.get(`${insights()}${suffix}`);
8442
+ }
8443
+ function getInsightsAccess() {
8444
+ return request_default.get(insightsAccess());
8445
+ }
8446
+ function getConversationTraceAvailability(conversationId) {
8447
+ return request_default.get(conversationTraceAvailability(conversationId));
8448
+ }
8449
+ function getConversationTraceRecords({ conversationId, cursor }, signal) {
8450
+ return request_default.get(conversationTraceRecords(conversationId, cursor), signal ? { signal } : void 0);
8451
+ }
8452
+ function getConversationTraceRecord({ conversationId, recordId, messageId, sourceId }, signal) {
8453
+ return request_default.get(conversationTraceRecord(conversationId, recordId, messageId, sourceId), signal ? { signal } : void 0);
8454
+ }
6815
8455
  function getLangfuseConnection() {
6816
8456
  return request_default.get(adminLangfuseConnection());
6817
8457
  }
@@ -6833,12 +8473,34 @@ function revokeAllUserKeys() {
6833
8473
  function deleteUser(payload) {
6834
8474
  return request_default.deleteWithOptions(deleteUser$1(), { data: payload });
6835
8475
  }
8476
+ function getCodeEnvironments() {
8477
+ return request_default.get(codeEnvironments());
8478
+ }
8479
+ function getCodeEnvironmentStatus(id) {
8480
+ return request_default.get(codeEnvironmentStatus(id));
8481
+ }
8482
+ function pairCodeEnvironment(payload) {
8483
+ return request_default.post(codeEnvironmentPairings(), payload);
8484
+ }
8485
+ function deleteCodeEnvironment(id) {
8486
+ return request_default.delete(codeEnvironmentById(id));
8487
+ }
8488
+ function updateCodeEnvironmentSettings({ id, settings }) {
8489
+ return request_default.patch(codeEnvironmentSettings(id), { settings });
8490
+ }
6836
8491
  function getFavorites() {
6837
8492
  return request_default.get(`${apiBaseUrl()}/api/user/settings/favorites`);
6838
8493
  }
6839
8494
  function updateFavorites(favorites) {
6840
8495
  return request_default.post(`${apiBaseUrl()}/api/user/settings/favorites`, { favorites });
6841
8496
  }
8497
+ /** Combined Pinned-section display order: favorite and pinned-chat entry keys interleaved. */
8498
+ function getPinnedOrder() {
8499
+ return request_default.get(pinnedOrder());
8500
+ }
8501
+ function updatePinnedOrder(pinnedOrder$1) {
8502
+ return request_default.post(pinnedOrder(), { pinnedOrder: pinnedOrder$1 });
8503
+ }
6842
8504
  /** Tool favorites — starred marketplace items (builtins, tools, MCP servers, skills). */
6843
8505
  function getToolFavorites() {
6844
8506
  return request_default.get(toolFavorites());
@@ -6916,6 +8578,9 @@ function getSearchEnabled() {
6916
8578
  function getUser() {
6917
8579
  return request_default.get(user());
6918
8580
  }
8581
+ function updateUserPreferences(preferences) {
8582
+ return request_default.patch(userPreferences(), preferences);
8583
+ }
6919
8584
  function getUserBalance() {
6920
8585
  return request_default.get(balance());
6921
8586
  }
@@ -7294,6 +8959,9 @@ function updateConversation(payload) {
7294
8959
  function archiveConversation(payload) {
7295
8960
  return request_default.post(archiveConversation$1(), { arg: payload });
7296
8961
  }
8962
+ function archiveAllConversations() {
8963
+ return request_default.post(archiveAllConversations$1(), {});
8964
+ }
7297
8965
  function listProjects(params) {
7298
8966
  return request_default.get(projects(params ?? {}));
7299
8967
  }
@@ -7352,6 +9020,21 @@ function getMessagesByConvoId(conversationId) {
7352
9020
  if (conversationId === "new" || conversationId === "PENDING") return Promise.resolve([]);
7353
9021
  return request_default.get(messages({ conversationId }));
7354
9022
  }
9023
+ function getMessageById(conversationId, messageId) {
9024
+ return request_default.get(messages({
9025
+ conversationId,
9026
+ messageId
9027
+ }));
9028
+ }
9029
+ function getParentSubagents(parentConversationId) {
9030
+ return request_default.get(parentSubagents(parentConversationId));
9031
+ }
9032
+ function getSubagentThread(parentConversationId, threadId, taskId, cursor) {
9033
+ return request_default.get(subagentThread(parentConversationId, threadId, taskId, cursor));
9034
+ }
9035
+ function controlSubagentTask(parentConversationId, threadId, body) {
9036
+ return request_default.post(subagentControl(parentConversationId, threadId), body);
9037
+ }
7355
9038
  function getPrompt(id) {
7356
9039
  return request_default.get(getPrompt$1(id));
7357
9040
  }
@@ -7400,6 +9083,33 @@ function getRandomPrompts(variables) {
7400
9083
  function listSkills(params) {
7401
9084
  return request_default.get(listSkillsWithFilters(params ?? {}));
7402
9085
  }
9086
+ function getSchedules() {
9087
+ return request_default.get(schedules());
9088
+ }
9089
+ function enqueueAgentQueuedTurn(payload) {
9090
+ return request_default.post(agentQueuedTurns(), payload);
9091
+ }
9092
+ function listAgentQueuedTurns(conversationId, clientRequestIds) {
9093
+ return request_default.get(agentQueuedTurnsByConversation(conversationId, clientRequestIds));
9094
+ }
9095
+ function cancelAgentQueuedTurn(queuedTurnId) {
9096
+ return request_default.delete(agentQueuedTurn(queuedTurnId));
9097
+ }
9098
+ function getSchedule(id) {
9099
+ return request_default.get(schedule(id));
9100
+ }
9101
+ function createSchedule(payload) {
9102
+ return request_default.post(schedules(), payload);
9103
+ }
9104
+ function updateSchedule(id, payload) {
9105
+ return request_default.patch(schedule(id), payload);
9106
+ }
9107
+ function deleteSchedule(id) {
9108
+ return request_default.delete(schedule(id));
9109
+ }
9110
+ function runScheduleNow(id) {
9111
+ return request_default.post(runSchedule(id), {});
9112
+ }
7403
9113
  function getSkill(id) {
7404
9114
  return request_default.get(getSkill$1(id));
7405
9115
  }
@@ -7590,12 +9300,21 @@ const getMemories = () => {
7590
9300
  const deleteMemory = (key, agentId) => {
7591
9301
  return request_default.delete(memory(key, agentId));
7592
9302
  };
9303
+ const deleteMemoryById = (id, agentId) => {
9304
+ return request_default.delete(memoryById(id, agentId));
9305
+ };
7593
9306
  const updateMemory = (key, value, originalKey, agentId) => {
7594
9307
  return request_default.patch(memory(originalKey || key, agentId), {
7595
9308
  key,
7596
9309
  value
7597
9310
  });
7598
9311
  };
9312
+ const updateMemoryById = (id, value, key, agentId) => {
9313
+ return request_default.patch(memoryById(id, agentId), {
9314
+ value,
9315
+ ...key ? { key } : {}
9316
+ });
9317
+ };
7599
9318
  const updateMemoryPreferences = (preferences) => {
7600
9319
  return request_default.patch(memoryPreferences(), preferences);
7601
9320
  };
@@ -7630,6 +9349,6 @@ const getActiveJobs = () => {
7630
9349
  return request_default.get(activeJobs());
7631
9350
  };
7632
9351
  //#endregion
7633
- export { permissionEntrySchema as $, tMessageSchema as $a, anthropicSettings as $i, supportsBalanceCheck as $n, imageTypeMapping as $r, azureGroupConfigsSchema as $t, updateResourcePermissions as A, googleSettings as Aa, AuthType as Ai, isRemoteOidcUrlAllowed as An, extractEnvVariable as Ao, applicationMimeTypes as Ar, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH as At, MutationKeys as B, isParamEndpoint as Ba, ReasoningEffort as Bi, paramDefinitionSchema as Bn, defaultSTTMimeTypes as Br, SettingsViews as Bt, resetPassword as C, endpointSettings as Ca, OptionTypes as Ci, getConfigDefaults as Cn, feedbackRatingSchema as Co, FileSources as Cr, MAX_SUBAGENT_DEPTH as Ct, updateFeedback as D, googleBaseSchema as Da, generateOpenAISchema as Di, imageGenTools as Dn, getTagsForRating as Do, loginPage as Dr, RateLimitPrefix as Dt, searchPrincipals as E, getSettingsKeys as Ea, generateGoogleSchema as Ei, getSchemaDefaults as En, getTagByKey as Eo, buildLoginRedirectUrl as Er, OCRStrategy as Et, request_default as F, isAssistantsEndpoint as Fa, ImageVisionTool as Fi, modelConfigSchema as Fn, codeInterpreterMimeTypes as Fr, SafeSearchTypes as Ft, PrincipalType as G, openRouterSchema as Ga, ThinkingDisplay as Gi, setMessageFilterRegexValidator as Gn, excelMimeTypes as Gr, VisionModes as Gt, AccessRoleIds as H, openAIBaseSchema as Ha, ReasoningParameterFormat as Hi, rateLimitSchema as Hn, documentParserMimeTypes as Hr, TTSProviders as Ht, getTokenHeader as I, isDocumentSupportedProvider as Ia, MYTHOS_CLASS_FAMILIES as Ii, modularEndpoints as In, codeInterpreterMimeTypesList as Ir, ScraperProviders as It, accessRoleToPermBits as J, tBannerSchema as Ja, agentsBaseSchema as Ji, specialVariables as Jn, fullMimeTypesList as Jr, alternateName as Jt, ResourceType as K, paramEndpoints as Ka, ThinkingLevel as Ki, skillSyncConfigSchema as Kn, fileConfig as Kr, agentsEndpointSchema as Kt, setAcceptLanguageHeader as L, isImageVisionTool as La, MemoryScope as Li, normalizeMCPToolKey as Ln, codeTypeMapping as Lr, SearchCategories as Lt, updateUserKey as M, imageDetailValue as Ma, BedrockReasoningConfig as Mi, memorySchema as Mn, isSensitiveEnvVar as Mo, bedrockDocumentExtensions as Mr, SKILL_SYNC_MAX_INTERVAL_MINUTES as Mt, updateUserPlugins as N, inputTokensIncludesCache as Na, EModelEndpoint as Ni, messageFilterPiiSchema as Nn, normalizeEndpointName as No, bedrockDocumentFormats as Nr, SKILL_SYNC_MIN_INTERVAL_MINUTES as Nt, updateMessage as O, googleGenConfigSchema as Oa, validateSettingDefinitions as Oi, initialModelsConfig as On, toMinimalFeedback as Oo, registerPage as Or, RerankerTypes as Ot, userKeyQuery as P, isAgentsEndpoint as Pa, ImageDetail as Pi, messageFilterSchema as Pn, bedrockDocumentMimeTypes as Pr, STTProviders as Pt, permBitsToAccessLevel as Q, tExampleSchema as Qa, anthropicSchema as Qi, summarizationTriggerSchema as Qn, imageMimeTypes as Qr, azureEndpointSchema as Qt, setTokenHeader as R, isMythosClassModel as Ra, Providers as Ri, normalizeServerName as Rn, convertStringsToRegex as Rr, SearchProviders as Rt, requestPasswordReset as S, eVerbositySchema as Sa, ComponentTypes as Si, fileStrategiesSchema as Sn, FEEDBACK_TAGS as So, FileContext as Sr, LocalStorageKeys as St, revokeUserKey as T, getModelKey as Ta, generateDynamicSchema as Ti, getEndpointField as Tn, feedbackTagKeySchema as To, apiBaseUrl as Tr, MAX_SUBAGENT_RUN_CONFIGS as Tt, PermissionBits as U, openAISchema as Ua, ReasoningResponseKey as Ui, resolveEndpointType as Un, endpointFileConfigSchema as Ur, Time as Ut, QueryKeys as V, isUUID as Va, ReasoningMode as Vi, providerEndpointMap as Vn, defaultTextMimeTypes as Vr, SystemCategories as Vt, PrincipalModel as W, openAISettings as Wa, ReasoningSummary as Wi, retainRecentConfigSchema as Wn, excelFileTypes as Wr, ViolationTypes as Wt, getResourcePermissionsResponseSchema as X, tConversationTagSchema as Xa, agentsSettings as Xi, splitToolCallName as Xn, getEndpointFileConfig as Xr, assistantEndpointSchema as Xt, effectivePermissionsResponseSchema as Y, tConversationSchema as Ya, agentsSchema as Yi, splitMCPToolKey as Yn, getConfiguredMimeAccept as Yr, anthropicEndpointSchema as Yt, hasPermissions as Z, tConvoUpdateSchema as Za, anthropicBaseSchema as Zi, summarizationConfigSchema as Zn, imageExtRegex as Zr, azureBaseSchema as Zt, getResourcePermissions as _, eReasoningParameterFormatSchema as _a, getRefillEligibilityDate as _i, defaultSocialLogins as _n, hostImageIdSuffix as _o, StreamableHTTPOptionsSchema as _r, FetchTokenConfig as _t, data_service_exports as a, compactAgentsSchema as aa, mbToBytes as ai, bedrockModels as an, tSharedLinkSchema as ao, turnstileSchema as ar, AgentCapabilities as at, register as b, eThinkingDisplaySchema as ba, tModelSpecSchema as bi, fileSourceSchema as bn, FEEDBACK_RATINGS as bo, AuthorizationTypeEnum as br, InfiniteCollections as bt, getAccessRoles as c, defaultAgentFormValues as ca, mimeTypeAliases as ci, checkpointerTypeSchema as cn, EToolResources as co, vertexModelConfigSchema as cr, BASE_PRINCIPAL_CONFIG_SECTIONS as ct, getAvailablePlugins as d, eAnthropicEffortSchema as da, setFileConfigRegexCompiler as di, contextPruningSchema as dn, RunStatus as do, MCPOptionsSchema as dr, CohereConstants as dt, assistantSchema as ea, inferMimeType as ei, azureGroupSchema as en, tModelSpecPresetSchema as eo, toolApprovalHookConfigSchema as er, principalSchema as et, getConversationById as f, eImageDetailSchema as fa, supportedMimeTypes as fi, defaultAgentCapabilities as fn, StepStatus as fo, MCPServerUserInputSchema as fr, Constants as ft, getModels as g, eReasoningModeSchema as ga, REFILL_INTERVAL_UNITS as gi, defaultRetrievalModels as gn, defaultOrderQuery as go, StdioOptionsSchema as gr, ErrorTypes as gt, getMCPServerConnectionStatus as h, eReasoningEffortSchema as ha, videoMimeTypes as hi, defaultModels as hn, actionDomainSeparator as ho, SSEOptionsSchema as hr, EndpointURLs as ht, createPreset as i, compactAgentsBaseSchema as ia, isPermissiveMimeConfig as ii, bedrockGuardrailConfigSchema as in, tQueryParamsSchema as io, turnstileOptionsSchema as ir, AUTH_USER_DOC_BY_ID_PREFIX as it, updateTokenCount as j, imageDetailNumeric as ja, BedrockProviders as ji, langfuseConfigSchema as jn, extractVariableName as jo, audioMimeTypes as jr, SKILL_SYNC_MAX_DISCOVERY_DEPTH as jt, updateMessageContent as k, googleSchema as ka, AnthropicEffort as ki, interfaceSchema as kn, envVarRegex as ko, sharedFileDownload as kr, RetentionMode as kt, getAgentApiKeys as l, defaultAssistantFormValues as la, retrievalMimeTypes as li, cloudfrontConfigSchema as ln, FilePurpose as lo, visionModels as lr, CacheKeys as lt, getEffectivePermissions as m, eReasoningContextSchema as ma, textMimeTypes as mi, defaultEndpoints as mn, actionDelimiter as mo, MCP_USER_INPUT_FIELDS as mr, EImageOutputType as mt, clearAllConversations as n, cacheSubsetProviders as na, isAnthropicTextDocumentType as ni, baseEndpointSchema as nn, tPluginSchema as no, toolApprovalPolicySchema as nr, updateResourcePermissionsRequestSchema as nt, deleteAgentApiKey as o, compactAssistantSchema as oa, megabyte as oi, buildServerNameAliases as on, AnnotationTypes as oo, validateVisionModel as or, AuthKeys as ot, getCustomConfigSpeech as p, eModelEndpointSchema as pa, supportsFiles as pi, defaultAssistantsVersion as pn, Tools as po, MCPServersSchema as pr, DEFAULT_MEMORY_MAX_INPUT_TOKENS as pt, accessRoleSchema as q, removeNullishValues as qa, Verbosity as qi, skillSyncGitHubSourceSchema as qn, fileConfigSchema as qr, allowedAddressesSchema as qt, createAgentApiKey as r, coerceNumber as ra, isBedrockDocumentType as ri, bedrockEndpointSchema as rn, tPresetSchema as ro, transactionsSchema as rr, updateResourcePermissionsResponseSchema as rt, deletePreset as s, compactGoogleSchema as sa, mergeFileConfig as si, checkpointerSchema as sn, AssistantStreamEvents as so, vertexAISchema as sr, BASE_ONLY_CONFIG_SECTIONS as st, cancelMCPOAuth as t, authTypeSchema as ta, isAnthropicDocumentType as ti, balanceSchema as tn, tPluginAuthConfigSchema as to, toolApprovalModeSchema as tr, resourcePermissionsResponseSchema as tt, getAllEffectivePermissions as u, documentSupportedProviders as ua, retrievalMimeTypesList as ui, configSchema as un, MessageContentTypes as uo, webSearchSchema as ur, Capabilities as ut, getSharedLink as v, eReasoningResponseKeySchema as va, modelSpecSubagentsSchema as vi, endpointSchema as vn, hostImageNamePrefix as vo, WebSocketOptionsSchema as vr, ForkOptions as vt, revokeAllUserKeys as w, extendedModelEndpointSchema as wa, SettingTypes as wi, getDefaultParamsEndpoint as wn, feedbackSchema as wo, checkOpenAIStorage as wr, MAX_SUBAGENT_GRAPH_NODES as wt, reinitializeMCPServer as x, eThinkingLevelSchema as xa, MAX_SUBAGENTS as xi, fileStorageSchema as xn, FEEDBACK_REASON_KEYS as xo, TokenExchangeMethodEnum as xr, KnownEndpoints as xt, getSharedMessages as y, eReasoningSummarySchema as ya, specsConfigSchema as yi, excludedKeys as yn, isActionTool as yo, AuthTypeEnum as yr, ImageDetailCost as yt, DynamicQueryKeys as z, isOpenAILikeProvider as za, ReasoningContext as zi, ocrSchema as zn, defaultOCRMimeTypes as zr, SettingsTabValues as zt };
9352
+ export { permissionEntrySchema as $, eAnthropicEffortSchema as $a, specsConfigSchema as $i, ocrSchema as $n, tQueryParamsSchema as $o, registerPage as $r, MAX_PII_CUSTOM_REGEX_INSTRUCTIONS as $s, alternateName as $t, updateResourcePermissions as A, ReasoningResponseKey as Aa, skillFilterFieldSchema as Ac, isAnthropicTextDocumentType as Ai, fileStrategiesSchema as An, isMythosClassModel as Ao, MAX_MCP_ICON_PATH_LENGTH as Ar, getTagByKey as As, MAX_SUBAGENT_RUN_CONFIGS as At, MutationKeys as B, anthropicSchema as Ba, resolveUseResponsesApi as Bi, isSpeechProviderConfigured as Bn, removeNullishValues as Bo, WebSocketOptionsSchema as Br, isCodeWorkspaceSelection as Bs, SafeSearchTypes as Bt, resetPassword as C, MYTHOS_CLASS_FAMILIES as Ca, hasActiveFiltersConfig as Cc, getDocumentFileExtension as Ci, defaultModels as Cn, inputTokensIncludesCache as Co, turnstileOptionsSchema as Cr, resolveCodePermissionDecision as Cs, KnownEndpoints as Ct, updateFeedback as D, ReasoningEffort as Da, messageFilterFieldSchema as Dc, imageTypeMapping as Di, excludedKeys as Dn, isImageVisionTool as Do, vertexModelConfigSchema as Dr, feedbackRatingSchema as Ds, LocalStorageKeys as Dt, searchPrincipals as E, ReasoningContext as Ea, memoryFilterFieldSchema as Ec, imageMimeTypes as Ei, endpointSchema as En, isDocumentSupportedProvider as Eo, vertexAISchema as Er, FEEDBACK_TAGS as Es, LANGFUSE_TRACE_USER_METADATA_FIELDS as Et, request_default as F, Verbosity as Fa, extractEnvVariable as Fc, mbToBytes as Fi, imageGenTools as Fn, openAIBaseSchema as Fo, MCP_SERVER_TITLE_PATTERN as Fr, CODE_WORKSPACE_ID_PATTERN as Fs, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH as Ft, PrincipalType as G, coerceNumber as Ga, supportsFiles as Gi, memorySchema as Gn, tConversationTagSchema as Go, AuthorizationTypeEnum as Gr, CONVERSATION_STARTER_FILTER_FIELDS as Gs, SettingsViews as Gt, AccessRoleIds as H, assistantSchema as Ha, retrievalMimeTypesList as Hi, langfuseTraceConfigSchema as Hn, subagentThreadLineageSchema as Ho, isProcessMCPServerConfig as Hr, isCodeWorkspaceSelections as Hs, SearchCategories as Ht, getTokenHeader as I, agentsBaseSchema as Ia, extractVariableName as Ic, megabyte as Ii, initialModelsConfig as In, openAISchema as Io, MCP_USER_INPUT_FIELDS as Ir, CODE_WORKSPACE_MAX_COUNT as Is, SKILL_SYNC_MAX_DISCOVERY_DEPTH as It, accessRoleToPermBits as J, compactAssistantSchema as Ja, REFILL_INTERVAL_UNITS as Ji, modelConfigSchema as Jn, tMessageSchema as Jo, FileSources as Jr, FILE_FILTER_FIELDS as Js, Time as Jt, ResourceType as K, compactAgentsBaseSchema as Ka, textMimeTypes as Ki, messageFilterPiiSchema as Kn, tConvoUpdateSchema as Ko, TokenExchangeMethodEnum as Kr, CONVERSATION_TITLE_FILTER_FIELDS as Ks, SystemCategories as Kt, setAcceptLanguageHeader as L, agentsSchema as La, isSensitiveEnvVar as Lc, mergeFileConfig as Li, interfaceSchema as Ln, openAISettings as Lo, SSEOptionsSchema as Lr, CODE_WORKSPACE_OPERATIONS as Ls, SKILL_SYNC_MAX_INTERVAL_MINUTES as Lt, updateUserKey as M, SkillsScope as Ma, unattributedAssistantContentSchema as Mc, isMessageFileUpload as Mi, getDefaultParamsEndpoint as Mn, isParamEndpoint as Mo, MCPServerUserInputSchema as Mr, toMinimalFeedback as Ms, RateLimitPrefix as Mt, updateUserPlugins as N, ThinkingDisplay as Na, userSubmittedMessageFieldPathSchema as Nc, isPermissiveMimeConfig as Ni, getEndpointField as Nn, isUUID as No, MCPServersSchema as Nr, CODE_ENVIRONMENT_DECISION_VERSION as Ns, RerankerTypes as Nt, updateMessage as O, ReasoningMode as Oa, modelParameterFilterFieldSchema as Oc, inferMimeType as Oi, fileSourceSchema as On, isKnownProviderIdentifier as Oo, visionModels as Or, feedbackSchema as Os, MAX_SUBAGENT_DEPTH as Ot, userKeyQuery as P, ThinkingLevel as Pa, envVarRegex as Pc, isResponsesApiUpload as Pi, getSchemaDefaults as Pn, mediaSupportedProviders as Po, MCP_SERVER_TITLE_ERROR as Pr, CODE_ENVIRONMENT_MODES as Ps, RetentionMode as Pt, permBitsToAccessLevel as Q, documentSupportedProviders as Qa, resolveModelSpecEndpoint as Qi, normalizeServerName as Qn, tPresetSchema as Qo, loginPage as Qr, MAX_PII_CUSTOM_REGEX_CHARACTERS as Qs, allowedAddressesSchema as Qt, setTokenHeader as R, agentsSettings as Ra, normalizeEndpointName as Rc, mimeTypeAliases as Ri, isRemoteOidcUrlAllowed as Rn, openRouterSchema as Ro, StdioOptionsSchema as Rr, CODE_WORKSPACE_SELECTION_ERROR_REASONS as Rs, SKILL_SYNC_MIN_INTERVAL_MINUTES as Rt, requestPasswordReset as S, ImageVisionTool as Sa, getPiiRegexProgramSize as Sc, getConfiguredMimeAccept as Si, defaultEndpoints as Sn, imageDetailValue as So, transactionsSchema as Sr, resolveCodeApprovalMode as Ss, InfiniteCollections as St, revokeUserKey as T, Providers as Ta, hasActivePiiPatterns as Tc, imageExtRegex as Ti, defaultSocialLogins as Tn, isAssistantsEndpoint as To, validateVisionModel as Tr, FEEDBACK_REASON_KEYS as Ts, LANGFUSE_TRACE_USER_ID_FIELDS as Tt, PermissionBits as U, authTypeSchema as Ua, setFileConfigRegexCompiler as Ui, listConfiguredSpeechProviders as Un, tBannerSchema as Uo, isProcessMCPServerField as Ur, ACTION_METADATA_FILTER_FIELDS as Us, SearchProviders as Ut, QueryKeys as V, anthropicSettings as Va, retrievalMimeTypes as Vi, langfuseConfigSchema as Vn, resolveAgentSkillsScope as Vo, hasProcessMCPServerConfig as Vr, isCodeWorkspaceSelectionErrorReason as Vs, ScraperProviders as Vt, PrincipalModel as W, cacheSubsetProviders as Wa, supportedMimeTypes as Wi, mcpRefreshDefaults as Wn, tConversationSchema as Wo, AuthTypeEnum as Wr, AGENT_INSTRUCTION_FILTER_FIELDS as Ws, SettingsTabValues as Wt, getResourcePermissionsResponseSchema as X, defaultAgentFormValues as Xa, materializeModelSpecEndpoints as Xi, normalizeMCPToolKey as Xn, tPluginAuthConfigSchema as Xo, apiBaseUrl as Xr, HITL_MESSAGE_FILTER_FIELDS as Xs, VisionModes as Xt, effectivePermissionsResponseSchema as Y, compactGoogleSchema as Ya, getRefillEligibilityDate as Yi, modularEndpoints as Yn, tModelSpecPresetSchema as Yo, checkOpenAIStorage as Yr, FILTER_PII_STARTER_PATTERNS as Ys, ViolationTypes as Yt, hasPermissions as Z, defaultAssistantFormValues as Za, modelSpecSubagentsSchema as Zi, normalizeSearxngEngines as Zn, tPluginSchema as Zo, buildLoginRedirectUrl as Zr, MAX_PII_CUSTOM_PATTERNS_TOTAL as Zs, agentsEndpointSchema as Zt, getResourcePermissions as _, AuthType as _a, filterPiiActionSchema as _c, excelFileTypes as _i, codeEnvironmentUserSettingsSchema as _n, googleBaseSchema as _o, toolApprovalHookConfigSchema as _r, resolveAllowedStatefulCodeEnvironments as _s, EndpointURLs as _t, data_service_exports as a, MAX_SUBAGENTS_CEILING as aa, MESSAGE_FILTER_FIELDS as ac, bedrockDocumentFormats as ai, azureGroupSchema as an, eReasoningParameterFormatSchema as ao, retainRecentConfigSchema as ar, MessageContentTypes as as, AgentCapabilities as at, register as b, EModelEndpoint as ba, filterPiiStarterPatternSchema as bc, fileConfigSchema as bi, defaultAgentCapabilities as bn, googleSettings as bo, traceViewerDefaults as br, CodeApprovalModeError as bs, ForkOptions as bt, getAccessRoles as c, ComponentTypes as ca, SKILL_FILTER_FIELDS as cc, codeInterpreterMimeTypesList as ci, bedrockEndpointSchema as cn, eThinkingDisplaySchema as co, skillSyncGitHubSourceSchema as cr, Tools as cs, BASE_PRINCIPAL_CONFIG_SECTIONS as ct, getAvailablePlugins as d, clampSettingRange as da, actionMetadataFilterFieldSchema as dc, defaultLLMDeliveryPathSchema as di, buildServerNameAliases as dn, endpointSettings as do, splitToolCallName as dr, agentGitIdentitySchema as ds, CacheKeys as dt, tModelSpecSchema as ea, MAX_PII_PATTERNS_PER_SOURCE as ec, sharedFileDownload as ei, anthropicEndpointSchema as en, eImageDetailSchema as eo, paramDefinitionSchema as er, tSharedLinkSchema as es, principalSchema as et, getConversationById as f, generateDynamicSchema as fa, agentInstructionFilterFieldSchema as fc, defaultOCRMimeTypes as fi, checkpointerSchema as fn, extendedModelEndpointSchema as fo, stripServerNamePrefix as fr, defaultOrderQuery as fs, Capabilities as ft, getModels as g, AnthropicEffort as ga, fileFilterFieldSchema as gc, endpointFileConfigSchema as gi, codeEnvironmentUserConfigSchema as gn, getSettingsKeys as go, supportsBalanceCheck as gr, STATEFUL_CODE_ENVIRONMENTS as gs, EImageOutputType as gt, getMCPServerConnectionStatus as h, validateSettingDefinitions as ha, feedbackFilterFieldSchema as hc, documentParserMimeTypes as hi, codeEnvironmentPermissionDecisionSchema as hn, getModelKey as ho, summarizationTriggerSchema as hr, isActionTool as hs, DEFAULT_MEMORY_MAX_INPUT_TOKENS as ht, createPreset as i, MAX_SUBAGENTS as ia, MEMORY_FILTER_FIELDS as ic, bedrockDocumentExtensions as ii, azureGroupConfigsSchema as in, eReasoningModeSchema as io, resolveTraceViewerConfig as ir, FilePurpose as is, AUTH_USER_DOC_BY_ID_PREFIX as it, updateTokenCount as j, ReasoningSummary as ja, toolArgumentFilterFieldSchema as jc, isBedrockDocumentType as ji, getConfigDefaults as jn, isOpenAILikeProvider as jo, MCPOptionsSchema as jr, getTagsForRating as js, OCRStrategy as jt, updateMessageContent as k, ReasoningParameterFormat as ka, promptFilterFieldSchema as kc, isAnthropicDocumentType as ki, fileStorageSchema as kn, isMediaSupportedProvider as ko, webSearchSchema as kr, feedbackTagKeySchema as ks, MAX_SUBAGENT_GRAPH_NODES as kt, getAgentApiKeys as l, OptionTypes as la, STORED_MESSAGE_FILTER_FIELDS as lc, codeTypeMapping as li, bedrockGuardrailConfigSchema as ln, eThinkingLevelSchema as lo, specialVariables as lr, actionDelimiter as ls, CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS as lt, getEffectivePermissions as m, generateOpenAISchema as ma, conversationTitleFilterFieldSchema as mc, defaultTextMimeTypes as mi, cloudfrontConfigSchema as mn, getGoogleThinkingBudgetMax as mo, summarizationConfigSchema as mr, hostImageNamePrefix as ms, Constants as mt, clearAllConversations as n, MAX_CHAT_PROJECT_NAME_LENGTH as na, MAX_PII_PATTERN_LABEL_LENGTH as nc, applicationMimeTypes as ni, azureBaseSchema as nn, eReasoningContextSchema as no, rateLimitSchema as nr, AssistantStreamEvents as ns, updateResourcePermissionsRequestSchema as nt, deleteAgentApiKey as o, getMaxSubagents as oa, MODEL_PARAMETER_FILTER_FIELDS as oc, bedrockDocumentMimeTypes as oi, balanceSchema as on, eReasoningResponseKeySchema as oo, setMessageFilterRegexValidator as or, RunStatus as os, AuthKeys as ot, getCustomConfigSpeech as p, generateGoogleSchema as pa, conversationStarterFilterFieldSchema as pc, defaultSTTMimeTypes as pi, checkpointerTypeSchema as pn, getGoogleThinkingBudgetBounds as po, stripServerNamePrefixes as pr, hostImageIdSuffix as ps, CohereConstants as pt, accessRoleSchema as q, compactAgentsSchema as qa, videoMimeTypes as qi, messageFilterSchema as qn, tExampleSchema as qo, FileContext as qr, FEEDBACK_FILTER_FIELDS as qs, TTSProviders as qt, createAgentApiKey as r, MAX_GRAPH_SUBAGENT_MEMBERS as ra, MAX_PII_PATTERN_LENGTH as rc, audioMimeTypes as ri, azureEndpointSchema as rn, eReasoningEffortSchema as ro, resolveEndpointType as rr, EToolResources as rs, updateResourcePermissionsResponseSchema as rt, deletePreset as s, setMaxSubagents as sa, PROMPT_FILTER_FIELDS as sc, codeInterpreterMimeTypes as si, baseEndpointSchema as sn, eReasoningSummarySchema as so, skillSyncConfigSchema as sr, StepStatus as ss, BASE_ONLY_CONFIG_SECTIONS as st, cancelMCPOAuth as t, MAX_CHAT_PROJECT_DESCRIPTION_LENGTH as ta, MAX_PII_PATTERN_ID_LENGTH as tc, DefaultLLMDeliveryPath as ti, assistantEndpointSchema as tn, eModelEndpointSchema as to, providerEndpointMap as tr, AnnotationTypes as ts, resourcePermissionsResponseSchema as tt, getAllEffectivePermissions as u, SettingTypes as ua, TOOL_ARGUMENT_FILTER_FIELDS as uc, convertStringsToRegex as ui, bedrockModels as un, eVerbositySchema as uo, splitMCPToolKey as ur, actionDomainSeparator as us, CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS as ut, getSharedLink as v, BedrockProviders as va, filterPiiCustomPatternSchema as vc, excelMimeTypes as vi, configSchema as vn, googleGenConfigSchema as vo, toolApprovalModeSchema as vr, resolveStatefulCodeEnvironment as vs, ErrorTypes as vt, revokeAllUserKeys as w, MemoryScope as wa, hasActivePiiFields as wc, getEndpointFileConfig as wi, defaultRetrievalModels as wn, isAgentsEndpoint as wo, turnstileSchema as wr, FEEDBACK_RATINGS as ws, LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS as wt, reinitializeMCPServer as x, ImageDetail as xa, filtersConfigSchema as xc, fullMimeTypesList as xi, defaultAssistantsVersion as xn, imageDetailNumeric as xo, traceViewerLimits as xr, getAllowedCodeApprovalModes as xs, ImageDetailCost as xt, getSharedMessages as y, BedrockReasoningConfig as ya, filterPiiRegexSchema as yc, fileConfig as yi, contextPruningSchema as yn, googleSchema as yo, toolApprovalPolicySchema as yr, CODE_APPROVAL_MODES as ys, FetchTokenConfig as yt, DynamicQueryKeys as z, anthropicBaseSchema as za, resolveSandboxFilename as zi, isSecureCodeEnvironmentControlURL as zn, paramEndpoints as zo, StreamableHTTPOptionsSchema as zr, isCodeEnvironmentMode as zs, STTProviders as zt };
7634
9353
 
7635
- //# sourceMappingURL=data-service-pwrlWjJs.mjs.map
9354
+ //# sourceMappingURL=data-service-Bx6IFaSa.mjs.map