librechat-data-provider 0.8.521 → 0.8.522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{data-service-pwrlWjJs.mjs → data-service-CaB7saTP.mjs} +1145 -37
- package/dist/data-service-CaB7saTP.mjs.map +1 -0
- package/dist/{data-service-DOIF4BkW.js → data-service-D5kHzBt-.js} +1588 -36
- package/dist/data-service-D5kHzBt-.js.map +1 -0
- package/dist/index.js +947 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +825 -37
- package/dist/index.mjs.map +1 -1
- package/dist/react-query/index.js +2 -1
- package/dist/react-query/index.js.map +1 -1
- package/dist/react-query/index.mjs +2 -1
- package/dist/react-query/index.mjs.map +1 -1
- package/dist/types/accessPermissions.d.ts +4 -0
- package/dist/types/actions.d.ts +2 -2
- package/dist/types/agentToolOptions.d.ts +11 -0
- package/dist/types/api-endpoints.d.ts +18 -0
- package/dist/types/bedrock.d.ts +168 -0
- package/dist/types/cadence.d.ts +33 -0
- package/dist/types/codeEnvRef.d.ts +21 -0
- package/dist/types/config.d.ts +9060 -1135
- package/dist/types/data-service.d.ts +40 -2
- package/dist/types/file-config.d.ts +1 -0
- package/dist/types/filters.d.ts +1422 -0
- package/dist/types/generate.d.ts +79 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/types/keys.d.ts +23 -2
- package/dist/types/langchain.d.ts +4 -0
- package/dist/types/limits.d.ts +13 -0
- package/dist/types/mcp.d.ts +299 -210
- package/dist/types/messages.d.ts +5 -0
- package/dist/types/models.d.ts +732 -68
- package/dist/types/parameterSettings.d.ts +5 -1
- package/dist/types/parsers.d.ts +10 -0
- package/dist/types/permissions.d.ts +42 -1
- package/dist/types/providers.d.ts +36 -0
- package/dist/types/request.d.ts +2 -2
- package/dist/types/roles.d.ts +34 -0
- package/dist/types/runSteps.d.ts +59 -0
- package/dist/types/schemas.d.ts +1191 -26
- package/dist/types/stateful-code.d.ts +7 -0
- package/dist/types/types/agents.d.ts +92 -7
- package/dist/types/types/assistants.d.ts +96 -5
- package/dist/types/types/files.d.ts +12 -2
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/insights.d.ts +62 -0
- package/dist/types/types/mutations.d.ts +1 -0
- package/dist/types/types/queries.d.ts +30 -2
- package/dist/types/types/queuedTurns.d.ts +870 -0
- package/dist/types/types/runs.d.ts +95 -4
- package/dist/types/types/schedules.d.ts +306 -0
- package/dist/types/types/skills.d.ts +9 -0
- package/dist/types/types/subagents.d.ts +159 -0
- package/dist/types/types/web.d.ts +12 -2
- package/dist/types/types.d.ts +61 -1
- package/package.json +4 -2
- package/dist/data-service-DOIF4BkW.js.map +0 -1
- 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,258 @@ 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
|
|
80
333
|
//#region src/feedback.ts
|
|
81
334
|
const FEEDBACK_RATINGS = ["thumbsUp", "thumbsDown"];
|
|
82
335
|
const FEEDBACK_REASON_KEYS = [
|
|
@@ -186,6 +439,25 @@ function getTagByKey(key) {
|
|
|
186
439
|
return FEEDBACK_TAGS.find((tag) => tag.key === key);
|
|
187
440
|
}
|
|
188
441
|
//#endregion
|
|
442
|
+
//#region src/stateful-code.ts
|
|
443
|
+
const STATEFUL_CODE_ENVIRONMENTS = [
|
|
444
|
+
"user",
|
|
445
|
+
"agent-user",
|
|
446
|
+
"conversation"
|
|
447
|
+
];
|
|
448
|
+
/** Resolve a deployment allowlist in stable UI order. An omitted value preserves
|
|
449
|
+
* the backward-compatible behavior where every environment is available. */
|
|
450
|
+
function resolveAllowedStatefulCodeEnvironments(configured) {
|
|
451
|
+
if (configured == null) return [...STATEFUL_CODE_ENVIRONMENTS];
|
|
452
|
+
const configuredSet = new Set(configured);
|
|
453
|
+
return STATEFUL_CODE_ENVIRONMENTS.filter((environment) => configuredSet.has(environment));
|
|
454
|
+
}
|
|
455
|
+
/** Keep an allowed preference, otherwise select the first deployment-allowed scope. */
|
|
456
|
+
function resolveStatefulCodeEnvironment(preferred, configured) {
|
|
457
|
+
const allowed = resolveAllowedStatefulCodeEnvironments(configured);
|
|
458
|
+
return preferred != null && allowed.includes(preferred) ? preferred : allowed[0];
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
189
461
|
//#region src/types/assistants.ts
|
|
190
462
|
let Tools = /* @__PURE__ */ function(Tools) {
|
|
191
463
|
Tools["execute_code"] = "execute_code";
|
|
@@ -602,6 +874,8 @@ const defaultAgentFormValues = {
|
|
|
602
874
|
["file_search"]: false,
|
|
603
875
|
["web_search"]: false,
|
|
604
876
|
["memory"]: false,
|
|
877
|
+
stateful_code_environment: "user",
|
|
878
|
+
code_environment_id: void 0,
|
|
605
879
|
category: "general",
|
|
606
880
|
support_contact: {
|
|
607
881
|
name: "",
|
|
@@ -613,6 +887,10 @@ const defaultAgentFormValues = {
|
|
|
613
887
|
/** Master toggle for skill use on this agent. `true` activates skills
|
|
614
888
|
* (full catalog unless `skills` narrows it). Anything else = inactive. */
|
|
615
889
|
skills_enabled: void 0,
|
|
890
|
+
/** Enables runtime skill creation without exposing an existing skill catalog. */
|
|
891
|
+
skill_authoring_enabled: void 0,
|
|
892
|
+
/** Explicit catalog scope. Missing preserves the legacy enabled + empty = all behavior. */
|
|
893
|
+
skills_scope: void 0,
|
|
616
894
|
/** `undefined` = feature disabled by default (no subagent tool injected). */
|
|
617
895
|
subagents: void 0,
|
|
618
896
|
/** Memory partition: 'agent' isolates memories per (user, agent); default shared pool */
|
|
@@ -630,6 +908,8 @@ const ImageVisionTool = {
|
|
|
630
908
|
}
|
|
631
909
|
}
|
|
632
910
|
};
|
|
911
|
+
/** Structural on purpose: accepts assistants tools/tool calls and agents function tool
|
|
912
|
+
* calls alike — the check only ever reads `type` and `function.name`. */
|
|
633
913
|
const isImageVisionTool = (tool) => tool.type === "function" && tool.function?.name === ImageVisionTool.function?.name;
|
|
634
914
|
const openAISettings = {
|
|
635
915
|
model: { default: "gpt-4o-mini" },
|
|
@@ -688,8 +968,45 @@ const getGoogleMaxOutputTokens = (modelName) => {
|
|
|
688
968
|
}
|
|
689
969
|
return GOOGLE_LEGACY_MAX_OUTPUT;
|
|
690
970
|
};
|
|
971
|
+
/**
|
|
972
|
+
* Per-model thinking budget bounds, documented in
|
|
973
|
+
* `com_endpoint_google_thinking_budget`: Gemini 2.5 Pro accepts 128-32,768,
|
|
974
|
+
* Flash accepts 0-24,576, and Flash Lite accepts 512-24,576. The generic
|
|
975
|
+
* 32,000 in the shared definition both under-limits Pro and lets invalid
|
|
976
|
+
* Flash values through.
|
|
977
|
+
*
|
|
978
|
+
* `-1` remains the "decide automatically" sentinel and is not part of these
|
|
979
|
+
* floors. Callers must keep `range.min` at -1 and apply `min` only to
|
|
980
|
+
* non-negative values.
|
|
981
|
+
*/
|
|
982
|
+
const GOOGLE_THINKING_BUDGET_PRO_MAX = 32768;
|
|
983
|
+
const GOOGLE_THINKING_BUDGET_FLASH_MAX = 24576;
|
|
984
|
+
const GOOGLE_THINKING_BUDGET_PRO_MIN = 128;
|
|
985
|
+
const GOOGLE_THINKING_BUDGET_FLASH_MIN = 0;
|
|
986
|
+
const GOOGLE_THINKING_BUDGET_FLASH_LITE_MIN = 512;
|
|
987
|
+
const getGoogleThinkingBudgetBounds = (modelName) => {
|
|
988
|
+
if (!/gemini-2\.5/i.test(modelName)) return;
|
|
989
|
+
if (/flash[-_.]?lite/i.test(modelName)) return {
|
|
990
|
+
min: GOOGLE_THINKING_BUDGET_FLASH_LITE_MIN,
|
|
991
|
+
max: GOOGLE_THINKING_BUDGET_FLASH_MAX
|
|
992
|
+
};
|
|
993
|
+
if (/flash/i.test(modelName)) return {
|
|
994
|
+
min: GOOGLE_THINKING_BUDGET_FLASH_MIN,
|
|
995
|
+
max: GOOGLE_THINKING_BUDGET_FLASH_MAX
|
|
996
|
+
};
|
|
997
|
+
if (/pro/i.test(modelName)) return {
|
|
998
|
+
min: GOOGLE_THINKING_BUDGET_PRO_MIN,
|
|
999
|
+
max: GOOGLE_THINKING_BUDGET_PRO_MAX
|
|
1000
|
+
};
|
|
1001
|
+
};
|
|
1002
|
+
const getGoogleThinkingBudgetMax = (modelName) => getGoogleThinkingBudgetBounds(modelName)?.max;
|
|
691
1003
|
const googleSettings = {
|
|
692
1004
|
model: { default: "gemini-1.5-flash-latest" },
|
|
1005
|
+
maxContextTokens: {
|
|
1006
|
+
min: 10,
|
|
1007
|
+
max: 2e6,
|
|
1008
|
+
step: 1e3
|
|
1009
|
+
},
|
|
693
1010
|
maxOutputTokens: {
|
|
694
1011
|
min: 1,
|
|
695
1012
|
max: GOOGLE_MAX_OUTPUT,
|
|
@@ -908,12 +1225,21 @@ const tPluginSchema = z.object({
|
|
|
908
1225
|
authenticated: z.boolean().optional(),
|
|
909
1226
|
chatMenu: z.boolean().optional(),
|
|
910
1227
|
isButton: z.boolean().optional(),
|
|
911
|
-
toolkit: z.boolean().optional()
|
|
1228
|
+
toolkit: z.boolean().optional(),
|
|
1229
|
+
/** Raw upstream tool name when the model-facing key stripped a redundant
|
|
1230
|
+
* server-name prefix — proves upstream identity for legacy id migration. */
|
|
1231
|
+
serverToolName: z.string().optional()
|
|
912
1232
|
});
|
|
913
1233
|
const tExampleSchema = z.object({
|
|
914
1234
|
input: z.object({ content: z.string() }),
|
|
915
1235
|
output: z.object({ content: z.string() })
|
|
916
1236
|
});
|
|
1237
|
+
/** Compact context-fading tier persisted beside a message's calibration ratio. */
|
|
1238
|
+
const agentFadingTierSchema = z.object({
|
|
1239
|
+
v: z.literal(1),
|
|
1240
|
+
budgetTokens: z.number().positive(),
|
|
1241
|
+
masked: z.boolean()
|
|
1242
|
+
});
|
|
917
1243
|
const tMessageSchema = z.object({
|
|
918
1244
|
messageId: z.string(),
|
|
919
1245
|
endpoint: z.string().optional(),
|
|
@@ -930,6 +1256,12 @@ const tMessageSchema = z.object({
|
|
|
930
1256
|
/** @deprecated */
|
|
931
1257
|
generation: z.string().nullable().optional(),
|
|
932
1258
|
isCreatedByUser: z.boolean(),
|
|
1259
|
+
/** True when the complete stored row came from outside the model. */
|
|
1260
|
+
isUserSubmitted: z.boolean().optional(),
|
|
1261
|
+
/** JSON pointers to caller-authored fields in an otherwise mixed model response. */
|
|
1262
|
+
userSubmittedPaths: z.array(z.string().startsWith("/")).optional(),
|
|
1263
|
+
/** Exact HITL message-field identity for caller-authored values stored in mixed responses. */
|
|
1264
|
+
userSubmittedMessageFieldPaths: z.array(userSubmittedMessageFieldPathSchema).optional(),
|
|
933
1265
|
isTemporary: z.boolean().optional(),
|
|
934
1266
|
expiredAt: z.string().nullable().optional(),
|
|
935
1267
|
error: z.boolean().optional(),
|
|
@@ -949,7 +1281,9 @@ const tMessageSchema = z.object({
|
|
|
949
1281
|
tokenCount: z.number().optional(),
|
|
950
1282
|
contextMeta: z.object({
|
|
951
1283
|
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\")")
|
|
1284
|
+
encoding: z.string().optional().describe("Tokenizer encoding used when this ratio was computed (e.g. \"claude\", \"o200k_base\")"),
|
|
1285
|
+
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"),
|
|
1286
|
+
fadingTiers: z.array(agentFadingTierSchema.extend({ agentId: z.string().min(1) })).optional().describe("Latched context-fading tiers keyed by agent ID, stored as entries")
|
|
953
1287
|
}).optional(),
|
|
954
1288
|
/**
|
|
955
1289
|
* Skill names the user invoked manually via the `$` popover on this turn.
|
|
@@ -987,6 +1321,19 @@ let MemoryScope = /* @__PURE__ */ function(MemoryScope) {
|
|
|
987
1321
|
MemoryScope["agent"] = "agent";
|
|
988
1322
|
return MemoryScope;
|
|
989
1323
|
}({});
|
|
1324
|
+
/** Catalog exposure for a persisted agent with skills enabled. */
|
|
1325
|
+
let SkillsScope = /* @__PURE__ */ function(SkillsScope) {
|
|
1326
|
+
SkillsScope["all"] = "all";
|
|
1327
|
+
SkillsScope["selected"] = "selected";
|
|
1328
|
+
SkillsScope["none"] = "none";
|
|
1329
|
+
return SkillsScope;
|
|
1330
|
+
}({});
|
|
1331
|
+
/** Resolves explicit and legacy persisted-agent skill catalog states. */
|
|
1332
|
+
function resolveAgentSkillsScope(skills, enabled, scope) {
|
|
1333
|
+
if (enabled !== true) return "none";
|
|
1334
|
+
if (scope !== void 0) return scope;
|
|
1335
|
+
return (skills ?? []).length > 0 ? "selected" : "all";
|
|
1336
|
+
}
|
|
990
1337
|
const coerceNumber = z.union([z.number(), z.string()]).transform((val) => {
|
|
991
1338
|
if (typeof val === "string") return val.trim() === "" ? void 0 : parseFloat(val);
|
|
992
1339
|
return val;
|
|
@@ -999,11 +1346,23 @@ const DocumentType = z.lazy(() => z.union([
|
|
|
999
1346
|
z.array(z.lazy(() => DocumentType)),
|
|
1000
1347
|
z.record(z.lazy(() => DocumentType))
|
|
1001
1348
|
]));
|
|
1349
|
+
const subagentThreadLineageSchema = z.object({
|
|
1350
|
+
rootConversationId: z.string().min(1),
|
|
1351
|
+
parentConversationId: z.string().min(1),
|
|
1352
|
+
parentMessageId: z.string().min(1),
|
|
1353
|
+
parentToolCallId: z.string().min(1),
|
|
1354
|
+
parentAgentId: z.string().min(1).optional(),
|
|
1355
|
+
subagentType: z.string().min(1),
|
|
1356
|
+
subagentKind: z.enum(["agent", "graph"]),
|
|
1357
|
+
depth: z.number().int().positive()
|
|
1358
|
+
});
|
|
1002
1359
|
const tConversationSchema = z.object({
|
|
1003
1360
|
conversationId: z.string().nullable(),
|
|
1004
1361
|
endpoint: eModelEndpointSchema.nullable(),
|
|
1005
1362
|
endpointType: eModelEndpointSchema.nullable().optional(),
|
|
1006
1363
|
isArchived: z.boolean().optional(),
|
|
1364
|
+
/** When the chat was archived; absent on chats archived before this was recorded. */
|
|
1365
|
+
archivedAt: z.string().nullable().optional(),
|
|
1007
1366
|
pinned: z.boolean().optional(),
|
|
1008
1367
|
/** Server-derived: an active shared link exists for this conversation. Not persisted. */
|
|
1009
1368
|
isShared: z.boolean().optional(),
|
|
@@ -1055,6 +1414,8 @@ const tConversationSchema = z.object({
|
|
|
1055
1414
|
disableStreaming: z.boolean().optional(),
|
|
1056
1415
|
assistant_id: z.string().optional(),
|
|
1057
1416
|
agent_id: z.string().optional(),
|
|
1417
|
+
/** Durable parent/child navigation for a subagent thread. */
|
|
1418
|
+
subagentThread: subagentThreadLineageSchema.optional(),
|
|
1058
1419
|
region: z.string().optional(),
|
|
1059
1420
|
maxTokens: coerceNumber.optional(),
|
|
1060
1421
|
additionalModelRequestFields: DocumentType.optional(),
|
|
@@ -1210,6 +1571,26 @@ const tModelSpecPresetSchema = tPresetSchema.omit({
|
|
|
1210
1571
|
chatGptLabel: true,
|
|
1211
1572
|
presetOverride: true,
|
|
1212
1573
|
spec: true
|
|
1574
|
+
}).merge(z.object({
|
|
1575
|
+
/**
|
|
1576
|
+
* Optional here, unlike `tPresetSchema`, where the key is required (though
|
|
1577
|
+
* nullable). A preset naming an `agent_id` has an unambiguous endpoint, so
|
|
1578
|
+
* config may omit it and `resolveModelSpecEndpoint` infers `agents` when
|
|
1579
|
+
* specs are materialized at config load.
|
|
1580
|
+
*/
|
|
1581
|
+
endpoint: extendedModelEndpointSchema.nullish() })).superRefine((preset, ctx) => {
|
|
1582
|
+
/**
|
|
1583
|
+
* Omission is only legal when the endpoint is inferable, which requires a
|
|
1584
|
+
* NON-EMPTY `agent_id` — form-backed writers persist untouched fields as
|
|
1585
|
+
* `''`, which names no agent. An explicit `endpoint: null` stays accepted:
|
|
1586
|
+
* it validated before the key became optional, so rejecting it now would
|
|
1587
|
+
* break previously valid configs.
|
|
1588
|
+
*/
|
|
1589
|
+
if (preset.endpoint === void 0 && !preset.agent_id) ctx.addIssue({
|
|
1590
|
+
code: z.ZodIssueCode.custom,
|
|
1591
|
+
path: ["endpoint"],
|
|
1592
|
+
message: "endpoint is required unless the preset names a non-empty agent_id (the agents endpoint is then inferred)"
|
|
1593
|
+
});
|
|
1213
1594
|
});
|
|
1214
1595
|
const tSharedLinkSchema = z.object({
|
|
1215
1596
|
conversationId: z.string(),
|
|
@@ -1238,6 +1619,7 @@ const googleBaseSchema = tConversationSchema.pick({
|
|
|
1238
1619
|
examples: true,
|
|
1239
1620
|
temperature: true,
|
|
1240
1621
|
maxOutputTokens: true,
|
|
1622
|
+
resendFiles: true,
|
|
1241
1623
|
artifacts: true,
|
|
1242
1624
|
topP: true,
|
|
1243
1625
|
topK: true,
|
|
@@ -1496,15 +1878,39 @@ const requiredSettingFields = [
|
|
|
1496
1878
|
"type",
|
|
1497
1879
|
"component"
|
|
1498
1880
|
];
|
|
1881
|
+
function clampSettingRange(value, range) {
|
|
1882
|
+
if (range.positiveMin != null) {
|
|
1883
|
+
/** The minimum carries its own meaning here (Google's -1 for automatic),
|
|
1884
|
+
* and the schema admits it outright, so it survives rather than being
|
|
1885
|
+
* lifted to the floor. It need not be negative to be the sentinel. */
|
|
1886
|
+
if (value === range.min) return range.min;
|
|
1887
|
+
/** Below the sentinel there is nothing admissible to lift to, so the value
|
|
1888
|
+
* resolves to it. Between the sentinel and the floor, the floor is the
|
|
1889
|
+
* nearest value the generated schema accepts. */
|
|
1890
|
+
if (value < Math.max(range.min, 0)) return range.min;
|
|
1891
|
+
return Math.min(Math.max(value, range.positiveMin), range.max);
|
|
1892
|
+
}
|
|
1893
|
+
return Math.min(Math.max(value, range.min), range.max);
|
|
1894
|
+
}
|
|
1499
1895
|
function generateDynamicSchema(settings) {
|
|
1500
1896
|
const schemaFields = {};
|
|
1501
1897
|
for (const setting of settings) {
|
|
1502
1898
|
const { key, type, default: defaultValue, range, options, minText, maxText, minTags, maxTags } = setting;
|
|
1503
1899
|
if (type === "number") {
|
|
1504
|
-
let
|
|
1900
|
+
let numberSchema = z.number();
|
|
1505
1901
|
if (range) {
|
|
1506
|
-
|
|
1507
|
-
|
|
1902
|
+
numberSchema = numberSchema.min(range.min);
|
|
1903
|
+
numberSchema = numberSchema.max(range.max);
|
|
1904
|
+
}
|
|
1905
|
+
/** Widened deliberately: refine returns ZodEffects, not ZodNumber, and
|
|
1906
|
+
* the number-specific chaining is already done above. */
|
|
1907
|
+
let schema = numberSchema;
|
|
1908
|
+
if (range?.positiveMin != null) {
|
|
1909
|
+
/** Mirrors clampSettingRange so the generated schema and the clamp
|
|
1910
|
+
* agree: `min` only admits the sentinel, and any non-negative value
|
|
1911
|
+
* must clear the documented floor. */
|
|
1912
|
+
const { positiveMin, min } = range;
|
|
1913
|
+
schema = numberSchema.refine((value) => value === min || value >= positiveMin, `Expected ${min} or a value of at least ${positiveMin}`);
|
|
1508
1914
|
}
|
|
1509
1915
|
if (typeof defaultValue === "number") schemaFields[key] = schema.default(defaultValue);
|
|
1510
1916
|
else schemaFields[key] = schema;
|
|
@@ -1646,7 +2052,14 @@ function validateSettingDefinitions(settings) {
|
|
|
1646
2052
|
setting.includeInput = setting.type === "number" ? setting.includeInput ?? true : false;
|
|
1647
2053
|
}
|
|
1648
2054
|
if (setting.component === "slider" && setting.type === "number") {
|
|
1649
|
-
if (setting.default === void 0 && setting.range)
|
|
2055
|
+
if (setting.default === void 0 && setting.range) {
|
|
2056
|
+
/** The midpoint of the admissible interval, which a positive floor
|
|
2057
|
+
* narrows: the span between the sentinel and that floor holds no value
|
|
2058
|
+
* the generated schema accepts, so a midpoint taken across it would
|
|
2059
|
+
* fail the validation below. */
|
|
2060
|
+
const floor = Math.max(setting.range.min, setting.range.positiveMin ?? setting.range.min);
|
|
2061
|
+
setting.default = Math.round((floor + setting.range.max) / 2);
|
|
2062
|
+
}
|
|
1650
2063
|
}
|
|
1651
2064
|
if (setting.component === "checkbox" || setting.component === "switch") {
|
|
1652
2065
|
if (setting.options && setting.options.length > 2) errors.push({
|
|
@@ -1724,6 +2137,16 @@ function validateSettingDefinitions(settings) {
|
|
|
1724
2137
|
message: `Invalid default value for setting ${setting.key}. Must be within the range [${setting.range.min}, ${setting.range.max}].`,
|
|
1725
2138
|
path: ["default"]
|
|
1726
2139
|
});
|
|
2140
|
+
if (setting.type === "number" && setting.range?.positiveMin != null && setting.range.positiveMin > setting.range.max) errors.push({
|
|
2141
|
+
code: ZodIssueCode.custom,
|
|
2142
|
+
message: `Invalid range for setting ${setting.key}. positiveMin (${setting.range.positiveMin}) cannot exceed max (${setting.range.max}).`,
|
|
2143
|
+
path: ["range"]
|
|
2144
|
+
});
|
|
2145
|
+
if (setting.type === "number" && setting.range?.positiveMin != null && typeof setting.default === "number" && setting.default !== setting.range.min && setting.default < setting.range.positiveMin) errors.push({
|
|
2146
|
+
code: ZodIssueCode.custom,
|
|
2147
|
+
message: `Invalid default value for setting ${setting.key}. Must be ${setting.range.min} or at least ${setting.range.positiveMin}.`,
|
|
2148
|
+
path: ["default"]
|
|
2149
|
+
});
|
|
1727
2150
|
if (setting.enumMappings && setting.type === "enum" && setting.options) {
|
|
1728
2151
|
for (const option of setting.options) if (!(option in setting.enumMappings)) errors.push({
|
|
1729
2152
|
code: ZodIssueCode.custom,
|
|
@@ -1825,13 +2248,83 @@ const generateGoogleSchema = (customGoogle) => {
|
|
|
1825
2248
|
//#region src/limits.ts
|
|
1826
2249
|
/** Maximum number of explicit subagents per parent agent. UI + Zod schema share this. */
|
|
1827
2250
|
const MAX_SUBAGENTS = 10;
|
|
2251
|
+
/** Hard upper bound for `endpoints.agents.maxSubagents`, keeping the request-validation
|
|
2252
|
+
* cap bounded no matter what the config file says. */
|
|
2253
|
+
const MAX_SUBAGENTS_CEILING = 50;
|
|
2254
|
+
let maxSubagents = 10;
|
|
2255
|
+
/** Effective subagents-per-agent cap; initialized from `endpoints.agents.maxSubagents` at startup. */
|
|
2256
|
+
const getMaxSubagents = () => maxSubagents;
|
|
2257
|
+
/** Applies a configured cap; any missing or out-of-range value resets to the default. */
|
|
2258
|
+
const setMaxSubagents = (value) => {
|
|
2259
|
+
maxSubagents = typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 50 ? value : 10;
|
|
2260
|
+
};
|
|
2261
|
+
/** Chat project field limits. The dialogs and the persistence layer share these,
|
|
2262
|
+
* so the inputs stop at the same point the server would otherwise truncate. */
|
|
2263
|
+
const MAX_CHAT_PROJECT_NAME_LENGTH = 100;
|
|
2264
|
+
const MAX_CHAT_PROJECT_DESCRIPTION_LENGTH = 1e3;
|
|
2265
|
+
/** Mirrors the bounded graph-child member limit in `@librechat/agents`. */
|
|
2266
|
+
const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
|
|
1828
2267
|
//#endregion
|
|
1829
2268
|
//#region src/models.ts
|
|
1830
2269
|
const modelSpecSubagentsSchema = z.object({
|
|
1831
2270
|
enabled: z.boolean().optional(),
|
|
1832
2271
|
allowSelf: z.boolean().optional(),
|
|
1833
|
-
agent_ids: z.array(z.string()).
|
|
2272
|
+
agent_ids: z.array(z.string()).optional()
|
|
2273
|
+
}).superRefine((subagents, ctx) => {
|
|
2274
|
+
const maxSubagents = getMaxSubagents();
|
|
2275
|
+
if ((subagents.agent_ids?.length ?? 0) > maxSubagents) ctx.addIssue({
|
|
2276
|
+
code: z.ZodIssueCode.custom,
|
|
2277
|
+
path: ["agent_ids"],
|
|
2278
|
+
message: `agent_ids must contain at most ${maxSubagents} item(s)`
|
|
2279
|
+
});
|
|
1834
2280
|
});
|
|
2281
|
+
function resolveModelSpecEndpoint(modelSpec) {
|
|
2282
|
+
const preset = modelSpec?.preset;
|
|
2283
|
+
if (preset?.endpoint != null) return preset.endpoint;
|
|
2284
|
+
/**
|
|
2285
|
+
* An explicit `endpoint: null` is a statement, not an omission — such specs
|
|
2286
|
+
* validated (and were skipped downstream) before inference existed, so
|
|
2287
|
+
* inferring here would silently activate them. Only an absent key infers,
|
|
2288
|
+
* and only from a non-empty `agent_id`: form-backed writers persist
|
|
2289
|
+
* untouched fields as `''`, which names no agent.
|
|
2290
|
+
*/
|
|
2291
|
+
if (preset?.endpoint === null) return;
|
|
2292
|
+
return preset?.agent_id ? "agents" : void 0;
|
|
2293
|
+
}
|
|
2294
|
+
/**
|
|
2295
|
+
* Writes each spec's resolved endpoint back onto its preset so every consumer —
|
|
2296
|
+
* endpoint matching, the selector, access filters, startup presets, provider-key
|
|
2297
|
+
* reachability — reads a complete spec instead of re-deriving it. Apply once
|
|
2298
|
+
* where the effective config is assembled (YAML load and DB-override merge);
|
|
2299
|
+
* downstream code then needs no awareness of inference.
|
|
2300
|
+
*
|
|
2301
|
+
* Returns the original object, and the original spec objects, when nothing
|
|
2302
|
+
* needs filling in, so cached configs and memoized consumers see no new
|
|
2303
|
+
* identities.
|
|
2304
|
+
*/
|
|
2305
|
+
function materializeModelSpecEndpoints(modelSpecs) {
|
|
2306
|
+
const list = modelSpecs?.list;
|
|
2307
|
+
if (!list?.length) return modelSpecs;
|
|
2308
|
+
let changed = false;
|
|
2309
|
+
const materialized = list.map((spec) => {
|
|
2310
|
+
if (spec?.preset == null || spec.preset.endpoint != null) return spec;
|
|
2311
|
+
const endpoint = resolveModelSpecEndpoint(spec);
|
|
2312
|
+
if (endpoint == null) return spec;
|
|
2313
|
+
changed = true;
|
|
2314
|
+
return {
|
|
2315
|
+
...spec,
|
|
2316
|
+
preset: {
|
|
2317
|
+
...spec.preset,
|
|
2318
|
+
endpoint
|
|
2319
|
+
}
|
|
2320
|
+
};
|
|
2321
|
+
});
|
|
2322
|
+
if (!changed) return modelSpecs;
|
|
2323
|
+
return {
|
|
2324
|
+
...modelSpecs,
|
|
2325
|
+
list: materialized
|
|
2326
|
+
};
|
|
2327
|
+
}
|
|
1835
2328
|
const tModelSpecSchema = z.object({
|
|
1836
2329
|
name: z.string(),
|
|
1837
2330
|
label: z.string(),
|
|
@@ -2325,7 +2818,8 @@ const fileConfig = {
|
|
|
2325
2818
|
enabled: false,
|
|
2326
2819
|
maxWidth: 1900,
|
|
2327
2820
|
maxHeight: 1900,
|
|
2328
|
-
quality: .92
|
|
2821
|
+
quality: .92,
|
|
2822
|
+
enforced: false
|
|
2329
2823
|
},
|
|
2330
2824
|
ocr: { supportedMimeTypes: defaultOCRMimeTypes },
|
|
2331
2825
|
text: { supportedMimeTypes: defaultTextMimeTypes },
|
|
@@ -2355,8 +2849,8 @@ const fileConfigSchema = z.object({
|
|
|
2355
2849
|
}).optional(),
|
|
2356
2850
|
clientImageResize: z.object({
|
|
2357
2851
|
enabled: z.boolean().optional(),
|
|
2358
|
-
maxWidth: z.number().min(
|
|
2359
|
-
maxHeight: z.number().min(
|
|
2852
|
+
maxWidth: z.number().min(1).optional(),
|
|
2853
|
+
maxHeight: z.number().min(1).optional(),
|
|
2360
2854
|
quality: z.number().min(0).max(1).optional()
|
|
2361
2855
|
}).optional(),
|
|
2362
2856
|
ocr: z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
|
|
@@ -2662,7 +3156,8 @@ function mergeFileConfig(dynamic) {
|
|
|
2662
3156
|
};
|
|
2663
3157
|
if (dynamic.clientImageResize !== void 0) mergedConfig.clientImageResize = {
|
|
2664
3158
|
...mergedConfig.clientImageResize,
|
|
2665
|
-
...dynamic.clientImageResize
|
|
3159
|
+
...dynamic.clientImageResize,
|
|
3160
|
+
enforced: dynamic.clientImageResize.enabled !== void 0
|
|
2666
3161
|
};
|
|
2667
3162
|
if (dynamic.ocr !== void 0) {
|
|
2668
3163
|
const { supportedMimeTypes: ocrMimeTypes, ...ocrRest } = dynamic.ocr;
|
|
@@ -2723,9 +3218,14 @@ const buildQuery = (params) => {
|
|
|
2723
3218
|
};
|
|
2724
3219
|
const health = () => `${BASE_URL}/health`;
|
|
2725
3220
|
const user = () => `${BASE_URL}/api/user`;
|
|
3221
|
+
const userPreferences = () => `${user()}/preferences`;
|
|
2726
3222
|
const balance = () => `${BASE_URL}/api/balance`;
|
|
2727
3223
|
const userPlugins = () => `${BASE_URL}/api/user/plugins`;
|
|
2728
3224
|
const deleteUser$1 = () => `${BASE_URL}/api/user/delete`;
|
|
3225
|
+
const codeEnvironments = () => `${BASE_URL}/api/code-environments`;
|
|
3226
|
+
const codeEnvironmentPairings = () => `${codeEnvironments()}/pairings`;
|
|
3227
|
+
const codeEnvironmentById = (id) => `${codeEnvironments()}/${encodeURIComponent(id)}`;
|
|
3228
|
+
const codeEnvironmentSettings = (id) => `${codeEnvironmentById(id)}/settings`;
|
|
2729
3229
|
const messagesRoot = `${BASE_URL}/api/messages`;
|
|
2730
3230
|
const messages = (params) => {
|
|
2731
3231
|
const { conversationId, messageId, ...rest } = params;
|
|
@@ -2766,9 +3266,17 @@ const conversations = (params) => {
|
|
|
2766
3266
|
return `${conversationsRoot}${buildQuery(params)}`;
|
|
2767
3267
|
};
|
|
2768
3268
|
const conversationById = (id) => `${conversationsRoot}/${id}`;
|
|
3269
|
+
const parentSubagents = (parentConversationId) => `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents`;
|
|
3270
|
+
const subagentThread = (parentConversationId, threadId, taskId, cursor) => {
|
|
3271
|
+
const endpoint = `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents/${encodeURIComponent(threadId)}`;
|
|
3272
|
+
if (taskId != null) return `${endpoint}?taskId=${encodeURIComponent(taskId)}`;
|
|
3273
|
+
return cursor == null ? endpoint : `${endpoint}?cursor=${encodeURIComponent(cursor)}`;
|
|
3274
|
+
};
|
|
3275
|
+
const subagentControl = (parentConversationId, threadId) => `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents/${encodeURIComponent(threadId)}/control`;
|
|
2769
3276
|
const genTitle$1 = (conversationId) => `${conversationsRoot}/gen_title/${encodeURIComponent(conversationId)}`;
|
|
2770
3277
|
const updateConversation$1 = () => `${conversationsRoot}/update`;
|
|
2771
3278
|
const archiveConversation$1 = () => `${conversationsRoot}/archive`;
|
|
3279
|
+
const archiveAllConversations$1 = () => `${conversationsRoot}/archive/all`;
|
|
2772
3280
|
const pinConversation$1 = () => `${conversationsRoot}/pin`;
|
|
2773
3281
|
const deleteConversation$1 = () => `${conversationsRoot}`;
|
|
2774
3282
|
const deleteAllConversation = () => `${conversationsRoot}/all`;
|
|
@@ -2853,6 +3361,14 @@ const agents = ({ path = "", options }) => {
|
|
|
2853
3361
|
return url;
|
|
2854
3362
|
};
|
|
2855
3363
|
const activeJobs = () => `${BASE_URL}/api/agents/chat/active`;
|
|
3364
|
+
const agentQueuedTurnsRoot = `${BASE_URL}/api/agents/chat/queued-turns`;
|
|
3365
|
+
const agentQueuedTurns = () => agentQueuedTurnsRoot;
|
|
3366
|
+
const agentQueuedTurnsByConversation = (conversationId, clientRequestIds = []) => {
|
|
3367
|
+
const uniqueIds = Array.from(new Set(clientRequestIds)).slice(0, 100);
|
|
3368
|
+
const knownIds = uniqueIds.length > 0 ? `&${uniqueIds.map((id) => `clientRequestIds=${encodeURIComponent(id)}`).join("&")}` : "";
|
|
3369
|
+
return `${agentQueuedTurnsRoot}?conversationId=${encodeURIComponent(conversationId)}${knownIds}`;
|
|
3370
|
+
};
|
|
3371
|
+
const agentQueuedTurn = (queuedTurnId) => `${agentQueuedTurnsRoot}/${encodeURIComponent(queuedTurnId)}`;
|
|
2856
3372
|
const mcp = {
|
|
2857
3373
|
tools: `${BASE_URL}/api/mcp/tools`,
|
|
2858
3374
|
servers: `${BASE_URL}/api/mcp/servers`
|
|
@@ -2906,6 +3422,9 @@ const deletePrompt$1 = ({ _id, groupId }) => {
|
|
|
2906
3422
|
};
|
|
2907
3423
|
const getCategories$1 = () => `${BASE_URL}/api/categories`;
|
|
2908
3424
|
const getAllPromptGroups$1 = () => `${prompts()}/all`;
|
|
3425
|
+
const schedules = () => `${BASE_URL}/api/schedules`;
|
|
3426
|
+
const schedule = (id) => `${schedules()}/${encodeURIComponent(id)}`;
|
|
3427
|
+
const runSchedule = (id) => `${schedule(id)}/run`;
|
|
2909
3428
|
const skills = () => `${BASE_URL}/api/skills`;
|
|
2910
3429
|
const importSkill$1 = () => `${skills()}/import`;
|
|
2911
3430
|
const getSkill$1 = (id) => `${skills()}/${encodeURIComponent(id)}`;
|
|
@@ -2919,6 +3438,8 @@ const listSkillsWithFilters = (filter) => {
|
|
|
2919
3438
|
};
|
|
2920
3439
|
const skillFiles = (id) => `${getSkill$1(id)}/files`;
|
|
2921
3440
|
const skillFile = (id, relativePath) => `${skillFiles(id)}/${encodeURIComponent(relativePath)}`;
|
|
3441
|
+
const insights = () => `${BASE_URL}/api/admin/insights`;
|
|
3442
|
+
const insightsAccess = () => `${insights()}/access`;
|
|
2922
3443
|
const adminSkillsSync = () => `${BASE_URL}/api/admin/skills/sync`;
|
|
2923
3444
|
const adminSkillsSyncStatus = () => `${adminSkillsSync()}/status`;
|
|
2924
3445
|
const adminSkillsSyncRun = () => `${adminSkillsSync()}/run`;
|
|
@@ -2954,6 +3475,7 @@ const regenerateBackupCodes$1 = () => `${BASE_URL}/api/auth/2fa/backup/regenerat
|
|
|
2954
3475
|
const verifyTwoFactorTemp$1 = () => `${BASE_URL}/api/auth/2fa/verify-temp`;
|
|
2955
3476
|
const memories = () => `${BASE_URL}/api/memories`;
|
|
2956
3477
|
const memory = (key, agentId) => `${memories()}/${encodeURIComponent(key)}${agentId ? `?agentId=${encodeURIComponent(agentId)}` : ""}`;
|
|
3478
|
+
const memoryById = (id, agentId) => `${memories()}/id/${encodeURIComponent(id)}${agentId ? `?agentId=${encodeURIComponent(agentId)}` : ""}`;
|
|
2957
3479
|
const memoryPreferences = () => `${memories()}/preferences`;
|
|
2958
3480
|
const searchPrincipals$1 = (params) => {
|
|
2959
3481
|
const { q: query, limit, types } = params;
|
|
@@ -3131,9 +3653,11 @@ const UserOAuthOptionsSchema = OAuthOptionsBaseSchema.omit({
|
|
|
3131
3653
|
const OboOptionsSchema = z.object({
|
|
3132
3654
|
/** Scopes to request for the downstream MCP server (e.g., "api://<client-id>/Mcp.Tools.ReadWrite") */
|
|
3133
3655
|
scopes: z.string().min(1) });
|
|
3656
|
+
const MCP_SERVER_TITLE_PATTERN = /* @__PURE__ */ new RegExp("^[\\p{L}\\p{N}][\\p{L}\\p{N}\\p{M}'’ -]*$", "u");
|
|
3657
|
+
const MCP_SERVER_TITLE_ERROR = "Title must start with a letter or number and can include spaces, hyphens, and apostrophes";
|
|
3134
3658
|
const BaseOptionsSchema = z.object({
|
|
3135
|
-
/** Display name for the MCP server
|
|
3136
|
-
title: z.string().regex(
|
|
3659
|
+
/** Display name for the MCP server */
|
|
3660
|
+
title: z.string().regex(MCP_SERVER_TITLE_PATTERN, MCP_SERVER_TITLE_ERROR).optional(),
|
|
3137
3661
|
/** Description of the MCP server */
|
|
3138
3662
|
description: z.string().optional(),
|
|
3139
3663
|
/**
|
|
@@ -3148,7 +3672,14 @@ const BaseOptionsSchema = z.object({
|
|
|
3148
3672
|
/** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
|
|
3149
3673
|
sseReadTimeout: z.number().int().positive().optional(),
|
|
3150
3674
|
initTimeout: z.number().int().nonnegative().optional(),
|
|
3151
|
-
/**
|
|
3675
|
+
/**
|
|
3676
|
+
* Whether the server is offered in chat.
|
|
3677
|
+
*
|
|
3678
|
+
* `false` hides it from the chat dropdown (MCPSelect) AND bars it from the
|
|
3679
|
+
* chat selection a request carries, so a stale or hand-written request cannot
|
|
3680
|
+
* reach it either. It does not restrict agents, nor a server a model spec
|
|
3681
|
+
* pins through `mcpServers` — both are the operator's own choice.
|
|
3682
|
+
*/
|
|
3152
3683
|
chatMenu: z.boolean().optional(),
|
|
3153
3684
|
/**
|
|
3154
3685
|
* Controls server instruction behavior:
|
|
@@ -3204,6 +3735,26 @@ const ProxyUrlSchema = z.string().transform((val) => extractEnvVariable(val)).pi
|
|
|
3204
3735
|
const protocol = new URL(val).protocol;
|
|
3205
3736
|
return protocol === "http:" || protocol === "https:" || protocol === "socks:" || protocol === "socks5:";
|
|
3206
3737
|
}, { message: "Proxy URL must use http://, https://, socks://, or socks5://" });
|
|
3738
|
+
const PROCESS_MCP_SERVER_FIELDS = new Set([
|
|
3739
|
+
"command",
|
|
3740
|
+
"args",
|
|
3741
|
+
"env",
|
|
3742
|
+
"cwd",
|
|
3743
|
+
"stderr"
|
|
3744
|
+
]);
|
|
3745
|
+
function isProcessMCPServerField(field) {
|
|
3746
|
+
return PROCESS_MCP_SERVER_FIELDS.has(field);
|
|
3747
|
+
}
|
|
3748
|
+
function isProcessMCPServerConfig(value) {
|
|
3749
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
3750
|
+
const config = value;
|
|
3751
|
+
if (config.type === "stdio") return true;
|
|
3752
|
+
return Object.keys(config).some(isProcessMCPServerField);
|
|
3753
|
+
}
|
|
3754
|
+
function hasProcessMCPServerConfig(value) {
|
|
3755
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
3756
|
+
return Object.values(value).some(isProcessMCPServerConfig);
|
|
3757
|
+
}
|
|
3207
3758
|
const StdioOptionsSchema = BaseOptionsSchema.extend({
|
|
3208
3759
|
type: z.literal("stdio").default("stdio"),
|
|
3209
3760
|
obo: z.undefined().optional(),
|
|
@@ -3376,7 +3927,7 @@ const defaultSocialLogins = [
|
|
|
3376
3927
|
"discord",
|
|
3377
3928
|
"saml"
|
|
3378
3929
|
];
|
|
3379
|
-
const BASE_ONLY_CONFIG_SECTIONS = [];
|
|
3930
|
+
const BASE_ONLY_CONFIG_SECTIONS = ["filters"];
|
|
3380
3931
|
/** Sections that may be stored in the tenant's base config document but must
|
|
3381
3932
|
* not be overridden or tombstoned by role, group, or user config documents. */
|
|
3382
3933
|
const BASE_PRINCIPAL_CONFIG_SECTIONS = ["langfuse"];
|
|
@@ -3404,6 +3955,12 @@ const defaultRetrievalModels = [
|
|
|
3404
3955
|
];
|
|
3405
3956
|
const excludedKeys = new Set([
|
|
3406
3957
|
"conversationId",
|
|
3958
|
+
"agentEventBinding",
|
|
3959
|
+
"agentEventActor",
|
|
3960
|
+
"agentEventActorReconciliations",
|
|
3961
|
+
"agentEventActorEpoch",
|
|
3962
|
+
"agentEventActorLegacyTurn",
|
|
3963
|
+
"subagentThread",
|
|
3407
3964
|
"title",
|
|
3408
3965
|
"iconURL",
|
|
3409
3966
|
"greeting",
|
|
@@ -3415,6 +3972,8 @@ const excludedKeys = new Set([
|
|
|
3415
3972
|
"isTemporary",
|
|
3416
3973
|
"messages",
|
|
3417
3974
|
"isArchived",
|
|
3975
|
+
"pinned",
|
|
3976
|
+
"archivedAt",
|
|
3418
3977
|
"tags",
|
|
3419
3978
|
"user",
|
|
3420
3979
|
"__v",
|
|
@@ -3804,6 +4363,22 @@ const baseEndpointSchema = z.object({
|
|
|
3804
4363
|
activityPhasePrompt: z.string().optional(),
|
|
3805
4364
|
/** Cost cap: maximum phase summaries generated per run. Default 5. */
|
|
3806
4365
|
activityPhaseMaxPerRun: z.number().int().positive().optional(),
|
|
4366
|
+
/** Generates a live orientation label for sufficiently long top-level response reasoning. */
|
|
4367
|
+
reasoningLabel: z.boolean().optional(),
|
|
4368
|
+
/** Model used for reasoning labels. Defaults to activityModel, titleModel, then run model. */
|
|
4369
|
+
reasoningLabelModel: z.string().optional(),
|
|
4370
|
+
/** Endpoint receiving the bounded visible-reasoning snapshot. Defaults to activityEndpoint. */
|
|
4371
|
+
reasoningLabelEndpoint: z.string().optional(),
|
|
4372
|
+
/** Overrides the dedicated reasoning-label system prompt. */
|
|
4373
|
+
reasoningLabelPrompt: z.string().optional(),
|
|
4374
|
+
/** Characters required before the first reasoning label. Default 500. */
|
|
4375
|
+
reasoningLabelMinChars: z.number().int().positive().optional(),
|
|
4376
|
+
/** New characters required between streaming revisions. Default 400. */
|
|
4377
|
+
reasoningLabelUpdateChars: z.number().int().positive().optional(),
|
|
4378
|
+
/** Minimum milliseconds between streaming revisions. Default 3000. */
|
|
4379
|
+
reasoningLabelUpdateIntervalMs: z.number().int().nonnegative().optional(),
|
|
4380
|
+
/** Cost cap: maximum reasoning-label provider calls attempted per run. Default 8. */
|
|
4381
|
+
reasoningLabelMaxPerRun: z.number().int().positive().optional(),
|
|
3807
4382
|
/** Maximum characters allowed in a single tool result before truncation. */
|
|
3808
4383
|
maxToolResultChars: z.number().positive().optional()
|
|
3809
4384
|
});
|
|
@@ -3935,7 +4510,7 @@ const toolApprovalModeSchema = z.enum([
|
|
|
3935
4510
|
*
|
|
3936
4511
|
* Shape mirrors `@librechat/agents`'s `ToolPolicyConfig` so the host can map it
|
|
3937
4512
|
* directly into `createToolPolicyHook(config)`. The SDK does the evaluation
|
|
3938
|
-
* (`deny →
|
|
4513
|
+
* (`deny → ask → allow → bypass → dontAsk → fallthrough(ask)`); this config
|
|
3939
4514
|
* just describes the surface.
|
|
3940
4515
|
*
|
|
3941
4516
|
* Conventions:
|
|
@@ -4018,6 +4593,52 @@ const checkpointerSchema = z.object({
|
|
|
4018
4593
|
checkpointCollectionName: z.string().optional(),
|
|
4019
4594
|
checkpointWritesCollectionName: z.string().optional()
|
|
4020
4595
|
}).optional();
|
|
4596
|
+
const codeEnvironmentBaseURLSchema = z.string().trim().url().refine((value) => {
|
|
4597
|
+
try {
|
|
4598
|
+
const url = new URL(value);
|
|
4599
|
+
return (url.protocol === "http:" || url.protocol === "https:") && !value.includes("?") && !value.includes("#") && url.search.length === 0 && url.hash.length === 0;
|
|
4600
|
+
} catch {
|
|
4601
|
+
return false;
|
|
4602
|
+
}
|
|
4603
|
+
}, { message: "Code environment baseURL must be an HTTP(S) base URL without query or fragment" });
|
|
4604
|
+
function isSecureCodeEnvironmentControlURL(baseURL) {
|
|
4605
|
+
try {
|
|
4606
|
+
const url = new URL(baseURL.trim());
|
|
4607
|
+
if (url.protocol === "https:") return true;
|
|
4608
|
+
if (url.protocol !== "http:") return false;
|
|
4609
|
+
return url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "[::1]";
|
|
4610
|
+
} catch {
|
|
4611
|
+
return false;
|
|
4612
|
+
}
|
|
4613
|
+
}
|
|
4614
|
+
const codeEnvironmentPermissionDecisionSchema = z.enum([
|
|
4615
|
+
"allow",
|
|
4616
|
+
"ask",
|
|
4617
|
+
"deny"
|
|
4618
|
+
]);
|
|
4619
|
+
const codeEnvironmentPermissionFieldSchema = z.object({
|
|
4620
|
+
allowed: z.array(codeEnvironmentPermissionDecisionSchema).min(1),
|
|
4621
|
+
default: codeEnvironmentPermissionDecisionSchema.optional().default("ask")
|
|
4622
|
+
}).strict().superRefine((field, context) => {
|
|
4623
|
+
if (!field.allowed.includes(field.default)) context.addIssue({
|
|
4624
|
+
code: z.ZodIssueCode.custom,
|
|
4625
|
+
path: ["default"],
|
|
4626
|
+
message: "Permission default must be included in allowed values"
|
|
4627
|
+
});
|
|
4628
|
+
});
|
|
4629
|
+
/**
|
|
4630
|
+
* Typed user-tunable surface for one attached code environment. Omitted fields
|
|
4631
|
+
* remain fixed at LibreChat's safe baseline. Isolation, networking, mounts,
|
|
4632
|
+
* privileged execution, and secrets are deliberately not representable here.
|
|
4633
|
+
*/
|
|
4634
|
+
const codeEnvironmentUserConfigSchema = z.object({ permissions: z.object({
|
|
4635
|
+
fileWrite: codeEnvironmentPermissionFieldSchema.optional(),
|
|
4636
|
+
commandExecution: codeEnvironmentPermissionFieldSchema.optional()
|
|
4637
|
+
}).strict().optional() }).strict();
|
|
4638
|
+
const codeEnvironmentUserSettingsSchema = z.object({ permissions: z.object({
|
|
4639
|
+
fileWrite: codeEnvironmentPermissionDecisionSchema.optional(),
|
|
4640
|
+
commandExecution: codeEnvironmentPermissionDecisionSchema.optional()
|
|
4641
|
+
}).strict().optional() }).strict();
|
|
4021
4642
|
const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.object({
|
|
4022
4643
|
recursionLimit: z.number().optional(),
|
|
4023
4644
|
disableBuilder: z.boolean().optional().default(false),
|
|
@@ -4034,8 +4655,123 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.
|
|
|
4034
4655
|
maxCitations: z.number().min(1).max(50).optional().default(30),
|
|
4035
4656
|
maxCitationsPerFile: z.number().min(1).max(10).optional().default(7),
|
|
4036
4657
|
minRelevanceScore: z.number().min(0).max(1).optional().default(.45),
|
|
4658
|
+
/** Maximum explicit subagents per agent (`agent_ids` and `graphs`); raised from
|
|
4659
|
+
* the shipped default of 10 for orchestration-heavy deployments, bounded by
|
|
4660
|
+
* `MAX_SUBAGENTS_CEILING`. */
|
|
4661
|
+
maxSubagents: z.number().int().min(1).max(50).optional().default(10),
|
|
4037
4662
|
allowedProviders: z.array(z.union([z.string(), eModelEndpointSchema])).optional(),
|
|
4038
4663
|
capabilities: z.array(z.nativeEnum(AgentCapabilities)).optional().default(defaultAgentCapabilities),
|
|
4664
|
+
/** Controls which workspace-sharing scopes users may select for stateful code sessions.
|
|
4665
|
+
* Omit this block to preserve the legacy behavior of allowing every scope. */
|
|
4666
|
+
statefulCodeSessions: z.object({
|
|
4667
|
+
allowedEnvironments: z.array(z.enum(STATEFUL_CODE_ENVIRONMENTS)).min(1),
|
|
4668
|
+
/** Operator-managed execution environments. Attached entries route to a
|
|
4669
|
+
* Code API deployment backed by an outbound librechat-code worker. */
|
|
4670
|
+
environments: z.array(z.object({
|
|
4671
|
+
id: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/),
|
|
4672
|
+
name: z.string().min(1).max(100),
|
|
4673
|
+
type: z.enum(["managed", "attached"]),
|
|
4674
|
+
baseURL: codeEnvironmentBaseURLSchema,
|
|
4675
|
+
default: z.boolean().optional(),
|
|
4676
|
+
/** Server-only outbound worker route. Removed from public config. */
|
|
4677
|
+
workerId: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/).optional(),
|
|
4678
|
+
/** Distinguishes operator policy from a principal-authorized
|
|
4679
|
+
* environment merged into request-scoped server config. */
|
|
4680
|
+
owner: z.enum(["deployment", "principal"]).optional().default("deployment"),
|
|
4681
|
+
/** Administrator-controlled user-tunable settings. Only fields
|
|
4682
|
+
* represented here may be changed by a principal. */
|
|
4683
|
+
configSchema: codeEnvironmentUserConfigSchema.optional(),
|
|
4684
|
+
/** Request-scoped effective settings for a principal-owned environment.
|
|
4685
|
+
* Deployment config should define defaults through configSchema instead. */
|
|
4686
|
+
settings: codeEnvironmentUserSettingsSchema.optional(),
|
|
4687
|
+
/** Server-only enrollment metadata. `tokenEnv` names an
|
|
4688
|
+
* environment variable and never contains the token itself. */
|
|
4689
|
+
pairing: z.object({
|
|
4690
|
+
workerId: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/).optional(),
|
|
4691
|
+
allowPrincipalWorkers: z.boolean().optional().default(false),
|
|
4692
|
+
tokenEnv: z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/)
|
|
4693
|
+
}).superRefine((pairing, pairingContext) => {
|
|
4694
|
+
if (pairing.workerId != null || pairing.allowPrincipalWorkers === true) return;
|
|
4695
|
+
pairingContext.addIssue({
|
|
4696
|
+
code: z.ZodIssueCode.custom,
|
|
4697
|
+
message: "Pairing requires a workerId or principal workers"
|
|
4698
|
+
});
|
|
4699
|
+
}).optional()
|
|
4700
|
+
})).optional()
|
|
4701
|
+
}).superRefine((value, context) => {
|
|
4702
|
+
if (!value?.environments) return;
|
|
4703
|
+
const ids = /* @__PURE__ */ new Set();
|
|
4704
|
+
let defaults = 0;
|
|
4705
|
+
let executableEnvironments = 0;
|
|
4706
|
+
for (const environment of value.environments) {
|
|
4707
|
+
const pairingOnly = environment.pairing?.allowPrincipalWorkers === true && environment.pairing.workerId == null && environment.workerId == null;
|
|
4708
|
+
if (environment.pairing != null && environment.type !== "attached") context.addIssue({
|
|
4709
|
+
code: z.ZodIssueCode.custom,
|
|
4710
|
+
message: "Only attached code environments may configure pairing",
|
|
4711
|
+
path: [
|
|
4712
|
+
"environments",
|
|
4713
|
+
environment.id,
|
|
4714
|
+
"pairing"
|
|
4715
|
+
]
|
|
4716
|
+
});
|
|
4717
|
+
if (environment.pairing != null && environment.owner !== "deployment") context.addIssue({
|
|
4718
|
+
code: z.ZodIssueCode.custom,
|
|
4719
|
+
message: "Only deployment-owned code environments may configure pairing",
|
|
4720
|
+
path: [
|
|
4721
|
+
"environments",
|
|
4722
|
+
environment.id,
|
|
4723
|
+
"pairing"
|
|
4724
|
+
]
|
|
4725
|
+
});
|
|
4726
|
+
if (environment.pairing != null && !isSecureCodeEnvironmentControlURL(environment.baseURL)) context.addIssue({
|
|
4727
|
+
code: z.ZodIssueCode.custom,
|
|
4728
|
+
message: "Paired code environments require HTTPS outside loopback development",
|
|
4729
|
+
path: [
|
|
4730
|
+
"environments",
|
|
4731
|
+
environment.id,
|
|
4732
|
+
"baseURL"
|
|
4733
|
+
]
|
|
4734
|
+
});
|
|
4735
|
+
if (environment.workerId != null && environment.pairing?.workerId != null && environment.workerId !== environment.pairing.workerId) context.addIssue({
|
|
4736
|
+
code: z.ZodIssueCode.custom,
|
|
4737
|
+
message: "Code environment workerId must match pairing.workerId",
|
|
4738
|
+
path: [
|
|
4739
|
+
"environments",
|
|
4740
|
+
environment.id,
|
|
4741
|
+
"workerId"
|
|
4742
|
+
]
|
|
4743
|
+
});
|
|
4744
|
+
if (pairingOnly && environment.default === true) context.addIssue({
|
|
4745
|
+
code: z.ZodIssueCode.custom,
|
|
4746
|
+
message: "Pairing-only code control planes cannot be execution defaults",
|
|
4747
|
+
path: [
|
|
4748
|
+
"environments",
|
|
4749
|
+
environment.id,
|
|
4750
|
+
"default"
|
|
4751
|
+
]
|
|
4752
|
+
});
|
|
4753
|
+
if (ids.has(environment.id)) context.addIssue({
|
|
4754
|
+
code: z.ZodIssueCode.custom,
|
|
4755
|
+
message: `Duplicate code environment id: ${environment.id}`,
|
|
4756
|
+
path: ["environments"]
|
|
4757
|
+
});
|
|
4758
|
+
ids.add(environment.id);
|
|
4759
|
+
if (!pairingOnly) {
|
|
4760
|
+
executableEnvironments += 1;
|
|
4761
|
+
if (environment.default === true) defaults += 1;
|
|
4762
|
+
}
|
|
4763
|
+
}
|
|
4764
|
+
if (executableEnvironments > 0 && defaults !== 1) context.addIssue({
|
|
4765
|
+
code: z.ZodIssueCode.custom,
|
|
4766
|
+
message: "Exactly one stateful code environment must be the default",
|
|
4767
|
+
path: ["environments"]
|
|
4768
|
+
});
|
|
4769
|
+
}).optional(),
|
|
4770
|
+
/** Optional trusted origin for in-process agent event delivery. */
|
|
4771
|
+
eventDriven: z.object({ selfUrl: z.string().url().optional() }).optional(),
|
|
4772
|
+
/** Conversational background-task delivery policy. Automatic completion wakeups are
|
|
4773
|
+
* enabled unless an administrator explicitly restores poll-only behavior. */
|
|
4774
|
+
backgroundTasks: z.object({ completionWakeups: z.boolean().optional().default(true) }).optional(),
|
|
4039
4775
|
skills: z.object({ maxCatalogSkills: z.number().int().min(1).max(100).optional() }).optional(),
|
|
4040
4776
|
remoteApi: remoteApiSchema.optional(),
|
|
4041
4777
|
/** Human-in-the-loop tool approval policy. Off by default. */
|
|
@@ -4048,7 +4784,8 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(z.
|
|
|
4048
4784
|
capabilities: defaultAgentCapabilities,
|
|
4049
4785
|
maxCitations: 30,
|
|
4050
4786
|
maxCitationsPerFile: 7,
|
|
4051
|
-
minRelevanceScore: .45
|
|
4787
|
+
minRelevanceScore: .45,
|
|
4788
|
+
maxSubagents: 10
|
|
4052
4789
|
});
|
|
4053
4790
|
const paramDefinitionSchema = z.object({
|
|
4054
4791
|
key: z.string(),
|
|
@@ -4066,7 +4803,11 @@ const paramDefinitionSchema = z.object({
|
|
|
4066
4803
|
range: z.object({
|
|
4067
4804
|
min: z.number(),
|
|
4068
4805
|
max: z.number(),
|
|
4069
|
-
step: z.number().optional()
|
|
4806
|
+
step: z.number().optional(),
|
|
4807
|
+
positiveMin: z.number().optional()
|
|
4808
|
+
}).refine((value) => value.positiveMin == null || value.positiveMin <= value.max, {
|
|
4809
|
+
message: "range.positiveMin cannot exceed range.max",
|
|
4810
|
+
path: ["positiveMin"]
|
|
4070
4811
|
}).optional(),
|
|
4071
4812
|
enumMappings: z.record(z.union([
|
|
4072
4813
|
z.number(),
|
|
@@ -4177,7 +4918,15 @@ const azureEndpointSchema = z.object({
|
|
|
4177
4918
|
activityPhaseModel: true,
|
|
4178
4919
|
activityPhaseEndpoint: true,
|
|
4179
4920
|
activityPhasePrompt: true,
|
|
4180
|
-
activityPhaseMaxPerRun: true
|
|
4921
|
+
activityPhaseMaxPerRun: true,
|
|
4922
|
+
reasoningLabel: true,
|
|
4923
|
+
reasoningLabelModel: true,
|
|
4924
|
+
reasoningLabelEndpoint: true,
|
|
4925
|
+
reasoningLabelPrompt: true,
|
|
4926
|
+
reasoningLabelMinChars: true,
|
|
4927
|
+
reasoningLabelUpdateChars: true,
|
|
4928
|
+
reasoningLabelUpdateIntervalMs: true,
|
|
4929
|
+
reasoningLabelMaxPerRun: true
|
|
4181
4930
|
}).partial()
|
|
4182
4931
|
);
|
|
4183
4932
|
/**
|
|
@@ -4322,6 +5071,10 @@ let RateLimitPrefix = /* @__PURE__ */ function(RateLimitPrefix) {
|
|
|
4322
5071
|
return RateLimitPrefix;
|
|
4323
5072
|
}({});
|
|
4324
5073
|
const rateLimitSchema = z.object({
|
|
5074
|
+
agentEvents: z.object({
|
|
5075
|
+
userMax: z.number().int().positive().optional(),
|
|
5076
|
+
userWindowInMinutes: z.number().positive().optional()
|
|
5077
|
+
}).optional(),
|
|
4325
5078
|
fileUploads: z.object({
|
|
4326
5079
|
ipMax: z.number().optional(),
|
|
4327
5080
|
ipWindowInMinutes: z.number().optional(),
|
|
@@ -4413,6 +5166,7 @@ const interfaceSchema = z.object({
|
|
|
4413
5166
|
webSearch: z.boolean().optional(),
|
|
4414
5167
|
contextUsage: z.boolean().optional(),
|
|
4415
5168
|
contextCost: z.boolean().optional(),
|
|
5169
|
+
feedback: z.boolean().optional(),
|
|
4416
5170
|
currency: z.object({
|
|
4417
5171
|
code: z.string(),
|
|
4418
5172
|
rate: z.number().positive()
|
|
@@ -4446,6 +5200,23 @@ const interfaceSchema = z.object({
|
|
|
4446
5200
|
share: z.boolean().optional(),
|
|
4447
5201
|
public: z.boolean().optional(),
|
|
4448
5202
|
snapshotFiles: z.boolean().optional()
|
|
5203
|
+
})]).optional(),
|
|
5204
|
+
schedules: z.union([z.boolean(), z.object({
|
|
5205
|
+
use: z.boolean().optional(),
|
|
5206
|
+
create: z.boolean().optional(),
|
|
5207
|
+
maxPerUser: z.number().int().min(0).optional(),
|
|
5208
|
+
minIntervalMinutes: z.number().int().min(1).optional(),
|
|
5209
|
+
autoDisableAfterFailures: z.number().int().min(1).optional(),
|
|
5210
|
+
fireConcurrency: z.number().int().min(1).optional(),
|
|
5211
|
+
/** Refuse schedules that are not filed under a chat project. Enforced on
|
|
5212
|
+
* create/update AND at every fire, so raising it later stops schedules
|
|
5213
|
+
* that predate the policy instead of grandfathering them. */
|
|
5214
|
+
requireProject: z.boolean().optional(),
|
|
5215
|
+
/** Pins every scheduled run to ONE chat project, ignoring any client
|
|
5216
|
+
* choice. Implies `requireProject`. The project must belong to the
|
|
5217
|
+
* schedule's owner, so a deployment-wide value only makes sense with a
|
|
5218
|
+
* per-user/per-role config override. */
|
|
5219
|
+
projectId: z.string().trim().min(1).optional()
|
|
4449
5220
|
})]).optional()
|
|
4450
5221
|
}).default({
|
|
4451
5222
|
modelSelect: true,
|
|
@@ -4472,6 +5243,7 @@ const interfaceSchema = z.object({
|
|
|
4472
5243
|
webSearch: true,
|
|
4473
5244
|
contextUsage: true,
|
|
4474
5245
|
contextCost: false,
|
|
5246
|
+
feedback: true,
|
|
4475
5247
|
peoplePicker: {
|
|
4476
5248
|
users: true,
|
|
4477
5249
|
groups: true,
|
|
@@ -4541,12 +5313,14 @@ let SearchProviders = /* @__PURE__ */ function(SearchProviders) {
|
|
|
4541
5313
|
SearchProviders["SERPER"] = "serper";
|
|
4542
5314
|
SearchProviders["SEARXNG"] = "searxng";
|
|
4543
5315
|
SearchProviders["TAVILY"] = "tavily";
|
|
5316
|
+
SearchProviders["KEENABLE"] = "keenable";
|
|
4544
5317
|
return SearchProviders;
|
|
4545
5318
|
}({});
|
|
4546
5319
|
let ScraperProviders = /* @__PURE__ */ function(ScraperProviders) {
|
|
4547
5320
|
ScraperProviders["FIRECRAWL"] = "firecrawl";
|
|
4548
5321
|
ScraperProviders["SERPER"] = "serper";
|
|
4549
5322
|
ScraperProviders["TAVILY"] = "tavily";
|
|
5323
|
+
ScraperProviders["KEENABLE"] = "keenable";
|
|
4550
5324
|
return ScraperProviders;
|
|
4551
5325
|
}({});
|
|
4552
5326
|
let RerankerTypes = /* @__PURE__ */ function(RerankerTypes) {
|
|
@@ -4561,6 +5335,17 @@ let SafeSearchTypes = /* @__PURE__ */ function(SafeSearchTypes) {
|
|
|
4561
5335
|
SafeSearchTypes[SafeSearchTypes["STRICT"] = 2] = "STRICT";
|
|
4562
5336
|
return SafeSearchTypes;
|
|
4563
5337
|
}({});
|
|
5338
|
+
/**
|
|
5339
|
+
* Normalizes a SearXNG engine list into the comma-separated form the API expects.
|
|
5340
|
+
* Accepts the YAML list or comma-separated string an operator may write, and is
|
|
5341
|
+
* applied both at the schema boundary and when loading the runtime config, since
|
|
5342
|
+
* `loadCustomConfig` returns the raw YAML object rather than the parsed result.
|
|
5343
|
+
*/
|
|
5344
|
+
function normalizeSearxngEngines(engines) {
|
|
5345
|
+
if (engines == null) return;
|
|
5346
|
+
const normalized = (Array.isArray(engines) ? engines : engines.split(",")).map((engine) => engine.trim()).filter(Boolean);
|
|
5347
|
+
return normalized.length ? normalized.join(",") : void 0;
|
|
5348
|
+
}
|
|
4564
5349
|
const webSearchSchema = z.object({
|
|
4565
5350
|
allowedAddresses: allowedAddressesSchema,
|
|
4566
5351
|
serperApiKey: z.string().optional().default("${SERPER_API_KEY}"),
|
|
@@ -4576,6 +5361,8 @@ const webSearchSchema = z.object({
|
|
|
4576
5361
|
tavilyApiKeyPreview: apiKeyPreviewSchema,
|
|
4577
5362
|
tavilySearchUrl: z.string().optional().default("${TAVILY_SEARCH_URL}"),
|
|
4578
5363
|
tavilyExtractUrl: z.string().optional().default("${TAVILY_EXTRACT_URL}"),
|
|
5364
|
+
keenableApiKey: z.string().optional().default("${KEENABLE_API_KEY}"),
|
|
5365
|
+
keenableApiUrl: z.string().optional().default("${KEENABLE_API_URL}"),
|
|
4579
5366
|
jinaApiKey: z.string().optional().default("${JINA_API_KEY}"),
|
|
4580
5367
|
jinaApiKeyPreview: apiKeyPreviewSchema,
|
|
4581
5368
|
jinaApiUrl: z.string().optional().default("${JINA_API_URL}"),
|
|
@@ -4613,6 +5400,16 @@ const webSearchSchema = z.object({
|
|
|
4613
5400
|
tag: z.string().nullable().optional()
|
|
4614
5401
|
}).optional()
|
|
4615
5402
|
}).optional(),
|
|
5403
|
+
searxngSearchOptions: z.object({
|
|
5404
|
+
engines: z.union([z.string(), z.array(z.string())]).transform(normalizeSearxngEngines).optional(),
|
|
5405
|
+
language: z.string().optional(),
|
|
5406
|
+
timeRange: z.enum([
|
|
5407
|
+
"day",
|
|
5408
|
+
"month",
|
|
5409
|
+
"year"
|
|
5410
|
+
]).optional(),
|
|
5411
|
+
timeout: z.number().int().positive().max(12e4).optional()
|
|
5412
|
+
}).optional(),
|
|
4616
5413
|
tavilySearchOptions: z.object({
|
|
4617
5414
|
searchDepth: z.enum([
|
|
4618
5415
|
"basic",
|
|
@@ -4653,6 +5450,16 @@ const webSearchSchema = z.object({
|
|
|
4653
5450
|
includeFavicon: z.boolean().optional(),
|
|
4654
5451
|
format: z.enum(["markdown", "text"]).optional(),
|
|
4655
5452
|
timeout: z.number().int().nonnegative().max(12e4).optional()
|
|
5453
|
+
}).optional(),
|
|
5454
|
+
keenableSearchOptions: z.object({
|
|
5455
|
+
maxResults: z.number().int().min(1).max(20).optional(),
|
|
5456
|
+
site: z.string().optional(),
|
|
5457
|
+
attributionTitle: z.string().optional(),
|
|
5458
|
+
timeout: z.number().int().nonnegative().max(12e4).optional()
|
|
5459
|
+
}).optional(),
|
|
5460
|
+
keenableScraperOptions: z.object({
|
|
5461
|
+
attributionTitle: z.string().optional(),
|
|
5462
|
+
timeout: z.number().int().nonnegative().max(12e4).optional()
|
|
4656
5463
|
}).optional()
|
|
4657
5464
|
});
|
|
4658
5465
|
const ocrSchema = z.object({
|
|
@@ -4740,13 +5547,6 @@ const summarizationConfigSchema = z.object({
|
|
|
4740
5547
|
retainRecent: retainRecentConfigSchema.optional()
|
|
4741
5548
|
});
|
|
4742
5549
|
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
5550
|
let messageFilterRegexValidator = (value) => {
|
|
4751
5551
|
try {
|
|
4752
5552
|
new RegExp(value, "g");
|
|
@@ -4759,13 +5559,45 @@ const setMessageFilterRegexValidator = (validate) => {
|
|
|
4759
5559
|
messageFilterRegexValidator = validate;
|
|
4760
5560
|
};
|
|
4761
5561
|
const messageFilterPiiCustomPatternSchema = z.object({
|
|
4762
|
-
id: z.string().min(1),
|
|
4763
|
-
label: z.string().min(1),
|
|
4764
|
-
regex: z.string().min(1).
|
|
5562
|
+
id: z.string().min(1).max(256),
|
|
5563
|
+
label: z.string().min(1).max(512),
|
|
5564
|
+
regex: z.string().min(1).max(512)
|
|
4765
5565
|
});
|
|
4766
5566
|
const messageFilterPiiSchema = z.object({
|
|
4767
|
-
starterPatterns: z.array(z.string()).optional(),
|
|
4768
|
-
customPatterns: z.array(messageFilterPiiCustomPatternSchema).optional()
|
|
5567
|
+
starterPatterns: z.array(z.string().max(256)).max(256).optional(),
|
|
5568
|
+
customPatterns: z.array(messageFilterPiiCustomPatternSchema).max(256).optional()
|
|
5569
|
+
}).superRefine((pii, context) => {
|
|
5570
|
+
let regexCharacters = 0;
|
|
5571
|
+
let regexInstructions = 0;
|
|
5572
|
+
for (let index = 0; index < (pii.customPatterns?.length ?? 0); index++) {
|
|
5573
|
+
const pattern = pii.customPatterns?.[index];
|
|
5574
|
+
if (pattern == null) continue;
|
|
5575
|
+
regexCharacters += pattern.regex.length;
|
|
5576
|
+
const result = messageFilterRegexValidator(pattern.regex);
|
|
5577
|
+
if (!(typeof result === "boolean" ? result : result.supported)) {
|
|
5578
|
+
context.addIssue({
|
|
5579
|
+
code: z.ZodIssueCode.custom,
|
|
5580
|
+
path: [
|
|
5581
|
+
"customPatterns",
|
|
5582
|
+
index,
|
|
5583
|
+
"regex"
|
|
5584
|
+
],
|
|
5585
|
+
message: "Unsupported regex: not compatible with the RE2 engine (no backreferences, lookaround, or control escapes)"
|
|
5586
|
+
});
|
|
5587
|
+
continue;
|
|
5588
|
+
}
|
|
5589
|
+
if (typeof result !== "boolean" && result.programSize != null) regexInstructions += result.programSize;
|
|
5590
|
+
}
|
|
5591
|
+
if (regexCharacters > 8192) context.addIssue({
|
|
5592
|
+
code: z.ZodIssueCode.custom,
|
|
5593
|
+
path: ["customPatterns"],
|
|
5594
|
+
message: `Custom PII regexes may contain at most ${MAX_PII_CUSTOM_REGEX_CHARACTERS} characters in total`
|
|
5595
|
+
});
|
|
5596
|
+
if (regexInstructions > 8192) context.addIssue({
|
|
5597
|
+
code: z.ZodIssueCode.custom,
|
|
5598
|
+
path: ["customPatterns"],
|
|
5599
|
+
message: `Custom PII regexes may compile to at most ${MAX_PII_CUSTOM_REGEX_INSTRUCTIONS} instructions in total`
|
|
5600
|
+
});
|
|
4769
5601
|
});
|
|
4770
5602
|
const messageFilterSchema = z.object({ pii: messageFilterPiiSchema.optional() });
|
|
4771
5603
|
const langfuseConfigSchema = z.object({
|
|
@@ -4778,7 +5610,28 @@ const langfuseConfigSchema = z.object({
|
|
|
4778
5610
|
* admin reads can show which secret key is configured without returning the secret. */
|
|
4779
5611
|
secretKeyPreview: z.string().optional(),
|
|
4780
5612
|
/** Routing key for one of the deployment-configured tenant Langfuse destinations. */
|
|
4781
|
-
destination: z.string().optional()
|
|
5613
|
+
destination: z.string().optional(),
|
|
5614
|
+
/**
|
|
5615
|
+
* Custom request headers sent on every outbound Langfuse request — trace and
|
|
5616
|
+
* media export, feedback scores, and credential verification — for
|
|
5617
|
+
* self-hosted instances behind an authenticating proxy or gateway. Values
|
|
5618
|
+
* support `${ENV_VAR}` interpolation.
|
|
5619
|
+
*
|
|
5620
|
+
* Deployment-level only. Trace export batches spans from every user through
|
|
5621
|
+
* one exporter, so unlike endpoint headers these cannot carry per-user
|
|
5622
|
+
* placeholders. Headers referencing an unset variable, naming an
|
|
5623
|
+
* infrastructure secret, or carrying an invalid HTTP field name are dropped
|
|
5624
|
+
* with a warning rather than sent.
|
|
5625
|
+
*
|
|
5626
|
+
* Sent only when the deployment configures exactly one Langfuse origin, and
|
|
5627
|
+
* only to that origin. The map cannot say which endpoint it authenticates
|
|
5628
|
+
* to, so with several configured origins any choice of recipient would risk
|
|
5629
|
+
* disclosing a gateway credential to the others; a warning is logged instead.
|
|
5630
|
+
* Multi-destination deployments need per-destination headers, which this
|
|
5631
|
+
* schema does not yet express — and note the fanout collector forwards only
|
|
5632
|
+
* `Authorization` upstream regardless.
|
|
5633
|
+
*/
|
|
5634
|
+
headers: z.record(z.string()).optional()
|
|
4782
5635
|
});
|
|
4783
5636
|
const configSchema = z.object({
|
|
4784
5637
|
version: z.string(),
|
|
@@ -4821,6 +5674,7 @@ const configSchema = z.object({
|
|
|
4821
5674
|
rateLimits: rateLimitSchema.optional(),
|
|
4822
5675
|
fileConfig: fileConfigSchema.optional(),
|
|
4823
5676
|
modelSpecs: specsConfigSchema.optional(),
|
|
5677
|
+
filters: filtersConfigSchema.optional(),
|
|
4824
5678
|
messageFilter: messageFilterSchema.optional(),
|
|
4825
5679
|
endpoints: z.object({
|
|
4826
5680
|
allowedAddresses: allowedAddressesSchema,
|
|
@@ -4926,6 +5780,7 @@ const sharedOpenAIModels = [
|
|
|
4926
5780
|
"gpt-4o"
|
|
4927
5781
|
];
|
|
4928
5782
|
const sharedAnthropicModels = [
|
|
5783
|
+
"claude-fable-5-1",
|
|
4929
5784
|
"claude-fable-5",
|
|
4930
5785
|
"claude-opus-5",
|
|
4931
5786
|
"claude-opus-4-8",
|
|
@@ -4960,6 +5815,7 @@ const sharedAnthropicModels = [
|
|
|
4960
5815
|
* availability); Opus 4.1 has no global profile, so it uses `us.`.
|
|
4961
5816
|
*/
|
|
4962
5817
|
const bedrockModels = [
|
|
5818
|
+
"global.anthropic.claude-fable-5-1",
|
|
4963
5819
|
"global.anthropic.claude-fable-5",
|
|
4964
5820
|
"global.anthropic.claude-opus-5",
|
|
4965
5821
|
"global.anthropic.claude-opus-4-8",
|
|
@@ -4994,6 +5850,7 @@ const defaultModels = {
|
|
|
4994
5850
|
["assistants"]: [...sharedOpenAIModels, "chatgpt-4o-latest"],
|
|
4995
5851
|
["agents"]: sharedOpenAIModels,
|
|
4996
5852
|
["google"]: [
|
|
5853
|
+
"gemini-3.8-flash",
|
|
4997
5854
|
"gemini-3.7-flash",
|
|
4998
5855
|
"gemini-3.6-flash",
|
|
4999
5856
|
"gemini-3.5-flash",
|
|
@@ -5161,6 +6018,10 @@ let CacheKeys = /* @__PURE__ */ function(CacheKeys) {
|
|
|
5161
6018
|
*/
|
|
5162
6019
|
CacheKeys["USER_PRINCIPALS"] = "USER_PRINCIPALS";
|
|
5163
6020
|
/**
|
|
6021
|
+
* Key for cached prompt group access ID sets (accessible, public, owned).
|
|
6022
|
+
*/
|
|
6023
|
+
CacheKeys["PROMPT_GROUPS_ACCESS"] = "PROMPT_GROUPS_ACCESS";
|
|
6024
|
+
/**
|
|
5164
6025
|
* Key for per-conversation stateful code sandbox prewarm/warm state.
|
|
5165
6026
|
*/
|
|
5166
6027
|
CacheKeys["SANDBOX_PREWARM"] = "SANDBOX_PREWARM";
|
|
@@ -5383,6 +6244,10 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
5383
6244
|
*/
|
|
5384
6245
|
ErrorTypes["RESOURCE_RECOVERY_REQUIRED"] = "resource_recovery_required";
|
|
5385
6246
|
/**
|
|
6247
|
+
* Agent selected a stateful Code API workspace scope disabled by the deployment.
|
|
6248
|
+
*/
|
|
6249
|
+
ErrorTypes["STATEFUL_CODE_ENVIRONMENT_NOT_ALLOWED"] = "stateful_code_environment_not_allowed";
|
|
6250
|
+
/**
|
|
5386
6251
|
* Invalid Agent Provider (excluded by Admin)
|
|
5387
6252
|
*/
|
|
5388
6253
|
ErrorTypes["INVALID_AGENT_PROVIDER"] = "invalid_agent_provider";
|
|
@@ -5403,6 +6268,14 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
5403
6268
|
*/
|
|
5404
6269
|
ErrorTypes["AUTH_FAILED"] = "auth_failed";
|
|
5405
6270
|
/**
|
|
6271
|
+
* Authentication rejected by a rate limiter
|
|
6272
|
+
*/
|
|
6273
|
+
ErrorTypes["AUTH_RATE_LIMITED"] = "auth_rate_limited";
|
|
6274
|
+
/**
|
|
6275
|
+
* Authentication rejected because the account or IP is banned
|
|
6276
|
+
*/
|
|
6277
|
+
ErrorTypes["AUTH_BANNED"] = "auth_banned";
|
|
6278
|
+
/**
|
|
5406
6279
|
* Model refused to respond (content policy violation)
|
|
5407
6280
|
*/
|
|
5408
6281
|
ErrorTypes["REFUSAL"] = "refusal";
|
|
@@ -5410,6 +6283,14 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
5410
6283
|
* SSE stream 404 — job completed, expired, or was deleted before the subscriber connected
|
|
5411
6284
|
*/
|
|
5412
6285
|
ErrorTypes["STREAM_EXPIRED"] = "stream_expired";
|
|
6286
|
+
/**
|
|
6287
|
+
* Provider does not serve the requested model
|
|
6288
|
+
*/
|
|
6289
|
+
ErrorTypes["MODEL_NOT_FOUND"] = "model_not_found";
|
|
6290
|
+
/**
|
|
6291
|
+
* Provider throttled or refused the request for exceeding a rate/spend allowance
|
|
6292
|
+
*/
|
|
6293
|
+
ErrorTypes["MODEL_RATE_LIMIT"] = "model_rate_limit";
|
|
5413
6294
|
return ErrorTypes;
|
|
5414
6295
|
}({});
|
|
5415
6296
|
/**
|
|
@@ -5541,7 +6422,7 @@ let TTSProviders = /* @__PURE__ */ function(TTSProviders) {
|
|
|
5541
6422
|
/** Enum for app-wide constants */
|
|
5542
6423
|
let Constants = /* @__PURE__ */ function(Constants) {
|
|
5543
6424
|
/**
|
|
5544
|
-
* Key for the app's version. The placeholder `v0.8.8-
|
|
6425
|
+
* Key for the app's version. The placeholder `v0.8.8-rc2` is
|
|
5545
6426
|
* swapped in by `@rollup/plugin-replace` during `npm run build:data-provider`
|
|
5546
6427
|
* using the value of the root `package.json`'s `version` field. Consumers
|
|
5547
6428
|
* always import this via the built dist bundle (see `main` field in
|
|
@@ -5549,9 +6430,9 @@ let Constants = /* @__PURE__ */ function(Constants) {
|
|
|
5549
6430
|
* substituted value. Only tests that import the TypeScript source directly
|
|
5550
6431
|
* would observe the raw placeholder.
|
|
5551
6432
|
*/
|
|
5552
|
-
Constants["VERSION"] = "v0.8.8-
|
|
6433
|
+
Constants["VERSION"] = "v0.8.8-rc2";
|
|
5553
6434
|
/** Key for the Custom Config's version (librechat.yaml). */
|
|
5554
|
-
Constants["CONFIG_VERSION"] = "1.3.
|
|
6435
|
+
Constants["CONFIG_VERSION"] = "1.3.15";
|
|
5555
6436
|
/** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
|
|
5556
6437
|
Constants["NO_PARENT"] = "00000000-0000-0000-0000-000000000000";
|
|
5557
6438
|
/** Standard value to use whatever the submission prelim. `responseMessageId` is */
|
|
@@ -5605,6 +6486,15 @@ let Constants = /* @__PURE__ */ function(Constants) {
|
|
|
5605
6486
|
Constants["SUBAGENT"] = "subagent";
|
|
5606
6487
|
/** Poll tool for retrieving the status/result of a backgrounded tool call. */
|
|
5607
6488
|
Constants["CHECK_BACKGROUND_TASK"] = "check_background_task";
|
|
6489
|
+
/**
|
|
6490
|
+
* `finish_reason` stamped on an assistant message whose turn ended because the
|
|
6491
|
+
* agent exhausted its per-turn graph step budget (`recursionLimit`) rather than
|
|
6492
|
+
* because the model chose to stop. Distinct from a user abort: nothing failed and
|
|
6493
|
+
* nothing was cancelled, the turn simply ran out of room. The UI keys its
|
|
6494
|
+
* "tool call limit reached" notice off this value. The hover Continue control
|
|
6495
|
+
* is withheld for this reason because the notice already offers the way forward.
|
|
6496
|
+
*/
|
|
6497
|
+
Constants["TOOL_CALL_LIMIT_FINISH_REASON"] = "tool_call_limit";
|
|
5608
6498
|
return Constants;
|
|
5609
6499
|
}({});
|
|
5610
6500
|
/**
|
|
@@ -5691,6 +6581,95 @@ function normalizeMCPToolKey(toolKey, rawServerNames) {
|
|
|
5691
6581
|
if (normalized === matched) return toolKey;
|
|
5692
6582
|
return `${toolKey.slice(0, toolKey.length - matched.length)}${normalized}`;
|
|
5693
6583
|
}
|
|
6584
|
+
/**
|
|
6585
|
+
* Strips a redundant leading server-name prefix from a raw upstream tool name
|
|
6586
|
+
* before it is embedded into a model-facing key, so the key doesn't carry the
|
|
6587
|
+
* server twice (`acme_trace_..._mcp_acme`) and push long tool names
|
|
6588
|
+
* past provider function-name limits (64 chars). The match is case-insensitive
|
|
6589
|
+
* because display-cased server names ("Acme") conventionally prefix their
|
|
6590
|
+
* tools in lowercase. Ingestion that strips must record the original name
|
|
6591
|
+
* (`serverToolName` on the cached definition) — tool calls send THAT name back
|
|
6592
|
+
* to the server, never the stripped one. Catalog producers must not call this
|
|
6593
|
+
* directly: only {@link stripServerNamePrefixes} sees the whole sibling set and
|
|
6594
|
+
* can keep colliding results apart.
|
|
6595
|
+
*/
|
|
6596
|
+
function stripServerNamePrefix(toolName, normalizedServerName) {
|
|
6597
|
+
const prefixLength = normalizedServerName.length + 1;
|
|
6598
|
+
if (toolName.length <= prefixLength) return toolName;
|
|
6599
|
+
if (toolName.slice(0, prefixLength).toLowerCase() !== `${normalizedServerName.toLowerCase()}_`) return toolName;
|
|
6600
|
+
const stripped = toolName.slice(prefixLength);
|
|
6601
|
+
if (isReservedMCPToolName(stripped)) return toolName;
|
|
6602
|
+
/** `isActionTool` classifies keys by the RELATIVE position of `_action_`
|
|
6603
|
+
* and `_mcp_`; stripping moves the first `_mcp_` earlier, so a server
|
|
6604
|
+
* whose normalized name contains `_action_` could see a real MCP tool
|
|
6605
|
+
* reclassified as an OpenAPI action (bypassing MCP authorization). Never
|
|
6606
|
+
* produce a key whose classification differs from the raw key's. */
|
|
6607
|
+
const keySuffix = `_mcp_${normalizedServerName}`;
|
|
6608
|
+
if (isActionTool(`${stripped}${keySuffix}`) !== isActionTool(`${toolName}${keySuffix}`)) return toolName;
|
|
6609
|
+
return stripped;
|
|
6610
|
+
}
|
|
6611
|
+
/**
|
|
6612
|
+
* Synthetic markers consumed by prefix (`isMCPAllPlaceholder`, the server-pin
|
|
6613
|
+
* skip, the client's OAuth stream classification), so each reserves BOTH its
|
|
6614
|
+
* exact name and its `${marker}${mcp_delimiter}` namespace: a stripped
|
|
6615
|
+
* remainder inside any of them would turn a real upstream tool into the
|
|
6616
|
+
* server-wide wildcard, the UI pin placeholder, or a synthetic OAuth call.
|
|
6617
|
+
*/
|
|
6618
|
+
const RESERVED_MCP_TOOL_MARKERS = [
|
|
6619
|
+
`sys__all__sys`,
|
|
6620
|
+
`sys__server__sys`,
|
|
6621
|
+
"oauth"
|
|
6622
|
+
];
|
|
6623
|
+
function isReservedMCPToolName(toolName) {
|
|
6624
|
+
/** `mcp_` opens the server-scoped pluginKey namespace (`mcp_${serverName}`),
|
|
6625
|
+
* and `lc_transfer_to_` opens the agent-handoff namespace (the client
|
|
6626
|
+
* renders such calls as handoffs; the background and intent passes exclude
|
|
6627
|
+
* them) — pre-strip tool keys could never enter either, since they always
|
|
6628
|
+
* began with the server name itself. */
|
|
6629
|
+
if (toolName.startsWith(`mcp_`) || toolName.startsWith(`lc_transfer_to_`)) return true;
|
|
6630
|
+
return RESERVED_MCP_TOOL_MARKERS.some((marker) => toolName === marker || toolName.startsWith(`${marker}_mcp_`));
|
|
6631
|
+
}
|
|
6632
|
+
/**
|
|
6633
|
+
* Maps every raw tool name in a server's catalog to its model-facing name,
|
|
6634
|
+
* stripping redundant server-name prefixes collision-free: when two names
|
|
6635
|
+
* yield the same result — a bare `foo` next to `<server>_foo`, or the
|
|
6636
|
+
* case-variant pair `<server>_Foo` / `<Server>_Foo` under the case-insensitive
|
|
6637
|
+
* prefix match — every collider keeps its raw name, so two distinct upstream
|
|
6638
|
+
* tools can never collapse onto one key. Unprefixed names count against the
|
|
6639
|
+
* result set through their identity mapping, which is what makes the bare-name
|
|
6640
|
+
* case fall out of the same counter.
|
|
6641
|
+
*/
|
|
6642
|
+
function stripServerNamePrefixes(toolNames, normalizedServerName) {
|
|
6643
|
+
const rawNames = new Set(toolNames);
|
|
6644
|
+
const finalNames = new Map(toolNames.map((name) => {
|
|
6645
|
+
const stripped = stripServerNamePrefix(name, normalizedServerName);
|
|
6646
|
+
/** Every sibling's RAW name is reserved even when that sibling itself
|
|
6647
|
+
* strips away: keys persisted BEFORE stripping embed raw names, so a
|
|
6648
|
+
* stripped result landing on another sibling's raw name would route
|
|
6649
|
+
* that sibling's legacy references to the wrong upstream tool. */
|
|
6650
|
+
return [name, stripped !== name && rawNames.has(stripped) ? name : stripped];
|
|
6651
|
+
}));
|
|
6652
|
+
/** Reverting a collider to its raw name can itself collide with ANOTHER
|
|
6653
|
+
* sibling's stripped result (`foo` / `acme_foo` / `acme_acme_foo`), so the
|
|
6654
|
+
* guard iterates to a fixpoint. Each pass converts at least one stripped
|
|
6655
|
+
* result back to its unique raw name, so it terminates within the catalog
|
|
6656
|
+
* size. */
|
|
6657
|
+
let changed = true;
|
|
6658
|
+
while (changed) {
|
|
6659
|
+
changed = false;
|
|
6660
|
+
const counts = /* @__PURE__ */ new Map();
|
|
6661
|
+
finalNames.forEach((result) => {
|
|
6662
|
+
counts.set(result, (counts.get(result) ?? 0) + 1);
|
|
6663
|
+
});
|
|
6664
|
+
finalNames.forEach((result, raw) => {
|
|
6665
|
+
if (result !== raw && (counts.get(result) ?? 0) > 1) {
|
|
6666
|
+
finalNames.set(raw, raw);
|
|
6667
|
+
changed = true;
|
|
6668
|
+
}
|
|
6669
|
+
});
|
|
6670
|
+
}
|
|
6671
|
+
return finalNames;
|
|
6672
|
+
}
|
|
5694
6673
|
function splitMCPToolKey(toolKey, knownServerNames) {
|
|
5695
6674
|
if (knownServerNames?.length) {
|
|
5696
6675
|
let matched;
|
|
@@ -5910,6 +6889,7 @@ let PrincipalModel = /* @__PURE__ */ function(PrincipalModel) {
|
|
|
5910
6889
|
*/
|
|
5911
6890
|
let ResourceType = /* @__PURE__ */ function(ResourceType) {
|
|
5912
6891
|
ResourceType["AGENT"] = "agent";
|
|
6892
|
+
ResourceType["CODE_ENVIRONMENT"] = "codeEnvironment";
|
|
5913
6893
|
ResourceType["PROMPTGROUP"] = "promptGroup";
|
|
5914
6894
|
ResourceType["MCPSERVER"] = "mcpServer";
|
|
5915
6895
|
ResourceType["REMOTE_AGENT"] = "remoteAgent";
|
|
@@ -5938,6 +6918,9 @@ let AccessRoleIds = /* @__PURE__ */ function(AccessRoleIds) {
|
|
|
5938
6918
|
AccessRoleIds["AGENT_VIEWER"] = "agent_viewer";
|
|
5939
6919
|
AccessRoleIds["AGENT_EDITOR"] = "agent_editor";
|
|
5940
6920
|
AccessRoleIds["AGENT_OWNER"] = "agent_owner";
|
|
6921
|
+
AccessRoleIds["CODE_ENVIRONMENT_VIEWER"] = "codeEnvironment_viewer";
|
|
6922
|
+
AccessRoleIds["CODE_ENVIRONMENT_EDITOR"] = "codeEnvironment_editor";
|
|
6923
|
+
AccessRoleIds["CODE_ENVIRONMENT_OWNER"] = "codeEnvironment_owner";
|
|
5941
6924
|
AccessRoleIds["PROMPTGROUP_VIEWER"] = "promptGroup_viewer";
|
|
5942
6925
|
AccessRoleIds["PROMPTGROUP_EDITOR"] = "promptGroup_editor";
|
|
5943
6926
|
AccessRoleIds["PROMPTGROUP_OWNER"] = "promptGroup_owner";
|
|
@@ -6054,17 +7037,20 @@ function permBitsToAccessLevel(permBits) {
|
|
|
6054
7037
|
function accessRoleToPermBits(accessRoleId) {
|
|
6055
7038
|
switch (accessRoleId) {
|
|
6056
7039
|
case "agent_viewer":
|
|
7040
|
+
case "codeEnvironment_viewer":
|
|
6057
7041
|
case "promptGroup_viewer":
|
|
6058
7042
|
case "mcpServer_viewer":
|
|
6059
7043
|
case "remoteAgent_viewer":
|
|
6060
7044
|
case "skill_viewer":
|
|
6061
7045
|
case "sharedLink_viewer": return 1;
|
|
6062
7046
|
case "agent_editor":
|
|
7047
|
+
case "codeEnvironment_editor":
|
|
6063
7048
|
case "promptGroup_editor":
|
|
6064
7049
|
case "mcpServer_editor":
|
|
6065
7050
|
case "remoteAgent_editor":
|
|
6066
7051
|
case "skill_editor": return 3;
|
|
6067
7052
|
case "agent_owner":
|
|
7053
|
+
case "codeEnvironment_owner":
|
|
6068
7054
|
case "promptGroup_owner":
|
|
6069
7055
|
case "mcpServer_owner":
|
|
6070
7056
|
case "remoteAgent_owner":
|
|
@@ -6091,6 +7077,7 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
|
|
|
6091
7077
|
QueryKeys["sharedLinks"] = "sharedLinks";
|
|
6092
7078
|
QueryKeys["allConversations"] = "allConversations";
|
|
6093
7079
|
QueryKeys["archivedConversations"] = "archivedConversations";
|
|
7080
|
+
QueryKeys["pinnedConversations"] = "pinnedConversations";
|
|
6094
7081
|
QueryKeys["searchConversations"] = "searchConversations";
|
|
6095
7082
|
QueryKeys["conversation"] = "conversation";
|
|
6096
7083
|
QueryKeys["searchEnabled"] = "searchEnabled";
|
|
@@ -6107,6 +7094,8 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
|
|
|
6107
7094
|
QueryKeys["tokenCount"] = "tokenCount";
|
|
6108
7095
|
QueryKeys["availablePlugins"] = "availablePlugins";
|
|
6109
7096
|
QueryKeys["startupConfig"] = "startupConfig";
|
|
7097
|
+
QueryKeys["insights"] = "insights";
|
|
7098
|
+
QueryKeys["insightsAccess"] = "insightsAccess";
|
|
6110
7099
|
QueryKeys["assistants"] = "assistants";
|
|
6111
7100
|
QueryKeys["assistant"] = "assistant";
|
|
6112
7101
|
QueryKeys["agents"] = "agents";
|
|
@@ -6164,10 +7153,19 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
|
|
|
6164
7153
|
QueryKeys["toolFavorites"] = "toolFavorites";
|
|
6165
7154
|
QueryKeys["skillStates"] = "skillStates";
|
|
6166
7155
|
QueryKeys["favorites"] = "favorites";
|
|
7156
|
+
QueryKeys["schedules"] = "schedules";
|
|
7157
|
+
QueryKeys["schedule"] = "schedule";
|
|
7158
|
+
QueryKeys["parentSubagents"] = "parentSubagents";
|
|
7159
|
+
QueryKeys["subagentThread"] = "subagentThread";
|
|
7160
|
+
QueryKeys["codeEnvironments"] = "codeEnvironments";
|
|
7161
|
+
QueryKeys["agentQueuedTurns"] = "agentQueuedTurns";
|
|
6167
7162
|
return QueryKeys;
|
|
6168
7163
|
}({});
|
|
6169
7164
|
const DynamicQueryKeys = { agentFiles: (agentId) => ["agentFiles", agentId] };
|
|
6170
7165
|
let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
|
|
7166
|
+
MutationKeys["subagentControl"] = "subagentControl";
|
|
7167
|
+
MutationKeys["enqueueAgentQueuedTurn"] = "enqueueAgentQueuedTurn";
|
|
7168
|
+
MutationKeys["cancelAgentQueuedTurn"] = "cancelAgentQueuedTurn";
|
|
6171
7169
|
MutationKeys["updateLangfuseConnection"] = "updateLangfuseConnection";
|
|
6172
7170
|
MutationKeys["testLangfuseConnection"] = "testLangfuseConnection";
|
|
6173
7171
|
MutationKeys["createAgentApiKey"] = "createAgentApiKey";
|
|
@@ -6191,6 +7189,7 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
|
|
|
6191
7189
|
MutationKeys["deleteAgentAction"] = "deleteAgentAction";
|
|
6192
7190
|
MutationKeys["revertAgentVersion"] = "revertAgentVersion";
|
|
6193
7191
|
MutationKeys["deleteUser"] = "deleteUser";
|
|
7192
|
+
MutationKeys["updateUserPreferences"] = "updateUserPreferences";
|
|
6194
7193
|
MutationKeys["updateRole"] = "updateRole";
|
|
6195
7194
|
MutationKeys["enableTwoFactor"] = "enableTwoFactor";
|
|
6196
7195
|
MutationKeys["verifyTwoFactor"] = "verifyTwoFactor";
|
|
@@ -6204,6 +7203,14 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
|
|
|
6204
7203
|
MutationKeys["deleteSkillNode"] = "deleteSkillNode";
|
|
6205
7204
|
MutationKeys["updateSkillNodeContent"] = "updateSkillNodeContent";
|
|
6206
7205
|
MutationKeys["convoPin"] = "convoPin";
|
|
7206
|
+
MutationKeys["archiveAllConversations"] = "archiveAllConversations";
|
|
7207
|
+
MutationKeys["createSchedule"] = "createSchedule";
|
|
7208
|
+
MutationKeys["updateSchedule"] = "updateSchedule";
|
|
7209
|
+
MutationKeys["deleteSchedule"] = "deleteSchedule";
|
|
7210
|
+
MutationKeys["runSchedule"] = "runSchedule";
|
|
7211
|
+
MutationKeys["pairCodeEnvironment"] = "pairCodeEnvironment";
|
|
7212
|
+
MutationKeys["updateCodeEnvironmentSettings"] = "updateCodeEnvironmentSettings";
|
|
7213
|
+
MutationKeys["deleteCodeEnvironment"] = "deleteCodeEnvironment";
|
|
6207
7214
|
return MutationKeys;
|
|
6208
7215
|
}({});
|
|
6209
7216
|
//#endregion
|
|
@@ -6605,15 +7612,18 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6605
7612
|
addPromptToGroup: () => addPromptToGroup,
|
|
6606
7613
|
addTagToConversation: () => addTagToConversation,
|
|
6607
7614
|
addToolFavorite: () => addToolFavorite,
|
|
7615
|
+
archiveAllConversations: () => archiveAllConversations,
|
|
6608
7616
|
archiveConversation: () => archiveConversation,
|
|
6609
7617
|
assignConversationToProject: () => assignConversationToProject,
|
|
6610
7618
|
bindActionOAuth: () => bindActionOAuth,
|
|
6611
7619
|
bindMCPOAuth: () => bindMCPOAuth,
|
|
6612
7620
|
branchMessage: () => branchMessage,
|
|
6613
7621
|
callTool: () => callTool,
|
|
7622
|
+
cancelAgentQueuedTurn: () => cancelAgentQueuedTurn,
|
|
6614
7623
|
cancelMCPOAuth: () => cancelMCPOAuth,
|
|
6615
7624
|
clearAllConversations: () => clearAllConversations,
|
|
6616
7625
|
confirmTwoFactor: () => confirmTwoFactor,
|
|
7626
|
+
controlSubagentTask: () => controlSubagentTask,
|
|
6617
7627
|
createAgent: () => createAgent,
|
|
6618
7628
|
createAgentApiKey: () => createAgentApiKey,
|
|
6619
7629
|
createAssistant: () => createAssistant,
|
|
@@ -6623,6 +7633,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6623
7633
|
createPreset: () => createPreset,
|
|
6624
7634
|
createProject: () => createProject,
|
|
6625
7635
|
createPrompt: () => createPrompt,
|
|
7636
|
+
createSchedule: () => createSchedule,
|
|
6626
7637
|
createSharedLink: () => createSharedLink,
|
|
6627
7638
|
createSkill: () => createSkill,
|
|
6628
7639
|
createSkillNode: () => createSkillNode,
|
|
@@ -6631,16 +7642,19 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6631
7642
|
deleteAgentAction: () => deleteAgentAction,
|
|
6632
7643
|
deleteAgentApiKey: () => deleteAgentApiKey,
|
|
6633
7644
|
deleteAssistant: () => deleteAssistant,
|
|
7645
|
+
deleteCodeEnvironment: () => deleteCodeEnvironment,
|
|
6634
7646
|
deleteConversation: () => deleteConversation,
|
|
6635
7647
|
deleteConversationTag: () => deleteConversationTag,
|
|
6636
7648
|
deleteFiles: () => deleteFiles,
|
|
6637
7649
|
deleteGitHubSkillSyncCredential: () => deleteGitHubSkillSyncCredential,
|
|
6638
7650
|
deleteMCPServer: () => deleteMCPServer,
|
|
6639
7651
|
deleteMemory: () => deleteMemory,
|
|
7652
|
+
deleteMemoryById: () => deleteMemoryById,
|
|
6640
7653
|
deletePreset: () => deletePreset,
|
|
6641
7654
|
deleteProject: () => deleteProject,
|
|
6642
7655
|
deletePrompt: () => deletePrompt,
|
|
6643
7656
|
deletePromptGroup: () => deletePromptGroup,
|
|
7657
|
+
deleteSchedule: () => deleteSchedule,
|
|
6644
7658
|
deleteSharedLink: () => deleteSharedLink,
|
|
6645
7659
|
deleteSkill: () => deleteSkill,
|
|
6646
7660
|
deleteSkillFile: () => deleteSkillFile,
|
|
@@ -6651,6 +7665,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6651
7665
|
duplicateConversation: () => duplicateConversation,
|
|
6652
7666
|
editArtifact: () => editArtifact,
|
|
6653
7667
|
enableTwoFactor: () => enableTwoFactor,
|
|
7668
|
+
enqueueAgentQueuedTurn: () => enqueueAgentQueuedTurn,
|
|
6654
7669
|
forkConversation: () => forkConversation,
|
|
6655
7670
|
forkSharedConversation: () => forkSharedConversation,
|
|
6656
7671
|
genTitle: () => genTitle,
|
|
@@ -6672,6 +7687,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6672
7687
|
getAvailableTools: () => getAvailableTools,
|
|
6673
7688
|
getBanner: () => getBanner,
|
|
6674
7689
|
getCategories: () => getCategories,
|
|
7690
|
+
getCodeEnvironments: () => getCodeEnvironments,
|
|
6675
7691
|
getCodeOutputDownload: () => getCodeOutputDownload,
|
|
6676
7692
|
getConversationById: () => getConversationById,
|
|
6677
7693
|
getConversationTags: () => getConversationTags,
|
|
@@ -6688,6 +7704,8 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6688
7704
|
getFiles: () => getFiles,
|
|
6689
7705
|
getGitHubSkillSyncStatus: () => getGitHubSkillSyncStatus,
|
|
6690
7706
|
getGraphApiToken: () => getGraphApiToken,
|
|
7707
|
+
getInsights: () => getInsights,
|
|
7708
|
+
getInsightsAccess: () => getInsightsAccess,
|
|
6691
7709
|
getLangfuseConnection: () => getLangfuseConnection,
|
|
6692
7710
|
getLangfuseSessionLink: () => getLangfuseSessionLink,
|
|
6693
7711
|
getLoginGoogle: () => getLoginGoogle,
|
|
@@ -6700,8 +7718,10 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6700
7718
|
getMCPTools: () => getMCPTools,
|
|
6701
7719
|
getMarketplaceAgents: () => getMarketplaceAgents,
|
|
6702
7720
|
getMemories: () => getMemories,
|
|
7721
|
+
getMessageById: () => getMessageById,
|
|
6703
7722
|
getMessagesByConvoId: () => getMessagesByConvoId,
|
|
6704
7723
|
getModels: () => getModels,
|
|
7724
|
+
getParentSubagents: () => getParentSubagents,
|
|
6705
7725
|
getPresets: () => getPresets,
|
|
6706
7726
|
getProjectById: () => getProjectById,
|
|
6707
7727
|
getPrompt: () => getPrompt,
|
|
@@ -6711,6 +7731,8 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6711
7731
|
getRandomPrompts: () => getRandomPrompts,
|
|
6712
7732
|
getResourcePermissions: () => getResourcePermissions,
|
|
6713
7733
|
getRole: () => getRole,
|
|
7734
|
+
getSchedule: () => getSchedule,
|
|
7735
|
+
getSchedules: () => getSchedules,
|
|
6714
7736
|
getSearchEnabled: () => getSearchEnabled,
|
|
6715
7737
|
getSharedFileDownload: () => getSharedFileDownload,
|
|
6716
7738
|
getSharedFilePreview: () => getSharedFilePreview,
|
|
@@ -6723,6 +7745,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6723
7745
|
getSkillStates: () => getSkillStates,
|
|
6724
7746
|
getSkillTree: () => getSkillTree,
|
|
6725
7747
|
getStartupConfig: () => getStartupConfig,
|
|
7748
|
+
getSubagentThread: () => getSubagentThread,
|
|
6726
7749
|
getTokenConfig: () => getTokenConfig,
|
|
6727
7750
|
getToolCalls: () => getToolCalls,
|
|
6728
7751
|
getToolFavorites: () => getToolFavorites,
|
|
@@ -6734,6 +7757,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6734
7757
|
healthCheck: () => healthCheck,
|
|
6735
7758
|
importConversationsFile: () => importConversationsFile,
|
|
6736
7759
|
importSkill: () => importSkill,
|
|
7760
|
+
listAgentQueuedTurns: () => listAgentQueuedTurns,
|
|
6737
7761
|
listAgents: () => listAgents,
|
|
6738
7762
|
listAssistants: () => listAssistants,
|
|
6739
7763
|
listConversations: () => listConversations,
|
|
@@ -6747,6 +7771,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6747
7771
|
logout: () => logout,
|
|
6748
7772
|
makePromptProduction: () => makePromptProduction,
|
|
6749
7773
|
markFilesUsage: () => markFilesUsage,
|
|
7774
|
+
pairCodeEnvironment: () => pairCodeEnvironment,
|
|
6750
7775
|
pinConversation: () => pinConversation,
|
|
6751
7776
|
rebuildConversationTags: () => rebuildConversationTags,
|
|
6752
7777
|
recordPromptGroupUsage: () => recordPromptGroupUsage,
|
|
@@ -6761,6 +7786,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6761
7786
|
revokeAllUserKeys: () => revokeAllUserKeys,
|
|
6762
7787
|
revokeUserKey: () => revokeUserKey,
|
|
6763
7788
|
runGitHubSkillSync: () => runGitHubSkillSync,
|
|
7789
|
+
runScheduleNow: () => runScheduleNow,
|
|
6764
7790
|
searchPrincipals: () => searchPrincipals,
|
|
6765
7791
|
setGitHubSkillSyncCredential: () => setGitHubSkillSyncCredential,
|
|
6766
7792
|
speechToText: () => speechToText,
|
|
@@ -6771,6 +7797,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6771
7797
|
updateAgentAction: () => updateAgentAction,
|
|
6772
7798
|
updateAgentPermissions: () => updateAgentPermissions,
|
|
6773
7799
|
updateAssistant: () => updateAssistant,
|
|
7800
|
+
updateCodeEnvironmentSettings: () => updateCodeEnvironmentSettings,
|
|
6774
7801
|
updateConversation: () => updateConversation,
|
|
6775
7802
|
updateConversationTag: () => updateConversationTag,
|
|
6776
7803
|
updateFavorites: () => updateFavorites,
|
|
@@ -6780,6 +7807,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6780
7807
|
updateMCPServersPermissions: () => updateMCPServersPermissions,
|
|
6781
7808
|
updateMarketplacePermissions: () => updateMarketplacePermissions,
|
|
6782
7809
|
updateMemory: () => updateMemory,
|
|
7810
|
+
updateMemoryById: () => updateMemoryById,
|
|
6783
7811
|
updateMemoryPermissions: () => updateMemoryPermissions,
|
|
6784
7812
|
updateMemoryPreferences: () => updateMemoryPreferences,
|
|
6785
7813
|
updateMessage: () => updateMessage,
|
|
@@ -6792,6 +7820,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6792
7820
|
updatePromptPermissions: () => updatePromptPermissions,
|
|
6793
7821
|
updateRemoteAgentsPermissions: () => updateRemoteAgentsPermissions,
|
|
6794
7822
|
updateResourcePermissions: () => updateResourcePermissions,
|
|
7823
|
+
updateSchedule: () => updateSchedule,
|
|
6795
7824
|
updateSharedLink: () => updateSharedLink,
|
|
6796
7825
|
updateSkill: () => updateSkill,
|
|
6797
7826
|
updateSkillNode: () => updateSkillNode,
|
|
@@ -6801,6 +7830,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6801
7830
|
updateTokenCount: () => updateTokenCount,
|
|
6802
7831
|
updateUserKey: () => updateUserKey,
|
|
6803
7832
|
updateUserPlugins: () => updateUserPlugins,
|
|
7833
|
+
updateUserPreferences: () => updateUserPreferences,
|
|
6804
7834
|
uploadAgentAvatar: () => uploadAgentAvatar,
|
|
6805
7835
|
uploadAssistantAvatar: () => uploadAssistantAvatar,
|
|
6806
7836
|
uploadAvatar: () => uploadAvatar,
|
|
@@ -6812,6 +7842,15 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
6812
7842
|
verifyTwoFactor: () => verifyTwoFactor,
|
|
6813
7843
|
verifyTwoFactorTemp: () => verifyTwoFactorTemp
|
|
6814
7844
|
});
|
|
7845
|
+
function getInsights(params = {}) {
|
|
7846
|
+
const query = new URLSearchParams();
|
|
7847
|
+
for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== "") query.set(key, String(value));
|
|
7848
|
+
const suffix = query.toString() ? `?${query.toString()}` : "";
|
|
7849
|
+
return request_default.get(`${insights()}${suffix}`);
|
|
7850
|
+
}
|
|
7851
|
+
function getInsightsAccess() {
|
|
7852
|
+
return request_default.get(insightsAccess());
|
|
7853
|
+
}
|
|
6815
7854
|
function getLangfuseConnection() {
|
|
6816
7855
|
return request_default.get(adminLangfuseConnection());
|
|
6817
7856
|
}
|
|
@@ -6833,6 +7872,18 @@ function revokeAllUserKeys() {
|
|
|
6833
7872
|
function deleteUser(payload) {
|
|
6834
7873
|
return request_default.deleteWithOptions(deleteUser$1(), { data: payload });
|
|
6835
7874
|
}
|
|
7875
|
+
function getCodeEnvironments() {
|
|
7876
|
+
return request_default.get(codeEnvironments());
|
|
7877
|
+
}
|
|
7878
|
+
function pairCodeEnvironment(payload) {
|
|
7879
|
+
return request_default.post(codeEnvironmentPairings(), payload);
|
|
7880
|
+
}
|
|
7881
|
+
function deleteCodeEnvironment(id) {
|
|
7882
|
+
return request_default.delete(codeEnvironmentById(id));
|
|
7883
|
+
}
|
|
7884
|
+
function updateCodeEnvironmentSettings({ id, settings }) {
|
|
7885
|
+
return request_default.patch(codeEnvironmentSettings(id), { settings });
|
|
7886
|
+
}
|
|
6836
7887
|
function getFavorites() {
|
|
6837
7888
|
return request_default.get(`${apiBaseUrl()}/api/user/settings/favorites`);
|
|
6838
7889
|
}
|
|
@@ -6916,6 +7967,9 @@ function getSearchEnabled() {
|
|
|
6916
7967
|
function getUser() {
|
|
6917
7968
|
return request_default.get(user());
|
|
6918
7969
|
}
|
|
7970
|
+
function updateUserPreferences(preferences) {
|
|
7971
|
+
return request_default.patch(userPreferences(), preferences);
|
|
7972
|
+
}
|
|
6919
7973
|
function getUserBalance() {
|
|
6920
7974
|
return request_default.get(balance());
|
|
6921
7975
|
}
|
|
@@ -7294,6 +8348,9 @@ function updateConversation(payload) {
|
|
|
7294
8348
|
function archiveConversation(payload) {
|
|
7295
8349
|
return request_default.post(archiveConversation$1(), { arg: payload });
|
|
7296
8350
|
}
|
|
8351
|
+
function archiveAllConversations() {
|
|
8352
|
+
return request_default.post(archiveAllConversations$1(), {});
|
|
8353
|
+
}
|
|
7297
8354
|
function listProjects(params) {
|
|
7298
8355
|
return request_default.get(projects(params ?? {}));
|
|
7299
8356
|
}
|
|
@@ -7352,6 +8409,21 @@ function getMessagesByConvoId(conversationId) {
|
|
|
7352
8409
|
if (conversationId === "new" || conversationId === "PENDING") return Promise.resolve([]);
|
|
7353
8410
|
return request_default.get(messages({ conversationId }));
|
|
7354
8411
|
}
|
|
8412
|
+
function getMessageById(conversationId, messageId) {
|
|
8413
|
+
return request_default.get(messages({
|
|
8414
|
+
conversationId,
|
|
8415
|
+
messageId
|
|
8416
|
+
}));
|
|
8417
|
+
}
|
|
8418
|
+
function getParentSubagents(parentConversationId) {
|
|
8419
|
+
return request_default.get(parentSubagents(parentConversationId));
|
|
8420
|
+
}
|
|
8421
|
+
function getSubagentThread(parentConversationId, threadId, taskId, cursor) {
|
|
8422
|
+
return request_default.get(subagentThread(parentConversationId, threadId, taskId, cursor));
|
|
8423
|
+
}
|
|
8424
|
+
function controlSubagentTask(parentConversationId, threadId, body) {
|
|
8425
|
+
return request_default.post(subagentControl(parentConversationId, threadId), body);
|
|
8426
|
+
}
|
|
7355
8427
|
function getPrompt(id) {
|
|
7356
8428
|
return request_default.get(getPrompt$1(id));
|
|
7357
8429
|
}
|
|
@@ -7400,6 +8472,33 @@ function getRandomPrompts(variables) {
|
|
|
7400
8472
|
function listSkills(params) {
|
|
7401
8473
|
return request_default.get(listSkillsWithFilters(params ?? {}));
|
|
7402
8474
|
}
|
|
8475
|
+
function getSchedules() {
|
|
8476
|
+
return request_default.get(schedules());
|
|
8477
|
+
}
|
|
8478
|
+
function enqueueAgentQueuedTurn(payload) {
|
|
8479
|
+
return request_default.post(agentQueuedTurns(), payload);
|
|
8480
|
+
}
|
|
8481
|
+
function listAgentQueuedTurns(conversationId, clientRequestIds) {
|
|
8482
|
+
return request_default.get(agentQueuedTurnsByConversation(conversationId, clientRequestIds));
|
|
8483
|
+
}
|
|
8484
|
+
function cancelAgentQueuedTurn(queuedTurnId) {
|
|
8485
|
+
return request_default.delete(agentQueuedTurn(queuedTurnId));
|
|
8486
|
+
}
|
|
8487
|
+
function getSchedule(id) {
|
|
8488
|
+
return request_default.get(schedule(id));
|
|
8489
|
+
}
|
|
8490
|
+
function createSchedule(payload) {
|
|
8491
|
+
return request_default.post(schedules(), payload);
|
|
8492
|
+
}
|
|
8493
|
+
function updateSchedule(id, payload) {
|
|
8494
|
+
return request_default.patch(schedule(id), payload);
|
|
8495
|
+
}
|
|
8496
|
+
function deleteSchedule(id) {
|
|
8497
|
+
return request_default.delete(schedule(id));
|
|
8498
|
+
}
|
|
8499
|
+
function runScheduleNow(id) {
|
|
8500
|
+
return request_default.post(runSchedule(id), {});
|
|
8501
|
+
}
|
|
7403
8502
|
function getSkill(id) {
|
|
7404
8503
|
return request_default.get(getSkill$1(id));
|
|
7405
8504
|
}
|
|
@@ -7590,12 +8689,21 @@ const getMemories = () => {
|
|
|
7590
8689
|
const deleteMemory = (key, agentId) => {
|
|
7591
8690
|
return request_default.delete(memory(key, agentId));
|
|
7592
8691
|
};
|
|
8692
|
+
const deleteMemoryById = (id, agentId) => {
|
|
8693
|
+
return request_default.delete(memoryById(id, agentId));
|
|
8694
|
+
};
|
|
7593
8695
|
const updateMemory = (key, value, originalKey, agentId) => {
|
|
7594
8696
|
return request_default.patch(memory(originalKey || key, agentId), {
|
|
7595
8697
|
key,
|
|
7596
8698
|
value
|
|
7597
8699
|
});
|
|
7598
8700
|
};
|
|
8701
|
+
const updateMemoryById = (id, value, key, agentId) => {
|
|
8702
|
+
return request_default.patch(memoryById(id, agentId), {
|
|
8703
|
+
value,
|
|
8704
|
+
...key ? { key } : {}
|
|
8705
|
+
});
|
|
8706
|
+
};
|
|
7599
8707
|
const updateMemoryPreferences = (preferences) => {
|
|
7600
8708
|
return request_default.patch(memoryPreferences(), preferences);
|
|
7601
8709
|
};
|
|
@@ -7630,6 +8738,6 @@ const getActiveJobs = () => {
|
|
|
7630
8738
|
return request_default.get(activeJobs());
|
|
7631
8739
|
};
|
|
7632
8740
|
//#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 };
|
|
8741
|
+
export { permissionEntrySchema as $, googleSchema as $a, BedrockReasoningConfig as $i, specialVariables as $n, feedbackSchema as $o, defaultTextMimeTypes as $r, normalizeEndpointName as $s, azureGroupConfigsSchema as $t, updateResourcePermissions as A, defaultAgentFormValues as Aa, materializeModelSpecEndpoints as Ai, imageGenTools as An, tQueryParamsSchema as Ao, isProcessMCPServerField as Ar, feedbackFilterFieldSchema as As, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH as At, MutationKeys as B, eReasoningResponseKeySchema as Ba, getMaxSubagents as Bi, modularEndpoints as Bn, actionDelimiter as Bo, registerPage as Br, hasActivePiiPatterns as Bs, SettingsViews as Bt, resetPassword as C, authTypeSchema as Ca, setFileConfigRegexCompiler as Ci, fileSourceSchema as Cn, tConvoUpdateSchema as Co, MCP_USER_INPUT_FIELDS as Cr, SKILL_FILTER_FIELDS as Cs, MAX_SUBAGENT_DEPTH as Ct, updateFeedback as D, compactAgentsSchema as Da, videoMimeTypes as Di, getDefaultParamsEndpoint as Dn, tPluginAuthConfigSchema as Do, WebSocketOptionsSchema as Dr, agentInstructionFilterFieldSchema as Ds, RateLimitPrefix as Dt, searchPrincipals as E, compactAgentsBaseSchema as Ea, textMimeTypes as Ei, getConfigDefaults as En, tModelSpecPresetSchema as Eo, StreamableHTTPOptionsSchema as Er, actionMetadataFilterFieldSchema as Es, OCRStrategy as Et, request_default as F, eModelEndpointSchema as Fa, MAX_CHAT_PROJECT_DESCRIPTION_LENGTH as Fi, langfuseConfigSchema as Fn, FilePurpose as Fo, FileSources as Fr, filterPiiStarterPatternSchema as Fs, SafeSearchTypes as Ft, PrincipalType as G, endpointSettings as Ga, clampSettingRange as Gi, paramDefinitionSchema as Gn, isActionTool as Go, bedrockDocumentFormats as Gr, skillFilterFieldSchema as Gs, VisionModes as Gt, AccessRoleIds as H, eThinkingDisplaySchema as Ha, ComponentTypes as Hi, normalizeSearxngEngines as Hn, defaultOrderQuery as Ho, applicationMimeTypes as Hr, messageFilterFieldSchema as Hs, TTSProviders as Ht, getTokenHeader as I, eReasoningContextSchema as Ia, MAX_CHAT_PROJECT_NAME_LENGTH as Ii, memorySchema as In, MessageContentTypes as Io, checkOpenAIStorage as Ir, filtersConfigSchema as Is, ScraperProviders as It, accessRoleToPermBits as J, getGoogleThinkingBudgetMax as Ja, generateOpenAISchema as Ji, resolveEndpointType as Jn, resolveStatefulCodeEnvironment as Jo, codeInterpreterMimeTypesList as Jr, userSubmittedMessageFieldPathSchema as Js, alternateName as Jt, ResourceType as K, extendedModelEndpointSchema as Ka, generateDynamicSchema as Ki, providerEndpointMap as Kn, STATEFUL_CODE_ENVIRONMENTS as Ko, bedrockDocumentMimeTypes as Kr, toolArgumentFilterFieldSchema as Ks, agentsEndpointSchema as Kt, setAcceptLanguageHeader as L, eReasoningEffortSchema as La, MAX_GRAPH_SUBAGENT_MEMBERS as Li, messageFilterPiiSchema as Ln, RunStatus as Lo, apiBaseUrl as Lr, getPiiRegexProgramSize as Ls, SearchCategories as Lt, updateUserKey as M, documentSupportedProviders as Ma, resolveModelSpecEndpoint as Mi, interfaceSchema as Mn, AnnotationTypes as Mo, AuthorizationTypeEnum as Mr, filterPiiActionSchema as Ms, SKILL_SYNC_MAX_INTERVAL_MINUTES as Mt, updateUserPlugins as N, eAnthropicEffortSchema as Na, specsConfigSchema as Ni, isRemoteOidcUrlAllowed as Nn, AssistantStreamEvents as No, TokenExchangeMethodEnum as Nr, filterPiiCustomPatternSchema as Ns, SKILL_SYNC_MIN_INTERVAL_MINUTES as Nt, updateMessage as O, compactAssistantSchema as Oa, REFILL_INTERVAL_UNITS as Oi, getEndpointField as On, tPluginSchema as Oo, hasProcessMCPServerConfig as Or, conversationStarterFilterFieldSchema as Os, RerankerTypes as Ot, userKeyQuery as P, eImageDetailSchema as Pa, tModelSpecSchema as Pi, isSecureCodeEnvironmentControlURL as Pn, EToolResources as Po, FileContext as Pr, filterPiiRegexSchema as Ps, STTProviders as Pt, permBitsToAccessLevel as Q, googleGenConfigSchema as Qa, BedrockProviders as Qi, skillSyncGitHubSourceSchema as Qn, feedbackRatingSchema as Qo, defaultSTTMimeTypes as Qr, isSensitiveEnvVar as Qs, azureEndpointSchema as Qt, setTokenHeader as R, eReasoningModeSchema as Ra, MAX_SUBAGENTS as Ri, messageFilterSchema as Rn, StepStatus as Ro, buildLoginRedirectUrl as Rr, hasActiveFiltersConfig as Rs, SearchProviders as Rt, requestPasswordReset as S, assistantSchema as Sa, retrievalMimeTypesList as Si, excludedKeys as Sn, tConversationTagSchema as So, MCP_SERVER_TITLE_PATTERN as Sr, PROMPT_FILTER_FIELDS as Ss, LocalStorageKeys as St, revokeUserKey as T, coerceNumber as Ta, supportsFiles as Ti, fileStrategiesSchema as Tn, tMessageSchema as To, StdioOptionsSchema as Tr, TOOL_ARGUMENT_FILTER_FIELDS as Ts, MAX_SUBAGENT_RUN_CONFIGS as Tt, PermissionBits as U, eThinkingLevelSchema as Ua, OptionTypes as Ui, normalizeServerName as Un, hostImageIdSuffix as Uo, audioMimeTypes as Ur, modelParameterFilterFieldSchema as Us, Time as Ut, QueryKeys as V, eReasoningSummarySchema as Va, setMaxSubagents as Vi, normalizeMCPToolKey as Vn, actionDomainSeparator as Vo, sharedFileDownload as Vr, memoryFilterFieldSchema as Vs, SystemCategories as Vt, PrincipalModel as W, eVerbositySchema as Wa, SettingTypes as Wi, ocrSchema as Wn, hostImageNamePrefix as Wo, bedrockDocumentExtensions as Wr, promptFilterFieldSchema as Ws, ViolationTypes as Wt, getResourcePermissionsResponseSchema as X, getSettingsKeys as Xa, AnthropicEffort as Xi, setMessageFilterRegexValidator as Xn, FEEDBACK_REASON_KEYS as Xo, convertStringsToRegex as Xr, extractEnvVariable as Xs, assistantEndpointSchema as Xt, effectivePermissionsResponseSchema as Y, getModelKey as Ya, validateSettingDefinitions as Yi, retainRecentConfigSchema as Yn, FEEDBACK_RATINGS as Yo, codeTypeMapping as Yr, envVarRegex as Ys, anthropicEndpointSchema as Yt, hasPermissions as Z, googleBaseSchema as Za, AuthType as Zi, skillSyncConfigSchema as Zn, FEEDBACK_TAGS as Zo, defaultOCRMimeTypes as Zr, extractVariableName as Zs, azureBaseSchema as Zt, getResourcePermissions as _, agentsSchema as _a, mbToBytes as _i, defaultEndpoints as _n, removeNullishValues as _o, webSearchSchema as _r, MAX_PII_PATTERN_LABEL_LENGTH as _s, FetchTokenConfig as _t, data_service_exports as a, Providers as aa, fileConfigSchema as ai, bedrockModels as an, isAssistantsEndpoint as ao, summarizationTriggerSchema as ar, AGENT_INSTRUCTION_FILTER_FIELDS as as, AgentCapabilities as at, register as b, anthropicSchema as ba, mimeTypeAliases as bi, defaultSocialLogins as bn, tBannerSchema as bo, MCPServersSchema as br, MESSAGE_FILTER_FIELDS as bs, InfiniteCollections as bt, getAccessRoles as c, ReasoningMode as ca, getEndpointFileConfig as ci, checkpointerTypeSchema as cn, isMythosClassModel as co, toolApprovalModeSchema as cr, FEEDBACK_FILTER_FIELDS as cs, BASE_PRINCIPAL_CONFIG_SECTIONS as ct, getAvailablePlugins as d, ReasoningSummary as da, imageTypeMapping as di, codeEnvironmentUserConfigSchema as dn, isUUID as do, turnstileOptionsSchema as dr, HITL_MESSAGE_FILTER_FIELDS as ds, CohereConstants as dt, EModelEndpoint as ea, documentParserMimeTypes as ei, azureGroupSchema as en, googleSettings as eo, splitMCPToolKey as er, feedbackTagKeySchema as es, principalSchema as et, getConversationById as f, SkillsScope as fa, inferMimeType as fi, codeEnvironmentUserSettingsSchema as fn, openAIBaseSchema as fo, turnstileSchema as fr, MAX_PII_CUSTOM_PATTERNS_TOTAL as fs, Constants as ft, getModels as g, agentsBaseSchema as ga, isPermissiveMimeConfig as gi, defaultAssistantsVersion as gn, paramEndpoints as go, visionModels as gr, MAX_PII_PATTERN_ID_LENGTH as gs, ErrorTypes as gt, getMCPServerConnectionStatus as h, Verbosity as ha, isBedrockDocumentType as hi, defaultAgentCapabilities as hn, openRouterSchema as ho, vertexModelConfigSchema as hr, MAX_PII_PATTERNS_PER_SOURCE as hs, EndpointURLs as ht, createPreset as i, MemoryScope as ia, fileConfig as ii, bedrockGuardrailConfigSchema as in, isAgentsEndpoint as io, summarizationConfigSchema as ir, ACTION_METADATA_FILTER_FIELDS as is, AUTH_USER_DOC_BY_ID_PREFIX as it, updateTokenCount as j, defaultAssistantFormValues as ja, modelSpecSubagentsSchema as ji, initialModelsConfig as jn, tSharedLinkSchema as jo, AuthTypeEnum as jr, fileFilterFieldSchema as js, SKILL_SYNC_MAX_DISCOVERY_DEPTH as jt, updateMessageContent as k, compactGoogleSchema as ka, getRefillEligibilityDate as ki, getSchemaDefaults as kn, tPresetSchema as ko, isProcessMCPServerConfig as kr, conversationTitleFilterFieldSchema as ks, RetentionMode as kt, getAgentApiKeys as l, ReasoningParameterFormat as la, imageExtRegex as li, cloudfrontConfigSchema as ln, isOpenAILikeProvider as lo, toolApprovalPolicySchema as lr, FILE_FILTER_FIELDS as ls, CacheKeys as lt, getEffectivePermissions as m, ThinkingLevel as ma, isAnthropicTextDocumentType as mi, contextPruningSchema as mn, openAISettings as mo, vertexAISchema as mr, MAX_PII_CUSTOM_REGEX_INSTRUCTIONS as ms, EImageOutputType as mt, clearAllConversations as n, ImageVisionTool as na, excelFileTypes as ni, baseEndpointSchema as nn, imageDetailValue as no, stripServerNamePrefix as nr, getTagsForRating as ns, updateResourcePermissionsRequestSchema as nt, deleteAgentApiKey as o, ReasoningContext as oa, fullMimeTypesList as oi, buildServerNameAliases as on, isDocumentSupportedProvider as oo, supportsBalanceCheck as or, CONVERSATION_STARTER_FILTER_FIELDS as os, AuthKeys as ot, getCustomConfigSpeech as p, ThinkingDisplay as pa, isAnthropicDocumentType as pi, configSchema as pn, openAISchema as po, validateVisionModel as pr, MAX_PII_CUSTOM_REGEX_CHARACTERS as ps, DEFAULT_MEMORY_MAX_INPUT_TOKENS as pt, accessRoleSchema as q, getGoogleThinkingBudgetBounds as qa, generateGoogleSchema as qi, rateLimitSchema as qn, resolveAllowedStatefulCodeEnvironments as qo, codeInterpreterMimeTypes as qr, unattributedAssistantContentSchema as qs, allowedAddressesSchema as qt, createAgentApiKey as r, MYTHOS_CLASS_FAMILIES as ra, excelMimeTypes as ri, bedrockEndpointSchema as rn, inputTokensIncludesCache as ro, stripServerNamePrefixes as rr, toMinimalFeedback as rs, updateResourcePermissionsResponseSchema as rt, deletePreset as s, ReasoningEffort as sa, getConfiguredMimeAccept as si, checkpointerSchema as sn, isImageVisionTool as so, toolApprovalHookConfigSchema as sr, CONVERSATION_TITLE_FILTER_FIELDS as ss, BASE_ONLY_CONFIG_SECTIONS as st, cancelMCPOAuth as t, ImageDetail as ta, endpointFileConfigSchema as ti, balanceSchema as tn, imageDetailNumeric as to, splitToolCallName as tr, getTagByKey as ts, resourcePermissionsResponseSchema as tt, getAllEffectivePermissions as u, ReasoningResponseKey as ua, imageMimeTypes as ui, codeEnvironmentPermissionDecisionSchema as un, isParamEndpoint as uo, transactionsSchema as ur, FILTER_PII_STARTER_PATTERNS as us, Capabilities as ut, getSharedLink as v, agentsSettings as va, megabyte as vi, defaultModels as vn, resolveAgentSkillsScope as vo, MCPOptionsSchema as vr, MAX_PII_PATTERN_LENGTH as vs, ForkOptions as vt, revokeAllUserKeys as w, cacheSubsetProviders as wa, supportedMimeTypes as wi, fileStorageSchema as wn, tExampleSchema as wo, SSEOptionsSchema as wr, STORED_MESSAGE_FILTER_FIELDS as ws, MAX_SUBAGENT_GRAPH_NODES as wt, reinitializeMCPServer as x, anthropicSettings as xa, retrievalMimeTypes as xi, endpointSchema as xn, tConversationSchema as xo, MCP_SERVER_TITLE_ERROR as xr, MODEL_PARAMETER_FILTER_FIELDS as xs, KnownEndpoints as xt, getSharedMessages as y, anthropicBaseSchema as ya, mergeFileConfig as yi, defaultRetrievalModels as yn, subagentThreadLineageSchema as yo, MCPServerUserInputSchema as yr, MEMORY_FILTER_FIELDS as ys, ImageDetailCost as yt, DynamicQueryKeys as z, eReasoningParameterFormatSchema as za, MAX_SUBAGENTS_CEILING as zi, modelConfigSchema as zn, Tools as zo, loginPage as zr, hasActivePiiFields as zs, SettingsTabValues as zt };
|
|
7634
8742
|
|
|
7635
|
-
//# sourceMappingURL=data-service-
|
|
8743
|
+
//# sourceMappingURL=data-service-CaB7saTP.mjs.map
|