librechat-data-provider 0.8.509 → 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-BsdHkdKS.mjs → data-service-CaB7saTP.mjs} +2175 -113
- package/dist/data-service-CaB7saTP.mjs.map +1 -0
- package/dist/{data-service-XTxx76uB.js → data-service-D5kHzBt-.js} +2806 -150
- package/dist/data-service-D5kHzBt-.js.map +1 -0
- package/dist/index.js +1403 -92
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1248 -93
- 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 +3 -3
- package/dist/types/agentToolOptions.d.ts +11 -0
- package/dist/types/api-endpoints.d.ts +28 -2
- package/dist/types/bedrock.d.ts +220 -0
- package/dist/types/cadence.d.ts +33 -0
- package/dist/types/codeEnvRef.d.ts +21 -0
- package/dist/types/config.d.ts +13457 -1573
- package/dist/types/data-service.d.ts +65 -14
- package/dist/types/feedback.d.ts +9 -1
- package/dist/types/file-config.d.ts +42 -5
- package/dist/types/filters.d.ts +1422 -0
- package/dist/types/generate.d.ts +85 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/types/keys.d.ts +29 -4
- package/dist/types/langchain.d.ts +4 -0
- package/dist/types/limits.d.ts +13 -0
- package/dist/types/mcp.d.ts +338 -228
- package/dist/types/messages.d.ts +13 -0
- package/dist/types/models.d.ts +840 -68
- package/dist/types/parameterSettings.d.ts +7 -3
- package/dist/types/parsers.d.ts +13 -1
- package/dist/types/permissions.d.ts +42 -1
- package/dist/types/providers.d.ts +36 -0
- package/dist/types/react-query/react-query-service.d.ts +2 -7
- package/dist/types/request.d.ts +4 -2
- package/dist/types/roles.d.ts +34 -0
- package/dist/types/runSteps.d.ts +59 -0
- package/dist/types/schemas.d.ts +1358 -34
- package/dist/types/stateful-code.d.ts +7 -0
- package/dist/types/types/agents.d.ts +303 -8
- package/dist/types/types/assistants.d.ts +170 -7
- package/dist/types/types/files.d.ts +29 -8
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/insights.d.ts +62 -0
- package/dist/types/types/mcpServers.d.ts +25 -0
- package/dist/types/types/mutations.d.ts +2 -0
- package/dist/types/types/queries.d.ts +47 -5
- package/dist/types/types/queuedTurns.d.ts +870 -0
- package/dist/types/types/runs.d.ts +206 -26
- package/dist/types/types/schedules.d.ts +306 -0
- package/dist/types/types/skills.d.ts +34 -6
- package/dist/types/types/subagents.d.ts +159 -0
- package/dist/types/types/web.d.ts +12 -2
- package/dist/types/types.d.ts +175 -2
- package/dist/types/upload.d.ts +2 -0
- package/package.json +7 -5
- package/dist/data-service-BsdHkdKS.mjs.map +0 -1
- package/dist/data-service-XTxx76uB.js.map +0 -1
|
@@ -30,6 +30,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
}) : target, mod));
|
|
31
31
|
//#endregion
|
|
32
32
|
let zod = require("zod");
|
|
33
|
+
let re2js = require("re2js");
|
|
33
34
|
let axios = require("axios");
|
|
34
35
|
axios = __toESM(axios);
|
|
35
36
|
//#region src/utils.ts
|
|
@@ -97,6 +98,258 @@ function normalizeEndpointName(name = "") {
|
|
|
97
98
|
return name.toLowerCase() === "ollama" ? "ollama" : name;
|
|
98
99
|
}
|
|
99
100
|
//#endregion
|
|
101
|
+
//#region src/filters.ts
|
|
102
|
+
const FILTER_PII_STARTER_PATTERNS = [
|
|
103
|
+
"sk_prefix",
|
|
104
|
+
"bearer_header",
|
|
105
|
+
"api_key_header"
|
|
106
|
+
];
|
|
107
|
+
const MAX_PII_PATTERNS_PER_SOURCE = 256;
|
|
108
|
+
const MAX_PII_PATTERN_LENGTH = 512;
|
|
109
|
+
const MAX_PII_PATTERN_ID_LENGTH = 256;
|
|
110
|
+
const MAX_PII_PATTERN_LABEL_LENGTH = 512;
|
|
111
|
+
const MAX_PII_CUSTOM_REGEX_CHARACTERS = 8192;
|
|
112
|
+
const MAX_PII_CUSTOM_REGEX_INSTRUCTIONS = 8192;
|
|
113
|
+
const MAX_PII_CUSTOM_PATTERNS_TOTAL = 256;
|
|
114
|
+
const MAX_PII_REGEX_SIZE_CACHE_ENTRIES = 512;
|
|
115
|
+
const PII_REGEX_PROGRAM_SIZE_CACHE = /* @__PURE__ */ new Map();
|
|
116
|
+
function getPiiRegexProgramSize(pattern) {
|
|
117
|
+
if (PII_REGEX_PROGRAM_SIZE_CACHE.has(pattern)) return PII_REGEX_PROGRAM_SIZE_CACHE.get(pattern) ?? null;
|
|
118
|
+
let programSize = null;
|
|
119
|
+
let compiled;
|
|
120
|
+
try {
|
|
121
|
+
compiled = re2js.RE2JS.compile(pattern);
|
|
122
|
+
const candidate = compiled.programSize();
|
|
123
|
+
if (Number.isSafeInteger(candidate) && candidate > 0) programSize = candidate;
|
|
124
|
+
} catch {
|
|
125
|
+
programSize = null;
|
|
126
|
+
} finally {
|
|
127
|
+
compiled?.reset();
|
|
128
|
+
}
|
|
129
|
+
if (PII_REGEX_PROGRAM_SIZE_CACHE.size >= MAX_PII_REGEX_SIZE_CACHE_ENTRIES) PII_REGEX_PROGRAM_SIZE_CACHE.clear();
|
|
130
|
+
PII_REGEX_PROGRAM_SIZE_CACHE.set(pattern, programSize);
|
|
131
|
+
return programSize;
|
|
132
|
+
}
|
|
133
|
+
const MESSAGE_FILTER_FIELDS = [
|
|
134
|
+
"name",
|
|
135
|
+
"text",
|
|
136
|
+
"summary",
|
|
137
|
+
"quote",
|
|
138
|
+
"answer",
|
|
139
|
+
"decision_response",
|
|
140
|
+
"decision_reason",
|
|
141
|
+
"content_part",
|
|
142
|
+
"attachment_reference",
|
|
143
|
+
"assembled_context"
|
|
144
|
+
];
|
|
145
|
+
const HITL_MESSAGE_FILTER_FIELDS = [
|
|
146
|
+
"answer",
|
|
147
|
+
"decision_response",
|
|
148
|
+
"decision_reason"
|
|
149
|
+
];
|
|
150
|
+
const REQUEST_ONLY_MESSAGE_FILTER_FIELDS = new Set(HITL_MESSAGE_FILTER_FIELDS);
|
|
151
|
+
/** Message fields structurally recoverable without exact semantic provenance. */
|
|
152
|
+
const STORED_MESSAGE_FILTER_FIELDS = MESSAGE_FILTER_FIELDS.filter((field) => !REQUEST_ONLY_MESSAGE_FILTER_FIELDS.has(field));
|
|
153
|
+
const PROMPT_FILTER_FIELDS = [
|
|
154
|
+
"name",
|
|
155
|
+
"description",
|
|
156
|
+
"oneliner",
|
|
157
|
+
"category",
|
|
158
|
+
"command",
|
|
159
|
+
"text",
|
|
160
|
+
"preset_text",
|
|
161
|
+
"system",
|
|
162
|
+
"context",
|
|
163
|
+
"instructions",
|
|
164
|
+
"additional_instructions",
|
|
165
|
+
"greeting",
|
|
166
|
+
"example_input",
|
|
167
|
+
"example_output"
|
|
168
|
+
];
|
|
169
|
+
const AGENT_INSTRUCTION_FILTER_FIELDS = [
|
|
170
|
+
"name",
|
|
171
|
+
"category",
|
|
172
|
+
"description",
|
|
173
|
+
"instructions",
|
|
174
|
+
"additional_instructions",
|
|
175
|
+
"edge_description",
|
|
176
|
+
"edge_prompt",
|
|
177
|
+
"edge_prompt_key",
|
|
178
|
+
"artifacts",
|
|
179
|
+
"support_contact_name",
|
|
180
|
+
"support_contact_email"
|
|
181
|
+
];
|
|
182
|
+
const CONVERSATION_STARTER_FILTER_FIELDS = ["text"];
|
|
183
|
+
const CONVERSATION_TITLE_FILTER_FIELDS = ["title"];
|
|
184
|
+
const FEEDBACK_FILTER_FIELDS = ["text"];
|
|
185
|
+
const SKILL_FILTER_FIELDS = [
|
|
186
|
+
"name",
|
|
187
|
+
"display_title",
|
|
188
|
+
"description",
|
|
189
|
+
"category",
|
|
190
|
+
"frontmatter",
|
|
191
|
+
"instructions",
|
|
192
|
+
"imported_text",
|
|
193
|
+
"file_name",
|
|
194
|
+
"file_text"
|
|
195
|
+
];
|
|
196
|
+
const MEMORY_FILTER_FIELDS = [
|
|
197
|
+
"key",
|
|
198
|
+
"value",
|
|
199
|
+
"summary"
|
|
200
|
+
];
|
|
201
|
+
const FILE_FILTER_FIELDS = [
|
|
202
|
+
"name",
|
|
203
|
+
"content",
|
|
204
|
+
"extracted_text",
|
|
205
|
+
"transcript",
|
|
206
|
+
"uri"
|
|
207
|
+
];
|
|
208
|
+
const TOOL_ARGUMENT_FILTER_FIELDS = [
|
|
209
|
+
"name",
|
|
210
|
+
"arguments",
|
|
211
|
+
"output"
|
|
212
|
+
];
|
|
213
|
+
const MODEL_PARAMETER_FILTER_FIELDS = [
|
|
214
|
+
"stop",
|
|
215
|
+
"request_fields",
|
|
216
|
+
"response_format",
|
|
217
|
+
"metadata"
|
|
218
|
+
];
|
|
219
|
+
const ACTION_METADATA_FILTER_FIELDS = [
|
|
220
|
+
"raw_spec",
|
|
221
|
+
"domain",
|
|
222
|
+
"privacy_policy_url",
|
|
223
|
+
"authorization_type",
|
|
224
|
+
"custom_auth_header",
|
|
225
|
+
"authorization_content_type",
|
|
226
|
+
"authorization_url",
|
|
227
|
+
"client_url",
|
|
228
|
+
"scope",
|
|
229
|
+
"token_exchange_method",
|
|
230
|
+
"api_key",
|
|
231
|
+
"oauth_client_id",
|
|
232
|
+
"oauth_client_secret"
|
|
233
|
+
];
|
|
234
|
+
const messageFilterFieldSchema = zod.z.enum(MESSAGE_FILTER_FIELDS);
|
|
235
|
+
const promptFilterFieldSchema = zod.z.enum(PROMPT_FILTER_FIELDS);
|
|
236
|
+
const agentInstructionFilterFieldSchema = zod.z.enum(AGENT_INSTRUCTION_FILTER_FIELDS);
|
|
237
|
+
const conversationStarterFilterFieldSchema = zod.z.enum(CONVERSATION_STARTER_FILTER_FIELDS);
|
|
238
|
+
const conversationTitleFilterFieldSchema = zod.z.enum(CONVERSATION_TITLE_FILTER_FIELDS);
|
|
239
|
+
const feedbackFilterFieldSchema = zod.z.enum(FEEDBACK_FILTER_FIELDS);
|
|
240
|
+
const skillFilterFieldSchema = zod.z.enum(SKILL_FILTER_FIELDS);
|
|
241
|
+
const memoryFilterFieldSchema = zod.z.enum(MEMORY_FILTER_FIELDS);
|
|
242
|
+
const fileFilterFieldSchema = zod.z.enum(FILE_FILTER_FIELDS);
|
|
243
|
+
const toolArgumentFilterFieldSchema = zod.z.enum(TOOL_ARGUMENT_FILTER_FIELDS);
|
|
244
|
+
const modelParameterFilterFieldSchema = zod.z.enum(MODEL_PARAMETER_FILTER_FIELDS);
|
|
245
|
+
const filterPiiStarterPatternSchema = zod.z.enum(FILTER_PII_STARTER_PATTERNS);
|
|
246
|
+
const filterPiiActionSchema = zod.z.enum(["block", "audit"]);
|
|
247
|
+
const actionMetadataFilterFieldSchema = zod.z.enum(ACTION_METADATA_FILTER_FIELDS);
|
|
248
|
+
const unattributedAssistantContentSchema = zod.z.enum(["model_output", "inspect"]);
|
|
249
|
+
const userSubmittedMessageFieldPathSchema = zod.z.object({
|
|
250
|
+
path: zod.z.string().startsWith("/").max(2048),
|
|
251
|
+
field: zod.z.enum(HITL_MESSAGE_FILTER_FIELDS)
|
|
252
|
+
}).strict();
|
|
253
|
+
const UNINSPECTABLE_FILE_FIELDS = new Set([
|
|
254
|
+
"content",
|
|
255
|
+
"extracted_text",
|
|
256
|
+
"transcript"
|
|
257
|
+
]);
|
|
258
|
+
/**
|
|
259
|
+
* An omitted starter selection enables the built-in catalog. An explicit
|
|
260
|
+
* empty selection disables it, so a source is active only when custom rules
|
|
261
|
+
* remain. This mirrors the documented filter semantics without compiling
|
|
262
|
+
* regular expressions.
|
|
263
|
+
*/
|
|
264
|
+
function hasActivePiiPatterns(config) {
|
|
265
|
+
return config != null && (config.starterPatterns == null || config.starterPatterns.length > 0 || (config.customPatterns?.length ?? 0) > 0);
|
|
266
|
+
}
|
|
267
|
+
/** Returns whether an active PII rule can inspect at least one candidate field. */
|
|
268
|
+
function hasActivePiiFields(config, candidates) {
|
|
269
|
+
return hasActivePiiPatterns(config) && (config?.fields == null || candidates.some((field) => config.fields?.includes(field)));
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Returns whether a parsed source-aware config can enforce any rule. An
|
|
273
|
+
* explicit fail-close file policy remains active even without text patterns.
|
|
274
|
+
*/
|
|
275
|
+
function hasActiveFiltersConfig(filters) {
|
|
276
|
+
if (filters == null) return false;
|
|
277
|
+
if (filters.messages?.unattributedAssistantContent === "inspect") return true;
|
|
278
|
+
if ([
|
|
279
|
+
filters.messages?.pii,
|
|
280
|
+
filters.prompts?.pii,
|
|
281
|
+
filters.agentInstructions?.pii,
|
|
282
|
+
filters.conversationStarters?.pii,
|
|
283
|
+
filters.conversationTitles?.pii,
|
|
284
|
+
filters.feedback?.pii,
|
|
285
|
+
filters.skills?.pii,
|
|
286
|
+
filters.memories?.pii,
|
|
287
|
+
filters.files?.pii,
|
|
288
|
+
filters.toolArguments?.pii,
|
|
289
|
+
filters.modelParameters?.pii,
|
|
290
|
+
filters.actionMetadata?.pii
|
|
291
|
+
].some(hasActivePiiPatterns)) return true;
|
|
292
|
+
const filePii = filters.files?.pii;
|
|
293
|
+
return filePii?.uninspectable === "block" && (filePii.fields == null || filePii.fields.some((field) => UNINSPECTABLE_FILE_FIELDS.has(field)));
|
|
294
|
+
}
|
|
295
|
+
const filterPiiRegexSchema = zod.z.string().min(1).max(512).refine((value) => getPiiRegexProgramSize(value) != null, { message: "Regex must use supported linear-time syntax" });
|
|
296
|
+
const filterPiiCustomPatternSchema = zod.z.object({
|
|
297
|
+
id: zod.z.string().min(1).max(256),
|
|
298
|
+
label: zod.z.string().min(1).max(512),
|
|
299
|
+
regex: filterPiiRegexSchema
|
|
300
|
+
}).strict();
|
|
301
|
+
function createPiiFilterSchema(fieldSchema) {
|
|
302
|
+
return zod.z.object({
|
|
303
|
+
action: filterPiiActionSchema.optional(),
|
|
304
|
+
fields: zod.z.array(fieldSchema).min(1).max(256).optional(),
|
|
305
|
+
starterPatterns: zod.z.array(filterPiiStarterPatternSchema).max(256).optional(),
|
|
306
|
+
customPatterns: zod.z.array(filterPiiCustomPatternSchema).max(256).optional()
|
|
307
|
+
}).strict();
|
|
308
|
+
}
|
|
309
|
+
function createSourceFilterSchema(fieldSchema) {
|
|
310
|
+
return zod.z.object({ pii: createPiiFilterSchema(fieldSchema).optional() }).strict();
|
|
311
|
+
}
|
|
312
|
+
const messageSourceFilterSchema = zod.z.object({
|
|
313
|
+
pii: createPiiFilterSchema(messageFilterFieldSchema).optional(),
|
|
314
|
+
unattributedAssistantContent: unattributedAssistantContentSchema.optional()
|
|
315
|
+
}).strict();
|
|
316
|
+
const fileSourceFilterSchema = zod.z.object({ pii: createPiiFilterSchema(fileFilterFieldSchema).extend({ uninspectable: zod.z.enum(["allow", "block"]).optional() }).optional() }).strict();
|
|
317
|
+
const filtersConfigSchema = zod.z.object({
|
|
318
|
+
messages: messageSourceFilterSchema.optional(),
|
|
319
|
+
prompts: createSourceFilterSchema(promptFilterFieldSchema).optional(),
|
|
320
|
+
agentInstructions: createSourceFilterSchema(agentInstructionFilterFieldSchema).optional(),
|
|
321
|
+
conversationStarters: createSourceFilterSchema(conversationStarterFilterFieldSchema).optional(),
|
|
322
|
+
conversationTitles: createSourceFilterSchema(conversationTitleFilterFieldSchema).optional(),
|
|
323
|
+
feedback: createSourceFilterSchema(feedbackFilterFieldSchema).optional(),
|
|
324
|
+
skills: createSourceFilterSchema(skillFilterFieldSchema).optional(),
|
|
325
|
+
memories: createSourceFilterSchema(memoryFilterFieldSchema).optional(),
|
|
326
|
+
files: fileSourceFilterSchema.optional(),
|
|
327
|
+
toolArguments: createSourceFilterSchema(toolArgumentFilterFieldSchema).optional(),
|
|
328
|
+
modelParameters: createSourceFilterSchema(modelParameterFilterFieldSchema).optional(),
|
|
329
|
+
actionMetadata: createSourceFilterSchema(actionMetadataFilterFieldSchema).optional()
|
|
330
|
+
}).strict().superRefine((filters, context) => {
|
|
331
|
+
let customPatterns = 0;
|
|
332
|
+
let regexCharacters = 0;
|
|
333
|
+
let regexInstructions = 0;
|
|
334
|
+
for (const source of Object.values(filters)) for (const pattern of source?.pii?.customPatterns ?? []) {
|
|
335
|
+
customPatterns++;
|
|
336
|
+
regexCharacters += pattern.regex.length;
|
|
337
|
+
regexInstructions += getPiiRegexProgramSize(pattern.regex) ?? 0;
|
|
338
|
+
}
|
|
339
|
+
if (customPatterns > 256) context.addIssue({
|
|
340
|
+
code: zod.z.ZodIssueCode.custom,
|
|
341
|
+
message: `At most 256 custom PII patterns may be configured in total`
|
|
342
|
+
});
|
|
343
|
+
if (regexCharacters > 8192) context.addIssue({
|
|
344
|
+
code: zod.z.ZodIssueCode.custom,
|
|
345
|
+
message: `Custom PII regexes may contain at most ${MAX_PII_CUSTOM_REGEX_CHARACTERS} characters in total`
|
|
346
|
+
});
|
|
347
|
+
if (regexInstructions > 8192) context.addIssue({
|
|
348
|
+
code: zod.z.ZodIssueCode.custom,
|
|
349
|
+
message: `Custom PII regexes may compile to at most ${MAX_PII_CUSTOM_REGEX_INSTRUCTIONS} instructions in total`
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
//#endregion
|
|
100
353
|
//#region src/feedback.ts
|
|
101
354
|
const FEEDBACK_RATINGS = ["thumbsUp", "thumbsDown"];
|
|
102
355
|
const FEEDBACK_REASON_KEYS = [
|
|
@@ -189,6 +442,9 @@ const feedbackSchema = zod.z.object({
|
|
|
189
442
|
rating: feedbackRatingSchema,
|
|
190
443
|
tag: feedbackTagKeySchema,
|
|
191
444
|
text: zod.z.string().max(1024).optional()
|
|
445
|
+
}).refine(({ rating, tag }) => FEEDBACK_TAGS.some((feedbackTag) => feedbackTag.key === tag && feedbackTag.direction === rating), {
|
|
446
|
+
message: "Feedback tag does not match rating",
|
|
447
|
+
path: ["tag"]
|
|
192
448
|
});
|
|
193
449
|
function toMinimalFeedback(feedback) {
|
|
194
450
|
if (!feedback?.rating || !feedback?.tag || !feedback.tag.key) return;
|
|
@@ -203,6 +459,25 @@ function getTagByKey(key) {
|
|
|
203
459
|
return FEEDBACK_TAGS.find((tag) => tag.key === key);
|
|
204
460
|
}
|
|
205
461
|
//#endregion
|
|
462
|
+
//#region src/stateful-code.ts
|
|
463
|
+
const STATEFUL_CODE_ENVIRONMENTS = [
|
|
464
|
+
"user",
|
|
465
|
+
"agent-user",
|
|
466
|
+
"conversation"
|
|
467
|
+
];
|
|
468
|
+
/** Resolve a deployment allowlist in stable UI order. An omitted value preserves
|
|
469
|
+
* the backward-compatible behavior where every environment is available. */
|
|
470
|
+
function resolveAllowedStatefulCodeEnvironments(configured) {
|
|
471
|
+
if (configured == null) return [...STATEFUL_CODE_ENVIRONMENTS];
|
|
472
|
+
const configuredSet = new Set(configured);
|
|
473
|
+
return STATEFUL_CODE_ENVIRONMENTS.filter((environment) => configuredSet.has(environment));
|
|
474
|
+
}
|
|
475
|
+
/** Keep an allowed preference, otherwise select the first deployment-allowed scope. */
|
|
476
|
+
function resolveStatefulCodeEnvironment(preferred, configured) {
|
|
477
|
+
const allowed = resolveAllowedStatefulCodeEnvironments(configured);
|
|
478
|
+
return preferred != null && allowed.includes(preferred) ? preferred : allowed[0];
|
|
479
|
+
}
|
|
480
|
+
//#endregion
|
|
206
481
|
//#region src/types/assistants.ts
|
|
207
482
|
let Tools = /* @__PURE__ */ function(Tools) {
|
|
208
483
|
Tools["execute_code"] = "execute_code";
|
|
@@ -484,6 +759,7 @@ let ReasoningEffort = /* @__PURE__ */ function(ReasoningEffort) {
|
|
|
484
759
|
ReasoningEffort["medium"] = "medium";
|
|
485
760
|
ReasoningEffort["high"] = "high";
|
|
486
761
|
ReasoningEffort["xhigh"] = "xhigh";
|
|
762
|
+
ReasoningEffort["max"] = "max";
|
|
487
763
|
return ReasoningEffort;
|
|
488
764
|
}({});
|
|
489
765
|
let ReasoningParameterFormat = /* @__PURE__ */ function(ReasoningParameterFormat) {
|
|
@@ -550,6 +826,21 @@ let ThinkingLevel = /* @__PURE__ */ function(ThinkingLevel) {
|
|
|
550
826
|
ThinkingLevel["high"] = "high";
|
|
551
827
|
return ThinkingLevel;
|
|
552
828
|
}({});
|
|
829
|
+
/** OpenAI Responses API `reasoning.mode` (GPT-5.6+). */
|
|
830
|
+
let ReasoningMode = /* @__PURE__ */ function(ReasoningMode) {
|
|
831
|
+
ReasoningMode["unset"] = "";
|
|
832
|
+
ReasoningMode["standard"] = "standard";
|
|
833
|
+
ReasoningMode["pro"] = "pro";
|
|
834
|
+
return ReasoningMode;
|
|
835
|
+
}({});
|
|
836
|
+
/** OpenAI Responses API `reasoning.context` (GPT-5.6+). */
|
|
837
|
+
let ReasoningContext = /* @__PURE__ */ function(ReasoningContext) {
|
|
838
|
+
ReasoningContext["unset"] = "";
|
|
839
|
+
ReasoningContext["auto"] = "auto";
|
|
840
|
+
ReasoningContext["current_turn"] = "current_turn";
|
|
841
|
+
ReasoningContext["all_turns"] = "all_turns";
|
|
842
|
+
return ReasoningContext;
|
|
843
|
+
}({});
|
|
553
844
|
const imageDetailNumeric = {
|
|
554
845
|
["low"]: 0,
|
|
555
846
|
["auto"]: 1,
|
|
@@ -569,6 +860,8 @@ const eThinkingDisplaySchema = zod.z.nativeEnum(ThinkingDisplay);
|
|
|
569
860
|
const eReasoningSummarySchema = zod.z.nativeEnum(ReasoningSummary);
|
|
570
861
|
const eVerbositySchema = zod.z.nativeEnum(Verbosity);
|
|
571
862
|
const eThinkingLevelSchema = zod.z.nativeEnum(ThinkingLevel);
|
|
863
|
+
const eReasoningModeSchema = zod.z.nativeEnum(ReasoningMode);
|
|
864
|
+
const eReasoningContextSchema = zod.z.nativeEnum(ReasoningContext);
|
|
572
865
|
const defaultAssistantFormValues = {
|
|
573
866
|
assistant: "",
|
|
574
867
|
id: "",
|
|
@@ -600,6 +893,9 @@ const defaultAgentFormValues = {
|
|
|
600
893
|
["execute_code"]: false,
|
|
601
894
|
["file_search"]: false,
|
|
602
895
|
["web_search"]: false,
|
|
896
|
+
["memory"]: false,
|
|
897
|
+
stateful_code_environment: "user",
|
|
898
|
+
code_environment_id: void 0,
|
|
603
899
|
category: "general",
|
|
604
900
|
support_contact: {
|
|
605
901
|
name: "",
|
|
@@ -611,8 +907,14 @@ const defaultAgentFormValues = {
|
|
|
611
907
|
/** Master toggle for skill use on this agent. `true` activates skills
|
|
612
908
|
* (full catalog unless `skills` narrows it). Anything else = inactive. */
|
|
613
909
|
skills_enabled: void 0,
|
|
910
|
+
/** Enables runtime skill creation without exposing an existing skill catalog. */
|
|
911
|
+
skill_authoring_enabled: void 0,
|
|
912
|
+
/** Explicit catalog scope. Missing preserves the legacy enabled + empty = all behavior. */
|
|
913
|
+
skills_scope: void 0,
|
|
614
914
|
/** `undefined` = feature disabled by default (no subagent tool injected). */
|
|
615
|
-
subagents: void 0
|
|
915
|
+
subagents: void 0,
|
|
916
|
+
/** Memory partition: 'agent' isolates memories per (user, agent); default shared pool */
|
|
917
|
+
memory_scope: void 0
|
|
616
918
|
};
|
|
617
919
|
const ImageVisionTool = {
|
|
618
920
|
type: "function",
|
|
@@ -626,6 +928,8 @@ const ImageVisionTool = {
|
|
|
626
928
|
}
|
|
627
929
|
}
|
|
628
930
|
};
|
|
931
|
+
/** Structural on purpose: accepts assistants tools/tool calls and agents function tool
|
|
932
|
+
* calls alike — the check only ever reads `type` and `function.name`. */
|
|
629
933
|
const isImageVisionTool = (tool) => tool.type === "function" && tool.function?.name === ImageVisionTool.function?.name;
|
|
630
934
|
const openAISettings = {
|
|
631
935
|
model: { default: "gpt-4o-mini" },
|
|
@@ -684,8 +988,45 @@ const getGoogleMaxOutputTokens = (modelName) => {
|
|
|
684
988
|
}
|
|
685
989
|
return GOOGLE_LEGACY_MAX_OUTPUT;
|
|
686
990
|
};
|
|
991
|
+
/**
|
|
992
|
+
* Per-model thinking budget bounds, documented in
|
|
993
|
+
* `com_endpoint_google_thinking_budget`: Gemini 2.5 Pro accepts 128-32,768,
|
|
994
|
+
* Flash accepts 0-24,576, and Flash Lite accepts 512-24,576. The generic
|
|
995
|
+
* 32,000 in the shared definition both under-limits Pro and lets invalid
|
|
996
|
+
* Flash values through.
|
|
997
|
+
*
|
|
998
|
+
* `-1` remains the "decide automatically" sentinel and is not part of these
|
|
999
|
+
* floors. Callers must keep `range.min` at -1 and apply `min` only to
|
|
1000
|
+
* non-negative values.
|
|
1001
|
+
*/
|
|
1002
|
+
const GOOGLE_THINKING_BUDGET_PRO_MAX = 32768;
|
|
1003
|
+
const GOOGLE_THINKING_BUDGET_FLASH_MAX = 24576;
|
|
1004
|
+
const GOOGLE_THINKING_BUDGET_PRO_MIN = 128;
|
|
1005
|
+
const GOOGLE_THINKING_BUDGET_FLASH_MIN = 0;
|
|
1006
|
+
const GOOGLE_THINKING_BUDGET_FLASH_LITE_MIN = 512;
|
|
1007
|
+
const getGoogleThinkingBudgetBounds = (modelName) => {
|
|
1008
|
+
if (!/gemini-2\.5/i.test(modelName)) return;
|
|
1009
|
+
if (/flash[-_.]?lite/i.test(modelName)) return {
|
|
1010
|
+
min: GOOGLE_THINKING_BUDGET_FLASH_LITE_MIN,
|
|
1011
|
+
max: GOOGLE_THINKING_BUDGET_FLASH_MAX
|
|
1012
|
+
};
|
|
1013
|
+
if (/flash/i.test(modelName)) return {
|
|
1014
|
+
min: GOOGLE_THINKING_BUDGET_FLASH_MIN,
|
|
1015
|
+
max: GOOGLE_THINKING_BUDGET_FLASH_MAX
|
|
1016
|
+
};
|
|
1017
|
+
if (/pro/i.test(modelName)) return {
|
|
1018
|
+
min: GOOGLE_THINKING_BUDGET_PRO_MIN,
|
|
1019
|
+
max: GOOGLE_THINKING_BUDGET_PRO_MAX
|
|
1020
|
+
};
|
|
1021
|
+
};
|
|
1022
|
+
const getGoogleThinkingBudgetMax = (modelName) => getGoogleThinkingBudgetBounds(modelName)?.max;
|
|
687
1023
|
const googleSettings = {
|
|
688
1024
|
model: { default: "gemini-1.5-flash-latest" },
|
|
1025
|
+
maxContextTokens: {
|
|
1026
|
+
min: 10,
|
|
1027
|
+
max: 2e6,
|
|
1028
|
+
step: 1e3
|
|
1029
|
+
},
|
|
689
1030
|
maxOutputTokens: {
|
|
690
1031
|
min: 1,
|
|
691
1032
|
max: GOOGLE_MAX_OUTPUT,
|
|
@@ -732,6 +1073,7 @@ const CLAUDE_4_64K_MAX_OUTPUT = 64e3;
|
|
|
732
1073
|
const CLAUDE_32K_MAX_OUTPUT = 32e3;
|
|
733
1074
|
const DEFAULT_MAX_OUTPUT = 8192;
|
|
734
1075
|
const LEGACY_ANTHROPIC_MAX_OUTPUT = 4096;
|
|
1076
|
+
const CLAUDE_SONNET_128K_OUTPUT_PATTERN = /claude-sonnet[-.]?(?:4[-.]?(?:[6-9]|\d{2})|[5-9]|\d{2,})(?=$|[^0-9])/;
|
|
735
1077
|
/**
|
|
736
1078
|
* Claude "Mythos-class" model families — new top-level classes (peers of
|
|
737
1079
|
* `opus`/`sonnet`/`haiku`) that ship with the post-Opus-4.7 modern profile:
|
|
@@ -775,6 +1117,7 @@ const anthropicSettings = {
|
|
|
775
1117
|
reset: (modelName) => {
|
|
776
1118
|
if (isMythosClassModel(modelName)) return ANTHROPIC_MAX_OUTPUT;
|
|
777
1119
|
if (/claude-opus[-.]?(?:4[-.]?(?:[6-9]|\d{2,})|[5-9]|\d{2,})/.test(modelName)) return ANTHROPIC_MAX_OUTPUT;
|
|
1120
|
+
if (CLAUDE_SONNET_128K_OUTPUT_PATTERN.test(modelName)) return ANTHROPIC_MAX_OUTPUT;
|
|
778
1121
|
if (/claude-(?:sonnet|haiku)[-.]?[4-9]/.test(modelName)) return CLAUDE_4_64K_MAX_OUTPUT;
|
|
779
1122
|
if (/claude-opus[-.]?(?:[5-9]|4[-.]?([5-9]|\d{2,}))/.test(modelName)) return CLAUDE_4_64K_MAX_OUTPUT;
|
|
780
1123
|
if (/claude-opus[-.]?[4-9]/.test(modelName)) return CLAUDE_32K_MAX_OUTPUT;
|
|
@@ -789,6 +1132,10 @@ const anthropicSettings = {
|
|
|
789
1132
|
if (value > ANTHROPIC_MAX_OUTPUT) return ANTHROPIC_MAX_OUTPUT;
|
|
790
1133
|
return value;
|
|
791
1134
|
}
|
|
1135
|
+
if (CLAUDE_SONNET_128K_OUTPUT_PATTERN.test(modelName)) {
|
|
1136
|
+
if (value > ANTHROPIC_MAX_OUTPUT) return ANTHROPIC_MAX_OUTPUT;
|
|
1137
|
+
return value;
|
|
1138
|
+
}
|
|
792
1139
|
if (/claude-(?:sonnet|haiku)[-.]?[4-9]/.test(modelName) && value > CLAUDE_4_64K_MAX_OUTPUT) return CLAUDE_4_64K_MAX_OUTPUT;
|
|
793
1140
|
if (/claude-opus[-.]?(?:[5-9]|4[-.]?([5-9]|\d{2,}))/.test(modelName)) {
|
|
794
1141
|
if (value > CLAUDE_4_64K_MAX_OUTPUT) return CLAUDE_4_64K_MAX_OUTPUT;
|
|
@@ -898,12 +1245,21 @@ const tPluginSchema = zod.z.object({
|
|
|
898
1245
|
authenticated: zod.z.boolean().optional(),
|
|
899
1246
|
chatMenu: zod.z.boolean().optional(),
|
|
900
1247
|
isButton: zod.z.boolean().optional(),
|
|
901
|
-
toolkit: zod.z.boolean().optional()
|
|
1248
|
+
toolkit: zod.z.boolean().optional(),
|
|
1249
|
+
/** Raw upstream tool name when the model-facing key stripped a redundant
|
|
1250
|
+
* server-name prefix — proves upstream identity for legacy id migration. */
|
|
1251
|
+
serverToolName: zod.z.string().optional()
|
|
902
1252
|
});
|
|
903
1253
|
const tExampleSchema = zod.z.object({
|
|
904
1254
|
input: zod.z.object({ content: zod.z.string() }),
|
|
905
1255
|
output: zod.z.object({ content: zod.z.string() })
|
|
906
1256
|
});
|
|
1257
|
+
/** Compact context-fading tier persisted beside a message's calibration ratio. */
|
|
1258
|
+
const agentFadingTierSchema = zod.z.object({
|
|
1259
|
+
v: zod.z.literal(1),
|
|
1260
|
+
budgetTokens: zod.z.number().positive(),
|
|
1261
|
+
masked: zod.z.boolean()
|
|
1262
|
+
});
|
|
907
1263
|
const tMessageSchema = zod.z.object({
|
|
908
1264
|
messageId: zod.z.string(),
|
|
909
1265
|
endpoint: zod.z.string().optional(),
|
|
@@ -920,6 +1276,12 @@ const tMessageSchema = zod.z.object({
|
|
|
920
1276
|
/** @deprecated */
|
|
921
1277
|
generation: zod.z.string().nullable().optional(),
|
|
922
1278
|
isCreatedByUser: zod.z.boolean(),
|
|
1279
|
+
/** True when the complete stored row came from outside the model. */
|
|
1280
|
+
isUserSubmitted: zod.z.boolean().optional(),
|
|
1281
|
+
/** JSON pointers to caller-authored fields in an otherwise mixed model response. */
|
|
1282
|
+
userSubmittedPaths: zod.z.array(zod.z.string().startsWith("/")).optional(),
|
|
1283
|
+
/** Exact HITL message-field identity for caller-authored values stored in mixed responses. */
|
|
1284
|
+
userSubmittedMessageFieldPaths: zod.z.array(userSubmittedMessageFieldPathSchema).optional(),
|
|
923
1285
|
isTemporary: zod.z.boolean().optional(),
|
|
924
1286
|
expiredAt: zod.z.string().nullable().optional(),
|
|
925
1287
|
error: zod.z.boolean().optional(),
|
|
@@ -939,7 +1301,9 @@ const tMessageSchema = zod.z.object({
|
|
|
939
1301
|
tokenCount: zod.z.number().optional(),
|
|
940
1302
|
contextMeta: zod.z.object({
|
|
941
1303
|
calibrationRatio: zod.z.number().optional().describe("EMA ratio of provider-reported vs local token estimates; seeds the pruner on subsequent runs"),
|
|
942
|
-
encoding: zod.z.string().optional().describe("Tokenizer encoding used when this ratio was computed (e.g. \"claude\", \"o200k_base\")")
|
|
1304
|
+
encoding: zod.z.string().optional().describe("Tokenizer encoding used when this ratio was computed (e.g. \"claude\", \"o200k_base\")"),
|
|
1305
|
+
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"),
|
|
1306
|
+
fadingTiers: zod.z.array(agentFadingTierSchema.extend({ agentId: zod.z.string().min(1) })).optional().describe("Latched context-fading tiers keyed by agent ID, stored as entries")
|
|
943
1307
|
}).optional(),
|
|
944
1308
|
/**
|
|
945
1309
|
* Skill names the user invoked manually via the `$` popover on this turn.
|
|
@@ -967,6 +1331,29 @@ const tMessageSchema = zod.z.object({
|
|
|
967
1331
|
*/
|
|
968
1332
|
quotes: zod.z.array(zod.z.string()).optional()
|
|
969
1333
|
});
|
|
1334
|
+
/**
|
|
1335
|
+
* Which memory partition an agent reads/writes.
|
|
1336
|
+
* `user` = the shared personal pool (default); `agent` = a partition
|
|
1337
|
+
* isolated per (user, agent) so the agent only sees its own memories.
|
|
1338
|
+
*/
|
|
1339
|
+
let MemoryScope = /* @__PURE__ */ function(MemoryScope) {
|
|
1340
|
+
MemoryScope["user"] = "user";
|
|
1341
|
+
MemoryScope["agent"] = "agent";
|
|
1342
|
+
return MemoryScope;
|
|
1343
|
+
}({});
|
|
1344
|
+
/** Catalog exposure for a persisted agent with skills enabled. */
|
|
1345
|
+
let SkillsScope = /* @__PURE__ */ function(SkillsScope) {
|
|
1346
|
+
SkillsScope["all"] = "all";
|
|
1347
|
+
SkillsScope["selected"] = "selected";
|
|
1348
|
+
SkillsScope["none"] = "none";
|
|
1349
|
+
return SkillsScope;
|
|
1350
|
+
}({});
|
|
1351
|
+
/** Resolves explicit and legacy persisted-agent skill catalog states. */
|
|
1352
|
+
function resolveAgentSkillsScope(skills, enabled, scope) {
|
|
1353
|
+
if (enabled !== true) return "none";
|
|
1354
|
+
if (scope !== void 0) return scope;
|
|
1355
|
+
return (skills ?? []).length > 0 ? "selected" : "all";
|
|
1356
|
+
}
|
|
970
1357
|
const coerceNumber = zod.z.union([zod.z.number(), zod.z.string()]).transform((val) => {
|
|
971
1358
|
if (typeof val === "string") return val.trim() === "" ? void 0 : parseFloat(val);
|
|
972
1359
|
return val;
|
|
@@ -979,12 +1366,26 @@ const DocumentType = zod.z.lazy(() => zod.z.union([
|
|
|
979
1366
|
zod.z.array(zod.z.lazy(() => DocumentType)),
|
|
980
1367
|
zod.z.record(zod.z.lazy(() => DocumentType))
|
|
981
1368
|
]));
|
|
1369
|
+
const subagentThreadLineageSchema = zod.z.object({
|
|
1370
|
+
rootConversationId: zod.z.string().min(1),
|
|
1371
|
+
parentConversationId: zod.z.string().min(1),
|
|
1372
|
+
parentMessageId: zod.z.string().min(1),
|
|
1373
|
+
parentToolCallId: zod.z.string().min(1),
|
|
1374
|
+
parentAgentId: zod.z.string().min(1).optional(),
|
|
1375
|
+
subagentType: zod.z.string().min(1),
|
|
1376
|
+
subagentKind: zod.z.enum(["agent", "graph"]),
|
|
1377
|
+
depth: zod.z.number().int().positive()
|
|
1378
|
+
});
|
|
982
1379
|
const tConversationSchema = zod.z.object({
|
|
983
1380
|
conversationId: zod.z.string().nullable(),
|
|
984
1381
|
endpoint: eModelEndpointSchema.nullable(),
|
|
985
1382
|
endpointType: eModelEndpointSchema.nullable().optional(),
|
|
986
1383
|
isArchived: zod.z.boolean().optional(),
|
|
1384
|
+
/** When the chat was archived; absent on chats archived before this was recorded. */
|
|
1385
|
+
archivedAt: zod.z.string().nullable().optional(),
|
|
987
1386
|
pinned: zod.z.boolean().optional(),
|
|
1387
|
+
/** Server-derived: an active shared link exists for this conversation. Not persisted. */
|
|
1388
|
+
isShared: zod.z.boolean().optional(),
|
|
988
1389
|
title: zod.z.string().nullable().or(zod.z.literal("New Chat")).default("New Chat"),
|
|
989
1390
|
user: zod.z.string().optional(),
|
|
990
1391
|
messages: zod.z.array(zod.z.string()).optional(),
|
|
@@ -1022,6 +1423,8 @@ const tConversationSchema = zod.z.object({
|
|
|
1022
1423
|
imageDetail: eImageDetailSchema.optional(),
|
|
1023
1424
|
reasoning_effort: eReasoningEffortSchema.optional().nullable(),
|
|
1024
1425
|
reasoning_summary: eReasoningSummarySchema.optional().nullable(),
|
|
1426
|
+
reasoning_mode: eReasoningModeSchema.optional().nullable(),
|
|
1427
|
+
reasoning_context: eReasoningContextSchema.optional().nullable(),
|
|
1025
1428
|
verbosity: eVerbositySchema.optional().nullable(),
|
|
1026
1429
|
useResponsesApi: zod.z.boolean().optional(),
|
|
1027
1430
|
effort: eAnthropicEffortSchema.optional().nullable(),
|
|
@@ -1031,6 +1434,8 @@ const tConversationSchema = zod.z.object({
|
|
|
1031
1434
|
disableStreaming: zod.z.boolean().optional(),
|
|
1032
1435
|
assistant_id: zod.z.string().optional(),
|
|
1033
1436
|
agent_id: zod.z.string().optional(),
|
|
1437
|
+
/** Durable parent/child navigation for a subagent thread. */
|
|
1438
|
+
subagentThread: subagentThreadLineageSchema.optional(),
|
|
1034
1439
|
region: zod.z.string().optional(),
|
|
1035
1440
|
maxTokens: coerceNumber.optional(),
|
|
1036
1441
|
additionalModelRequestFields: DocumentType.optional(),
|
|
@@ -1113,6 +1518,10 @@ const tQueryParamsSchema = tConversationSchema.pick({
|
|
|
1113
1518
|
/** @endpoints openAI, custom, azureOpenAI */
|
|
1114
1519
|
reasoning_summary: true,
|
|
1115
1520
|
/** @endpoints openAI, custom, azureOpenAI */
|
|
1521
|
+
reasoning_mode: true,
|
|
1522
|
+
/** @endpoints openAI, custom, azureOpenAI */
|
|
1523
|
+
reasoning_context: true,
|
|
1524
|
+
/** @endpoints openAI, custom, azureOpenAI */
|
|
1116
1525
|
verbosity: true,
|
|
1117
1526
|
/** @endpoints openAI, custom, azureOpenAI */
|
|
1118
1527
|
useResponsesApi: true,
|
|
@@ -1182,6 +1591,26 @@ const tModelSpecPresetSchema = tPresetSchema.omit({
|
|
|
1182
1591
|
chatGptLabel: true,
|
|
1183
1592
|
presetOverride: true,
|
|
1184
1593
|
spec: true
|
|
1594
|
+
}).merge(zod.z.object({
|
|
1595
|
+
/**
|
|
1596
|
+
* Optional here, unlike `tPresetSchema`, where the key is required (though
|
|
1597
|
+
* nullable). A preset naming an `agent_id` has an unambiguous endpoint, so
|
|
1598
|
+
* config may omit it and `resolveModelSpecEndpoint` infers `agents` when
|
|
1599
|
+
* specs are materialized at config load.
|
|
1600
|
+
*/
|
|
1601
|
+
endpoint: extendedModelEndpointSchema.nullish() })).superRefine((preset, ctx) => {
|
|
1602
|
+
/**
|
|
1603
|
+
* Omission is only legal when the endpoint is inferable, which requires a
|
|
1604
|
+
* NON-EMPTY `agent_id` — form-backed writers persist untouched fields as
|
|
1605
|
+
* `''`, which names no agent. An explicit `endpoint: null` stays accepted:
|
|
1606
|
+
* it validated before the key became optional, so rejecting it now would
|
|
1607
|
+
* break previously valid configs.
|
|
1608
|
+
*/
|
|
1609
|
+
if (preset.endpoint === void 0 && !preset.agent_id) ctx.addIssue({
|
|
1610
|
+
code: zod.z.ZodIssueCode.custom,
|
|
1611
|
+
path: ["endpoint"],
|
|
1612
|
+
message: "endpoint is required unless the preset names a non-empty agent_id (the agents endpoint is then inferred)"
|
|
1613
|
+
});
|
|
1185
1614
|
});
|
|
1186
1615
|
const tSharedLinkSchema = zod.z.object({
|
|
1187
1616
|
conversationId: zod.z.string(),
|
|
@@ -1210,6 +1639,7 @@ const googleBaseSchema = tConversationSchema.pick({
|
|
|
1210
1639
|
examples: true,
|
|
1211
1640
|
temperature: true,
|
|
1212
1641
|
maxOutputTokens: true,
|
|
1642
|
+
resendFiles: true,
|
|
1213
1643
|
artifacts: true,
|
|
1214
1644
|
topP: true,
|
|
1215
1645
|
topK: true,
|
|
@@ -1368,6 +1798,8 @@ const openAIBaseSchema = tConversationSchema.pick({
|
|
|
1368
1798
|
max_tokens: true,
|
|
1369
1799
|
reasoning_effort: true,
|
|
1370
1800
|
reasoning_summary: true,
|
|
1801
|
+
reasoning_mode: true,
|
|
1802
|
+
reasoning_context: true,
|
|
1371
1803
|
verbosity: true,
|
|
1372
1804
|
useResponsesApi: true,
|
|
1373
1805
|
web_search: true,
|
|
@@ -1466,15 +1898,39 @@ const requiredSettingFields = [
|
|
|
1466
1898
|
"type",
|
|
1467
1899
|
"component"
|
|
1468
1900
|
];
|
|
1901
|
+
function clampSettingRange(value, range) {
|
|
1902
|
+
if (range.positiveMin != null) {
|
|
1903
|
+
/** The minimum carries its own meaning here (Google's -1 for automatic),
|
|
1904
|
+
* and the schema admits it outright, so it survives rather than being
|
|
1905
|
+
* lifted to the floor. It need not be negative to be the sentinel. */
|
|
1906
|
+
if (value === range.min) return range.min;
|
|
1907
|
+
/** Below the sentinel there is nothing admissible to lift to, so the value
|
|
1908
|
+
* resolves to it. Between the sentinel and the floor, the floor is the
|
|
1909
|
+
* nearest value the generated schema accepts. */
|
|
1910
|
+
if (value < Math.max(range.min, 0)) return range.min;
|
|
1911
|
+
return Math.min(Math.max(value, range.positiveMin), range.max);
|
|
1912
|
+
}
|
|
1913
|
+
return Math.min(Math.max(value, range.min), range.max);
|
|
1914
|
+
}
|
|
1469
1915
|
function generateDynamicSchema(settings) {
|
|
1470
1916
|
const schemaFields = {};
|
|
1471
1917
|
for (const setting of settings) {
|
|
1472
1918
|
const { key, type, default: defaultValue, range, options, minText, maxText, minTags, maxTags } = setting;
|
|
1473
1919
|
if (type === "number") {
|
|
1474
|
-
let
|
|
1920
|
+
let numberSchema = zod.z.number();
|
|
1475
1921
|
if (range) {
|
|
1476
|
-
|
|
1477
|
-
|
|
1922
|
+
numberSchema = numberSchema.min(range.min);
|
|
1923
|
+
numberSchema = numberSchema.max(range.max);
|
|
1924
|
+
}
|
|
1925
|
+
/** Widened deliberately: refine returns ZodEffects, not ZodNumber, and
|
|
1926
|
+
* the number-specific chaining is already done above. */
|
|
1927
|
+
let schema = numberSchema;
|
|
1928
|
+
if (range?.positiveMin != null) {
|
|
1929
|
+
/** Mirrors clampSettingRange so the generated schema and the clamp
|
|
1930
|
+
* agree: `min` only admits the sentinel, and any non-negative value
|
|
1931
|
+
* must clear the documented floor. */
|
|
1932
|
+
const { positiveMin, min } = range;
|
|
1933
|
+
schema = numberSchema.refine((value) => value === min || value >= positiveMin, `Expected ${min} or a value of at least ${positiveMin}`);
|
|
1478
1934
|
}
|
|
1479
1935
|
if (typeof defaultValue === "number") schemaFields[key] = schema.default(defaultValue);
|
|
1480
1936
|
else schemaFields[key] = schema;
|
|
@@ -1616,7 +2072,14 @@ function validateSettingDefinitions(settings) {
|
|
|
1616
2072
|
setting.includeInput = setting.type === "number" ? setting.includeInput ?? true : false;
|
|
1617
2073
|
}
|
|
1618
2074
|
if (setting.component === "slider" && setting.type === "number") {
|
|
1619
|
-
if (setting.default === void 0 && setting.range)
|
|
2075
|
+
if (setting.default === void 0 && setting.range) {
|
|
2076
|
+
/** The midpoint of the admissible interval, which a positive floor
|
|
2077
|
+
* narrows: the span between the sentinel and that floor holds no value
|
|
2078
|
+
* the generated schema accepts, so a midpoint taken across it would
|
|
2079
|
+
* fail the validation below. */
|
|
2080
|
+
const floor = Math.max(setting.range.min, setting.range.positiveMin ?? setting.range.min);
|
|
2081
|
+
setting.default = Math.round((floor + setting.range.max) / 2);
|
|
2082
|
+
}
|
|
1620
2083
|
}
|
|
1621
2084
|
if (setting.component === "checkbox" || setting.component === "switch") {
|
|
1622
2085
|
if (setting.options && setting.options.length > 2) errors.push({
|
|
@@ -1694,6 +2157,16 @@ function validateSettingDefinitions(settings) {
|
|
|
1694
2157
|
message: `Invalid default value for setting ${setting.key}. Must be within the range [${setting.range.min}, ${setting.range.max}].`,
|
|
1695
2158
|
path: ["default"]
|
|
1696
2159
|
});
|
|
2160
|
+
if (setting.type === "number" && setting.range?.positiveMin != null && setting.range.positiveMin > setting.range.max) errors.push({
|
|
2161
|
+
code: zod.ZodIssueCode.custom,
|
|
2162
|
+
message: `Invalid range for setting ${setting.key}. positiveMin (${setting.range.positiveMin}) cannot exceed max (${setting.range.max}).`,
|
|
2163
|
+
path: ["range"]
|
|
2164
|
+
});
|
|
2165
|
+
if (setting.type === "number" && setting.range?.positiveMin != null && typeof setting.default === "number" && setting.default !== setting.range.min && setting.default < setting.range.positiveMin) errors.push({
|
|
2166
|
+
code: zod.ZodIssueCode.custom,
|
|
2167
|
+
message: `Invalid default value for setting ${setting.key}. Must be ${setting.range.min} or at least ${setting.range.positiveMin}.`,
|
|
2168
|
+
path: ["default"]
|
|
2169
|
+
});
|
|
1697
2170
|
if (setting.enumMappings && setting.type === "enum" && setting.options) {
|
|
1698
2171
|
for (const option of setting.options) if (!(option in setting.enumMappings)) errors.push({
|
|
1699
2172
|
code: zod.ZodIssueCode.custom,
|
|
@@ -1795,13 +2268,83 @@ const generateGoogleSchema = (customGoogle) => {
|
|
|
1795
2268
|
//#region src/limits.ts
|
|
1796
2269
|
/** Maximum number of explicit subagents per parent agent. UI + Zod schema share this. */
|
|
1797
2270
|
const MAX_SUBAGENTS = 10;
|
|
2271
|
+
/** Hard upper bound for `endpoints.agents.maxSubagents`, keeping the request-validation
|
|
2272
|
+
* cap bounded no matter what the config file says. */
|
|
2273
|
+
const MAX_SUBAGENTS_CEILING = 50;
|
|
2274
|
+
let maxSubagents = 10;
|
|
2275
|
+
/** Effective subagents-per-agent cap; initialized from `endpoints.agents.maxSubagents` at startup. */
|
|
2276
|
+
const getMaxSubagents = () => maxSubagents;
|
|
2277
|
+
/** Applies a configured cap; any missing or out-of-range value resets to the default. */
|
|
2278
|
+
const setMaxSubagents = (value) => {
|
|
2279
|
+
maxSubagents = typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 50 ? value : 10;
|
|
2280
|
+
};
|
|
2281
|
+
/** Chat project field limits. The dialogs and the persistence layer share these,
|
|
2282
|
+
* so the inputs stop at the same point the server would otherwise truncate. */
|
|
2283
|
+
const MAX_CHAT_PROJECT_NAME_LENGTH = 100;
|
|
2284
|
+
const MAX_CHAT_PROJECT_DESCRIPTION_LENGTH = 1e3;
|
|
2285
|
+
/** Mirrors the bounded graph-child member limit in `@librechat/agents`. */
|
|
2286
|
+
const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
|
|
1798
2287
|
//#endregion
|
|
1799
2288
|
//#region src/models.ts
|
|
1800
2289
|
const modelSpecSubagentsSchema = zod.z.object({
|
|
1801
2290
|
enabled: zod.z.boolean().optional(),
|
|
1802
2291
|
allowSelf: zod.z.boolean().optional(),
|
|
1803
|
-
agent_ids: zod.z.array(zod.z.string()).
|
|
2292
|
+
agent_ids: zod.z.array(zod.z.string()).optional()
|
|
2293
|
+
}).superRefine((subagents, ctx) => {
|
|
2294
|
+
const maxSubagents = getMaxSubagents();
|
|
2295
|
+
if ((subagents.agent_ids?.length ?? 0) > maxSubagents) ctx.addIssue({
|
|
2296
|
+
code: zod.z.ZodIssueCode.custom,
|
|
2297
|
+
path: ["agent_ids"],
|
|
2298
|
+
message: `agent_ids must contain at most ${maxSubagents} item(s)`
|
|
2299
|
+
});
|
|
1804
2300
|
});
|
|
2301
|
+
function resolveModelSpecEndpoint(modelSpec) {
|
|
2302
|
+
const preset = modelSpec?.preset;
|
|
2303
|
+
if (preset?.endpoint != null) return preset.endpoint;
|
|
2304
|
+
/**
|
|
2305
|
+
* An explicit `endpoint: null` is a statement, not an omission — such specs
|
|
2306
|
+
* validated (and were skipped downstream) before inference existed, so
|
|
2307
|
+
* inferring here would silently activate them. Only an absent key infers,
|
|
2308
|
+
* and only from a non-empty `agent_id`: form-backed writers persist
|
|
2309
|
+
* untouched fields as `''`, which names no agent.
|
|
2310
|
+
*/
|
|
2311
|
+
if (preset?.endpoint === null) return;
|
|
2312
|
+
return preset?.agent_id ? "agents" : void 0;
|
|
2313
|
+
}
|
|
2314
|
+
/**
|
|
2315
|
+
* Writes each spec's resolved endpoint back onto its preset so every consumer —
|
|
2316
|
+
* endpoint matching, the selector, access filters, startup presets, provider-key
|
|
2317
|
+
* reachability — reads a complete spec instead of re-deriving it. Apply once
|
|
2318
|
+
* where the effective config is assembled (YAML load and DB-override merge);
|
|
2319
|
+
* downstream code then needs no awareness of inference.
|
|
2320
|
+
*
|
|
2321
|
+
* Returns the original object, and the original spec objects, when nothing
|
|
2322
|
+
* needs filling in, so cached configs and memoized consumers see no new
|
|
2323
|
+
* identities.
|
|
2324
|
+
*/
|
|
2325
|
+
function materializeModelSpecEndpoints(modelSpecs) {
|
|
2326
|
+
const list = modelSpecs?.list;
|
|
2327
|
+
if (!list?.length) return modelSpecs;
|
|
2328
|
+
let changed = false;
|
|
2329
|
+
const materialized = list.map((spec) => {
|
|
2330
|
+
if (spec?.preset == null || spec.preset.endpoint != null) return spec;
|
|
2331
|
+
const endpoint = resolveModelSpecEndpoint(spec);
|
|
2332
|
+
if (endpoint == null) return spec;
|
|
2333
|
+
changed = true;
|
|
2334
|
+
return {
|
|
2335
|
+
...spec,
|
|
2336
|
+
preset: {
|
|
2337
|
+
...spec.preset,
|
|
2338
|
+
endpoint
|
|
2339
|
+
}
|
|
2340
|
+
};
|
|
2341
|
+
});
|
|
2342
|
+
if (!changed) return modelSpecs;
|
|
2343
|
+
return {
|
|
2344
|
+
...modelSpecs,
|
|
2345
|
+
list: materialized
|
|
2346
|
+
};
|
|
2347
|
+
}
|
|
1805
2348
|
const tModelSpecSchema = zod.z.object({
|
|
1806
2349
|
name: zod.z.string(),
|
|
1807
2350
|
label: zod.z.string(),
|
|
@@ -1816,12 +2359,17 @@ const tModelSpecSchema = zod.z.object({
|
|
|
1816
2359
|
showIconInHeader: zod.z.boolean().optional(),
|
|
1817
2360
|
showOnLanding: zod.z.boolean().optional(),
|
|
1818
2361
|
conversation_starters: zod.z.array(zod.z.string()).optional(),
|
|
2362
|
+
showInMenu: zod.z.boolean().optional(),
|
|
1819
2363
|
iconURL: zod.z.union([zod.z.string(), eModelEndpointSchema]).optional(),
|
|
1820
2364
|
authType: authTypeSchema.optional(),
|
|
1821
2365
|
hideBadgeRow: zod.z.boolean().optional(),
|
|
1822
2366
|
webSearch: zod.z.boolean().optional(),
|
|
1823
2367
|
fileSearch: zod.z.boolean().optional(),
|
|
1824
2368
|
executeCode: zod.z.boolean().optional(),
|
|
2369
|
+
memory: zod.z.boolean().optional(),
|
|
2370
|
+
askUserQuestion: zod.z.boolean().optional(),
|
|
2371
|
+
runInBackground: zod.z.union([zod.z.boolean(), zod.z.array(zod.z.string())]).optional(),
|
|
2372
|
+
describeIntent: zod.z.union([zod.z.boolean(), zod.z.array(zod.z.string())]).optional(),
|
|
1825
2373
|
artifacts: zod.z.union([zod.z.string(), zod.z.boolean()]).optional(),
|
|
1826
2374
|
mcpServers: zod.z.array(zod.z.string()).optional(),
|
|
1827
2375
|
skills: zod.z.union([zod.z.boolean(), zod.z.array(zod.z.string())]).optional(),
|
|
@@ -1903,6 +2451,7 @@ const fullMimeTypesList = [
|
|
|
1903
2451
|
"application/pdf",
|
|
1904
2452
|
"text/x-php",
|
|
1905
2453
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
2454
|
+
"application/vnd.openxmlformats-officedocument.presentationml.template",
|
|
1906
2455
|
"text/x-python",
|
|
1907
2456
|
"text/x-script.python",
|
|
1908
2457
|
"text/x-ruby",
|
|
@@ -1933,6 +2482,7 @@ const fullMimeTypesList = [
|
|
|
1933
2482
|
"application/vnd.oasis.opendocument.graphics",
|
|
1934
2483
|
"image/svg",
|
|
1935
2484
|
"image/svg+xml",
|
|
2485
|
+
"message/rfc822",
|
|
1936
2486
|
"video/mp4",
|
|
1937
2487
|
"video/avi",
|
|
1938
2488
|
"video/mov",
|
|
@@ -1966,6 +2516,7 @@ const codeInterpreterMimeTypesList = [
|
|
|
1966
2516
|
"application/pdf",
|
|
1967
2517
|
"text/x-php",
|
|
1968
2518
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
2519
|
+
"application/vnd.openxmlformats-officedocument.presentationml.template",
|
|
1969
2520
|
"text/x-python",
|
|
1970
2521
|
"text/x-script.python",
|
|
1971
2522
|
"text/x-ruby",
|
|
@@ -1998,6 +2549,7 @@ const retrievalMimeTypesList = [
|
|
|
1998
2549
|
"application/pdf",
|
|
1999
2550
|
"text/x-php",
|
|
2000
2551
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
2552
|
+
"application/vnd.openxmlformats-officedocument.presentationml.template",
|
|
2001
2553
|
"text/x-python",
|
|
2002
2554
|
"text/x-script.python",
|
|
2003
2555
|
"text/x-ruby",
|
|
@@ -2019,11 +2571,34 @@ const bedrockDocumentFormats = {
|
|
|
2019
2571
|
"text/markdown": "md"
|
|
2020
2572
|
};
|
|
2021
2573
|
const isBedrockDocumentType = (mimeType) => mimeType != null && mimeType in bedrockDocumentFormats;
|
|
2574
|
+
/** MIME types Bedrock's Converse document path can send to the model (mirrors `bedrockDocumentFormats`). */
|
|
2575
|
+
const bedrockDocumentMimeTypes = Object.keys(bedrockDocumentFormats);
|
|
2022
2576
|
/** File extensions accepted by Bedrock document uploads (for input accept attributes) */
|
|
2023
2577
|
const bedrockDocumentExtensions = ".pdf,.csv,.doc,.docx,.xls,.xlsx,.html,.htm,.txt,.md,application/pdf,text/csv,application/csv,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/html,text/plain,text/markdown";
|
|
2578
|
+
/** Textual `application/*` MIME types that can be decoded and sent as plain text */
|
|
2579
|
+
const textualApplicationTypes = new Set([
|
|
2580
|
+
"application/json",
|
|
2581
|
+
"application/xml",
|
|
2582
|
+
"application/yaml",
|
|
2583
|
+
"application/sql",
|
|
2584
|
+
"application/typescript",
|
|
2585
|
+
"application/x-sh",
|
|
2586
|
+
"application/csv"
|
|
2587
|
+
]);
|
|
2588
|
+
/**
|
|
2589
|
+
* MIME types the Anthropic Messages API accepts as a plain-text document source
|
|
2590
|
+
* (`source.type: 'text'`)
|
|
2591
|
+
*/
|
|
2592
|
+
const isAnthropicTextDocumentType = (mimeType) => mimeType != null && (mimeType.startsWith("text/") || textualApplicationTypes.has(mimeType));
|
|
2593
|
+
/**
|
|
2594
|
+
* MIME types the Anthropic Messages API document path can send to the model
|
|
2595
|
+
* (mirrors `isBedrockDocumentType`): PDF via base64, textual types via a
|
|
2596
|
+
* plain-text document source. All other types are rejected with a provider 400.
|
|
2597
|
+
*/
|
|
2598
|
+
const isAnthropicDocumentType = (mimeType) => mimeType === "application/pdf" || isAnthropicTextDocumentType(mimeType);
|
|
2024
2599
|
const excelMimeTypes = /^application\/(vnd\.ms-excel|msexcel|x-msexcel|x-ms-excel|x-excel|x-dos_ms_excel|xls|x-xls|vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet)$/;
|
|
2025
2600
|
const textMimeTypes = /^(text\/(x-c|x-csharp|tab-separated-values|x-c\+\+|x-h|x-java|html|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|css|vtt|javascript|csv|xml|calendar))$/;
|
|
2026
|
-
const applicationMimeTypes = /^(application\/(epub\+zip|csv|json|msword|pdf|x-tar|x-sh|x-zip-compressed|typescript|sql|yaml|x-parquet|vnd\.apache\.parquet|vnd\.coffeescript|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation|spreadsheetml\.sheet)|vnd\.oasis\.opendocument\.(text|spreadsheet|presentation|graphics)|xml|zip))$/;
|
|
2601
|
+
const applicationMimeTypes = /^(application\/(epub\+zip|csv|json|msword|pdf|x-tar|x-sh|x-zip-compressed|typescript|sql|yaml|x-parquet|vnd\.apache\.parquet|vnd\.coffeescript|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.(presentation|template)|spreadsheetml\.sheet)|vnd\.oasis\.opendocument\.(text|spreadsheet|presentation|graphics)|xml|zip))$/;
|
|
2027
2602
|
const imageMimeTypes = /^image\/(jpeg|gif|png|webp|heic|heif)$/;
|
|
2028
2603
|
const audioMimeTypes = /^audio\/(mp3|mpeg|mpeg3|wav|wave|x-wav|ogg|vorbis|mp4|m4a|x-m4a|flac|x-flac|webm|aac|wma|opus)$/;
|
|
2029
2604
|
const videoMimeTypes = /^video\/(mp4|avi|mov|wmv|flv|webm|mkv|m4v|3gp|ogv)$/;
|
|
@@ -2032,6 +2607,7 @@ const defaultOCRMimeTypes = [
|
|
|
2032
2607
|
excelMimeTypes,
|
|
2033
2608
|
/^application\/pdf$/,
|
|
2034
2609
|
/^application\/vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation)$/,
|
|
2610
|
+
/^application\/vnd\.openxmlformats-officedocument\.presentationml\.template$/,
|
|
2035
2611
|
/^application\/vnd\.ms-(word|powerpoint)$/,
|
|
2036
2612
|
/^application\/epub\+zip$/,
|
|
2037
2613
|
/^application\/vnd\.oasis\.opendocument\.(text|spreadsheet|presentation|graphics)$/
|
|
@@ -2053,7 +2629,8 @@ const supportedMimeTypes = [
|
|
|
2053
2629
|
imageMimeTypes,
|
|
2054
2630
|
videoMimeTypes,
|
|
2055
2631
|
audioMimeTypes,
|
|
2056
|
-
/^image\/(svg|svg\+xml)
|
|
2632
|
+
/^image\/(svg|svg\+xml)$/,
|
|
2633
|
+
/^message\/rfc822$/
|
|
2057
2634
|
];
|
|
2058
2635
|
const codeInterpreterMimeTypes = [
|
|
2059
2636
|
textMimeTypes,
|
|
@@ -2108,6 +2685,7 @@ const codeTypeMapping = {
|
|
|
2108
2685
|
cljs: "text/plain",
|
|
2109
2686
|
cljc: "text/plain",
|
|
2110
2687
|
elm: "text/plain",
|
|
2688
|
+
eml: "message/rfc822",
|
|
2111
2689
|
erl: "text/plain",
|
|
2112
2690
|
hrl: "text/plain",
|
|
2113
2691
|
ex: "text/plain",
|
|
@@ -2179,6 +2757,13 @@ const codeTypeMapping = {
|
|
|
2179
2757
|
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
2180
2758
|
odp: "application/vnd.oasis.opendocument.presentation",
|
|
2181
2759
|
odg: "application/vnd.oasis.opendocument.graphics",
|
|
2760
|
+
doc: "application/msword",
|
|
2761
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
2762
|
+
xls: "application/vnd.ms-excel",
|
|
2763
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
2764
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
2765
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
2766
|
+
potx: "application/vnd.openxmlformats-officedocument.presentationml.template",
|
|
2182
2767
|
ics: "text/calendar",
|
|
2183
2768
|
ical: "text/calendar",
|
|
2184
2769
|
ifb: "text/calendar",
|
|
@@ -2193,7 +2778,11 @@ const imageTypeMapping = {
|
|
|
2193
2778
|
const mimeTypeAliases = {
|
|
2194
2779
|
"application/x-zip-compressed": "application/zip",
|
|
2195
2780
|
"text/x-python-script": "text/x-python",
|
|
2196
|
-
"text/x-markdown": "text/markdown"
|
|
2781
|
+
"text/x-markdown": "text/markdown",
|
|
2782
|
+
/** freedesktop shared-mime-info (Chrome on Linux) */
|
|
2783
|
+
"application/x-shellscript": "application/x-sh",
|
|
2784
|
+
/** libmagic, i.e. `file --mime-type` */
|
|
2785
|
+
"text/x-shellscript": "application/x-sh"
|
|
2197
2786
|
};
|
|
2198
2787
|
/**
|
|
2199
2788
|
* Infers the MIME type from a file's extension when the browser doesn't recognize it,
|
|
@@ -2207,7 +2796,7 @@ function inferMimeType(fileName, currentType) {
|
|
|
2207
2796
|
const extension = fileName.split(".").pop()?.toLowerCase() ?? "";
|
|
2208
2797
|
return codeTypeMapping[extension] || imageTypeMapping[extension] || currentType;
|
|
2209
2798
|
}
|
|
2210
|
-
const retrievalMimeTypes = [/^(text\/(x-c|x-c\+\+|x-h|html|x-java|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|vtt|xml))$/, /^(application\/(json|pdf|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation)))$/];
|
|
2799
|
+
const retrievalMimeTypes = [/^(text\/(x-c|x-c\+\+|x-h|html|x-java|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|vtt|xml))$/, /^(application\/(json|pdf|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.(presentation|template))))$/];
|
|
2211
2800
|
const megabyte = 1024 * 1024;
|
|
2212
2801
|
/** Helper function to get megabytes value */
|
|
2213
2802
|
const mbToBytes = (mb) => mb * megabyte;
|
|
@@ -2249,7 +2838,8 @@ const fileConfig = {
|
|
|
2249
2838
|
enabled: false,
|
|
2250
2839
|
maxWidth: 1900,
|
|
2251
2840
|
maxHeight: 1900,
|
|
2252
|
-
quality: .92
|
|
2841
|
+
quality: .92,
|
|
2842
|
+
enforced: false
|
|
2253
2843
|
},
|
|
2254
2844
|
ocr: { supportedMimeTypes: defaultOCRMimeTypes },
|
|
2255
2845
|
text: { supportedMimeTypes: defaultTextMimeTypes },
|
|
@@ -2279,28 +2869,219 @@ const fileConfigSchema = zod.z.object({
|
|
|
2279
2869
|
}).optional(),
|
|
2280
2870
|
clientImageResize: zod.z.object({
|
|
2281
2871
|
enabled: zod.z.boolean().optional(),
|
|
2282
|
-
maxWidth: zod.z.number().min(
|
|
2283
|
-
maxHeight: zod.z.number().min(
|
|
2872
|
+
maxWidth: zod.z.number().min(1).optional(),
|
|
2873
|
+
maxHeight: zod.z.number().min(1).optional(),
|
|
2284
2874
|
quality: zod.z.number().min(0).max(1).optional()
|
|
2285
2875
|
}).optional(),
|
|
2286
2876
|
ocr: zod.z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
|
|
2287
2877
|
text: zod.z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional()
|
|
2288
2878
|
});
|
|
2289
|
-
/**
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2879
|
+
/**
|
|
2880
|
+
* Compiler for admin-supplied MIME patterns. Defaults to native `RegExp`, which browser
|
|
2881
|
+
* builds keep so no extra dependency is bundled. The server swaps in a linear-time engine
|
|
2882
|
+
* via `setFileConfigRegexCompiler` so an admin-authored catastrophic-backtracking pattern
|
|
2883
|
+
* cannot ReDoS the shared event loop when tested against an uploaded file's MIME type.
|
|
2884
|
+
*/
|
|
2885
|
+
let compileMimeRegex = (pattern) => new RegExp(pattern);
|
|
2886
|
+
/** Override the MIME-pattern compiler; the server injects a linear-time engine at startup. */
|
|
2887
|
+
const setFileConfigRegexCompiler = (compile) => {
|
|
2888
|
+
compileMimeRegex = compile;
|
|
2889
|
+
};
|
|
2890
|
+
/** Returned when every configured pattern fails to compile, so consumers that read an empty
|
|
2891
|
+
* allowlist as "no restriction" fail closed instead of allowing every file. */
|
|
2892
|
+
const rejectAllMimeMatcher = { test: () => false };
|
|
2893
|
+
/** Helper function to safely convert string patterns to matcher objects */
|
|
2894
|
+
const convertStringsToRegex = (patterns) => {
|
|
2895
|
+
const compiled = patterns.reduce((acc, pattern) => {
|
|
2896
|
+
try {
|
|
2897
|
+
acc.push(compileMimeRegex(pattern));
|
|
2898
|
+
} catch (error) {
|
|
2899
|
+
console.error(`Invalid regex pattern "${pattern}" skipped.`, error);
|
|
2900
|
+
}
|
|
2901
|
+
return acc;
|
|
2902
|
+
}, []);
|
|
2903
|
+
if (patterns.length > 0 && compiled.length === 0) {
|
|
2904
|
+
console.error(`All ${patterns.length} MIME type pattern(s) were invalid and skipped; the resulting allowlist rejects every file.`);
|
|
2905
|
+
return [rejectAllMimeMatcher];
|
|
2296
2906
|
}
|
|
2297
|
-
return
|
|
2298
|
-
}
|
|
2907
|
+
return compiled;
|
|
2908
|
+
};
|
|
2299
2909
|
/** Detects whether the given MIME type patterns accept all file types (e.g., `.*` or `.+`). */
|
|
2300
2910
|
const isPermissiveMimeConfig = (types) => {
|
|
2301
2911
|
if (!types || types.length === 0) return false;
|
|
2302
2912
|
return types.some((regex) => regex.test("x-librechat/x-probe"));
|
|
2303
2913
|
};
|
|
2914
|
+
/** Media categories that collapse to a wildcard `accept` token when any member type is allowed. */
|
|
2915
|
+
const mimeAcceptCategories = [
|
|
2916
|
+
{
|
|
2917
|
+
/** Mirrors `imageMimeTypes` (+ the code-interpreter svg variants) so every accepted type is known. */
|
|
2918
|
+
category: "image",
|
|
2919
|
+
token: "image/*",
|
|
2920
|
+
samples: [
|
|
2921
|
+
"image/jpeg",
|
|
2922
|
+
"image/gif",
|
|
2923
|
+
"image/png",
|
|
2924
|
+
"image/webp",
|
|
2925
|
+
"image/heic",
|
|
2926
|
+
"image/heif",
|
|
2927
|
+
"image/svg",
|
|
2928
|
+
"image/svg+xml"
|
|
2929
|
+
],
|
|
2930
|
+
extras: [".heif", ".heic"]
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
/** Mirrors `audioMimeTypes`. */
|
|
2934
|
+
category: "audio",
|
|
2935
|
+
token: "audio/*",
|
|
2936
|
+
samples: [
|
|
2937
|
+
"audio/mp3",
|
|
2938
|
+
"audio/mpeg",
|
|
2939
|
+
"audio/mpeg3",
|
|
2940
|
+
"audio/wav",
|
|
2941
|
+
"audio/wave",
|
|
2942
|
+
"audio/x-wav",
|
|
2943
|
+
"audio/ogg",
|
|
2944
|
+
"audio/vorbis",
|
|
2945
|
+
"audio/mp4",
|
|
2946
|
+
"audio/m4a",
|
|
2947
|
+
"audio/x-m4a",
|
|
2948
|
+
"audio/flac",
|
|
2949
|
+
"audio/x-flac",
|
|
2950
|
+
"audio/webm",
|
|
2951
|
+
"audio/aac",
|
|
2952
|
+
"audio/wma",
|
|
2953
|
+
"audio/opus"
|
|
2954
|
+
]
|
|
2955
|
+
},
|
|
2956
|
+
{
|
|
2957
|
+
/** Mirrors `videoMimeTypes`. */
|
|
2958
|
+
category: "video",
|
|
2959
|
+
token: "video/*",
|
|
2960
|
+
samples: [
|
|
2961
|
+
"video/mp4",
|
|
2962
|
+
"video/avi",
|
|
2963
|
+
"video/mov",
|
|
2964
|
+
"video/wmv",
|
|
2965
|
+
"video/flv",
|
|
2966
|
+
"video/webm",
|
|
2967
|
+
"video/mkv",
|
|
2968
|
+
"video/m4v",
|
|
2969
|
+
"video/3gp",
|
|
2970
|
+
"video/ogv"
|
|
2971
|
+
]
|
|
2972
|
+
}
|
|
2973
|
+
];
|
|
2974
|
+
/** Document/text MIME types paired with the extension(s) browsers filter on in the file picker. */
|
|
2975
|
+
const documentMimeExtensions = [
|
|
2976
|
+
["application/pdf", [".pdf"]],
|
|
2977
|
+
["application/msword", [".doc"]],
|
|
2978
|
+
["application/vnd.openxmlformats-officedocument.wordprocessingml.document", [".docx"]],
|
|
2979
|
+
["application/vnd.ms-excel", [".xls"]],
|
|
2980
|
+
["application/msexcel", [".xls"]],
|
|
2981
|
+
["application/x-msexcel", [".xls"]],
|
|
2982
|
+
["application/x-ms-excel", [".xls"]],
|
|
2983
|
+
["application/x-excel", [".xls"]],
|
|
2984
|
+
["application/x-dos_ms_excel", [".xls"]],
|
|
2985
|
+
["application/xls", [".xls"]],
|
|
2986
|
+
["application/x-xls", [".xls"]],
|
|
2987
|
+
["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", [".xlsx"]],
|
|
2988
|
+
["application/vnd.ms-powerpoint", [".ppt"]],
|
|
2989
|
+
["application/vnd.openxmlformats-officedocument.presentationml.presentation", [".pptx"]],
|
|
2990
|
+
["application/vnd.openxmlformats-officedocument.presentationml.template", [".potx"]],
|
|
2991
|
+
["application/vnd.oasis.opendocument.text", [".odt"]],
|
|
2992
|
+
["application/vnd.oasis.opendocument.spreadsheet", [".ods"]],
|
|
2993
|
+
["application/vnd.oasis.opendocument.presentation", [".odp"]],
|
|
2994
|
+
["application/vnd.oasis.opendocument.graphics", [".odg"]],
|
|
2995
|
+
["application/rtf", [".rtf"]],
|
|
2996
|
+
["application/json", [".json"]],
|
|
2997
|
+
["application/xml", [".xml"]],
|
|
2998
|
+
["application/yaml", [".yaml", ".yml"]],
|
|
2999
|
+
["application/zip", [".zip"]],
|
|
3000
|
+
["application/x-zip-compressed", [".zip"]],
|
|
3001
|
+
["application/epub+zip", [".epub"]],
|
|
3002
|
+
["application/x-parquet", [".parquet"]],
|
|
3003
|
+
["application/vnd.apache.parquet", [".parquet"]],
|
|
3004
|
+
["text/csv", [".csv"]],
|
|
3005
|
+
["application/csv", [".csv"]],
|
|
3006
|
+
["text/tab-separated-values", [".tsv"]],
|
|
3007
|
+
["text/plain", [".txt"]],
|
|
3008
|
+
["text/markdown", [".md"]],
|
|
3009
|
+
["text/html", [".html", ".htm"]],
|
|
3010
|
+
["text/calendar", [".ics"]],
|
|
3011
|
+
["message/rfc822", [".eml"]]
|
|
3012
|
+
];
|
|
3013
|
+
const documentMimeSet = new Set(documentMimeExtensions.map(([mimeType]) => mimeType));
|
|
3014
|
+
/** Every MIME type LibreChat may accept, used to detect patterns that reach beyond the representable set. */
|
|
3015
|
+
const knownMimeUniverse = Array.from(new Set([
|
|
3016
|
+
...fullMimeTypesList,
|
|
3017
|
+
...documentMimeExtensions.map(([mimeType]) => mimeType),
|
|
3018
|
+
...mimeAcceptCategories.flatMap((category) => category.samples)
|
|
3019
|
+
]));
|
|
3020
|
+
const categoryOf = (mimeType) => {
|
|
3021
|
+
if (mimeType.startsWith("image/")) return "image";
|
|
3022
|
+
if (mimeType.startsWith("audio/")) return "audio";
|
|
3023
|
+
if (mimeType.startsWith("video/")) return "video";
|
|
3024
|
+
return "document";
|
|
3025
|
+
};
|
|
3026
|
+
/** Media types are covered by their `<cat>/*` wildcard token; document types need an explicit entry. */
|
|
3027
|
+
const isRepresentable = (mimeType) => categoryOf(mimeType) !== "document" || documentMimeSet.has(mimeType);
|
|
3028
|
+
/**
|
|
3029
|
+
* Translates a finite MIME allowlist into a file-input `accept` string, intersected with what the
|
|
3030
|
+
* provider upload path can actually send. Returns `undefined` (keep the provider filter) when a
|
|
3031
|
+
* configured pattern matches a supported, path-handleable type that cannot be represented, so the
|
|
3032
|
+
* picker never hides a file the path would have accepted.
|
|
3033
|
+
*/
|
|
3034
|
+
const buildMimeAccept = (types, { categories, documentMimeTypes }) => {
|
|
3035
|
+
const permittedSet = new Set(categories);
|
|
3036
|
+
const documentAllowSet = documentMimeTypes ? new Set(documentMimeTypes) : null;
|
|
3037
|
+
const emittedMedia = /* @__PURE__ */ new Set();
|
|
3038
|
+
const emittedDocuments = /* @__PURE__ */ new Set();
|
|
3039
|
+
if (!types.every((regex) => knownMimeUniverse.some((mimeType) => regex.test(mimeType)))) return;
|
|
3040
|
+
for (const regex of types) for (const mimeType of knownMimeUniverse) {
|
|
3041
|
+
if (!regex.test(mimeType)) continue;
|
|
3042
|
+
const category = categoryOf(mimeType);
|
|
3043
|
+
if (!permittedSet.has(category)) continue;
|
|
3044
|
+
/** The path handles documents but drops this specific type (e.g. Bedrock ignores pptx/ODF). */
|
|
3045
|
+
if (category === "document" && documentAllowSet && !documentAllowSet.has(mimeType)) continue;
|
|
3046
|
+
if (!isRepresentable(mimeType)) return;
|
|
3047
|
+
if (category === "document") emittedDocuments.add(mimeType);
|
|
3048
|
+
else emittedMedia.add(category);
|
|
3049
|
+
}
|
|
3050
|
+
const tokens = [];
|
|
3051
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3052
|
+
const push = (token) => {
|
|
3053
|
+
if (!seen.has(token)) {
|
|
3054
|
+
seen.add(token);
|
|
3055
|
+
tokens.push(token);
|
|
3056
|
+
}
|
|
3057
|
+
};
|
|
3058
|
+
for (const category of mimeAcceptCategories) if (emittedMedia.has(category.category)) {
|
|
3059
|
+
push(category.token);
|
|
3060
|
+
category.extras?.forEach(push);
|
|
3061
|
+
}
|
|
3062
|
+
for (const [mimeType, extensions] of documentMimeExtensions) if (emittedDocuments.has(mimeType)) {
|
|
3063
|
+
extensions.forEach(push);
|
|
3064
|
+
push(mimeType);
|
|
3065
|
+
}
|
|
3066
|
+
return tokens.length > 0 ? tokens.join(",") : void 0;
|
|
3067
|
+
};
|
|
3068
|
+
/**
|
|
3069
|
+
* Resolves the file-input `accept` value for a configured `supportedMimeTypes` allowlist, scoped to
|
|
3070
|
+
* what the current upload path (`capability`) can send to the model.
|
|
3071
|
+
* - `undefined` for the built-in default or a config that can't be represented safely, so callers
|
|
3072
|
+
* keep their provider-specific filter.
|
|
3073
|
+
* - `''` for permissive configs (e.g. `.*`), leaving the picker unrestricted.
|
|
3074
|
+
* - a translated `accept` string for a recognized finite allowlist (images, PDFs, Office docs, etc.).
|
|
3075
|
+
*
|
|
3076
|
+
* The picker `accept` is a UX convenience, not a security boundary: the backend still enforces
|
|
3077
|
+
* `supportedMimeTypes` on upload.
|
|
3078
|
+
*/
|
|
3079
|
+
const getConfiguredMimeAccept = (types, capability) => {
|
|
3080
|
+
/** Referential identity with the built-in list signals an unconfigured endpoint (keep provider filter). */
|
|
3081
|
+
if (!types || types.length === 0 || types === supportedMimeTypes) return;
|
|
3082
|
+
if (isPermissiveMimeConfig(types)) return "";
|
|
3083
|
+
return buildMimeAccept(types, capability);
|
|
3084
|
+
};
|
|
2304
3085
|
/**
|
|
2305
3086
|
* Gets the appropriate endpoint file configuration with standardized lookup logic.
|
|
2306
3087
|
*
|
|
@@ -2395,7 +3176,8 @@ function mergeFileConfig(dynamic) {
|
|
|
2395
3176
|
};
|
|
2396
3177
|
if (dynamic.clientImageResize !== void 0) mergedConfig.clientImageResize = {
|
|
2397
3178
|
...mergedConfig.clientImageResize,
|
|
2398
|
-
...dynamic.clientImageResize
|
|
3179
|
+
...dynamic.clientImageResize,
|
|
3180
|
+
enforced: dynamic.clientImageResize.enabled !== void 0
|
|
2399
3181
|
};
|
|
2400
3182
|
if (dynamic.ocr !== void 0) {
|
|
2401
3183
|
const { supportedMimeTypes: ocrMimeTypes, ...ocrRest } = dynamic.ocr;
|
|
@@ -2456,9 +3238,14 @@ const buildQuery = (params) => {
|
|
|
2456
3238
|
};
|
|
2457
3239
|
const health = () => `${BASE_URL}/health`;
|
|
2458
3240
|
const user = () => `${BASE_URL}/api/user`;
|
|
3241
|
+
const userPreferences = () => `${user()}/preferences`;
|
|
2459
3242
|
const balance = () => `${BASE_URL}/api/balance`;
|
|
2460
3243
|
const userPlugins = () => `${BASE_URL}/api/user/plugins`;
|
|
2461
3244
|
const deleteUser$1 = () => `${BASE_URL}/api/user/delete`;
|
|
3245
|
+
const codeEnvironments = () => `${BASE_URL}/api/code-environments`;
|
|
3246
|
+
const codeEnvironmentPairings = () => `${codeEnvironments()}/pairings`;
|
|
3247
|
+
const codeEnvironmentById = (id) => `${codeEnvironments()}/${encodeURIComponent(id)}`;
|
|
3248
|
+
const codeEnvironmentSettings = (id) => `${codeEnvironmentById(id)}/settings`;
|
|
2462
3249
|
const messagesRoot = `${BASE_URL}/api/messages`;
|
|
2463
3250
|
const messages = (params) => {
|
|
2464
3251
|
const { conversationId, messageId, ...rest } = params;
|
|
@@ -2470,9 +3257,16 @@ const messagesArtifacts = (messageId) => `${messagesRoot}/artifact/${messageId}`
|
|
|
2470
3257
|
const messagesBranch = () => `${messagesRoot}/branch`;
|
|
2471
3258
|
const shareRoot = `${BASE_URL}/api/share`;
|
|
2472
3259
|
const shareMessages = (shareId) => `${shareRoot}/${shareId}`;
|
|
3260
|
+
const forkSharedMessages = (shareId) => `${shareRoot}/${shareId}/fork`;
|
|
2473
3261
|
const sharedStartupConfig = (shareId) => `${shareMessages(shareId)}/config`;
|
|
2474
3262
|
const getSharedLink$1 = (conversationId) => `${shareRoot}/link/${conversationId}`;
|
|
2475
|
-
const getSharedLinks = (pageSize, sortBy, sortDirection, search, cursor) => `${shareRoot}
|
|
3263
|
+
const getSharedLinks = (pageSize, sortBy, sortDirection, search, cursor) => `${shareRoot}${buildQuery({
|
|
3264
|
+
pageSize,
|
|
3265
|
+
sortBy,
|
|
3266
|
+
sortDirection,
|
|
3267
|
+
search,
|
|
3268
|
+
cursor
|
|
3269
|
+
})}`;
|
|
2476
3270
|
const createSharedLink$1 = (conversationId) => `${shareRoot}/${conversationId}`;
|
|
2477
3271
|
const updateSharedLink$1 = (shareId) => `${shareRoot}/${shareId}`;
|
|
2478
3272
|
/** Share-scoped file routes: serve snapshotted files via shared-link permission. */
|
|
@@ -2492,9 +3286,17 @@ const conversations = (params) => {
|
|
|
2492
3286
|
return `${conversationsRoot}${buildQuery(params)}`;
|
|
2493
3287
|
};
|
|
2494
3288
|
const conversationById = (id) => `${conversationsRoot}/${id}`;
|
|
3289
|
+
const parentSubagents = (parentConversationId) => `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents`;
|
|
3290
|
+
const subagentThread = (parentConversationId, threadId, taskId, cursor) => {
|
|
3291
|
+
const endpoint = `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents/${encodeURIComponent(threadId)}`;
|
|
3292
|
+
if (taskId != null) return `${endpoint}?taskId=${encodeURIComponent(taskId)}`;
|
|
3293
|
+
return cursor == null ? endpoint : `${endpoint}?cursor=${encodeURIComponent(cursor)}`;
|
|
3294
|
+
};
|
|
3295
|
+
const subagentControl = (parentConversationId, threadId) => `${conversationsRoot}/${encodeURIComponent(parentConversationId)}/subagents/${encodeURIComponent(threadId)}/control`;
|
|
2495
3296
|
const genTitle$1 = (conversationId) => `${conversationsRoot}/gen_title/${encodeURIComponent(conversationId)}`;
|
|
2496
3297
|
const updateConversation$1 = () => `${conversationsRoot}/update`;
|
|
2497
3298
|
const archiveConversation$1 = () => `${conversationsRoot}/archive`;
|
|
3299
|
+
const archiveAllConversations$1 = () => `${conversationsRoot}/archive/all`;
|
|
2498
3300
|
const pinConversation$1 = () => `${conversationsRoot}/pin`;
|
|
2499
3301
|
const deleteConversation$1 = () => `${conversationsRoot}`;
|
|
2500
3302
|
const deleteAllConversation = () => `${conversationsRoot}/all`;
|
|
@@ -2512,7 +3314,6 @@ const presets = () => `${BASE_URL}/api/presets`;
|
|
|
2512
3314
|
const deletePreset$1 = () => `${BASE_URL}/api/presets/delete`;
|
|
2513
3315
|
const aiEndpoints = () => `${BASE_URL}/api/endpoints`;
|
|
2514
3316
|
const tokenConfig = () => `${BASE_URL}/api/endpoints/token-config`;
|
|
2515
|
-
const contextProjection = () => `${BASE_URL}/api/endpoints/context-projection`;
|
|
2516
3317
|
const models = () => `${BASE_URL}/api/models`;
|
|
2517
3318
|
const tokenizer = () => `${BASE_URL}/api/tokenizer`;
|
|
2518
3319
|
const login$1 = () => `${BASE_URL}/api/auth/login`;
|
|
@@ -2551,6 +3352,7 @@ const mcpAuthValues = (serverName) => {
|
|
|
2551
3352
|
const cancelMCPOAuth$1 = (serverName) => {
|
|
2552
3353
|
return `${BASE_URL}/api/mcp/oauth/cancel/${serverName}`;
|
|
2553
3354
|
};
|
|
3355
|
+
const mcpOAuthStatus = (flowId) => `${BASE_URL}/api/mcp/oauth/status/${encodeURIComponent(flowId)}`;
|
|
2554
3356
|
const mcpOAuthBind = (serverName) => `${BASE_URL}/api/mcp/${serverName}/oauth/bind`;
|
|
2555
3357
|
const actionOAuthBind = (actionId) => `${BASE_URL}/api/actions/${actionId}/oauth/bind`;
|
|
2556
3358
|
const config = (context) => `${BASE_URL}/api/config${buildQuery({ context })}`;
|
|
@@ -2579,6 +3381,14 @@ const agents = ({ path = "", options }) => {
|
|
|
2579
3381
|
return url;
|
|
2580
3382
|
};
|
|
2581
3383
|
const activeJobs = () => `${BASE_URL}/api/agents/chat/active`;
|
|
3384
|
+
const agentQueuedTurnsRoot = `${BASE_URL}/api/agents/chat/queued-turns`;
|
|
3385
|
+
const agentQueuedTurns = () => agentQueuedTurnsRoot;
|
|
3386
|
+
const agentQueuedTurnsByConversation = (conversationId, clientRequestIds = []) => {
|
|
3387
|
+
const uniqueIds = Array.from(new Set(clientRequestIds)).slice(0, 100);
|
|
3388
|
+
const knownIds = uniqueIds.length > 0 ? `&${uniqueIds.map((id) => `clientRequestIds=${encodeURIComponent(id)}`).join("&")}` : "";
|
|
3389
|
+
return `${agentQueuedTurnsRoot}?conversationId=${encodeURIComponent(conversationId)}${knownIds}`;
|
|
3390
|
+
};
|
|
3391
|
+
const agentQueuedTurn = (queuedTurnId) => `${agentQueuedTurnsRoot}/${encodeURIComponent(queuedTurnId)}`;
|
|
2582
3392
|
const mcp = {
|
|
2583
3393
|
tools: `${BASE_URL}/api/mcp/tools`,
|
|
2584
3394
|
servers: `${BASE_URL}/api/mcp/servers`
|
|
@@ -2587,6 +3397,8 @@ const mcpServer = (serverName) => `${BASE_URL}/api/mcp/servers/${serverName}`;
|
|
|
2587
3397
|
const revertAgentVersion$1 = (agent_id) => `${agents({ path: `${agent_id}/revert` })}`;
|
|
2588
3398
|
const files = () => `${BASE_URL}/api/files`;
|
|
2589
3399
|
const filePreview = (fileId) => `${BASE_URL}/api/files/${encodeURIComponent(fileId)}/preview`;
|
|
3400
|
+
/** Owner-scoped usage touch so queued attachments outlive the upload-window TTL. */
|
|
3401
|
+
const fileUsage = () => `${BASE_URL}/api/files/usage`;
|
|
2590
3402
|
const agentFiles = (agentId) => `${BASE_URL}/api/files/agent/${agentId}`;
|
|
2591
3403
|
const images = () => `${files()}/images`;
|
|
2592
3404
|
const avatar = () => `${images()}/avatar`;
|
|
@@ -2630,6 +3442,9 @@ const deletePrompt$1 = ({ _id, groupId }) => {
|
|
|
2630
3442
|
};
|
|
2631
3443
|
const getCategories$1 = () => `${BASE_URL}/api/categories`;
|
|
2632
3444
|
const getAllPromptGroups$1 = () => `${prompts()}/all`;
|
|
3445
|
+
const schedules = () => `${BASE_URL}/api/schedules`;
|
|
3446
|
+
const schedule = (id) => `${schedules()}/${encodeURIComponent(id)}`;
|
|
3447
|
+
const runSchedule = (id) => `${schedule(id)}/run`;
|
|
2633
3448
|
const skills = () => `${BASE_URL}/api/skills`;
|
|
2634
3449
|
const importSkill$1 = () => `${skills()}/import`;
|
|
2635
3450
|
const getSkill$1 = (id) => `${skills()}/${encodeURIComponent(id)}`;
|
|
@@ -2643,11 +3458,18 @@ const listSkillsWithFilters = (filter) => {
|
|
|
2643
3458
|
};
|
|
2644
3459
|
const skillFiles = (id) => `${getSkill$1(id)}/files`;
|
|
2645
3460
|
const skillFile = (id, relativePath) => `${skillFiles(id)}/${encodeURIComponent(relativePath)}`;
|
|
3461
|
+
const insights = () => `${BASE_URL}/api/admin/insights`;
|
|
3462
|
+
const insightsAccess = () => `${insights()}/access`;
|
|
2646
3463
|
const adminSkillsSync = () => `${BASE_URL}/api/admin/skills/sync`;
|
|
2647
3464
|
const adminSkillsSyncStatus = () => `${adminSkillsSync()}/status`;
|
|
2648
3465
|
const adminSkillsSyncRun = () => `${adminSkillsSync()}/run`;
|
|
2649
3466
|
const adminSkillsSyncCredential = (credentialKey) => `${adminSkillsSync()}/credentials/${encodeURIComponent(credentialKey)}`;
|
|
2650
3467
|
const skillStates = () => `${BASE_URL}/api/user/settings/skills/active`;
|
|
3468
|
+
const adminLangfuseConnection = () => `${BASE_URL}/api/admin/langfuse/connection`;
|
|
3469
|
+
const adminLangfuseConnectionTest = () => `${adminLangfuseConnection()}/test`;
|
|
3470
|
+
const adminLangfuseSessionLink = (conversationId) => `${adminLangfuseConnection()}/session/${encodeURIComponent(conversationId)}`;
|
|
3471
|
+
const toolFavorites = () => `${BASE_URL}/api/user/settings/favorites/tools`;
|
|
3472
|
+
const toolFavorite = (itemType, itemId) => `${toolFavorites()}/${itemType}/${encodeURIComponent(itemId)}`;
|
|
2651
3473
|
const roles = () => `${BASE_URL}/api/roles`;
|
|
2652
3474
|
const adminRoles = () => `${BASE_URL}/api/admin/roles`;
|
|
2653
3475
|
const getRole$1 = (roleName) => `${roles()}/${encodeURIComponent(roleName)}`;
|
|
@@ -2672,7 +3494,8 @@ const disableTwoFactor$1 = () => `${BASE_URL}/api/auth/2fa/disable`;
|
|
|
2672
3494
|
const regenerateBackupCodes$1 = () => `${BASE_URL}/api/auth/2fa/backup/regenerate`;
|
|
2673
3495
|
const verifyTwoFactorTemp$1 = () => `${BASE_URL}/api/auth/2fa/verify-temp`;
|
|
2674
3496
|
const memories = () => `${BASE_URL}/api/memories`;
|
|
2675
|
-
const memory = (key) => `${memories()}/${encodeURIComponent(key)}`;
|
|
3497
|
+
const memory = (key, agentId) => `${memories()}/${encodeURIComponent(key)}${agentId ? `?agentId=${encodeURIComponent(agentId)}` : ""}`;
|
|
3498
|
+
const memoryById = (id, agentId) => `${memories()}/id/${encodeURIComponent(id)}${agentId ? `?agentId=${encodeURIComponent(agentId)}` : ""}`;
|
|
2676
3499
|
const memoryPreferences = () => `${memories()}/preferences`;
|
|
2677
3500
|
const searchPrincipals$1 = (params) => {
|
|
2678
3501
|
const { q: query, limit, types } = params;
|
|
@@ -2850,9 +3673,11 @@ const UserOAuthOptionsSchema = OAuthOptionsBaseSchema.omit({
|
|
|
2850
3673
|
const OboOptionsSchema = zod.z.object({
|
|
2851
3674
|
/** Scopes to request for the downstream MCP server (e.g., "api://<client-id>/Mcp.Tools.ReadWrite") */
|
|
2852
3675
|
scopes: zod.z.string().min(1) });
|
|
3676
|
+
const MCP_SERVER_TITLE_PATTERN = /* @__PURE__ */ new RegExp("^[\\p{L}\\p{N}][\\p{L}\\p{N}\\p{M}'’ -]*$", "u");
|
|
3677
|
+
const MCP_SERVER_TITLE_ERROR = "Title must start with a letter or number and can include spaces, hyphens, and apostrophes";
|
|
2853
3678
|
const BaseOptionsSchema = zod.z.object({
|
|
2854
|
-
/** Display name for the MCP server
|
|
2855
|
-
title: zod.z.string().regex(
|
|
3679
|
+
/** Display name for the MCP server */
|
|
3680
|
+
title: zod.z.string().regex(MCP_SERVER_TITLE_PATTERN, MCP_SERVER_TITLE_ERROR).optional(),
|
|
2856
3681
|
/** Description of the MCP server */
|
|
2857
3682
|
description: zod.z.string().optional(),
|
|
2858
3683
|
/**
|
|
@@ -2867,7 +3692,14 @@ const BaseOptionsSchema = zod.z.object({
|
|
|
2867
3692
|
/** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
|
|
2868
3693
|
sseReadTimeout: zod.z.number().int().positive().optional(),
|
|
2869
3694
|
initTimeout: zod.z.number().int().nonnegative().optional(),
|
|
2870
|
-
/**
|
|
3695
|
+
/**
|
|
3696
|
+
* Whether the server is offered in chat.
|
|
3697
|
+
*
|
|
3698
|
+
* `false` hides it from the chat dropdown (MCPSelect) AND bars it from the
|
|
3699
|
+
* chat selection a request carries, so a stale or hand-written request cannot
|
|
3700
|
+
* reach it either. It does not restrict agents, nor a server a model spec
|
|
3701
|
+
* pins through `mcpServers` — both are the operator's own choice.
|
|
3702
|
+
*/
|
|
2871
3703
|
chatMenu: zod.z.boolean().optional(),
|
|
2872
3704
|
/**
|
|
2873
3705
|
* Controls server instruction behavior:
|
|
@@ -2923,6 +3755,26 @@ const ProxyUrlSchema = zod.z.string().transform((val) => extractEnvVariable(val)
|
|
|
2923
3755
|
const protocol = new URL(val).protocol;
|
|
2924
3756
|
return protocol === "http:" || protocol === "https:" || protocol === "socks:" || protocol === "socks5:";
|
|
2925
3757
|
}, { message: "Proxy URL must use http://, https://, socks://, or socks5://" });
|
|
3758
|
+
const PROCESS_MCP_SERVER_FIELDS = new Set([
|
|
3759
|
+
"command",
|
|
3760
|
+
"args",
|
|
3761
|
+
"env",
|
|
3762
|
+
"cwd",
|
|
3763
|
+
"stderr"
|
|
3764
|
+
]);
|
|
3765
|
+
function isProcessMCPServerField(field) {
|
|
3766
|
+
return PROCESS_MCP_SERVER_FIELDS.has(field);
|
|
3767
|
+
}
|
|
3768
|
+
function isProcessMCPServerConfig(value) {
|
|
3769
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
3770
|
+
const config = value;
|
|
3771
|
+
if (config.type === "stdio") return true;
|
|
3772
|
+
return Object.keys(config).some(isProcessMCPServerField);
|
|
3773
|
+
}
|
|
3774
|
+
function hasProcessMCPServerConfig(value) {
|
|
3775
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
3776
|
+
return Object.values(value).some(isProcessMCPServerConfig);
|
|
3777
|
+
}
|
|
2926
3778
|
const StdioOptionsSchema = BaseOptionsSchema.extend({
|
|
2927
3779
|
type: zod.z.literal("stdio").default("stdio"),
|
|
2928
3780
|
obo: zod.z.undefined().optional(),
|
|
@@ -2955,7 +3807,12 @@ const StdioOptionsSchema = BaseOptionsSchema.extend({
|
|
|
2955
3807
|
"pipe",
|
|
2956
3808
|
"ignore",
|
|
2957
3809
|
"inherit"
|
|
2958
|
-
]), zod.z.number().int().nonnegative()]).optional()
|
|
3810
|
+
]), zod.z.number().int().nonnegative()]).optional(),
|
|
3811
|
+
/**
|
|
3812
|
+
* Working directory for the spawned process. Supplied by Agent Plugins
|
|
3813
|
+
* packages, which resolve and contain the path before it reaches this schema.
|
|
3814
|
+
*/
|
|
3815
|
+
cwd: zod.z.string().optional()
|
|
2959
3816
|
});
|
|
2960
3817
|
const WebSocketOptionsSchema = BaseOptionsSchema.extend({
|
|
2961
3818
|
type: zod.z.literal("websocket").default("websocket"),
|
|
@@ -3090,7 +3947,10 @@ const defaultSocialLogins = [
|
|
|
3090
3947
|
"discord",
|
|
3091
3948
|
"saml"
|
|
3092
3949
|
];
|
|
3093
|
-
const BASE_ONLY_CONFIG_SECTIONS = [];
|
|
3950
|
+
const BASE_ONLY_CONFIG_SECTIONS = ["filters"];
|
|
3951
|
+
/** Sections that may be stored in the tenant's base config document but must
|
|
3952
|
+
* not be overridden or tombstoned by role, group, or user config documents. */
|
|
3953
|
+
const BASE_PRINCIPAL_CONFIG_SECTIONS = ["langfuse"];
|
|
3094
3954
|
const defaultRetrievalModels = [
|
|
3095
3955
|
"gpt-4o",
|
|
3096
3956
|
"o1-preview-2024-09-12",
|
|
@@ -3115,6 +3975,12 @@ const defaultRetrievalModels = [
|
|
|
3115
3975
|
];
|
|
3116
3976
|
const excludedKeys = new Set([
|
|
3117
3977
|
"conversationId",
|
|
3978
|
+
"agentEventBinding",
|
|
3979
|
+
"agentEventActor",
|
|
3980
|
+
"agentEventActorReconciliations",
|
|
3981
|
+
"agentEventActorEpoch",
|
|
3982
|
+
"agentEventActorLegacyTurn",
|
|
3983
|
+
"subagentThread",
|
|
3118
3984
|
"title",
|
|
3119
3985
|
"iconURL",
|
|
3120
3986
|
"greeting",
|
|
@@ -3126,6 +3992,8 @@ const excludedKeys = new Set([
|
|
|
3126
3992
|
"isTemporary",
|
|
3127
3993
|
"messages",
|
|
3128
3994
|
"isArchived",
|
|
3995
|
+
"pinned",
|
|
3996
|
+
"archivedAt",
|
|
3129
3997
|
"tags",
|
|
3130
3998
|
"user",
|
|
3131
3999
|
"__v",
|
|
@@ -3174,6 +4042,32 @@ function isPrivateIPv4Literal(value) {
|
|
|
3174
4042
|
if (a >= 224) return true;
|
|
3175
4043
|
return false;
|
|
3176
4044
|
}
|
|
4045
|
+
/**
|
|
4046
|
+
* Mirrors `hasPrivateEmbeddedIPv4` in `@librechat/api`'s ip helpers: 6to4, NAT64, and Teredo
|
|
4047
|
+
* carry an IPv4 address inside the IPv6 one, and the runtime guard blocks those when the
|
|
4048
|
+
* embedded address is private. Kept in sync so an operator can exempt what the runtime blocks.
|
|
4049
|
+
*/
|
|
4050
|
+
function hasPrivateEmbeddedIPv4Literal(value) {
|
|
4051
|
+
const is6to4 = value.startsWith("2002:");
|
|
4052
|
+
const isNat64 = value.startsWith("64:ff9b::");
|
|
4053
|
+
const isTeredo = value.startsWith("2001::");
|
|
4054
|
+
if (!is6to4 && !isNat64 && !isTeredo) return false;
|
|
4055
|
+
const segments = value.split(":").filter((segment) => segment !== "");
|
|
4056
|
+
const pair = is6to4 ? segments.slice(1, 3) : segments.slice(-2);
|
|
4057
|
+
if (pair.length !== 2) return false;
|
|
4058
|
+
const hi = parseInt(pair[0], 16);
|
|
4059
|
+
const lo = parseInt(pair[1], 16);
|
|
4060
|
+
if (isNaN(hi) || isNaN(lo)) return false;
|
|
4061
|
+
/** RFC 4380: Teredo stores the external IPv4 as a bitwise complement. */
|
|
4062
|
+
const high = isTeredo ? ~hi : hi;
|
|
4063
|
+
const low = isTeredo ? ~lo : lo;
|
|
4064
|
+
return isPrivateIPv4Literal([
|
|
4065
|
+
high >> 8 & 255,
|
|
4066
|
+
high & 255,
|
|
4067
|
+
low >> 8 & 255,
|
|
4068
|
+
low & 255
|
|
4069
|
+
].join("."));
|
|
4070
|
+
}
|
|
3177
4071
|
function isPrivateIPv6Literal(value) {
|
|
3178
4072
|
if (!value.includes(":")) return false;
|
|
3179
4073
|
if (value === "::1" || value === "::") return true;
|
|
@@ -3184,7 +4078,7 @@ function isPrivateIPv6Literal(value) {
|
|
|
3184
4078
|
}
|
|
3185
4079
|
const mappedMatch = value.match(/^::ffff:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);
|
|
3186
4080
|
if (mappedMatch) return isPrivateIPv4Literal(mappedMatch[1]);
|
|
3187
|
-
return
|
|
4081
|
+
return hasPrivateEmbeddedIPv4Literal(value);
|
|
3188
4082
|
}
|
|
3189
4083
|
/**
|
|
3190
4084
|
* Mirrors the allowedAddresses parser in `@librechat/api`'s auth helpers.
|
|
@@ -3401,6 +4295,7 @@ let AgentCapabilities = /* @__PURE__ */ function(AgentCapabilities) {
|
|
|
3401
4295
|
AgentCapabilities["end_after_tools"] = "end_after_tools";
|
|
3402
4296
|
AgentCapabilities["deferred_tools"] = "deferred_tools";
|
|
3403
4297
|
AgentCapabilities["execute_code"] = "execute_code";
|
|
4298
|
+
AgentCapabilities["stateful_code_sessions"] = "stateful_code_sessions";
|
|
3404
4299
|
AgentCapabilities["file_search"] = "file_search";
|
|
3405
4300
|
AgentCapabilities["web_search"] = "web_search";
|
|
3406
4301
|
AgentCapabilities["artifacts"] = "artifacts";
|
|
@@ -3408,9 +4303,13 @@ let AgentCapabilities = /* @__PURE__ */ function(AgentCapabilities) {
|
|
|
3408
4303
|
AgentCapabilities["actions"] = "actions";
|
|
3409
4304
|
AgentCapabilities["context"] = "context";
|
|
3410
4305
|
AgentCapabilities["skills"] = "skills";
|
|
4306
|
+
AgentCapabilities["memory"] = "memory";
|
|
4307
|
+
AgentCapabilities["ask_user_question"] = "ask_user_question";
|
|
3411
4308
|
AgentCapabilities["tools"] = "tools";
|
|
3412
4309
|
AgentCapabilities["chain"] = "chain";
|
|
3413
4310
|
AgentCapabilities["ocr"] = "ocr";
|
|
4311
|
+
AgentCapabilities["run_in_background"] = "run_in_background";
|
|
4312
|
+
AgentCapabilities["tool_intents"] = "tool_intents";
|
|
3414
4313
|
return AgentCapabilities;
|
|
3415
4314
|
}({});
|
|
3416
4315
|
const defaultAssistantsVersion = {
|
|
@@ -3418,7 +4317,14 @@ const defaultAssistantsVersion = {
|
|
|
3418
4317
|
["azureAssistants"]: 1
|
|
3419
4318
|
};
|
|
3420
4319
|
const baseEndpointSchema = zod.z.object({
|
|
3421
|
-
|
|
4320
|
+
/**
|
|
4321
|
+
* Milliseconds between visible streamed chunks. Agents SDK-backed
|
|
4322
|
+
* providers (openAI, custom, anthropic, google, bedrock, agents) smooth
|
|
4323
|
+
* adaptively at 25ms by default; set to override the cadence, 0 to
|
|
4324
|
+
* disable smoothing. Legacy Assistants and Ollama paths instead sleep
|
|
4325
|
+
* this long per provider chunk (default 1ms), with no adaptive smoothing.
|
|
4326
|
+
*/
|
|
4327
|
+
streamRate: zod.z.number().min(0).optional(),
|
|
3422
4328
|
baseURL: zod.z.string().optional(),
|
|
3423
4329
|
/**
|
|
3424
4330
|
* Custom request headers forwarded to the provider on every request. Values
|
|
@@ -3446,6 +4352,53 @@ const baseEndpointSchema = zod.z.object({
|
|
|
3446
4352
|
* completes (legacy behavior).
|
|
3447
4353
|
*/
|
|
3448
4354
|
titleTiming: zod.z.union([zod.z.literal("immediate"), zod.z.literal("final")]).optional(),
|
|
4355
|
+
/**
|
|
4356
|
+
* Agent activity groups: collapse each contiguous block of reasoning and
|
|
4357
|
+
* tool calls under a generated one-line header. Mirrors the title options
|
|
4358
|
+
* above — `activityLabel` enables it (like `titleConvo`), the rest tune
|
|
4359
|
+
* the fast model that writes the label.
|
|
4360
|
+
*
|
|
4361
|
+
* NOTE: fields added here reach `endpoints.all` automatically (that schema
|
|
4362
|
+
* is `baseEndpointSchema.omit({ baseURL })`), but NOT Azure — see the
|
|
4363
|
+
* enumerated `.pick()` in `azureEndpointSchema` below.
|
|
4364
|
+
*/
|
|
4365
|
+
activityLabel: zod.z.boolean().optional(),
|
|
4366
|
+
/** Model used to write activity labels. Defaults to `titleModel`, then the agent's model. */
|
|
4367
|
+
activityModel: zod.z.string().optional(),
|
|
4368
|
+
/** Endpoint whose credentials the label model runs on. Defaults to the agent's endpoint. */
|
|
4369
|
+
activityEndpoint: zod.z.string().optional(),
|
|
4370
|
+
/** Overrides the system prompt used to write activity labels. */
|
|
4371
|
+
activityPrompt: zod.z.string().optional(),
|
|
4372
|
+
/** Cost cap: maximum labels generated per run. Default 20. */
|
|
4373
|
+
activityMaxPerRun: zod.z.number().int().positive().optional(),
|
|
4374
|
+
/** Per-entry truncation of tool input/output in the label prompt. Default 600. */
|
|
4375
|
+
activityCharLimit: zod.z.number().int().positive().optional(),
|
|
4376
|
+
/** Generates one parent summary for each run phase containing 2+ activities. */
|
|
4377
|
+
activityPhaseLabel: zod.z.boolean().optional(),
|
|
4378
|
+
/** Model used for phase summaries. Defaults to activityModel, titleModel, then the run model. */
|
|
4379
|
+
activityPhaseModel: zod.z.string().optional(),
|
|
4380
|
+
/** Endpoint whose credentials the phase summary model uses. Defaults to activityEndpoint. */
|
|
4381
|
+
activityPhaseEndpoint: zod.z.string().optional(),
|
|
4382
|
+
/** Overrides the dedicated phase-summary system prompt. */
|
|
4383
|
+
activityPhasePrompt: zod.z.string().optional(),
|
|
4384
|
+
/** Cost cap: maximum phase summaries generated per run. Default 5. */
|
|
4385
|
+
activityPhaseMaxPerRun: zod.z.number().int().positive().optional(),
|
|
4386
|
+
/** Generates a live orientation label for sufficiently long top-level response reasoning. */
|
|
4387
|
+
reasoningLabel: zod.z.boolean().optional(),
|
|
4388
|
+
/** Model used for reasoning labels. Defaults to activityModel, titleModel, then run model. */
|
|
4389
|
+
reasoningLabelModel: zod.z.string().optional(),
|
|
4390
|
+
/** Endpoint receiving the bounded visible-reasoning snapshot. Defaults to activityEndpoint. */
|
|
4391
|
+
reasoningLabelEndpoint: zod.z.string().optional(),
|
|
4392
|
+
/** Overrides the dedicated reasoning-label system prompt. */
|
|
4393
|
+
reasoningLabelPrompt: zod.z.string().optional(),
|
|
4394
|
+
/** Characters required before the first reasoning label. Default 500. */
|
|
4395
|
+
reasoningLabelMinChars: zod.z.number().int().positive().optional(),
|
|
4396
|
+
/** New characters required between streaming revisions. Default 400. */
|
|
4397
|
+
reasoningLabelUpdateChars: zod.z.number().int().positive().optional(),
|
|
4398
|
+
/** Minimum milliseconds between streaming revisions. Default 3000. */
|
|
4399
|
+
reasoningLabelUpdateIntervalMs: zod.z.number().int().nonnegative().optional(),
|
|
4400
|
+
/** Cost cap: maximum reasoning-label provider calls attempted per run. Default 8. */
|
|
4401
|
+
reasoningLabelMaxPerRun: zod.z.number().int().positive().optional(),
|
|
3449
4402
|
/** Maximum characters allowed in a single tool result before truncation. */
|
|
3450
4403
|
maxToolResultChars: zod.z.number().positive().optional()
|
|
3451
4404
|
});
|
|
@@ -3486,6 +4439,11 @@ const assistantEndpointSchema = baseEndpointSchema.merge(zod.z.object({
|
|
|
3486
4439
|
"tools"
|
|
3487
4440
|
]),
|
|
3488
4441
|
apiKey: zod.z.string().optional(),
|
|
4442
|
+
/** Masked preview of the API key, stored at write time so admin
|
|
4443
|
+
* reads can show which key is configured without returning the secret.
|
|
4444
|
+
* Shared by both `endpoints.assistants` and `endpoints.azureAssistants`,
|
|
4445
|
+
* which both use this schema. */
|
|
4446
|
+
apiKeyPreview: zod.z.string().optional(),
|
|
3489
4447
|
models: zod.z.object({
|
|
3490
4448
|
default: zod.z.array(modelItemSchema).min(1),
|
|
3491
4449
|
fetch: zod.z.boolean().optional(),
|
|
@@ -3503,6 +4461,8 @@ const defaultAgentCapabilities = [
|
|
|
3503
4461
|
"actions",
|
|
3504
4462
|
"context",
|
|
3505
4463
|
"skills",
|
|
4464
|
+
"memory",
|
|
4465
|
+
"ask_user_question",
|
|
3506
4466
|
"tools",
|
|
3507
4467
|
"chain",
|
|
3508
4468
|
"ocr"
|
|
@@ -3548,23 +4508,304 @@ const remoteApiAuthSchema = zod.z.object({
|
|
|
3548
4508
|
oidc: remoteApiOidcSchema.optional()
|
|
3549
4509
|
});
|
|
3550
4510
|
const remoteApiSchema = zod.z.object({ auth: remoteApiAuthSchema.optional() });
|
|
4511
|
+
/**
|
|
4512
|
+
* Permission mode applied to a tool call. Mirrors `@librechat/agents`'s
|
|
4513
|
+
* `ToolPolicyMode` 1:1.
|
|
4514
|
+
*
|
|
4515
|
+
* - `default`: ask the user about anything not explicitly allowed (default-on).
|
|
4516
|
+
* - `dontAsk`: deny anything not explicitly allowed (headless / API-key flows).
|
|
4517
|
+
* - `bypass`: auto-approve everything that isn't explicitly denied
|
|
4518
|
+
* (the user-facing "stop asking me" toggle).
|
|
4519
|
+
*
|
|
4520
|
+
* Subagents inherit the parent's mode; this is enforced by the SDK and not
|
|
4521
|
+
* overridable per-subagent.
|
|
4522
|
+
*/
|
|
4523
|
+
const toolApprovalModeSchema = zod.z.enum([
|
|
4524
|
+
"default",
|
|
4525
|
+
"dontAsk",
|
|
4526
|
+
"bypass"
|
|
4527
|
+
]);
|
|
4528
|
+
/**
|
|
4529
|
+
* Per-endpoint tool-approval policy.
|
|
4530
|
+
*
|
|
4531
|
+
* Shape mirrors `@librechat/agents`'s `ToolPolicyConfig` so the host can map it
|
|
4532
|
+
* directly into `createToolPolicyHook(config)`. The SDK does the evaluation
|
|
4533
|
+
* (`deny → ask → allow → bypass → dontAsk → fallthrough(ask)`); this config
|
|
4534
|
+
* just describes the surface.
|
|
4535
|
+
*
|
|
4536
|
+
* Conventions:
|
|
4537
|
+
* - All list entries are matched as globs (`*`). Use `mcp:server:*` to scope
|
|
4538
|
+
* a rule to every tool from a single MCP server.
|
|
4539
|
+
* - `deny` always wins, including under `bypass`.
|
|
4540
|
+
* - `enabled: false` is a LibreChat-only kill switch that disables the entire
|
|
4541
|
+
* HITL machinery for this endpoint (no checkpointer, no hooks, no prompts).
|
|
4542
|
+
* This is admin-level; users toggle prompting via `mode: 'bypass'` instead.
|
|
4543
|
+
*/
|
|
4544
|
+
/**
|
|
4545
|
+
* A programmatic tool-approval hook loaded from a module at startup.
|
|
4546
|
+
*
|
|
4547
|
+
* The referenced module's default export must be a builder
|
|
4548
|
+
* `(options?) => ToolApprovalHookFactory` (see `@librechat/api`'s `registerToolApprovalHook`).
|
|
4549
|
+
* Hooks compose with the static `allow`/`deny`/`ask` policy above and can only TIGHTEN it
|
|
4550
|
+
* (the SDK folds decisions `deny → ask → allow`). This is admin-level config — the module is
|
|
4551
|
+
* dynamically imported and executed in-process, so only reference trusted code.
|
|
4552
|
+
*/
|
|
4553
|
+
const toolApprovalHookConfigSchema = zod.z.object({
|
|
4554
|
+
/**
|
|
4555
|
+
* Module specifier to import: a bare package name (e.g. `@acme/approval-hooks`) or a path —
|
|
4556
|
+
* absolute, or relative to the app root. Its default export is the hook builder.
|
|
4557
|
+
*/
|
|
4558
|
+
module: zod.z.string().min(1),
|
|
4559
|
+
/** Optional regex matched against the tool name; omit to run for every tool. */
|
|
4560
|
+
matcher: zod.z.string().optional(),
|
|
4561
|
+
/** Static options forwarded to the module's builder; the hook's own per-call config. */
|
|
4562
|
+
options: zod.z.record(zod.z.unknown()).optional()
|
|
4563
|
+
});
|
|
4564
|
+
const toolApprovalPolicySchema = zod.z.object({
|
|
4565
|
+
enabled: zod.z.boolean().optional(),
|
|
4566
|
+
mode: toolApprovalModeSchema.optional(),
|
|
4567
|
+
allow: zod.z.array(zod.z.string()).optional(),
|
|
4568
|
+
deny: zod.z.array(zod.z.string()).optional(),
|
|
4569
|
+
ask: zod.z.array(zod.z.string()).optional(),
|
|
4570
|
+
/** Optional reason template surfaced in the prompt; `{tool}` is interpolated. */
|
|
4571
|
+
reason: zod.z.string().optional(),
|
|
4572
|
+
/**
|
|
4573
|
+
* Programmatic policy hooks loaded from modules at startup. They layer on top of the
|
|
4574
|
+
* static lists above for dynamic, context-aware decisions the lists can't express
|
|
4575
|
+
* (per-args, per-agent, per-user). See {@link toolApprovalHookConfigSchema}.
|
|
4576
|
+
*
|
|
4577
|
+
* BASE-CONFIG ONLY: hooks are imported + registered once, process-wide, at server
|
|
4578
|
+
* startup — they are NOT reloaded from per-role/user/tenant admin overrides. Encode
|
|
4579
|
+
* per-user/tenant behavior INSIDE the hook (via its runtime context), not by varying the
|
|
4580
|
+
* module list per override. Honored only when `enabled` is true.
|
|
4581
|
+
*/
|
|
4582
|
+
hooks: zod.z.array(toolApprovalHookConfigSchema).optional()
|
|
4583
|
+
}).optional();
|
|
4584
|
+
/**
|
|
4585
|
+
* Durable checkpointer backing human-in-the-loop resume.
|
|
4586
|
+
*
|
|
4587
|
+
* When `toolApproval.enabled` is true, a run that pauses for review suspends its
|
|
4588
|
+
* LangGraph state to a checkpoint; resuming rebuilds that state on a *fresh* `Run`
|
|
4589
|
+
* — possibly on a different replica, or the same worker after a restart. That only
|
|
4590
|
+
* works if the checkpoint outlives the original request, so HITL needs a durable
|
|
4591
|
+
* saver, not the SDK's process-local `MemorySaver` fallback.
|
|
4592
|
+
*
|
|
4593
|
+
* Defaults are zero-config: with `toolApproval.enabled` on and no `checkpointer`
|
|
4594
|
+
* block, LibreChat persists checkpoints to its primary MongoDB, so resume works
|
|
4595
|
+
* across replicas out of the box.
|
|
4596
|
+
*
|
|
4597
|
+
* - `type: 'mongo'` (default) — persist to the app database; survives restarts and
|
|
4598
|
+
* resolves on any replica. A TTL index reclaims runs that are never resolved.
|
|
4599
|
+
* - `type: 'memory'` — process-local only. Paused runs do NOT survive a restart and
|
|
4600
|
+
* can only be resolved on the originating worker. Single-process / dev only.
|
|
4601
|
+
*/
|
|
4602
|
+
const checkpointerTypeSchema = zod.z.enum(["mongo", "memory"]);
|
|
4603
|
+
const checkpointerSchema = zod.z.object({
|
|
4604
|
+
type: checkpointerTypeSchema.optional(),
|
|
4605
|
+
/**
|
|
4606
|
+
* Approval window, in seconds: how long a paused run waits for a decision
|
|
4607
|
+
* before it is reclaimed. Drives both the Mongo TTL index on checkpoints and
|
|
4608
|
+
* the pending-action expiry, keeping the two layers in lockstep. Defaults to
|
|
4609
|
+
* 86400 (24h). Raise it for longer review windows.
|
|
4610
|
+
*/
|
|
4611
|
+
ttl: zod.z.number().int().positive().optional(),
|
|
4612
|
+
/** Advanced: override the Mongo collection names used for checkpoints. */
|
|
4613
|
+
checkpointCollectionName: zod.z.string().optional(),
|
|
4614
|
+
checkpointWritesCollectionName: zod.z.string().optional()
|
|
4615
|
+
}).optional();
|
|
4616
|
+
const codeEnvironmentBaseURLSchema = zod.z.string().trim().url().refine((value) => {
|
|
4617
|
+
try {
|
|
4618
|
+
const url = new URL(value);
|
|
4619
|
+
return (url.protocol === "http:" || url.protocol === "https:") && !value.includes("?") && !value.includes("#") && url.search.length === 0 && url.hash.length === 0;
|
|
4620
|
+
} catch {
|
|
4621
|
+
return false;
|
|
4622
|
+
}
|
|
4623
|
+
}, { message: "Code environment baseURL must be an HTTP(S) base URL without query or fragment" });
|
|
4624
|
+
function isSecureCodeEnvironmentControlURL(baseURL) {
|
|
4625
|
+
try {
|
|
4626
|
+
const url = new URL(baseURL.trim());
|
|
4627
|
+
if (url.protocol === "https:") return true;
|
|
4628
|
+
if (url.protocol !== "http:") return false;
|
|
4629
|
+
return url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "[::1]";
|
|
4630
|
+
} catch {
|
|
4631
|
+
return false;
|
|
4632
|
+
}
|
|
4633
|
+
}
|
|
4634
|
+
const codeEnvironmentPermissionDecisionSchema = zod.z.enum([
|
|
4635
|
+
"allow",
|
|
4636
|
+
"ask",
|
|
4637
|
+
"deny"
|
|
4638
|
+
]);
|
|
4639
|
+
const codeEnvironmentPermissionFieldSchema = zod.z.object({
|
|
4640
|
+
allowed: zod.z.array(codeEnvironmentPermissionDecisionSchema).min(1),
|
|
4641
|
+
default: codeEnvironmentPermissionDecisionSchema.optional().default("ask")
|
|
4642
|
+
}).strict().superRefine((field, context) => {
|
|
4643
|
+
if (!field.allowed.includes(field.default)) context.addIssue({
|
|
4644
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4645
|
+
path: ["default"],
|
|
4646
|
+
message: "Permission default must be included in allowed values"
|
|
4647
|
+
});
|
|
4648
|
+
});
|
|
4649
|
+
/**
|
|
4650
|
+
* Typed user-tunable surface for one attached code environment. Omitted fields
|
|
4651
|
+
* remain fixed at LibreChat's safe baseline. Isolation, networking, mounts,
|
|
4652
|
+
* privileged execution, and secrets are deliberately not representable here.
|
|
4653
|
+
*/
|
|
4654
|
+
const codeEnvironmentUserConfigSchema = zod.z.object({ permissions: zod.z.object({
|
|
4655
|
+
fileWrite: codeEnvironmentPermissionFieldSchema.optional(),
|
|
4656
|
+
commandExecution: codeEnvironmentPermissionFieldSchema.optional()
|
|
4657
|
+
}).strict().optional() }).strict();
|
|
4658
|
+
const codeEnvironmentUserSettingsSchema = zod.z.object({ permissions: zod.z.object({
|
|
4659
|
+
fileWrite: codeEnvironmentPermissionDecisionSchema.optional(),
|
|
4660
|
+
commandExecution: codeEnvironmentPermissionDecisionSchema.optional()
|
|
4661
|
+
}).strict().optional() }).strict();
|
|
3551
4662
|
const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zod.z.object({
|
|
3552
4663
|
recursionLimit: zod.z.number().optional(),
|
|
3553
4664
|
disableBuilder: zod.z.boolean().optional().default(false),
|
|
3554
4665
|
maxRecursionLimit: zod.z.number().optional(),
|
|
4666
|
+
/** Max cumulative bytes a single streamed tool call's arguments may reach before the run
|
|
4667
|
+
* aborts. Defaults to 64 KiB in the agents SDK; `0` disables the guard. */
|
|
4668
|
+
maxToolCallArgBytes: zod.z.number().optional(),
|
|
4669
|
+
/** Max streamed chunk events per model generation before the run aborts. Off by default. */
|
|
4670
|
+
maxDeltaEventsPerTurn: zod.z.number().optional(),
|
|
4671
|
+
/** Per-tool overrides of `maxToolCallArgBytes`, keyed by model-facing tool name; `0`
|
|
4672
|
+
* disables the guard for that tool only. Merged over LibreChat's shipped default of
|
|
4673
|
+
* `{ create_file: 131072 }`. */
|
|
4674
|
+
maxToolCallArgBytesByTool: zod.z.record(zod.z.number()).optional(),
|
|
3555
4675
|
maxCitations: zod.z.number().min(1).max(50).optional().default(30),
|
|
3556
4676
|
maxCitationsPerFile: zod.z.number().min(1).max(10).optional().default(7),
|
|
3557
4677
|
minRelevanceScore: zod.z.number().min(0).max(1).optional().default(.45),
|
|
4678
|
+
/** Maximum explicit subagents per agent (`agent_ids` and `graphs`); raised from
|
|
4679
|
+
* the shipped default of 10 for orchestration-heavy deployments, bounded by
|
|
4680
|
+
* `MAX_SUBAGENTS_CEILING`. */
|
|
4681
|
+
maxSubagents: zod.z.number().int().min(1).max(50).optional().default(10),
|
|
3558
4682
|
allowedProviders: zod.z.array(zod.z.union([zod.z.string(), eModelEndpointSchema])).optional(),
|
|
3559
4683
|
capabilities: zod.z.array(zod.z.nativeEnum(AgentCapabilities)).optional().default(defaultAgentCapabilities),
|
|
4684
|
+
/** Controls which workspace-sharing scopes users may select for stateful code sessions.
|
|
4685
|
+
* Omit this block to preserve the legacy behavior of allowing every scope. */
|
|
4686
|
+
statefulCodeSessions: zod.z.object({
|
|
4687
|
+
allowedEnvironments: zod.z.array(zod.z.enum(STATEFUL_CODE_ENVIRONMENTS)).min(1),
|
|
4688
|
+
/** Operator-managed execution environments. Attached entries route to a
|
|
4689
|
+
* Code API deployment backed by an outbound librechat-code worker. */
|
|
4690
|
+
environments: zod.z.array(zod.z.object({
|
|
4691
|
+
id: zod.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/),
|
|
4692
|
+
name: zod.z.string().min(1).max(100),
|
|
4693
|
+
type: zod.z.enum(["managed", "attached"]),
|
|
4694
|
+
baseURL: codeEnvironmentBaseURLSchema,
|
|
4695
|
+
default: zod.z.boolean().optional(),
|
|
4696
|
+
/** Server-only outbound worker route. Removed from public config. */
|
|
4697
|
+
workerId: zod.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/).optional(),
|
|
4698
|
+
/** Distinguishes operator policy from a principal-authorized
|
|
4699
|
+
* environment merged into request-scoped server config. */
|
|
4700
|
+
owner: zod.z.enum(["deployment", "principal"]).optional().default("deployment"),
|
|
4701
|
+
/** Administrator-controlled user-tunable settings. Only fields
|
|
4702
|
+
* represented here may be changed by a principal. */
|
|
4703
|
+
configSchema: codeEnvironmentUserConfigSchema.optional(),
|
|
4704
|
+
/** Request-scoped effective settings for a principal-owned environment.
|
|
4705
|
+
* Deployment config should define defaults through configSchema instead. */
|
|
4706
|
+
settings: codeEnvironmentUserSettingsSchema.optional(),
|
|
4707
|
+
/** Server-only enrollment metadata. `tokenEnv` names an
|
|
4708
|
+
* environment variable and never contains the token itself. */
|
|
4709
|
+
pairing: zod.z.object({
|
|
4710
|
+
workerId: zod.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/).optional(),
|
|
4711
|
+
allowPrincipalWorkers: zod.z.boolean().optional().default(false),
|
|
4712
|
+
tokenEnv: zod.z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/)
|
|
4713
|
+
}).superRefine((pairing, pairingContext) => {
|
|
4714
|
+
if (pairing.workerId != null || pairing.allowPrincipalWorkers === true) return;
|
|
4715
|
+
pairingContext.addIssue({
|
|
4716
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4717
|
+
message: "Pairing requires a workerId or principal workers"
|
|
4718
|
+
});
|
|
4719
|
+
}).optional()
|
|
4720
|
+
})).optional()
|
|
4721
|
+
}).superRefine((value, context) => {
|
|
4722
|
+
if (!value?.environments) return;
|
|
4723
|
+
const ids = /* @__PURE__ */ new Set();
|
|
4724
|
+
let defaults = 0;
|
|
4725
|
+
let executableEnvironments = 0;
|
|
4726
|
+
for (const environment of value.environments) {
|
|
4727
|
+
const pairingOnly = environment.pairing?.allowPrincipalWorkers === true && environment.pairing.workerId == null && environment.workerId == null;
|
|
4728
|
+
if (environment.pairing != null && environment.type !== "attached") context.addIssue({
|
|
4729
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4730
|
+
message: "Only attached code environments may configure pairing",
|
|
4731
|
+
path: [
|
|
4732
|
+
"environments",
|
|
4733
|
+
environment.id,
|
|
4734
|
+
"pairing"
|
|
4735
|
+
]
|
|
4736
|
+
});
|
|
4737
|
+
if (environment.pairing != null && environment.owner !== "deployment") context.addIssue({
|
|
4738
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4739
|
+
message: "Only deployment-owned code environments may configure pairing",
|
|
4740
|
+
path: [
|
|
4741
|
+
"environments",
|
|
4742
|
+
environment.id,
|
|
4743
|
+
"pairing"
|
|
4744
|
+
]
|
|
4745
|
+
});
|
|
4746
|
+
if (environment.pairing != null && !isSecureCodeEnvironmentControlURL(environment.baseURL)) context.addIssue({
|
|
4747
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4748
|
+
message: "Paired code environments require HTTPS outside loopback development",
|
|
4749
|
+
path: [
|
|
4750
|
+
"environments",
|
|
4751
|
+
environment.id,
|
|
4752
|
+
"baseURL"
|
|
4753
|
+
]
|
|
4754
|
+
});
|
|
4755
|
+
if (environment.workerId != null && environment.pairing?.workerId != null && environment.workerId !== environment.pairing.workerId) context.addIssue({
|
|
4756
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4757
|
+
message: "Code environment workerId must match pairing.workerId",
|
|
4758
|
+
path: [
|
|
4759
|
+
"environments",
|
|
4760
|
+
environment.id,
|
|
4761
|
+
"workerId"
|
|
4762
|
+
]
|
|
4763
|
+
});
|
|
4764
|
+
if (pairingOnly && environment.default === true) context.addIssue({
|
|
4765
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4766
|
+
message: "Pairing-only code control planes cannot be execution defaults",
|
|
4767
|
+
path: [
|
|
4768
|
+
"environments",
|
|
4769
|
+
environment.id,
|
|
4770
|
+
"default"
|
|
4771
|
+
]
|
|
4772
|
+
});
|
|
4773
|
+
if (ids.has(environment.id)) context.addIssue({
|
|
4774
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4775
|
+
message: `Duplicate code environment id: ${environment.id}`,
|
|
4776
|
+
path: ["environments"]
|
|
4777
|
+
});
|
|
4778
|
+
ids.add(environment.id);
|
|
4779
|
+
if (!pairingOnly) {
|
|
4780
|
+
executableEnvironments += 1;
|
|
4781
|
+
if (environment.default === true) defaults += 1;
|
|
4782
|
+
}
|
|
4783
|
+
}
|
|
4784
|
+
if (executableEnvironments > 0 && defaults !== 1) context.addIssue({
|
|
4785
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4786
|
+
message: "Exactly one stateful code environment must be the default",
|
|
4787
|
+
path: ["environments"]
|
|
4788
|
+
});
|
|
4789
|
+
}).optional(),
|
|
4790
|
+
/** Optional trusted origin for in-process agent event delivery. */
|
|
4791
|
+
eventDriven: zod.z.object({ selfUrl: zod.z.string().url().optional() }).optional(),
|
|
4792
|
+
/** Conversational background-task delivery policy. Automatic completion wakeups are
|
|
4793
|
+
* enabled unless an administrator explicitly restores poll-only behavior. */
|
|
4794
|
+
backgroundTasks: zod.z.object({ completionWakeups: zod.z.boolean().optional().default(true) }).optional(),
|
|
3560
4795
|
skills: zod.z.object({ maxCatalogSkills: zod.z.number().int().min(1).max(100).optional() }).optional(),
|
|
3561
|
-
remoteApi: remoteApiSchema.optional()
|
|
4796
|
+
remoteApi: remoteApiSchema.optional(),
|
|
4797
|
+
/** Human-in-the-loop tool approval policy. Off by default. */
|
|
4798
|
+
toolApproval: toolApprovalPolicySchema,
|
|
4799
|
+
/** Durable checkpointer backing tool-approval and Ask User resume.
|
|
4800
|
+
* Defaults to the app's MongoDB when either flow needs it. */
|
|
4801
|
+
checkpointer: checkpointerSchema
|
|
3562
4802
|
})).default({
|
|
3563
4803
|
disableBuilder: false,
|
|
3564
4804
|
capabilities: defaultAgentCapabilities,
|
|
3565
4805
|
maxCitations: 30,
|
|
3566
4806
|
maxCitationsPerFile: 7,
|
|
3567
|
-
minRelevanceScore: .45
|
|
4807
|
+
minRelevanceScore: .45,
|
|
4808
|
+
maxSubagents: 10
|
|
3568
4809
|
});
|
|
3569
4810
|
const paramDefinitionSchema = zod.z.object({
|
|
3570
4811
|
key: zod.z.string(),
|
|
@@ -3582,7 +4823,11 @@ const paramDefinitionSchema = zod.z.object({
|
|
|
3582
4823
|
range: zod.z.object({
|
|
3583
4824
|
min: zod.z.number(),
|
|
3584
4825
|
max: zod.z.number(),
|
|
3585
|
-
step: zod.z.number().optional()
|
|
4826
|
+
step: zod.z.number().optional(),
|
|
4827
|
+
positiveMin: zod.z.number().optional()
|
|
4828
|
+
}).refine((value) => value.positiveMin == null || value.positiveMin <= value.max, {
|
|
4829
|
+
message: "range.positiveMin cannot exceed range.max",
|
|
4830
|
+
path: ["positiveMin"]
|
|
3586
4831
|
}).optional(),
|
|
3587
4832
|
enumMappings: zod.z.record(zod.z.union([
|
|
3588
4833
|
zod.z.number(),
|
|
@@ -3617,6 +4862,9 @@ const paramDefinitionSchema = zod.z.object({
|
|
|
3617
4862
|
const endpointSchema = baseEndpointSchema.merge(zod.z.object({
|
|
3618
4863
|
name: zod.z.string().refine((value) => !eModelEndpointSchema.safeParse(value).success, { message: `Value cannot be one of the default endpoint (EModelEndpoint) values: ${Object.values(EModelEndpoint).join(", ")}` }),
|
|
3619
4864
|
apiKey: zod.z.string(),
|
|
4865
|
+
/** Masked preview of the API key, stored at write time so admin
|
|
4866
|
+
* reads can show which key is configured without returning the secret. */
|
|
4867
|
+
apiKeyPreview: zod.z.string().optional(),
|
|
3620
4868
|
baseURL: zod.z.string(),
|
|
3621
4869
|
models: zod.z.object({
|
|
3622
4870
|
default: zod.z.array(modelItemSchema).min(1),
|
|
@@ -3664,15 +4912,43 @@ const endpointSchema = baseEndpointSchema.merge(zod.z.object({
|
|
|
3664
4912
|
const azureEndpointSchema = zod.z.object({
|
|
3665
4913
|
groups: azureGroupConfigsSchema,
|
|
3666
4914
|
assistants: zod.z.boolean().optional()
|
|
3667
|
-
}).and(
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
4915
|
+
}).and(
|
|
4916
|
+
/**
|
|
4917
|
+
* Azure carries only the base-endpoint fields enumerated here. This is a
|
|
4918
|
+
* `.pick()`, NOT an omit, so a field added to `baseEndpointSchema` is
|
|
4919
|
+
* silently unavailable on Azure endpoints until it is listed below —
|
|
4920
|
+
* unlike `endpoints.all`, which omits and therefore inherits new fields
|
|
4921
|
+
* automatically. Keep this list in sync when adding endpoint options.
|
|
4922
|
+
*/
|
|
4923
|
+
endpointSchema.pick({
|
|
4924
|
+
streamRate: true,
|
|
4925
|
+
titleConvo: true,
|
|
4926
|
+
titleMethod: true,
|
|
4927
|
+
titleModel: true,
|
|
4928
|
+
titlePrompt: true,
|
|
4929
|
+
titleTiming: true,
|
|
4930
|
+
titlePromptTemplate: true,
|
|
4931
|
+
activityLabel: true,
|
|
4932
|
+
activityModel: true,
|
|
4933
|
+
activityEndpoint: true,
|
|
4934
|
+
activityPrompt: true,
|
|
4935
|
+
activityMaxPerRun: true,
|
|
4936
|
+
activityCharLimit: true,
|
|
4937
|
+
activityPhaseLabel: true,
|
|
4938
|
+
activityPhaseModel: true,
|
|
4939
|
+
activityPhaseEndpoint: true,
|
|
4940
|
+
activityPhasePrompt: true,
|
|
4941
|
+
activityPhaseMaxPerRun: true,
|
|
4942
|
+
reasoningLabel: true,
|
|
4943
|
+
reasoningLabelModel: true,
|
|
4944
|
+
reasoningLabelEndpoint: true,
|
|
4945
|
+
reasoningLabelPrompt: true,
|
|
4946
|
+
reasoningLabelMinChars: true,
|
|
4947
|
+
reasoningLabelUpdateChars: true,
|
|
4948
|
+
reasoningLabelUpdateIntervalMs: true,
|
|
4949
|
+
reasoningLabelMaxPerRun: true
|
|
4950
|
+
}).partial()
|
|
4951
|
+
);
|
|
3676
4952
|
/**
|
|
3677
4953
|
* Vertex AI model configuration - similar to Azure model config
|
|
3678
4954
|
* Allows specifying deployment name for each model
|
|
@@ -3708,15 +4984,20 @@ const anthropicEndpointSchema = baseEndpointSchema.merge(zod.z.object({
|
|
|
3708
4984
|
/** Optional: List of available models */
|
|
3709
4985
|
models: zod.z.array(zod.z.string()).optional()
|
|
3710
4986
|
}));
|
|
4987
|
+
/** Masked preview of the API key, stored at write time so admin
|
|
4988
|
+
* reads can show which key is configured without returning the secret. */
|
|
4989
|
+
const apiKeyPreviewSchema = zod.z.string().optional();
|
|
3711
4990
|
const ttsOpenaiSchema = zod.z.object({
|
|
3712
4991
|
url: zod.z.string().optional(),
|
|
3713
4992
|
apiKey: zod.z.string(),
|
|
4993
|
+
apiKeyPreview: apiKeyPreviewSchema,
|
|
3714
4994
|
model: zod.z.string(),
|
|
3715
4995
|
voices: zod.z.array(zod.z.string())
|
|
3716
4996
|
});
|
|
3717
4997
|
const ttsAzureOpenAISchema = zod.z.object({
|
|
3718
4998
|
instanceName: zod.z.string(),
|
|
3719
4999
|
apiKey: zod.z.string(),
|
|
5000
|
+
apiKeyPreview: apiKeyPreviewSchema,
|
|
3720
5001
|
deploymentName: zod.z.string(),
|
|
3721
5002
|
apiVersion: zod.z.string(),
|
|
3722
5003
|
model: zod.z.string(),
|
|
@@ -3726,6 +5007,7 @@ const ttsElevenLabsSchema = zod.z.object({
|
|
|
3726
5007
|
url: zod.z.string().optional(),
|
|
3727
5008
|
websocketUrl: zod.z.string().optional(),
|
|
3728
5009
|
apiKey: zod.z.string(),
|
|
5010
|
+
apiKeyPreview: apiKeyPreviewSchema,
|
|
3729
5011
|
model: zod.z.string(),
|
|
3730
5012
|
voices: zod.z.array(zod.z.string()),
|
|
3731
5013
|
voice_settings: zod.z.object({
|
|
@@ -3739,10 +5021,12 @@ const ttsElevenLabsSchema = zod.z.object({
|
|
|
3739
5021
|
const ttsLocalaiSchema = zod.z.object({
|
|
3740
5022
|
url: zod.z.string(),
|
|
3741
5023
|
apiKey: zod.z.string().optional(),
|
|
5024
|
+
apiKeyPreview: apiKeyPreviewSchema,
|
|
3742
5025
|
voices: zod.z.array(zod.z.string()),
|
|
3743
5026
|
backend: zod.z.string()
|
|
3744
5027
|
});
|
|
3745
5028
|
const ttsSchema = zod.z.object({
|
|
5029
|
+
allowedAddresses: allowedAddressesSchema,
|
|
3746
5030
|
openai: ttsOpenaiSchema.optional(),
|
|
3747
5031
|
azureOpenAI: ttsAzureOpenAISchema.optional(),
|
|
3748
5032
|
elevenlabs: ttsElevenLabsSchema.optional(),
|
|
@@ -3751,15 +5035,18 @@ const ttsSchema = zod.z.object({
|
|
|
3751
5035
|
const sttOpenaiSchema = zod.z.object({
|
|
3752
5036
|
url: zod.z.string().optional(),
|
|
3753
5037
|
apiKey: zod.z.string(),
|
|
5038
|
+
apiKeyPreview: apiKeyPreviewSchema,
|
|
3754
5039
|
model: zod.z.string()
|
|
3755
5040
|
});
|
|
3756
5041
|
const sttAzureOpenAISchema = zod.z.object({
|
|
3757
5042
|
instanceName: zod.z.string(),
|
|
3758
5043
|
apiKey: zod.z.string(),
|
|
5044
|
+
apiKeyPreview: apiKeyPreviewSchema,
|
|
3759
5045
|
deploymentName: zod.z.string(),
|
|
3760
5046
|
apiVersion: zod.z.string()
|
|
3761
5047
|
});
|
|
3762
5048
|
const sttSchema = zod.z.object({
|
|
5049
|
+
allowedAddresses: allowedAddressesSchema,
|
|
3763
5050
|
openai: sttOpenaiSchema.optional(),
|
|
3764
5051
|
azureOpenAI: sttAzureOpenAISchema.optional()
|
|
3765
5052
|
});
|
|
@@ -3767,16 +5054,23 @@ const speechTab = zod.z.object({
|
|
|
3767
5054
|
conversationMode: zod.z.boolean().optional(),
|
|
3768
5055
|
advancedMode: zod.z.boolean().optional(),
|
|
3769
5056
|
speechToText: zod.z.boolean().optional().or(zod.z.object({
|
|
3770
|
-
/**
|
|
3771
|
-
engineSTT: zod.z.enum([
|
|
5057
|
+
/** Provider names remain valid for backward compatibility and are normalized for clients. */
|
|
5058
|
+
engineSTT: zod.z.enum([
|
|
5059
|
+
"browser",
|
|
5060
|
+
"external",
|
|
5061
|
+
"openai",
|
|
5062
|
+
"azureOpenAI"
|
|
5063
|
+
]).optional(),
|
|
3772
5064
|
languageSTT: zod.z.string().optional(),
|
|
3773
5065
|
autoTranscribeAudio: zod.z.boolean().optional(),
|
|
3774
5066
|
decibelValue: zod.z.number().optional(),
|
|
3775
5067
|
autoSendText: zod.z.number().optional()
|
|
3776
5068
|
})).optional(),
|
|
3777
5069
|
textToSpeech: zod.z.boolean().optional().or(zod.z.object({
|
|
3778
|
-
/**
|
|
5070
|
+
/** Provider names remain valid for backward compatibility and are normalized for clients. */
|
|
3779
5071
|
engineTTS: zod.z.enum([
|
|
5072
|
+
"browser",
|
|
5073
|
+
"external",
|
|
3780
5074
|
"openai",
|
|
3781
5075
|
"azureOpenAI",
|
|
3782
5076
|
"elevenlabs",
|
|
@@ -3797,6 +5091,10 @@ let RateLimitPrefix = /* @__PURE__ */ function(RateLimitPrefix) {
|
|
|
3797
5091
|
return RateLimitPrefix;
|
|
3798
5092
|
}({});
|
|
3799
5093
|
const rateLimitSchema = zod.z.object({
|
|
5094
|
+
agentEvents: zod.z.object({
|
|
5095
|
+
userMax: zod.z.number().int().positive().optional(),
|
|
5096
|
+
userWindowInMinutes: zod.z.number().positive().optional()
|
|
5097
|
+
}).optional(),
|
|
3800
5098
|
fileUploads: zod.z.object({
|
|
3801
5099
|
ipMax: zod.z.number().optional(),
|
|
3802
5100
|
ipWindowInMinutes: zod.z.number().optional(),
|
|
@@ -3888,6 +5186,7 @@ const interfaceSchema = zod.z.object({
|
|
|
3888
5186
|
webSearch: zod.z.boolean().optional(),
|
|
3889
5187
|
contextUsage: zod.z.boolean().optional(),
|
|
3890
5188
|
contextCost: zod.z.boolean().optional(),
|
|
5189
|
+
feedback: zod.z.boolean().optional(),
|
|
3891
5190
|
currency: zod.z.object({
|
|
3892
5191
|
code: zod.z.string(),
|
|
3893
5192
|
rate: zod.z.number().positive()
|
|
@@ -3921,6 +5220,23 @@ const interfaceSchema = zod.z.object({
|
|
|
3921
5220
|
share: zod.z.boolean().optional(),
|
|
3922
5221
|
public: zod.z.boolean().optional(),
|
|
3923
5222
|
snapshotFiles: zod.z.boolean().optional()
|
|
5223
|
+
})]).optional(),
|
|
5224
|
+
schedules: zod.z.union([zod.z.boolean(), zod.z.object({
|
|
5225
|
+
use: zod.z.boolean().optional(),
|
|
5226
|
+
create: zod.z.boolean().optional(),
|
|
5227
|
+
maxPerUser: zod.z.number().int().min(0).optional(),
|
|
5228
|
+
minIntervalMinutes: zod.z.number().int().min(1).optional(),
|
|
5229
|
+
autoDisableAfterFailures: zod.z.number().int().min(1).optional(),
|
|
5230
|
+
fireConcurrency: zod.z.number().int().min(1).optional(),
|
|
5231
|
+
/** Refuse schedules that are not filed under a chat project. Enforced on
|
|
5232
|
+
* create/update AND at every fire, so raising it later stops schedules
|
|
5233
|
+
* that predate the policy instead of grandfathering them. */
|
|
5234
|
+
requireProject: zod.z.boolean().optional(),
|
|
5235
|
+
/** Pins every scheduled run to ONE chat project, ignoring any client
|
|
5236
|
+
* choice. Implies `requireProject`. The project must belong to the
|
|
5237
|
+
* schedule's owner, so a deployment-wide value only makes sense with a
|
|
5238
|
+
* per-user/per-role config override. */
|
|
5239
|
+
projectId: zod.z.string().trim().min(1).optional()
|
|
3924
5240
|
})]).optional()
|
|
3925
5241
|
}).default({
|
|
3926
5242
|
modelSelect: true,
|
|
@@ -3947,6 +5263,7 @@ const interfaceSchema = zod.z.object({
|
|
|
3947
5263
|
webSearch: true,
|
|
3948
5264
|
contextUsage: true,
|
|
3949
5265
|
contextCost: false,
|
|
5266
|
+
feedback: true,
|
|
3950
5267
|
peoplePicker: {
|
|
3951
5268
|
users: true,
|
|
3952
5269
|
groups: true,
|
|
@@ -4016,12 +5333,14 @@ let SearchProviders = /* @__PURE__ */ function(SearchProviders) {
|
|
|
4016
5333
|
SearchProviders["SERPER"] = "serper";
|
|
4017
5334
|
SearchProviders["SEARXNG"] = "searxng";
|
|
4018
5335
|
SearchProviders["TAVILY"] = "tavily";
|
|
5336
|
+
SearchProviders["KEENABLE"] = "keenable";
|
|
4019
5337
|
return SearchProviders;
|
|
4020
5338
|
}({});
|
|
4021
5339
|
let ScraperProviders = /* @__PURE__ */ function(ScraperProviders) {
|
|
4022
5340
|
ScraperProviders["FIRECRAWL"] = "firecrawl";
|
|
4023
5341
|
ScraperProviders["SERPER"] = "serper";
|
|
4024
5342
|
ScraperProviders["TAVILY"] = "tavily";
|
|
5343
|
+
ScraperProviders["KEENABLE"] = "keenable";
|
|
4025
5344
|
return ScraperProviders;
|
|
4026
5345
|
}({});
|
|
4027
5346
|
let RerankerTypes = /* @__PURE__ */ function(RerankerTypes) {
|
|
@@ -4036,19 +5355,39 @@ let SafeSearchTypes = /* @__PURE__ */ function(SafeSearchTypes) {
|
|
|
4036
5355
|
SafeSearchTypes[SafeSearchTypes["STRICT"] = 2] = "STRICT";
|
|
4037
5356
|
return SafeSearchTypes;
|
|
4038
5357
|
}({});
|
|
5358
|
+
/**
|
|
5359
|
+
* Normalizes a SearXNG engine list into the comma-separated form the API expects.
|
|
5360
|
+
* Accepts the YAML list or comma-separated string an operator may write, and is
|
|
5361
|
+
* applied both at the schema boundary and when loading the runtime config, since
|
|
5362
|
+
* `loadCustomConfig` returns the raw YAML object rather than the parsed result.
|
|
5363
|
+
*/
|
|
5364
|
+
function normalizeSearxngEngines(engines) {
|
|
5365
|
+
if (engines == null) return;
|
|
5366
|
+
const normalized = (Array.isArray(engines) ? engines : engines.split(",")).map((engine) => engine.trim()).filter(Boolean);
|
|
5367
|
+
return normalized.length ? normalized.join(",") : void 0;
|
|
5368
|
+
}
|
|
4039
5369
|
const webSearchSchema = zod.z.object({
|
|
5370
|
+
allowedAddresses: allowedAddressesSchema,
|
|
4040
5371
|
serperApiKey: zod.z.string().optional().default("${SERPER_API_KEY}"),
|
|
5372
|
+
serperApiKeyPreview: apiKeyPreviewSchema,
|
|
4041
5373
|
searxngInstanceUrl: zod.z.string().optional().default("${SEARXNG_INSTANCE_URL}"),
|
|
4042
5374
|
searxngApiKey: zod.z.string().optional().default("${SEARXNG_API_KEY}"),
|
|
5375
|
+
searxngApiKeyPreview: apiKeyPreviewSchema,
|
|
4043
5376
|
firecrawlApiKey: zod.z.string().optional().default("${FIRECRAWL_API_KEY}"),
|
|
5377
|
+
firecrawlApiKeyPreview: apiKeyPreviewSchema,
|
|
4044
5378
|
firecrawlApiUrl: zod.z.string().optional().default("${FIRECRAWL_API_URL}"),
|
|
4045
5379
|
firecrawlVersion: zod.z.string().optional().default("${FIRECRAWL_VERSION}"),
|
|
4046
5380
|
tavilyApiKey: zod.z.string().optional().default("${TAVILY_API_KEY}"),
|
|
5381
|
+
tavilyApiKeyPreview: apiKeyPreviewSchema,
|
|
4047
5382
|
tavilySearchUrl: zod.z.string().optional().default("${TAVILY_SEARCH_URL}"),
|
|
4048
5383
|
tavilyExtractUrl: zod.z.string().optional().default("${TAVILY_EXTRACT_URL}"),
|
|
5384
|
+
keenableApiKey: zod.z.string().optional().default("${KEENABLE_API_KEY}"),
|
|
5385
|
+
keenableApiUrl: zod.z.string().optional().default("${KEENABLE_API_URL}"),
|
|
4049
5386
|
jinaApiKey: zod.z.string().optional().default("${JINA_API_KEY}"),
|
|
5387
|
+
jinaApiKeyPreview: apiKeyPreviewSchema,
|
|
4050
5388
|
jinaApiUrl: zod.z.string().optional().default("${JINA_API_URL}"),
|
|
4051
5389
|
cohereApiKey: zod.z.string().optional().default("${COHERE_API_KEY}"),
|
|
5390
|
+
cohereApiKeyPreview: apiKeyPreviewSchema,
|
|
4052
5391
|
searchProvider: zod.z.nativeEnum(SearchProviders).optional(),
|
|
4053
5392
|
scraperProvider: zod.z.nativeEnum(ScraperProviders).optional(),
|
|
4054
5393
|
rerankerType: zod.z.nativeEnum(RerankerTypes).optional(),
|
|
@@ -4081,6 +5420,16 @@ const webSearchSchema = zod.z.object({
|
|
|
4081
5420
|
tag: zod.z.string().nullable().optional()
|
|
4082
5421
|
}).optional()
|
|
4083
5422
|
}).optional(),
|
|
5423
|
+
searxngSearchOptions: zod.z.object({
|
|
5424
|
+
engines: zod.z.union([zod.z.string(), zod.z.array(zod.z.string())]).transform(normalizeSearxngEngines).optional(),
|
|
5425
|
+
language: zod.z.string().optional(),
|
|
5426
|
+
timeRange: zod.z.enum([
|
|
5427
|
+
"day",
|
|
5428
|
+
"month",
|
|
5429
|
+
"year"
|
|
5430
|
+
]).optional(),
|
|
5431
|
+
timeout: zod.z.number().int().positive().max(12e4).optional()
|
|
5432
|
+
}).optional(),
|
|
4084
5433
|
tavilySearchOptions: zod.z.object({
|
|
4085
5434
|
searchDepth: zod.z.enum([
|
|
4086
5435
|
"basic",
|
|
@@ -4121,11 +5470,23 @@ const webSearchSchema = zod.z.object({
|
|
|
4121
5470
|
includeFavicon: zod.z.boolean().optional(),
|
|
4122
5471
|
format: zod.z.enum(["markdown", "text"]).optional(),
|
|
4123
5472
|
timeout: zod.z.number().int().nonnegative().max(12e4).optional()
|
|
5473
|
+
}).optional(),
|
|
5474
|
+
keenableSearchOptions: zod.z.object({
|
|
5475
|
+
maxResults: zod.z.number().int().min(1).max(20).optional(),
|
|
5476
|
+
site: zod.z.string().optional(),
|
|
5477
|
+
attributionTitle: zod.z.string().optional(),
|
|
5478
|
+
timeout: zod.z.number().int().nonnegative().max(12e4).optional()
|
|
5479
|
+
}).optional(),
|
|
5480
|
+
keenableScraperOptions: zod.z.object({
|
|
5481
|
+
attributionTitle: zod.z.string().optional(),
|
|
5482
|
+
timeout: zod.z.number().int().nonnegative().max(12e4).optional()
|
|
4124
5483
|
}).optional()
|
|
4125
5484
|
});
|
|
4126
5485
|
const ocrSchema = zod.z.object({
|
|
5486
|
+
allowedAddresses: allowedAddressesSchema,
|
|
4127
5487
|
mistralModel: zod.z.string().optional(),
|
|
4128
5488
|
apiKey: zod.z.string().optional().default("${OCR_API_KEY}"),
|
|
5489
|
+
apiKeyPreview: apiKeyPreviewSchema,
|
|
4129
5490
|
baseURL: zod.z.string().optional().default("${OCR_BASEURL}"),
|
|
4130
5491
|
strategy: zod.z.nativeEnum(OCRStrategy).default("mistral_ocr")
|
|
4131
5492
|
});
|
|
@@ -4183,6 +5544,10 @@ const contextPruningSchema = zod.z.object({
|
|
|
4183
5544
|
hardClearRatio: zod.z.number().min(0).max(1).optional(),
|
|
4184
5545
|
minPrunableToolChars: zod.z.number().min(0).optional()
|
|
4185
5546
|
});
|
|
5547
|
+
const retainRecentConfigSchema = zod.z.object({
|
|
5548
|
+
turns: zod.z.number().min(0).max(20).optional(),
|
|
5549
|
+
tokens: zod.z.number().positive().optional()
|
|
5550
|
+
});
|
|
4186
5551
|
const summarizationConfigSchema = zod.z.object({
|
|
4187
5552
|
enabled: zod.z.boolean().optional(),
|
|
4188
5553
|
provider: zod.z.string().optional(),
|
|
@@ -4198,32 +5563,103 @@ const summarizationConfigSchema = zod.z.object({
|
|
|
4198
5563
|
updatePrompt: zod.z.string().optional(),
|
|
4199
5564
|
reserveRatio: zod.z.number().min(0).max(1).optional(),
|
|
4200
5565
|
maxSummaryTokens: zod.z.number().positive().optional(),
|
|
4201
|
-
contextPruning: contextPruningSchema.optional()
|
|
5566
|
+
contextPruning: contextPruningSchema.optional(),
|
|
5567
|
+
retainRecent: retainRecentConfigSchema.optional()
|
|
4202
5568
|
});
|
|
4203
5569
|
const customEndpointsSchema = zod.z.array(endpointSchema.partial()).optional();
|
|
5570
|
+
let messageFilterRegexValidator = (value) => {
|
|
5571
|
+
try {
|
|
5572
|
+
new RegExp(value, "g");
|
|
5573
|
+
return true;
|
|
5574
|
+
} catch {
|
|
5575
|
+
return false;
|
|
5576
|
+
}
|
|
5577
|
+
};
|
|
5578
|
+
const setMessageFilterRegexValidator = (validate) => {
|
|
5579
|
+
messageFilterRegexValidator = validate;
|
|
5580
|
+
};
|
|
4204
5581
|
const messageFilterPiiCustomPatternSchema = zod.z.object({
|
|
4205
|
-
id: zod.z.string().min(1),
|
|
4206
|
-
label: zod.z.string().min(1),
|
|
4207
|
-
regex: zod.z.string().min(1).
|
|
4208
|
-
try {
|
|
4209
|
-
new RegExp(value, "g");
|
|
4210
|
-
return true;
|
|
4211
|
-
} catch {
|
|
4212
|
-
return false;
|
|
4213
|
-
}
|
|
4214
|
-
}, { message: "Invalid regex" })
|
|
5582
|
+
id: zod.z.string().min(1).max(256),
|
|
5583
|
+
label: zod.z.string().min(1).max(512),
|
|
5584
|
+
regex: zod.z.string().min(1).max(512)
|
|
4215
5585
|
});
|
|
4216
5586
|
const messageFilterPiiSchema = zod.z.object({
|
|
4217
|
-
starterPatterns: zod.z.array(zod.z.string()).optional(),
|
|
4218
|
-
customPatterns: zod.z.array(messageFilterPiiCustomPatternSchema).optional()
|
|
4219
|
-
})
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
5587
|
+
starterPatterns: zod.z.array(zod.z.string().max(256)).max(256).optional(),
|
|
5588
|
+
customPatterns: zod.z.array(messageFilterPiiCustomPatternSchema).max(256).optional()
|
|
5589
|
+
}).superRefine((pii, context) => {
|
|
5590
|
+
let regexCharacters = 0;
|
|
5591
|
+
let regexInstructions = 0;
|
|
5592
|
+
for (let index = 0; index < (pii.customPatterns?.length ?? 0); index++) {
|
|
5593
|
+
const pattern = pii.customPatterns?.[index];
|
|
5594
|
+
if (pattern == null) continue;
|
|
5595
|
+
regexCharacters += pattern.regex.length;
|
|
5596
|
+
const result = messageFilterRegexValidator(pattern.regex);
|
|
5597
|
+
if (!(typeof result === "boolean" ? result : result.supported)) {
|
|
5598
|
+
context.addIssue({
|
|
5599
|
+
code: zod.z.ZodIssueCode.custom,
|
|
5600
|
+
path: [
|
|
5601
|
+
"customPatterns",
|
|
5602
|
+
index,
|
|
5603
|
+
"regex"
|
|
5604
|
+
],
|
|
5605
|
+
message: "Unsupported regex: not compatible with the RE2 engine (no backreferences, lookaround, or control escapes)"
|
|
5606
|
+
});
|
|
5607
|
+
continue;
|
|
5608
|
+
}
|
|
5609
|
+
if (typeof result !== "boolean" && result.programSize != null) regexInstructions += result.programSize;
|
|
5610
|
+
}
|
|
5611
|
+
if (regexCharacters > 8192) context.addIssue({
|
|
5612
|
+
code: zod.z.ZodIssueCode.custom,
|
|
5613
|
+
path: ["customPatterns"],
|
|
5614
|
+
message: `Custom PII regexes may contain at most ${MAX_PII_CUSTOM_REGEX_CHARACTERS} characters in total`
|
|
5615
|
+
});
|
|
5616
|
+
if (regexInstructions > 8192) context.addIssue({
|
|
5617
|
+
code: zod.z.ZodIssueCode.custom,
|
|
5618
|
+
path: ["customPatterns"],
|
|
5619
|
+
message: `Custom PII regexes may compile to at most ${MAX_PII_CUSTOM_REGEX_INSTRUCTIONS} instructions in total`
|
|
5620
|
+
});
|
|
5621
|
+
});
|
|
5622
|
+
const messageFilterSchema = zod.z.object({ pii: messageFilterPiiSchema.optional() });
|
|
5623
|
+
const langfuseConfigSchema = zod.z.object({
|
|
5624
|
+
enabled: zod.z.boolean().optional(),
|
|
5625
|
+
publicKey: zod.z.string().optional(),
|
|
5626
|
+
secretKey: zod.z.string().optional(),
|
|
5627
|
+
/** Stable Langfuse project identity returned when credentials are verified. */
|
|
5628
|
+
projectId: zod.z.string().optional(),
|
|
5629
|
+
/** Masked preview of the secret key, stored at write time so
|
|
5630
|
+
* admin reads can show which secret key is configured without returning the secret. */
|
|
5631
|
+
secretKeyPreview: zod.z.string().optional(),
|
|
5632
|
+
/** Routing key for one of the deployment-configured tenant Langfuse destinations. */
|
|
5633
|
+
destination: zod.z.string().optional(),
|
|
5634
|
+
/**
|
|
5635
|
+
* Custom request headers sent on every outbound Langfuse request — trace and
|
|
5636
|
+
* media export, feedback scores, and credential verification — for
|
|
5637
|
+
* self-hosted instances behind an authenticating proxy or gateway. Values
|
|
5638
|
+
* support `${ENV_VAR}` interpolation.
|
|
5639
|
+
*
|
|
5640
|
+
* Deployment-level only. Trace export batches spans from every user through
|
|
5641
|
+
* one exporter, so unlike endpoint headers these cannot carry per-user
|
|
5642
|
+
* placeholders. Headers referencing an unset variable, naming an
|
|
5643
|
+
* infrastructure secret, or carrying an invalid HTTP field name are dropped
|
|
5644
|
+
* with a warning rather than sent.
|
|
5645
|
+
*
|
|
5646
|
+
* Sent only when the deployment configures exactly one Langfuse origin, and
|
|
5647
|
+
* only to that origin. The map cannot say which endpoint it authenticates
|
|
5648
|
+
* to, so with several configured origins any choice of recipient would risk
|
|
5649
|
+
* disclosing a gateway credential to the others; a warning is logged instead.
|
|
5650
|
+
* Multi-destination deployments need per-destination headers, which this
|
|
5651
|
+
* schema does not yet express — and note the fanout collector forwards only
|
|
5652
|
+
* `Authorization` upstream regardless.
|
|
5653
|
+
*/
|
|
5654
|
+
headers: zod.z.record(zod.z.string()).optional()
|
|
5655
|
+
});
|
|
5656
|
+
const configSchema = zod.z.object({
|
|
5657
|
+
version: zod.z.string(),
|
|
5658
|
+
cache: zod.z.boolean().default(true),
|
|
5659
|
+
ocr: ocrSchema.optional(),
|
|
5660
|
+
webSearch: webSearchSchema.optional(),
|
|
5661
|
+
langfuse: langfuseConfigSchema.optional(),
|
|
5662
|
+
memory: memorySchema.optional(),
|
|
4227
5663
|
summarization: summarizationConfigSchema.optional(),
|
|
4228
5664
|
skillSync: skillSyncConfigSchema,
|
|
4229
5665
|
secureImageLinks: zod.z.boolean().optional(),
|
|
@@ -4258,9 +5694,17 @@ const configSchema = zod.z.object({
|
|
|
4258
5694
|
rateLimits: rateLimitSchema.optional(),
|
|
4259
5695
|
fileConfig: fileConfigSchema.optional(),
|
|
4260
5696
|
modelSpecs: specsConfigSchema.optional(),
|
|
5697
|
+
filters: filtersConfigSchema.optional(),
|
|
4261
5698
|
messageFilter: messageFilterSchema.optional(),
|
|
4262
5699
|
endpoints: zod.z.object({
|
|
4263
5700
|
allowedAddresses: allowedAddressesSchema,
|
|
5701
|
+
/**
|
|
5702
|
+
* Defaults applied to every endpoint. Omit-based, so options added to
|
|
5703
|
+
* `baseEndpointSchema` are inherited here automatically — no list to
|
|
5704
|
+
* maintain (contrast `azureEndpointSchema`, which enumerates via
|
|
5705
|
+
* `.pick()`). Resolution order at read sites is `all` > the named
|
|
5706
|
+
* endpoint > a custom endpoint's own config.
|
|
5707
|
+
*/
|
|
4264
5708
|
all: baseEndpointSchema.omit({ baseURL: true }).optional(),
|
|
4265
5709
|
["openAI"]: baseEndpointSchema.optional(),
|
|
4266
5710
|
["google"]: baseEndpointSchema.optional(),
|
|
@@ -4330,6 +5774,9 @@ const alternateName = {
|
|
|
4330
5774
|
["helicone"]: "Helicone"
|
|
4331
5775
|
};
|
|
4332
5776
|
const sharedOpenAIModels = [
|
|
5777
|
+
"gpt-5.6",
|
|
5778
|
+
"gpt-5.6-terra",
|
|
5779
|
+
"gpt-5.6-luna",
|
|
4333
5780
|
"gpt-5.5",
|
|
4334
5781
|
"gpt-5.5-pro",
|
|
4335
5782
|
"chat-latest",
|
|
@@ -4353,9 +5800,12 @@ const sharedOpenAIModels = [
|
|
|
4353
5800
|
"gpt-4o"
|
|
4354
5801
|
];
|
|
4355
5802
|
const sharedAnthropicModels = [
|
|
5803
|
+
"claude-fable-5-1",
|
|
4356
5804
|
"claude-fable-5",
|
|
5805
|
+
"claude-opus-5",
|
|
4357
5806
|
"claude-opus-4-8",
|
|
4358
5807
|
"claude-opus-4-7",
|
|
5808
|
+
"claude-sonnet-5",
|
|
4359
5809
|
"claude-sonnet-4-6",
|
|
4360
5810
|
"claude-opus-4-6",
|
|
4361
5811
|
"claude-sonnet-4-5",
|
|
@@ -4376,18 +5826,26 @@ const sharedAnthropicModels = [
|
|
|
4376
5826
|
"claude-3-5-sonnet-20240620",
|
|
4377
5827
|
"claude-3-5-sonnet-latest"
|
|
4378
5828
|
];
|
|
5829
|
+
/**
|
|
5830
|
+
* Claude 4+ models are not invocable on-demand by their bare foundation-model
|
|
5831
|
+
* ID on the Converse path — Bedrock rejects those with "Invocation of model ID
|
|
5832
|
+
* ... with on-demand throughput isn't supported. Retry your request with the ID
|
|
5833
|
+
* or ARN of an inference profile that contains this model." Default to the
|
|
5834
|
+
* `global.` cross-region profile (no regional pricing premium, widest
|
|
5835
|
+
* availability); Opus 4.1 has no global profile, so it uses `us.`.
|
|
5836
|
+
*/
|
|
4379
5837
|
const bedrockModels = [
|
|
4380
|
-
"anthropic.claude-fable-5",
|
|
4381
|
-
"anthropic.claude-
|
|
4382
|
-
"anthropic.claude-opus-
|
|
4383
|
-
"anthropic.claude-
|
|
4384
|
-
"anthropic.claude-opus-4-
|
|
4385
|
-
"anthropic.claude-sonnet-
|
|
4386
|
-
"anthropic.claude-
|
|
4387
|
-
"anthropic.claude-opus-4-
|
|
4388
|
-
"anthropic.claude-
|
|
4389
|
-
"anthropic.claude-
|
|
4390
|
-
"anthropic.claude-
|
|
5838
|
+
"global.anthropic.claude-fable-5-1",
|
|
5839
|
+
"global.anthropic.claude-fable-5",
|
|
5840
|
+
"global.anthropic.claude-opus-5",
|
|
5841
|
+
"global.anthropic.claude-opus-4-8",
|
|
5842
|
+
"global.anthropic.claude-opus-4-7",
|
|
5843
|
+
"global.anthropic.claude-sonnet-5",
|
|
5844
|
+
"global.anthropic.claude-sonnet-4-6",
|
|
5845
|
+
"global.anthropic.claude-opus-4-6-v1",
|
|
5846
|
+
"global.anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
5847
|
+
"global.anthropic.claude-haiku-4-5-20251001-v1:0",
|
|
5848
|
+
"us.anthropic.claude-opus-4-1-20250805-v1:0",
|
|
4391
5849
|
"cohere.command-r-v1:0",
|
|
4392
5850
|
"cohere.command-r-plus-v1:0",
|
|
4393
5851
|
"meta.llama2-13b-chat-v1",
|
|
@@ -4412,7 +5870,11 @@ const defaultModels = {
|
|
|
4412
5870
|
["assistants"]: [...sharedOpenAIModels, "chatgpt-4o-latest"],
|
|
4413
5871
|
["agents"]: sharedOpenAIModels,
|
|
4414
5872
|
["google"]: [
|
|
5873
|
+
"gemini-3.8-flash",
|
|
5874
|
+
"gemini-3.7-flash",
|
|
5875
|
+
"gemini-3.6-flash",
|
|
4415
5876
|
"gemini-3.5-flash",
|
|
5877
|
+
"gemini-3.5-flash-lite",
|
|
4416
5878
|
"gemini-3.1-pro-preview",
|
|
4417
5879
|
"gemini-3.1-pro-preview-customtools",
|
|
4418
5880
|
"gemini-3.1-flash-lite-preview",
|
|
@@ -4572,6 +6034,18 @@ let CacheKeys = /* @__PURE__ */ function(CacheKeys) {
|
|
|
4572
6034
|
*/
|
|
4573
6035
|
CacheKeys["ROLES"] = "ROLES";
|
|
4574
6036
|
/**
|
|
6037
|
+
* Key for cached group memberships used to resolve ACL user principals.
|
|
6038
|
+
*/
|
|
6039
|
+
CacheKeys["USER_PRINCIPALS"] = "USER_PRINCIPALS";
|
|
6040
|
+
/**
|
|
6041
|
+
* Key for cached prompt group access ID sets (accessible, public, owned).
|
|
6042
|
+
*/
|
|
6043
|
+
CacheKeys["PROMPT_GROUPS_ACCESS"] = "PROMPT_GROUPS_ACCESS";
|
|
6044
|
+
/**
|
|
6045
|
+
* Key for per-conversation stateful code sandbox prewarm/warm state.
|
|
6046
|
+
*/
|
|
6047
|
+
CacheKeys["SANDBOX_PREWARM"] = "SANDBOX_PREWARM";
|
|
6048
|
+
/**
|
|
4575
6049
|
* Key for the title generation cache.
|
|
4576
6050
|
*/
|
|
4577
6051
|
CacheKeys["GEN_TITLE"] = "GEN_TITLE";
|
|
@@ -4641,6 +6115,10 @@ let CacheKeys = /* @__PURE__ */ function(CacheKeys) {
|
|
|
4641
6115
|
*/
|
|
4642
6116
|
CacheKeys["OPENID_EXCHANGED_TOKENS"] = "OPENID_EXCHANGED_TOKENS";
|
|
4643
6117
|
/**
|
|
6118
|
+
* Key for cached authenticated user documents.
|
|
6119
|
+
*/
|
|
6120
|
+
CacheKeys["AUTH_USER_DOC"] = "AUTH_USER_DOC";
|
|
6121
|
+
/**
|
|
4644
6122
|
* Key for OpenID session.
|
|
4645
6123
|
*/
|
|
4646
6124
|
CacheKeys["OPENID_SESSION"] = "OPENID_SESSION";
|
|
@@ -4654,6 +6132,7 @@ let CacheKeys = /* @__PURE__ */ function(CacheKeys) {
|
|
|
4654
6132
|
CacheKeys["ADMIN_OAUTH_EXCHANGE"] = "ADMIN_OAUTH_EXCHANGE";
|
|
4655
6133
|
return CacheKeys;
|
|
4656
6134
|
}({});
|
|
6135
|
+
const AUTH_USER_DOC_BY_ID_PREFIX = "auth-user-doc-byid";
|
|
4657
6136
|
/**
|
|
4658
6137
|
* Enum for violation types, used to identify, log, and cache violations.
|
|
4659
6138
|
*/
|
|
@@ -4777,6 +6256,18 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
4777
6256
|
*/
|
|
4778
6257
|
ErrorTypes["GOOGLE_TOOL_CONFLICT"] = "google_tool_conflict";
|
|
4779
6258
|
/**
|
|
6259
|
+
* Google provider could not process a linked video (most often longer than the model accepts)
|
|
6260
|
+
*/
|
|
6261
|
+
ErrorTypes["GOOGLE_VIDEO_UNPROCESSABLE"] = "google_video_unprocessable";
|
|
6262
|
+
/**
|
|
6263
|
+
* Required CodeAPI resources could not be restored before model invocation.
|
|
6264
|
+
*/
|
|
6265
|
+
ErrorTypes["RESOURCE_RECOVERY_REQUIRED"] = "resource_recovery_required";
|
|
6266
|
+
/**
|
|
6267
|
+
* Agent selected a stateful Code API workspace scope disabled by the deployment.
|
|
6268
|
+
*/
|
|
6269
|
+
ErrorTypes["STATEFUL_CODE_ENVIRONMENT_NOT_ALLOWED"] = "stateful_code_environment_not_allowed";
|
|
6270
|
+
/**
|
|
4780
6271
|
* Invalid Agent Provider (excluded by Admin)
|
|
4781
6272
|
*/
|
|
4782
6273
|
ErrorTypes["INVALID_AGENT_PROVIDER"] = "invalid_agent_provider";
|
|
@@ -4797,6 +6288,14 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
4797
6288
|
*/
|
|
4798
6289
|
ErrorTypes["AUTH_FAILED"] = "auth_failed";
|
|
4799
6290
|
/**
|
|
6291
|
+
* Authentication rejected by a rate limiter
|
|
6292
|
+
*/
|
|
6293
|
+
ErrorTypes["AUTH_RATE_LIMITED"] = "auth_rate_limited";
|
|
6294
|
+
/**
|
|
6295
|
+
* Authentication rejected because the account or IP is banned
|
|
6296
|
+
*/
|
|
6297
|
+
ErrorTypes["AUTH_BANNED"] = "auth_banned";
|
|
6298
|
+
/**
|
|
4800
6299
|
* Model refused to respond (content policy violation)
|
|
4801
6300
|
*/
|
|
4802
6301
|
ErrorTypes["REFUSAL"] = "refusal";
|
|
@@ -4804,6 +6303,14 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
4804
6303
|
* SSE stream 404 — job completed, expired, or was deleted before the subscriber connected
|
|
4805
6304
|
*/
|
|
4806
6305
|
ErrorTypes["STREAM_EXPIRED"] = "stream_expired";
|
|
6306
|
+
/**
|
|
6307
|
+
* Provider does not serve the requested model
|
|
6308
|
+
*/
|
|
6309
|
+
ErrorTypes["MODEL_NOT_FOUND"] = "model_not_found";
|
|
6310
|
+
/**
|
|
6311
|
+
* Provider throttled or refused the request for exceeding a rate/spend allowance
|
|
6312
|
+
*/
|
|
6313
|
+
ErrorTypes["MODEL_RATE_LIMIT"] = "model_rate_limit";
|
|
4807
6314
|
return ErrorTypes;
|
|
4808
6315
|
}({});
|
|
4809
6316
|
/**
|
|
@@ -4869,6 +6376,10 @@ let SettingsTabValues = /* @__PURE__ */ function(SettingsTabValues) {
|
|
|
4869
6376
|
*/
|
|
4870
6377
|
SettingsTabValues["SPEECH"] = "speech";
|
|
4871
6378
|
/**
|
|
6379
|
+
* Tab for Langfuse Settings
|
|
6380
|
+
*/
|
|
6381
|
+
SettingsTabValues["LANGFUSE"] = "langfuse";
|
|
6382
|
+
/**
|
|
4872
6383
|
* Tab for Beta Features
|
|
4873
6384
|
*/
|
|
4874
6385
|
SettingsTabValues["BETA"] = "beta";
|
|
@@ -4931,7 +6442,7 @@ let TTSProviders = /* @__PURE__ */ function(TTSProviders) {
|
|
|
4931
6442
|
/** Enum for app-wide constants */
|
|
4932
6443
|
let Constants = /* @__PURE__ */ function(Constants) {
|
|
4933
6444
|
/**
|
|
4934
|
-
* Key for the app's version. The placeholder `v0.8.
|
|
6445
|
+
* Key for the app's version. The placeholder `v0.8.8-rc2` is
|
|
4935
6446
|
* swapped in by `@rollup/plugin-replace` during `npm run build:data-provider`
|
|
4936
6447
|
* using the value of the root `package.json`'s `version` field. Consumers
|
|
4937
6448
|
* always import this via the built dist bundle (see `main` field in
|
|
@@ -4939,9 +6450,9 @@ let Constants = /* @__PURE__ */ function(Constants) {
|
|
|
4939
6450
|
* substituted value. Only tests that import the TypeScript source directly
|
|
4940
6451
|
* would observe the raw placeholder.
|
|
4941
6452
|
*/
|
|
4942
|
-
Constants["VERSION"] = "v0.8.
|
|
6453
|
+
Constants["VERSION"] = "v0.8.8-rc2";
|
|
4943
6454
|
/** Key for the Custom Config's version (librechat.yaml). */
|
|
4944
|
-
Constants["CONFIG_VERSION"] = "1.3.
|
|
6455
|
+
Constants["CONFIG_VERSION"] = "1.3.15";
|
|
4945
6456
|
/** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
|
|
4946
6457
|
Constants["NO_PARENT"] = "00000000-0000-0000-0000-000000000000";
|
|
4947
6458
|
/** Standard value to use whatever the submission prelim. `responseMessageId` is */
|
|
@@ -4993,8 +6504,224 @@ let Constants = /* @__PURE__ */ function(Constants) {
|
|
|
4993
6504
|
Constants["BASH_PROGRAMMATIC_TOOL_CALLING"] = "run_tools_with_bash";
|
|
4994
6505
|
/** Subagent spawn tool name (must match `@librechat/agents` `Constants.SUBAGENT`). */
|
|
4995
6506
|
Constants["SUBAGENT"] = "subagent";
|
|
6507
|
+
/** Poll tool for retrieving the status/result of a backgrounded tool call. */
|
|
6508
|
+
Constants["CHECK_BACKGROUND_TASK"] = "check_background_task";
|
|
6509
|
+
/**
|
|
6510
|
+
* `finish_reason` stamped on an assistant message whose turn ended because the
|
|
6511
|
+
* agent exhausted its per-turn graph step budget (`recursionLimit`) rather than
|
|
6512
|
+
* because the model chose to stop. Distinct from a user abort: nothing failed and
|
|
6513
|
+
* nothing was cancelled, the turn simply ran out of room. The UI keys its
|
|
6514
|
+
* "tool call limit reached" notice off this value. The hover Continue control
|
|
6515
|
+
* is withheld for this reason because the notice already offers the way forward.
|
|
6516
|
+
*/
|
|
6517
|
+
Constants["TOOL_CALL_LIMIT_FINISH_REASON"] = "tool_call_limit";
|
|
4996
6518
|
return Constants;
|
|
4997
6519
|
}({});
|
|
6520
|
+
/**
|
|
6521
|
+
* Normalizes a server name into the character set tool keys are built from.
|
|
6522
|
+
* Tool keys embed this output, so any candidate list matched against a key must
|
|
6523
|
+
* be normalized the same way.
|
|
6524
|
+
*/
|
|
6525
|
+
function normalizeServerName(serverName) {
|
|
6526
|
+
if (/^[a-zA-Z0-9_.-]+$/.test(serverName)) return serverName;
|
|
6527
|
+
const normalized = serverName.replace(/[^a-zA-Z0-9_.-]/g, "_").replace(/^_+|_+$/g, "");
|
|
6528
|
+
if (normalized) return normalized;
|
|
6529
|
+
/** All characters were stripped; hash the original so the name stays unique. */
|
|
6530
|
+
let hash = 0;
|
|
6531
|
+
for (let i = 0; i < serverName.length; i++) {
|
|
6532
|
+
hash = (hash << 5) - hash + serverName.charCodeAt(i);
|
|
6533
|
+
hash |= 0;
|
|
6534
|
+
}
|
|
6535
|
+
return `server_${Math.abs(hash)}`;
|
|
6536
|
+
}
|
|
6537
|
+
/**
|
|
6538
|
+
* Splits a combined MCP tool key (`${rawToolName}${mcp_delimiter}${serverName}`)
|
|
6539
|
+
* back into its two parts.
|
|
6540
|
+
*
|
|
6541
|
+
* Both halves can legitimately contain the delimiter, so position alone cannot
|
|
6542
|
+
* identify the boundary. Raw tool names come from the upstream server and are
|
|
6543
|
+
* untrusted (`get_mcp_server_version`, or a gateway-prefixed
|
|
6544
|
+
* `gitlab-get_mcp_server_version`), and `normalizeServerName` preserves
|
|
6545
|
+
* underscores, so a configured server may be named `Google_mcp_Workspace`.
|
|
6546
|
+
*
|
|
6547
|
+
* When `knownServerNames` is supplied the boundary is resolved against it: the
|
|
6548
|
+
* longest configured name the key actually ends with wins. Otherwise this falls
|
|
6549
|
+
* back to the last delimiter, which is correct whenever only the tool half
|
|
6550
|
+
* contains one and matches `.split()` when neither does.
|
|
6551
|
+
*
|
|
6552
|
+
* One case stays undecidable from the key alone: if both `bar` and `foo_mcp_bar`
|
|
6553
|
+
* are configured, `tool_mcp_foo_mcp_bar` is a valid key for either. Longest match
|
|
6554
|
+
* is the deterministic tiebreak; resolving it properly needs the tool/server
|
|
6555
|
+
* mapping carried alongside the key rather than re-derived from the string.
|
|
6556
|
+
*/
|
|
6557
|
+
/**
|
|
6558
|
+
* Maps each configured server name's normalized form back to the raw config
|
|
6559
|
+
* name. Model-facing tool keys embed `normalizeServerName(server)`, while the
|
|
6560
|
+
* registry, config maps, tool cache, and plugin-auth rows are keyed by the raw
|
|
6561
|
+
* name — any consumer that parses a server out of a tool key must resolve it
|
|
6562
|
+
* through this map before those lookups. Identity entries are included so
|
|
6563
|
+
* `aliases.get(name) ?? name` works uniformly.
|
|
6564
|
+
*
|
|
6565
|
+
* When two configured names normalize to the same value their tool keys are
|
|
6566
|
+
* inherently ambiguous; the FIRST configured name wins deterministically here,
|
|
6567
|
+
* and `resolveMCPServerContext` warns about the collision so the operator can
|
|
6568
|
+
* rename one server.
|
|
6569
|
+
*/
|
|
6570
|
+
function buildServerNameAliases(rawServerNames) {
|
|
6571
|
+
const aliases = /* @__PURE__ */ new Map();
|
|
6572
|
+
/** Identity entries claim their slot FIRST regardless of configuration
|
|
6573
|
+
* order: a server literally named `foo` must never have its keys rerouted
|
|
6574
|
+
* to a `foo!` whose normalized form collides with it. */
|
|
6575
|
+
for (const raw of rawServerNames) if (raw && normalizeServerName(raw) === raw) aliases.set(raw, raw);
|
|
6576
|
+
for (const raw of rawServerNames) {
|
|
6577
|
+
if (!raw) continue;
|
|
6578
|
+
const normalized = normalizeServerName(raw);
|
|
6579
|
+
if (!aliases.has(normalized)) aliases.set(normalized, raw);
|
|
6580
|
+
}
|
|
6581
|
+
return aliases;
|
|
6582
|
+
}
|
|
6583
|
+
/**
|
|
6584
|
+
* Rewrites a tool key's server segment into the normalized form model-facing
|
|
6585
|
+
* keys carry, resolving the boundary against the configured raw names (longest
|
|
6586
|
+
* suffix wins, mirroring {@link splitMCPToolKey}). Returns the key unchanged
|
|
6587
|
+
* when no configured raw name matches — already-normalized keys, placeholder
|
|
6588
|
+
* tokens, and keys for servers that are no longer configured all pass through.
|
|
6589
|
+
* Idempotent: a normalized segment never matches a raw candidate that needs
|
|
6590
|
+
* rewriting.
|
|
6591
|
+
*/
|
|
6592
|
+
function normalizeMCPToolKey(toolKey, rawServerNames) {
|
|
6593
|
+
let matched;
|
|
6594
|
+
for (let i = 0; i < rawServerNames.length; i++) {
|
|
6595
|
+
const raw = rawServerNames[i];
|
|
6596
|
+
if (!raw || raw.length <= (matched?.length ?? 0)) continue;
|
|
6597
|
+
if (toolKey.endsWith(`_mcp_${raw}`)) matched = raw;
|
|
6598
|
+
}
|
|
6599
|
+
if (matched == null) return toolKey;
|
|
6600
|
+
const normalized = normalizeServerName(matched);
|
|
6601
|
+
if (normalized === matched) return toolKey;
|
|
6602
|
+
return `${toolKey.slice(0, toolKey.length - matched.length)}${normalized}`;
|
|
6603
|
+
}
|
|
6604
|
+
/**
|
|
6605
|
+
* Strips a redundant leading server-name prefix from a raw upstream tool name
|
|
6606
|
+
* before it is embedded into a model-facing key, so the key doesn't carry the
|
|
6607
|
+
* server twice (`acme_trace_..._mcp_acme`) and push long tool names
|
|
6608
|
+
* past provider function-name limits (64 chars). The match is case-insensitive
|
|
6609
|
+
* because display-cased server names ("Acme") conventionally prefix their
|
|
6610
|
+
* tools in lowercase. Ingestion that strips must record the original name
|
|
6611
|
+
* (`serverToolName` on the cached definition) — tool calls send THAT name back
|
|
6612
|
+
* to the server, never the stripped one. Catalog producers must not call this
|
|
6613
|
+
* directly: only {@link stripServerNamePrefixes} sees the whole sibling set and
|
|
6614
|
+
* can keep colliding results apart.
|
|
6615
|
+
*/
|
|
6616
|
+
function stripServerNamePrefix(toolName, normalizedServerName) {
|
|
6617
|
+
const prefixLength = normalizedServerName.length + 1;
|
|
6618
|
+
if (toolName.length <= prefixLength) return toolName;
|
|
6619
|
+
if (toolName.slice(0, prefixLength).toLowerCase() !== `${normalizedServerName.toLowerCase()}_`) return toolName;
|
|
6620
|
+
const stripped = toolName.slice(prefixLength);
|
|
6621
|
+
if (isReservedMCPToolName(stripped)) return toolName;
|
|
6622
|
+
/** `isActionTool` classifies keys by the RELATIVE position of `_action_`
|
|
6623
|
+
* and `_mcp_`; stripping moves the first `_mcp_` earlier, so a server
|
|
6624
|
+
* whose normalized name contains `_action_` could see a real MCP tool
|
|
6625
|
+
* reclassified as an OpenAPI action (bypassing MCP authorization). Never
|
|
6626
|
+
* produce a key whose classification differs from the raw key's. */
|
|
6627
|
+
const keySuffix = `_mcp_${normalizedServerName}`;
|
|
6628
|
+
if (isActionTool(`${stripped}${keySuffix}`) !== isActionTool(`${toolName}${keySuffix}`)) return toolName;
|
|
6629
|
+
return stripped;
|
|
6630
|
+
}
|
|
6631
|
+
/**
|
|
6632
|
+
* Synthetic markers consumed by prefix (`isMCPAllPlaceholder`, the server-pin
|
|
6633
|
+
* skip, the client's OAuth stream classification), so each reserves BOTH its
|
|
6634
|
+
* exact name and its `${marker}${mcp_delimiter}` namespace: a stripped
|
|
6635
|
+
* remainder inside any of them would turn a real upstream tool into the
|
|
6636
|
+
* server-wide wildcard, the UI pin placeholder, or a synthetic OAuth call.
|
|
6637
|
+
*/
|
|
6638
|
+
const RESERVED_MCP_TOOL_MARKERS = [
|
|
6639
|
+
`sys__all__sys`,
|
|
6640
|
+
`sys__server__sys`,
|
|
6641
|
+
"oauth"
|
|
6642
|
+
];
|
|
6643
|
+
function isReservedMCPToolName(toolName) {
|
|
6644
|
+
/** `mcp_` opens the server-scoped pluginKey namespace (`mcp_${serverName}`),
|
|
6645
|
+
* and `lc_transfer_to_` opens the agent-handoff namespace (the client
|
|
6646
|
+
* renders such calls as handoffs; the background and intent passes exclude
|
|
6647
|
+
* them) — pre-strip tool keys could never enter either, since they always
|
|
6648
|
+
* began with the server name itself. */
|
|
6649
|
+
if (toolName.startsWith(`mcp_`) || toolName.startsWith(`lc_transfer_to_`)) return true;
|
|
6650
|
+
return RESERVED_MCP_TOOL_MARKERS.some((marker) => toolName === marker || toolName.startsWith(`${marker}_mcp_`));
|
|
6651
|
+
}
|
|
6652
|
+
/**
|
|
6653
|
+
* Maps every raw tool name in a server's catalog to its model-facing name,
|
|
6654
|
+
* stripping redundant server-name prefixes collision-free: when two names
|
|
6655
|
+
* yield the same result — a bare `foo` next to `<server>_foo`, or the
|
|
6656
|
+
* case-variant pair `<server>_Foo` / `<Server>_Foo` under the case-insensitive
|
|
6657
|
+
* prefix match — every collider keeps its raw name, so two distinct upstream
|
|
6658
|
+
* tools can never collapse onto one key. Unprefixed names count against the
|
|
6659
|
+
* result set through their identity mapping, which is what makes the bare-name
|
|
6660
|
+
* case fall out of the same counter.
|
|
6661
|
+
*/
|
|
6662
|
+
function stripServerNamePrefixes(toolNames, normalizedServerName) {
|
|
6663
|
+
const rawNames = new Set(toolNames);
|
|
6664
|
+
const finalNames = new Map(toolNames.map((name) => {
|
|
6665
|
+
const stripped = stripServerNamePrefix(name, normalizedServerName);
|
|
6666
|
+
/** Every sibling's RAW name is reserved even when that sibling itself
|
|
6667
|
+
* strips away: keys persisted BEFORE stripping embed raw names, so a
|
|
6668
|
+
* stripped result landing on another sibling's raw name would route
|
|
6669
|
+
* that sibling's legacy references to the wrong upstream tool. */
|
|
6670
|
+
return [name, stripped !== name && rawNames.has(stripped) ? name : stripped];
|
|
6671
|
+
}));
|
|
6672
|
+
/** Reverting a collider to its raw name can itself collide with ANOTHER
|
|
6673
|
+
* sibling's stripped result (`foo` / `acme_foo` / `acme_acme_foo`), so the
|
|
6674
|
+
* guard iterates to a fixpoint. Each pass converts at least one stripped
|
|
6675
|
+
* result back to its unique raw name, so it terminates within the catalog
|
|
6676
|
+
* size. */
|
|
6677
|
+
let changed = true;
|
|
6678
|
+
while (changed) {
|
|
6679
|
+
changed = false;
|
|
6680
|
+
const counts = /* @__PURE__ */ new Map();
|
|
6681
|
+
finalNames.forEach((result) => {
|
|
6682
|
+
counts.set(result, (counts.get(result) ?? 0) + 1);
|
|
6683
|
+
});
|
|
6684
|
+
finalNames.forEach((result, raw) => {
|
|
6685
|
+
if (result !== raw && (counts.get(result) ?? 0) > 1) {
|
|
6686
|
+
finalNames.set(raw, raw);
|
|
6687
|
+
changed = true;
|
|
6688
|
+
}
|
|
6689
|
+
});
|
|
6690
|
+
}
|
|
6691
|
+
return finalNames;
|
|
6692
|
+
}
|
|
6693
|
+
function splitMCPToolKey(toolKey, knownServerNames) {
|
|
6694
|
+
if (knownServerNames?.length) {
|
|
6695
|
+
let matched;
|
|
6696
|
+
for (let i = 0; i < knownServerNames.length; i++) {
|
|
6697
|
+
const serverName = knownServerNames[i];
|
|
6698
|
+
if (!serverName || serverName.length <= (matched?.length ?? 0)) continue;
|
|
6699
|
+
if (toolKey.endsWith(`_mcp_${serverName}`)) matched = serverName;
|
|
6700
|
+
}
|
|
6701
|
+
if (matched != null) return [toolKey.slice(0, toolKey.length - matched.length - 5), matched];
|
|
6702
|
+
}
|
|
6703
|
+
const idx = toolKey.lastIndexOf("_mcp_");
|
|
6704
|
+
if (idx === -1) return [toolKey, void 0];
|
|
6705
|
+
return [toolKey.slice(0, idx), toolKey.slice(idx + 5)];
|
|
6706
|
+
}
|
|
6707
|
+
/**
|
|
6708
|
+
* Splits a tool-call name for display, where the key may be a synthetic MCP OAuth
|
|
6709
|
+
* call (`oauth${mcp_delimiter}${serverName}`) rather than a real tool key.
|
|
6710
|
+
*
|
|
6711
|
+
* A configured server name is authoritative when one matches, because a real tool key
|
|
6712
|
+
* always ends in its server. Only when none matches does the `oauth` prefix decide,
|
|
6713
|
+
* which keeps a genuine upstream tool named `oauth${mcp_delimiter}...` from being read
|
|
6714
|
+
* as a synthetic call while still resolving OAuth prompts for unconfigured servers.
|
|
6715
|
+
*/
|
|
6716
|
+
function splitToolCallName(toolCallName, knownServerNames) {
|
|
6717
|
+
if (knownServerNames?.length) {
|
|
6718
|
+
const [toolName, serverName] = splitMCPToolKey(toolCallName, knownServerNames);
|
|
6719
|
+
if (serverName != null && knownServerNames.includes(serverName)) return [toolName, serverName];
|
|
6720
|
+
}
|
|
6721
|
+
const oauthPrefix = `oauth_mcp_`;
|
|
6722
|
+
if (toolCallName.startsWith(oauthPrefix)) return ["oauth", toolCallName.slice(oauthPrefix.length)];
|
|
6723
|
+
return splitMCPToolKey(toolCallName, knownServerNames);
|
|
6724
|
+
}
|
|
4998
6725
|
/** Maximum explicit subagent hops allowed from any root agent at runtime. */
|
|
4999
6726
|
const MAX_SUBAGENT_DEPTH = 5;
|
|
5000
6727
|
/** Maximum unique explicit subagent targets that may be loaded at runtime. */
|
|
@@ -5046,6 +6773,8 @@ let LocalStorageKeys = /* @__PURE__ */ function(LocalStorageKeys) {
|
|
|
5046
6773
|
LocalStorageKeys["LAST_ARTIFACTS_TOGGLE_"] = "LAST_ARTIFACTS_TOGGLE_";
|
|
5047
6774
|
/** Last checked toggle for Skills per conversation ID */
|
|
5048
6775
|
LocalStorageKeys["LAST_SKILLS_TOGGLE_"] = "LAST_SKILLS_TOGGLE_";
|
|
6776
|
+
/** Last checked toggle for Memory per conversation ID */
|
|
6777
|
+
LocalStorageKeys["LAST_MEMORY_TOGGLE_"] = "LAST_MEMORY_TOGGLE_";
|
|
5049
6778
|
/** Key for the last selected agent provider */
|
|
5050
6779
|
LocalStorageKeys["LAST_AGENT_PROVIDER"] = "lastAgentProvider";
|
|
5051
6780
|
/** Key for the last selected agent model */
|
|
@@ -5180,6 +6909,7 @@ let PrincipalModel = /* @__PURE__ */ function(PrincipalModel) {
|
|
|
5180
6909
|
*/
|
|
5181
6910
|
let ResourceType = /* @__PURE__ */ function(ResourceType) {
|
|
5182
6911
|
ResourceType["AGENT"] = "agent";
|
|
6912
|
+
ResourceType["CODE_ENVIRONMENT"] = "codeEnvironment";
|
|
5183
6913
|
ResourceType["PROMPTGROUP"] = "promptGroup";
|
|
5184
6914
|
ResourceType["MCPSERVER"] = "mcpServer";
|
|
5185
6915
|
ResourceType["REMOTE_AGENT"] = "remoteAgent";
|
|
@@ -5208,6 +6938,9 @@ let AccessRoleIds = /* @__PURE__ */ function(AccessRoleIds) {
|
|
|
5208
6938
|
AccessRoleIds["AGENT_VIEWER"] = "agent_viewer";
|
|
5209
6939
|
AccessRoleIds["AGENT_EDITOR"] = "agent_editor";
|
|
5210
6940
|
AccessRoleIds["AGENT_OWNER"] = "agent_owner";
|
|
6941
|
+
AccessRoleIds["CODE_ENVIRONMENT_VIEWER"] = "codeEnvironment_viewer";
|
|
6942
|
+
AccessRoleIds["CODE_ENVIRONMENT_EDITOR"] = "codeEnvironment_editor";
|
|
6943
|
+
AccessRoleIds["CODE_ENVIRONMENT_OWNER"] = "codeEnvironment_owner";
|
|
5211
6944
|
AccessRoleIds["PROMPTGROUP_VIEWER"] = "promptGroup_viewer";
|
|
5212
6945
|
AccessRoleIds["PROMPTGROUP_EDITOR"] = "promptGroup_editor";
|
|
5213
6946
|
AccessRoleIds["PROMPTGROUP_OWNER"] = "promptGroup_owner";
|
|
@@ -5324,17 +7057,20 @@ function permBitsToAccessLevel(permBits) {
|
|
|
5324
7057
|
function accessRoleToPermBits(accessRoleId) {
|
|
5325
7058
|
switch (accessRoleId) {
|
|
5326
7059
|
case "agent_viewer":
|
|
7060
|
+
case "codeEnvironment_viewer":
|
|
5327
7061
|
case "promptGroup_viewer":
|
|
5328
7062
|
case "mcpServer_viewer":
|
|
5329
7063
|
case "remoteAgent_viewer":
|
|
5330
7064
|
case "skill_viewer":
|
|
5331
7065
|
case "sharedLink_viewer": return 1;
|
|
5332
7066
|
case "agent_editor":
|
|
7067
|
+
case "codeEnvironment_editor":
|
|
5333
7068
|
case "promptGroup_editor":
|
|
5334
7069
|
case "mcpServer_editor":
|
|
5335
7070
|
case "remoteAgent_editor":
|
|
5336
7071
|
case "skill_editor": return 3;
|
|
5337
7072
|
case "agent_owner":
|
|
7073
|
+
case "codeEnvironment_owner":
|
|
5338
7074
|
case "promptGroup_owner":
|
|
5339
7075
|
case "mcpServer_owner":
|
|
5340
7076
|
case "remoteAgent_owner":
|
|
@@ -5361,21 +7097,25 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
|
|
|
5361
7097
|
QueryKeys["sharedLinks"] = "sharedLinks";
|
|
5362
7098
|
QueryKeys["allConversations"] = "allConversations";
|
|
5363
7099
|
QueryKeys["archivedConversations"] = "archivedConversations";
|
|
7100
|
+
QueryKeys["pinnedConversations"] = "pinnedConversations";
|
|
5364
7101
|
QueryKeys["searchConversations"] = "searchConversations";
|
|
5365
7102
|
QueryKeys["conversation"] = "conversation";
|
|
5366
7103
|
QueryKeys["searchEnabled"] = "searchEnabled";
|
|
7104
|
+
QueryKeys["langfuseConnection"] = "langfuseConnection";
|
|
7105
|
+
QueryKeys["langfuseSessionLink"] = "langfuseSessionLink";
|
|
5367
7106
|
QueryKeys["user"] = "user";
|
|
5368
7107
|
QueryKeys["name"] = "name";
|
|
5369
7108
|
QueryKeys["models"] = "models";
|
|
5370
7109
|
QueryKeys["balance"] = "balance";
|
|
5371
7110
|
QueryKeys["endpoints"] = "endpoints";
|
|
5372
7111
|
QueryKeys["tokenConfig"] = "tokenConfig";
|
|
5373
|
-
QueryKeys["contextProjection"] = "contextProjection";
|
|
5374
7112
|
QueryKeys["presets"] = "presets";
|
|
5375
7113
|
QueryKeys["searchResults"] = "searchResults";
|
|
5376
7114
|
QueryKeys["tokenCount"] = "tokenCount";
|
|
5377
7115
|
QueryKeys["availablePlugins"] = "availablePlugins";
|
|
5378
7116
|
QueryKeys["startupConfig"] = "startupConfig";
|
|
7117
|
+
QueryKeys["insights"] = "insights";
|
|
7118
|
+
QueryKeys["insightsAccess"] = "insightsAccess";
|
|
5379
7119
|
QueryKeys["assistants"] = "assistants";
|
|
5380
7120
|
QueryKeys["assistant"] = "assistant";
|
|
5381
7121
|
QueryKeys["agents"] = "agents";
|
|
@@ -5430,17 +7170,29 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
|
|
|
5430
7170
|
QueryKeys["skillFileContent"] = "skillFileContent";
|
|
5431
7171
|
QueryKeys["skillTree"] = "skillTree";
|
|
5432
7172
|
QueryKeys["skillNodeContent"] = "skillNodeContent";
|
|
5433
|
-
QueryKeys["
|
|
7173
|
+
QueryKeys["toolFavorites"] = "toolFavorites";
|
|
5434
7174
|
QueryKeys["skillStates"] = "skillStates";
|
|
5435
7175
|
QueryKeys["favorites"] = "favorites";
|
|
7176
|
+
QueryKeys["schedules"] = "schedules";
|
|
7177
|
+
QueryKeys["schedule"] = "schedule";
|
|
7178
|
+
QueryKeys["parentSubagents"] = "parentSubagents";
|
|
7179
|
+
QueryKeys["subagentThread"] = "subagentThread";
|
|
7180
|
+
QueryKeys["codeEnvironments"] = "codeEnvironments";
|
|
7181
|
+
QueryKeys["agentQueuedTurns"] = "agentQueuedTurns";
|
|
5436
7182
|
return QueryKeys;
|
|
5437
7183
|
}({});
|
|
5438
7184
|
const DynamicQueryKeys = { agentFiles: (agentId) => ["agentFiles", agentId] };
|
|
5439
7185
|
let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
|
|
7186
|
+
MutationKeys["subagentControl"] = "subagentControl";
|
|
7187
|
+
MutationKeys["enqueueAgentQueuedTurn"] = "enqueueAgentQueuedTurn";
|
|
7188
|
+
MutationKeys["cancelAgentQueuedTurn"] = "cancelAgentQueuedTurn";
|
|
7189
|
+
MutationKeys["updateLangfuseConnection"] = "updateLangfuseConnection";
|
|
7190
|
+
MutationKeys["testLangfuseConnection"] = "testLangfuseConnection";
|
|
5440
7191
|
MutationKeys["createAgentApiKey"] = "createAgentApiKey";
|
|
5441
7192
|
MutationKeys["deleteAgentApiKey"] = "deleteAgentApiKey";
|
|
5442
7193
|
MutationKeys["fileUpload"] = "fileUpload";
|
|
5443
7194
|
MutationKeys["fileDelete"] = "fileDelete";
|
|
7195
|
+
MutationKeys["fileUsage"] = "fileUsage";
|
|
5444
7196
|
MutationKeys["updatePreset"] = "updatePreset";
|
|
5445
7197
|
MutationKeys["deletePreset"] = "deletePreset";
|
|
5446
7198
|
MutationKeys["loginUser"] = "loginUser";
|
|
@@ -5457,6 +7209,7 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
|
|
|
5457
7209
|
MutationKeys["deleteAgentAction"] = "deleteAgentAction";
|
|
5458
7210
|
MutationKeys["revertAgentVersion"] = "revertAgentVersion";
|
|
5459
7211
|
MutationKeys["deleteUser"] = "deleteUser";
|
|
7212
|
+
MutationKeys["updateUserPreferences"] = "updateUserPreferences";
|
|
5460
7213
|
MutationKeys["updateRole"] = "updateRole";
|
|
5461
7214
|
MutationKeys["enableTwoFactor"] = "enableTwoFactor";
|
|
5462
7215
|
MutationKeys["verifyTwoFactor"] = "verifyTwoFactor";
|
|
@@ -5470,6 +7223,14 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
|
|
|
5470
7223
|
MutationKeys["deleteSkillNode"] = "deleteSkillNode";
|
|
5471
7224
|
MutationKeys["updateSkillNodeContent"] = "updateSkillNodeContent";
|
|
5472
7225
|
MutationKeys["convoPin"] = "convoPin";
|
|
7226
|
+
MutationKeys["archiveAllConversations"] = "archiveAllConversations";
|
|
7227
|
+
MutationKeys["createSchedule"] = "createSchedule";
|
|
7228
|
+
MutationKeys["updateSchedule"] = "updateSchedule";
|
|
7229
|
+
MutationKeys["deleteSchedule"] = "deleteSchedule";
|
|
7230
|
+
MutationKeys["runSchedule"] = "runSchedule";
|
|
7231
|
+
MutationKeys["pairCodeEnvironment"] = "pairCodeEnvironment";
|
|
7232
|
+
MutationKeys["updateCodeEnvironmentSettings"] = "updateCodeEnvironmentSettings";
|
|
7233
|
+
MutationKeys["deleteCodeEnvironment"] = "deleteCodeEnvironment";
|
|
5473
7234
|
return MutationKeys;
|
|
5474
7235
|
}({});
|
|
5475
7236
|
//#endregion
|
|
@@ -5529,6 +7290,7 @@ const TOKEN_REFRESH_BUFFER_MS = 120 * 1e3;
|
|
|
5529
7290
|
const refreshToken = (retry) => _post(refreshToken$1(retry));
|
|
5530
7291
|
const SHARE_PAGE_PATH_REGEX = /^\/share\/[^/]+\/?$/;
|
|
5531
7292
|
const SHARED_MESSAGES_PATH_REGEX = /^\/api\/share\/[^/]+$/;
|
|
7293
|
+
const SHARE_FORK_PATH_REGEX = /^\/api\/share\/[^/]+\/fork$/;
|
|
5532
7294
|
const normalizePathname = (pathname) => pathname.startsWith("/") ? pathname : `/${pathname}`;
|
|
5533
7295
|
const stripBasePath = (pathname) => {
|
|
5534
7296
|
const normalizedPathname = normalizePathname(pathname);
|
|
@@ -5548,6 +7310,11 @@ const getRequestPathname = (url) => {
|
|
|
5548
7310
|
}
|
|
5549
7311
|
};
|
|
5550
7312
|
const isSharedMessagesRequest = (url, method) => method?.toLowerCase() === "get" && SHARED_MESSAGES_PATH_REGEX.test(stripBasePath(getRequestPathname(url)));
|
|
7313
|
+
/** The "continue this chat" fork is a deliberate authenticated action initiated
|
|
7314
|
+
* from a share page, so it must reach auth recovery/redirect like the shared
|
|
7315
|
+
* data request — otherwise a logged-out (or cold-loaded) viewer's 401 is
|
|
7316
|
+
* rejected silently instead of routing them through login. */
|
|
7317
|
+
const isShareForkRequest = (url, method) => method?.toLowerCase() === "post" && SHARE_FORK_PATH_REGEX.test(stripBasePath(getRequestPathname(url)));
|
|
5551
7318
|
const dispatchTokenUpdatedEvent = (token) => {
|
|
5552
7319
|
setTokenHeader(token);
|
|
5553
7320
|
clearAuthRedirectStartedAt();
|
|
@@ -5646,16 +7413,42 @@ const shouldRefreshBeforeRequest = (url) => {
|
|
|
5646
7413
|
const timeUntilExpiry = expiresAt - Date.now();
|
|
5647
7414
|
return timeUntilExpiry > 0 && timeUntilExpiry <= TOKEN_REFRESH_BUFFER_MS;
|
|
5648
7415
|
};
|
|
7416
|
+
const refreshBeforeRequest = async (url) => {
|
|
7417
|
+
const state = getAuthRecoveryState();
|
|
7418
|
+
if (state.refreshPromise && !isAuthRecoveryEndpoint(url)) return state.refreshPromise.catch(() => null);
|
|
7419
|
+
if (!shouldRefreshBeforeRequest(url)) return null;
|
|
7420
|
+
return startAuthRecovery(false).catch(() => null);
|
|
7421
|
+
};
|
|
7422
|
+
const withAuthorization = (options, token) => {
|
|
7423
|
+
const headers = new Headers(options?.headers);
|
|
7424
|
+
if (token) headers.set("Authorization", `Bearer ${token}`);
|
|
7425
|
+
return {
|
|
7426
|
+
...options,
|
|
7427
|
+
headers
|
|
7428
|
+
};
|
|
7429
|
+
};
|
|
7430
|
+
async function _authenticatedFetch(url, options) {
|
|
7431
|
+
if (typeof window === "undefined") return fetch(url, options);
|
|
7432
|
+
const token = await refreshBeforeRequest(url) ?? getBearerToken();
|
|
7433
|
+
const response = await fetch(url, withAuthorization(options, token));
|
|
7434
|
+
if (response.status !== 401 || isAuthRecoveryEndpoint(url) || isAuthRedirectInProgress() || !getBearerToken()) return response;
|
|
7435
|
+
let refreshedToken;
|
|
7436
|
+
try {
|
|
7437
|
+
refreshedToken = await startAuthRecovery(false);
|
|
7438
|
+
} catch {
|
|
7439
|
+
redirectToLoginOnce();
|
|
7440
|
+
return response;
|
|
7441
|
+
}
|
|
7442
|
+
if (!refreshedToken) {
|
|
7443
|
+
redirectToLoginOnce();
|
|
7444
|
+
return response;
|
|
7445
|
+
}
|
|
7446
|
+
await response.body?.cancel().catch(() => void 0);
|
|
7447
|
+
return fetch(url, withAuthorization(options, refreshedToken));
|
|
7448
|
+
}
|
|
5649
7449
|
if (typeof window !== "undefined") {
|
|
5650
7450
|
axios.default.interceptors.request.use(async (config) => {
|
|
5651
|
-
const
|
|
5652
|
-
if (state.refreshPromise && !isAuthRecoveryEndpoint(config.url)) {
|
|
5653
|
-
const token = await state.refreshPromise.catch(() => null);
|
|
5654
|
-
if (token) setRequestAuthorizationHeader(config, token);
|
|
5655
|
-
return config;
|
|
5656
|
-
}
|
|
5657
|
-
if (!shouldRefreshBeforeRequest(config.url)) return config;
|
|
5658
|
-
const token = await startAuthRecovery(false).catch(() => null);
|
|
7451
|
+
const token = await refreshBeforeRequest(config.url);
|
|
5659
7452
|
if (token) setRequestAuthorizationHeader(config, token);
|
|
5660
7453
|
return config;
|
|
5661
7454
|
});
|
|
@@ -5669,7 +7462,7 @@ if (typeof window !== "undefined") {
|
|
|
5669
7462
|
/** Skip refresh when the Authorization header has been cleared (e.g. during logout),
|
|
5670
7463
|
* but allow the shared link data request to proceed so private shares can still
|
|
5671
7464
|
* recover auth/redirect without unrelated share-page queries forcing login. */
|
|
5672
|
-
if (!axios.default.defaults.headers.common["Authorization"] && !(isSharePage() && isSharedMessagesRequest(originalRequest.url, originalRequest.method))) return Promise.reject(error);
|
|
7465
|
+
if (!axios.default.defaults.headers.common["Authorization"] && !(isSharePage() && (isSharedMessagesRequest(originalRequest.url, originalRequest.method) || isShareForkRequest(originalRequest.url, originalRequest.method)))) return Promise.reject(error);
|
|
5673
7466
|
if (isAuthRedirectInProgress()) return Promise.reject(error);
|
|
5674
7467
|
if (error.response.status === 401 && !originalRequest._retry) {
|
|
5675
7468
|
if (!(getAuthRecoveryState().refreshPromise != null)) console.warn("401 error, refreshing token");
|
|
@@ -5682,8 +7475,12 @@ if (typeof window !== "undefined") {
|
|
|
5682
7475
|
}
|
|
5683
7476
|
redirectToLoginOnce();
|
|
5684
7477
|
return Promise.reject(error);
|
|
5685
|
-
} catch
|
|
5686
|
-
|
|
7478
|
+
} catch {
|
|
7479
|
+
/** A rejected refresh (stale/invalid session → 401/403) must route to
|
|
7480
|
+
* login just like an empty-token refresh, otherwise the original 401
|
|
7481
|
+
* surfaces to the caller (e.g. the share fork button) with no redirect. */
|
|
7482
|
+
redirectToLoginOnce();
|
|
7483
|
+
return Promise.reject(error);
|
|
5687
7484
|
}
|
|
5688
7485
|
}
|
|
5689
7486
|
return Promise.reject(error);
|
|
@@ -5699,24 +7496,154 @@ var request_default = {
|
|
|
5699
7496
|
delete: _delete,
|
|
5700
7497
|
deleteWithOptions: _deleteWithOptions,
|
|
5701
7498
|
patch: _patch,
|
|
7499
|
+
authenticatedFetch: _authenticatedFetch,
|
|
5702
7500
|
refreshToken,
|
|
5703
7501
|
dispatchTokenUpdatedEvent
|
|
5704
7502
|
};
|
|
5705
7503
|
//#endregion
|
|
7504
|
+
//#region src/upload.ts
|
|
7505
|
+
const EVENT_STREAM_MEDIA_TYPE = "text/event-stream";
|
|
7506
|
+
const HEARTBEAT_TIMEOUT_MS = 15e3;
|
|
7507
|
+
var FileUploadError = class extends Error {
|
|
7508
|
+
constructor(message, fileId, toolResource, displayToUser = false, code = 0) {
|
|
7509
|
+
super(message);
|
|
7510
|
+
this.name = "CustomAppError";
|
|
7511
|
+
this.code = code;
|
|
7512
|
+
this.file_id = fileId;
|
|
7513
|
+
this.tool_resource = toolResource;
|
|
7514
|
+
this.display_to_user = displayToUser;
|
|
7515
|
+
this.response = { data: { message: displayToUser ? message : "" } };
|
|
7516
|
+
}
|
|
7517
|
+
};
|
|
7518
|
+
var UploadCanceledError = class extends Error {
|
|
7519
|
+
constructor(..._args) {
|
|
7520
|
+
super(..._args);
|
|
7521
|
+
this.code = "ERR_CANCELED";
|
|
7522
|
+
}
|
|
7523
|
+
};
|
|
7524
|
+
const getFileId = (formData) => String(formData.get("file_id") ?? "");
|
|
7525
|
+
const getToolResource = (formData) => formData.get("tool_resource") ?? void 0;
|
|
7526
|
+
const parseEvent = (message) => {
|
|
7527
|
+
let type = "message";
|
|
7528
|
+
const data = [];
|
|
7529
|
+
for (const line of message.split(/\r?\n/)) {
|
|
7530
|
+
if (line.startsWith("event:")) {
|
|
7531
|
+
type = line.slice(6).trim();
|
|
7532
|
+
continue;
|
|
7533
|
+
}
|
|
7534
|
+
if (line.startsWith("data:")) data.push(line.slice(5).trimStart());
|
|
7535
|
+
}
|
|
7536
|
+
return {
|
|
7537
|
+
type,
|
|
7538
|
+
data: data.join("\n")
|
|
7539
|
+
};
|
|
7540
|
+
};
|
|
7541
|
+
const createHttpError = async (response, formData) => {
|
|
7542
|
+
let message = `Server responded with status: ${response.status}`;
|
|
7543
|
+
try {
|
|
7544
|
+
message = (await response.json()).message || message;
|
|
7545
|
+
} catch {}
|
|
7546
|
+
return new FileUploadError(message, getFileId(formData), getToolResource(formData), true, response.status);
|
|
7547
|
+
};
|
|
7548
|
+
const createStreamError = (data, formData) => {
|
|
7549
|
+
let error;
|
|
7550
|
+
try {
|
|
7551
|
+
error = JSON.parse(data);
|
|
7552
|
+
} catch {
|
|
7553
|
+
error = { message: data };
|
|
7554
|
+
}
|
|
7555
|
+
return new FileUploadError(error.message || "File upload failed.", error.temp_file_id || getFileId(formData), error.tool_resource || getToolResource(formData), error.display_to_user ?? false, error.code ?? 0);
|
|
7556
|
+
};
|
|
7557
|
+
const readEventStream = async (stream, formData) => {
|
|
7558
|
+
const reader = stream.getReader();
|
|
7559
|
+
const decoder = new TextDecoder();
|
|
7560
|
+
let buffer = "";
|
|
7561
|
+
let result = null;
|
|
7562
|
+
let streamEnded = false;
|
|
7563
|
+
let timeoutError = null;
|
|
7564
|
+
let heartbeatTimer;
|
|
7565
|
+
const resetHeartbeatTimer = () => {
|
|
7566
|
+
clearTimeout(heartbeatTimer);
|
|
7567
|
+
heartbeatTimer = setTimeout(() => {
|
|
7568
|
+
timeoutError = /* @__PURE__ */ new Error("Upload connection timed out waiting for a heartbeat.");
|
|
7569
|
+
reader.cancel(timeoutError);
|
|
7570
|
+
}, HEARTBEAT_TIMEOUT_MS);
|
|
7571
|
+
};
|
|
7572
|
+
resetHeartbeatTimer();
|
|
7573
|
+
try {
|
|
7574
|
+
while (true) {
|
|
7575
|
+
const { value, done } = await reader.read();
|
|
7576
|
+
if (done) {
|
|
7577
|
+
streamEnded = true;
|
|
7578
|
+
if (timeoutError) throw timeoutError;
|
|
7579
|
+
if (result) return result;
|
|
7580
|
+
throw new Error("Upload connection closed before completion.");
|
|
7581
|
+
}
|
|
7582
|
+
buffer += decoder.decode(value, { stream: true });
|
|
7583
|
+
const messages = buffer.split(/\r?\n\r?\n/);
|
|
7584
|
+
buffer = messages.pop() ?? "";
|
|
7585
|
+
for (const message of messages) {
|
|
7586
|
+
const event = parseEvent(message);
|
|
7587
|
+
if (event.type === "heartbeat") {
|
|
7588
|
+
resetHeartbeatTimer();
|
|
7589
|
+
continue;
|
|
7590
|
+
}
|
|
7591
|
+
if (event.type === "error") throw createStreamError(event.data, formData);
|
|
7592
|
+
if (event.type === "data") {
|
|
7593
|
+
result = JSON.parse(event.data);
|
|
7594
|
+
continue;
|
|
7595
|
+
}
|
|
7596
|
+
if (event.type === "close") {
|
|
7597
|
+
if (result) return result;
|
|
7598
|
+
throw new Error("Upload stream closed without a result.");
|
|
7599
|
+
}
|
|
7600
|
+
}
|
|
7601
|
+
}
|
|
7602
|
+
} catch (error) {
|
|
7603
|
+
if (error instanceof Error && error.name === "AbortError") throw new UploadCanceledError("Upload canceled.");
|
|
7604
|
+
throw error;
|
|
7605
|
+
} finally {
|
|
7606
|
+
clearTimeout(heartbeatTimer);
|
|
7607
|
+
if (!streamEnded) await reader.cancel().catch(() => void 0);
|
|
7608
|
+
reader.releaseLock();
|
|
7609
|
+
}
|
|
7610
|
+
};
|
|
7611
|
+
async function uploadEventStream(url, formData, signal) {
|
|
7612
|
+
try {
|
|
7613
|
+
const response = await request_default.authenticatedFetch(url, {
|
|
7614
|
+
method: "POST",
|
|
7615
|
+
body: formData,
|
|
7616
|
+
headers: { Accept: EVENT_STREAM_MEDIA_TYPE },
|
|
7617
|
+
signal: signal ?? void 0
|
|
7618
|
+
});
|
|
7619
|
+
if (!response.ok) throw await createHttpError(response, formData);
|
|
7620
|
+
if (!(response.headers.get("Content-Type")?.toLowerCase() ?? "").includes(EVENT_STREAM_MEDIA_TYPE)) return await response.json();
|
|
7621
|
+
if (!response.body) throw new Error("No upload response body received.");
|
|
7622
|
+
return await readEventStream(response.body, formData);
|
|
7623
|
+
} catch (error) {
|
|
7624
|
+
if (signal?.aborted || error instanceof Error && error.name === "AbortError") throw new UploadCanceledError("Upload canceled.");
|
|
7625
|
+
throw error;
|
|
7626
|
+
}
|
|
7627
|
+
}
|
|
7628
|
+
//#endregion
|
|
5706
7629
|
//#region src/data-service.ts
|
|
5707
7630
|
var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
5708
7631
|
acceptTerms: () => acceptTerms,
|
|
5709
7632
|
addPromptToGroup: () => addPromptToGroup,
|
|
5710
7633
|
addTagToConversation: () => addTagToConversation,
|
|
7634
|
+
addToolFavorite: () => addToolFavorite,
|
|
7635
|
+
archiveAllConversations: () => archiveAllConversations,
|
|
5711
7636
|
archiveConversation: () => archiveConversation,
|
|
5712
7637
|
assignConversationToProject: () => assignConversationToProject,
|
|
5713
7638
|
bindActionOAuth: () => bindActionOAuth,
|
|
5714
7639
|
bindMCPOAuth: () => bindMCPOAuth,
|
|
5715
7640
|
branchMessage: () => branchMessage,
|
|
5716
7641
|
callTool: () => callTool,
|
|
7642
|
+
cancelAgentQueuedTurn: () => cancelAgentQueuedTurn,
|
|
5717
7643
|
cancelMCPOAuth: () => cancelMCPOAuth,
|
|
5718
7644
|
clearAllConversations: () => clearAllConversations,
|
|
5719
7645
|
confirmTwoFactor: () => confirmTwoFactor,
|
|
7646
|
+
controlSubagentTask: () => controlSubagentTask,
|
|
5720
7647
|
createAgent: () => createAgent,
|
|
5721
7648
|
createAgentApiKey: () => createAgentApiKey,
|
|
5722
7649
|
createAssistant: () => createAssistant,
|
|
@@ -5726,6 +7653,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5726
7653
|
createPreset: () => createPreset,
|
|
5727
7654
|
createProject: () => createProject,
|
|
5728
7655
|
createPrompt: () => createPrompt,
|
|
7656
|
+
createSchedule: () => createSchedule,
|
|
5729
7657
|
createSharedLink: () => createSharedLink,
|
|
5730
7658
|
createSkill: () => createSkill,
|
|
5731
7659
|
createSkillNode: () => createSkillNode,
|
|
@@ -5734,16 +7662,19 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5734
7662
|
deleteAgentAction: () => deleteAgentAction,
|
|
5735
7663
|
deleteAgentApiKey: () => deleteAgentApiKey,
|
|
5736
7664
|
deleteAssistant: () => deleteAssistant,
|
|
7665
|
+
deleteCodeEnvironment: () => deleteCodeEnvironment,
|
|
5737
7666
|
deleteConversation: () => deleteConversation,
|
|
5738
7667
|
deleteConversationTag: () => deleteConversationTag,
|
|
5739
7668
|
deleteFiles: () => deleteFiles,
|
|
5740
7669
|
deleteGitHubSkillSyncCredential: () => deleteGitHubSkillSyncCredential,
|
|
5741
7670
|
deleteMCPServer: () => deleteMCPServer,
|
|
5742
7671
|
deleteMemory: () => deleteMemory,
|
|
7672
|
+
deleteMemoryById: () => deleteMemoryById,
|
|
5743
7673
|
deletePreset: () => deletePreset,
|
|
5744
7674
|
deleteProject: () => deleteProject,
|
|
5745
7675
|
deletePrompt: () => deletePrompt,
|
|
5746
7676
|
deletePromptGroup: () => deletePromptGroup,
|
|
7677
|
+
deleteSchedule: () => deleteSchedule,
|
|
5747
7678
|
deleteSharedLink: () => deleteSharedLink,
|
|
5748
7679
|
deleteSkill: () => deleteSkill,
|
|
5749
7680
|
deleteSkillFile: () => deleteSkillFile,
|
|
@@ -5754,7 +7685,9 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5754
7685
|
duplicateConversation: () => duplicateConversation,
|
|
5755
7686
|
editArtifact: () => editArtifact,
|
|
5756
7687
|
enableTwoFactor: () => enableTwoFactor,
|
|
7688
|
+
enqueueAgentQueuedTurn: () => enqueueAgentQueuedTurn,
|
|
5757
7689
|
forkConversation: () => forkConversation,
|
|
7690
|
+
forkSharedConversation: () => forkSharedConversation,
|
|
5758
7691
|
genTitle: () => genTitle,
|
|
5759
7692
|
getAIEndpoints: () => getAIEndpoints,
|
|
5760
7693
|
getAccessRoles: () => getAccessRoles,
|
|
@@ -5764,6 +7697,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5764
7697
|
getAgentById: () => getAgentById,
|
|
5765
7698
|
getAgentCategories: () => getAgentCategories,
|
|
5766
7699
|
getAgentFiles: () => getAgentFiles,
|
|
7700
|
+
getAgentVersions: () => getAgentVersions,
|
|
5767
7701
|
getAllEffectivePermissions: () => getAllEffectivePermissions,
|
|
5768
7702
|
getAllPromptGroups: () => getAllPromptGroups,
|
|
5769
7703
|
getAssistantById: () => getAssistantById,
|
|
@@ -5773,8 +7707,8 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5773
7707
|
getAvailableTools: () => getAvailableTools,
|
|
5774
7708
|
getBanner: () => getBanner,
|
|
5775
7709
|
getCategories: () => getCategories,
|
|
7710
|
+
getCodeEnvironments: () => getCodeEnvironments,
|
|
5776
7711
|
getCodeOutputDownload: () => getCodeOutputDownload,
|
|
5777
|
-
getContextProjection: () => getContextProjection,
|
|
5778
7712
|
getConversationById: () => getConversationById,
|
|
5779
7713
|
getConversationTags: () => getConversationTags,
|
|
5780
7714
|
getConversations: () => getConversations,
|
|
@@ -5790,17 +7724,24 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5790
7724
|
getFiles: () => getFiles,
|
|
5791
7725
|
getGitHubSkillSyncStatus: () => getGitHubSkillSyncStatus,
|
|
5792
7726
|
getGraphApiToken: () => getGraphApiToken,
|
|
7727
|
+
getInsights: () => getInsights,
|
|
7728
|
+
getInsightsAccess: () => getInsightsAccess,
|
|
7729
|
+
getLangfuseConnection: () => getLangfuseConnection,
|
|
7730
|
+
getLangfuseSessionLink: () => getLangfuseSessionLink,
|
|
5793
7731
|
getLoginGoogle: () => getLoginGoogle,
|
|
5794
7732
|
getMCPAuthValues: () => getMCPAuthValues,
|
|
5795
7733
|
getMCPConnectionStatus: () => getMCPConnectionStatus,
|
|
7734
|
+
getMCPOAuthStatus: () => getMCPOAuthStatus,
|
|
5796
7735
|
getMCPServer: () => getMCPServer,
|
|
5797
7736
|
getMCPServerConnectionStatus: () => getMCPServerConnectionStatus,
|
|
5798
7737
|
getMCPServers: () => getMCPServers,
|
|
5799
7738
|
getMCPTools: () => getMCPTools,
|
|
5800
7739
|
getMarketplaceAgents: () => getMarketplaceAgents,
|
|
5801
7740
|
getMemories: () => getMemories,
|
|
7741
|
+
getMessageById: () => getMessageById,
|
|
5802
7742
|
getMessagesByConvoId: () => getMessagesByConvoId,
|
|
5803
7743
|
getModels: () => getModels,
|
|
7744
|
+
getParentSubagents: () => getParentSubagents,
|
|
5804
7745
|
getPresets: () => getPresets,
|
|
5805
7746
|
getProjectById: () => getProjectById,
|
|
5806
7747
|
getPrompt: () => getPrompt,
|
|
@@ -5810,6 +7751,8 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5810
7751
|
getRandomPrompts: () => getRandomPrompts,
|
|
5811
7752
|
getResourcePermissions: () => getResourcePermissions,
|
|
5812
7753
|
getRole: () => getRole,
|
|
7754
|
+
getSchedule: () => getSchedule,
|
|
7755
|
+
getSchedules: () => getSchedules,
|
|
5813
7756
|
getSearchEnabled: () => getSearchEnabled,
|
|
5814
7757
|
getSharedFileDownload: () => getSharedFileDownload,
|
|
5815
7758
|
getSharedFilePreview: () => getSharedFilePreview,
|
|
@@ -5817,14 +7760,15 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5817
7760
|
getSharedMessages: () => getSharedMessages,
|
|
5818
7761
|
getSharedStartupConfig: () => getSharedStartupConfig,
|
|
5819
7762
|
getSkill: () => getSkill,
|
|
5820
|
-
getSkillFavorites: () => getSkillFavorites,
|
|
5821
7763
|
getSkillFileContent: () => getSkillFileContent,
|
|
5822
7764
|
getSkillNodeContent: () => getSkillNodeContent,
|
|
5823
7765
|
getSkillStates: () => getSkillStates,
|
|
5824
7766
|
getSkillTree: () => getSkillTree,
|
|
5825
7767
|
getStartupConfig: () => getStartupConfig,
|
|
7768
|
+
getSubagentThread: () => getSubagentThread,
|
|
5826
7769
|
getTokenConfig: () => getTokenConfig,
|
|
5827
7770
|
getToolCalls: () => getToolCalls,
|
|
7771
|
+
getToolFavorites: () => getToolFavorites,
|
|
5828
7772
|
getUser: () => getUser,
|
|
5829
7773
|
getUserBalance: () => getUserBalance,
|
|
5830
7774
|
getUserTerms: () => getUserTerms,
|
|
@@ -5833,6 +7777,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5833
7777
|
healthCheck: () => healthCheck,
|
|
5834
7778
|
importConversationsFile: () => importConversationsFile,
|
|
5835
7779
|
importSkill: () => importSkill,
|
|
7780
|
+
listAgentQueuedTurns: () => listAgentQueuedTurns,
|
|
5836
7781
|
listAgents: () => listAgents,
|
|
5837
7782
|
listAssistants: () => listAssistants,
|
|
5838
7783
|
listConversations: () => listConversations,
|
|
@@ -5845,12 +7790,15 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5845
7790
|
login: () => login,
|
|
5846
7791
|
logout: () => logout,
|
|
5847
7792
|
makePromptProduction: () => makePromptProduction,
|
|
7793
|
+
markFilesUsage: () => markFilesUsage,
|
|
7794
|
+
pairCodeEnvironment: () => pairCodeEnvironment,
|
|
5848
7795
|
pinConversation: () => pinConversation,
|
|
5849
7796
|
rebuildConversationTags: () => rebuildConversationTags,
|
|
5850
7797
|
recordPromptGroupUsage: () => recordPromptGroupUsage,
|
|
5851
7798
|
regenerateBackupCodes: () => regenerateBackupCodes,
|
|
5852
7799
|
register: () => register,
|
|
5853
7800
|
reinitializeMCPServer: () => reinitializeMCPServer,
|
|
7801
|
+
removeToolFavorite: () => removeToolFavorite,
|
|
5854
7802
|
requestPasswordReset: () => requestPasswordReset,
|
|
5855
7803
|
resendVerificationEmail: () => resendVerificationEmail,
|
|
5856
7804
|
resetPassword: () => resetPassword,
|
|
@@ -5858,23 +7806,28 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5858
7806
|
revokeAllUserKeys: () => revokeAllUserKeys,
|
|
5859
7807
|
revokeUserKey: () => revokeUserKey,
|
|
5860
7808
|
runGitHubSkillSync: () => runGitHubSkillSync,
|
|
7809
|
+
runScheduleNow: () => runScheduleNow,
|
|
5861
7810
|
searchPrincipals: () => searchPrincipals,
|
|
5862
7811
|
setGitHubSkillSyncCredential: () => setGitHubSkillSyncCredential,
|
|
5863
7812
|
speechToText: () => speechToText,
|
|
7813
|
+
testLangfuseConnection: () => testLangfuseConnection,
|
|
5864
7814
|
textToSpeech: () => textToSpeech,
|
|
5865
7815
|
updateAction: () => updateAction,
|
|
5866
7816
|
updateAgent: () => updateAgent,
|
|
5867
7817
|
updateAgentAction: () => updateAgentAction,
|
|
5868
7818
|
updateAgentPermissions: () => updateAgentPermissions,
|
|
5869
7819
|
updateAssistant: () => updateAssistant,
|
|
7820
|
+
updateCodeEnvironmentSettings: () => updateCodeEnvironmentSettings,
|
|
5870
7821
|
updateConversation: () => updateConversation,
|
|
5871
7822
|
updateConversationTag: () => updateConversationTag,
|
|
5872
7823
|
updateFavorites: () => updateFavorites,
|
|
5873
7824
|
updateFeedback: () => updateFeedback,
|
|
7825
|
+
updateLangfuseConnection: () => updateLangfuseConnection,
|
|
5874
7826
|
updateMCPServer: () => updateMCPServer,
|
|
5875
7827
|
updateMCPServersPermissions: () => updateMCPServersPermissions,
|
|
5876
7828
|
updateMarketplacePermissions: () => updateMarketplacePermissions,
|
|
5877
7829
|
updateMemory: () => updateMemory,
|
|
7830
|
+
updateMemoryById: () => updateMemoryById,
|
|
5878
7831
|
updateMemoryPermissions: () => updateMemoryPermissions,
|
|
5879
7832
|
updateMemoryPreferences: () => updateMemoryPreferences,
|
|
5880
7833
|
updateMessage: () => updateMessage,
|
|
@@ -5887,9 +7840,9 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5887
7840
|
updatePromptPermissions: () => updatePromptPermissions,
|
|
5888
7841
|
updateRemoteAgentsPermissions: () => updateRemoteAgentsPermissions,
|
|
5889
7842
|
updateResourcePermissions: () => updateResourcePermissions,
|
|
7843
|
+
updateSchedule: () => updateSchedule,
|
|
5890
7844
|
updateSharedLink: () => updateSharedLink,
|
|
5891
7845
|
updateSkill: () => updateSkill,
|
|
5892
|
-
updateSkillFavorites: () => updateSkillFavorites,
|
|
5893
7846
|
updateSkillNode: () => updateSkillNode,
|
|
5894
7847
|
updateSkillNodeContent: () => updateSkillNodeContent,
|
|
5895
7848
|
updateSkillPermissions: () => updateSkillPermissions,
|
|
@@ -5897,6 +7850,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5897
7850
|
updateTokenCount: () => updateTokenCount,
|
|
5898
7851
|
updateUserKey: () => updateUserKey,
|
|
5899
7852
|
updateUserPlugins: () => updateUserPlugins,
|
|
7853
|
+
updateUserPreferences: () => updateUserPreferences,
|
|
5900
7854
|
uploadAgentAvatar: () => uploadAgentAvatar,
|
|
5901
7855
|
uploadAssistantAvatar: () => uploadAssistantAvatar,
|
|
5902
7856
|
uploadAvatar: () => uploadAvatar,
|
|
@@ -5908,6 +7862,27 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
5908
7862
|
verifyTwoFactor: () => verifyTwoFactor,
|
|
5909
7863
|
verifyTwoFactorTemp: () => verifyTwoFactorTemp
|
|
5910
7864
|
});
|
|
7865
|
+
function getInsights(params = {}) {
|
|
7866
|
+
const query = new URLSearchParams();
|
|
7867
|
+
for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== "") query.set(key, String(value));
|
|
7868
|
+
const suffix = query.toString() ? `?${query.toString()}` : "";
|
|
7869
|
+
return request_default.get(`${insights()}${suffix}`);
|
|
7870
|
+
}
|
|
7871
|
+
function getInsightsAccess() {
|
|
7872
|
+
return request_default.get(insightsAccess());
|
|
7873
|
+
}
|
|
7874
|
+
function getLangfuseConnection() {
|
|
7875
|
+
return request_default.get(adminLangfuseConnection());
|
|
7876
|
+
}
|
|
7877
|
+
function updateLangfuseConnection(payload) {
|
|
7878
|
+
return request_default.put(adminLangfuseConnection(), payload);
|
|
7879
|
+
}
|
|
7880
|
+
function testLangfuseConnection(payload) {
|
|
7881
|
+
return request_default.post(adminLangfuseConnectionTest(), payload);
|
|
7882
|
+
}
|
|
7883
|
+
function getLangfuseSessionLink(conversationId) {
|
|
7884
|
+
return request_default.get(adminLangfuseSessionLink(conversationId));
|
|
7885
|
+
}
|
|
5911
7886
|
function revokeUserKey(name) {
|
|
5912
7887
|
return request_default.delete(revokeUserKey$1(name));
|
|
5913
7888
|
}
|
|
@@ -5917,22 +7892,33 @@ function revokeAllUserKeys() {
|
|
|
5917
7892
|
function deleteUser(payload) {
|
|
5918
7893
|
return request_default.deleteWithOptions(deleteUser$1(), { data: payload });
|
|
5919
7894
|
}
|
|
7895
|
+
function getCodeEnvironments() {
|
|
7896
|
+
return request_default.get(codeEnvironments());
|
|
7897
|
+
}
|
|
7898
|
+
function pairCodeEnvironment(payload) {
|
|
7899
|
+
return request_default.post(codeEnvironmentPairings(), payload);
|
|
7900
|
+
}
|
|
7901
|
+
function deleteCodeEnvironment(id) {
|
|
7902
|
+
return request_default.delete(codeEnvironmentById(id));
|
|
7903
|
+
}
|
|
7904
|
+
function updateCodeEnvironmentSettings({ id, settings }) {
|
|
7905
|
+
return request_default.patch(codeEnvironmentSettings(id), { settings });
|
|
7906
|
+
}
|
|
5920
7907
|
function getFavorites() {
|
|
5921
7908
|
return request_default.get(`${apiBaseUrl()}/api/user/settings/favorites`);
|
|
5922
7909
|
}
|
|
5923
7910
|
function updateFavorites(favorites) {
|
|
5924
7911
|
return request_default.post(`${apiBaseUrl()}/api/user/settings/favorites`, { favorites });
|
|
5925
7912
|
}
|
|
5926
|
-
/**
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
* an empty list so the UI hooks compile and the Star button is a no-op.
|
|
5930
|
-
*/
|
|
5931
|
-
function getSkillFavorites() {
|
|
5932
|
-
return Promise.resolve([]);
|
|
7913
|
+
/** Tool favorites — starred marketplace items (builtins, tools, MCP servers, skills). */
|
|
7914
|
+
function getToolFavorites() {
|
|
7915
|
+
return request_default.get(toolFavorites());
|
|
5933
7916
|
}
|
|
5934
|
-
function
|
|
5935
|
-
return
|
|
7917
|
+
function addToolFavorite(favorite) {
|
|
7918
|
+
return request_default.put(toolFavorite(favorite.itemType, favorite.itemId));
|
|
7919
|
+
}
|
|
7920
|
+
function removeToolFavorite(favorite) {
|
|
7921
|
+
return request_default.delete(toolFavorite(favorite.itemType, favorite.itemId));
|
|
5936
7922
|
}
|
|
5937
7923
|
/** Per-user skill active/inactive overrides. */
|
|
5938
7924
|
function getSkillStates() {
|
|
@@ -6001,6 +7987,9 @@ function getSearchEnabled() {
|
|
|
6001
7987
|
function getUser() {
|
|
6002
7988
|
return request_default.get(user());
|
|
6003
7989
|
}
|
|
7990
|
+
function updateUserPreferences(preferences) {
|
|
7991
|
+
return request_default.patch(userPreferences(), preferences);
|
|
7992
|
+
}
|
|
6004
7993
|
function getUserBalance() {
|
|
6005
7994
|
return request_default.get(balance());
|
|
6006
7995
|
}
|
|
@@ -6059,6 +8048,9 @@ const getMCPAuthValues = (serverName) => {
|
|
|
6059
8048
|
function cancelMCPOAuth(serverName) {
|
|
6060
8049
|
return request_default.post(cancelMCPOAuth$1(serverName), {});
|
|
6061
8050
|
}
|
|
8051
|
+
function getMCPOAuthStatus(flowId) {
|
|
8052
|
+
return request_default.get(mcpOAuthStatus(flowId));
|
|
8053
|
+
}
|
|
6062
8054
|
const getStartupConfig = (options) => {
|
|
6063
8055
|
return request_default.get(config(options?.context));
|
|
6064
8056
|
};
|
|
@@ -6068,9 +8060,6 @@ const getAIEndpoints = () => {
|
|
|
6068
8060
|
const getTokenConfig = () => {
|
|
6069
8061
|
return request_default.get(tokenConfig());
|
|
6070
8062
|
};
|
|
6071
|
-
const getContextProjection = (payload) => {
|
|
6072
|
-
return request_default.post(contextProjection(), payload);
|
|
6073
|
-
};
|
|
6074
8063
|
const getModels = async () => {
|
|
6075
8064
|
return request_default.get(models());
|
|
6076
8065
|
};
|
|
@@ -6170,14 +8159,24 @@ const getAgentFiles = (agentId) => {
|
|
|
6170
8159
|
const getFileConfig = () => {
|
|
6171
8160
|
return request_default.get(`${files()}/config`);
|
|
6172
8161
|
};
|
|
6173
|
-
const uploadImage = (data, signal) => {
|
|
8162
|
+
const uploadImage = (data, signal, sseEnabled = false) => {
|
|
6174
8163
|
const requestConfig = signal ? { signal } : void 0;
|
|
8164
|
+
if (sseEnabled) return uploadEventStream(images(), data, signal);
|
|
6175
8165
|
return request_default.postMultiPart(images(), data, requestConfig);
|
|
6176
8166
|
};
|
|
6177
|
-
const uploadFile = (data, signal) => {
|
|
8167
|
+
const uploadFile = (data, signal, sseEnabled = false) => {
|
|
6178
8168
|
const requestConfig = signal ? { signal } : void 0;
|
|
8169
|
+
if (sseEnabled) return uploadEventStream(files(), data, signal);
|
|
6179
8170
|
return request_default.postMultiPart(files(), data, requestConfig);
|
|
6180
8171
|
};
|
|
8172
|
+
/**
|
|
8173
|
+
* Marks uploaded files as used (owner-scoped TTL touch) so the upload-window
|
|
8174
|
+
* TTL cannot reap attachments held in a client-side queue during a long run.
|
|
8175
|
+
* Best-effort: callers fire-and-forget — send-time marking is the backstop.
|
|
8176
|
+
*/
|
|
8177
|
+
const markFilesUsage = (body) => {
|
|
8178
|
+
return request_default.post(fileUsage(), body);
|
|
8179
|
+
};
|
|
6181
8180
|
const updateAction = (data) => {
|
|
6182
8181
|
const { assistant_id, version, ...body } = data;
|
|
6183
8182
|
return request_default.post(assistants({
|
|
@@ -6205,6 +8204,9 @@ const getAgentById = ({ agent_id }) => {
|
|
|
6205
8204
|
const getExpandedAgentById = ({ agent_id }) => {
|
|
6206
8205
|
return request_default.get(agents({ path: `${agent_id}/expanded` }));
|
|
6207
8206
|
};
|
|
8207
|
+
const getAgentVersions = ({ agent_id }) => {
|
|
8208
|
+
return request_default.get(agents({ path: `${agent_id}/versions` }));
|
|
8209
|
+
};
|
|
6208
8210
|
const updateAgent = ({ agent_id, data }) => {
|
|
6209
8211
|
return request_default.patch(agents({ path: agent_id }), data);
|
|
6210
8212
|
};
|
|
@@ -6339,6 +8341,12 @@ function duplicateConversation(payload) {
|
|
|
6339
8341
|
function forkConversation(payload) {
|
|
6340
8342
|
return request_default.post(forkConversation$1(), payload);
|
|
6341
8343
|
}
|
|
8344
|
+
function forkSharedConversation(shareId, targetMessageIndex, shareRevision) {
|
|
8345
|
+
return request_default.post(forkSharedMessages(shareId), {
|
|
8346
|
+
targetMessageIndex,
|
|
8347
|
+
shareRevision
|
|
8348
|
+
});
|
|
8349
|
+
}
|
|
6342
8350
|
function deleteConversation(payload) {
|
|
6343
8351
|
return request_default.deleteWithOptions(deleteConversation$1(), { data: { arg: payload } });
|
|
6344
8352
|
}
|
|
@@ -6360,6 +8368,9 @@ function updateConversation(payload) {
|
|
|
6360
8368
|
function archiveConversation(payload) {
|
|
6361
8369
|
return request_default.post(archiveConversation$1(), { arg: payload });
|
|
6362
8370
|
}
|
|
8371
|
+
function archiveAllConversations() {
|
|
8372
|
+
return request_default.post(archiveAllConversations$1(), {});
|
|
8373
|
+
}
|
|
6363
8374
|
function listProjects(params) {
|
|
6364
8375
|
return request_default.get(projects(params ?? {}));
|
|
6365
8376
|
}
|
|
@@ -6418,6 +8429,21 @@ function getMessagesByConvoId(conversationId) {
|
|
|
6418
8429
|
if (conversationId === "new" || conversationId === "PENDING") return Promise.resolve([]);
|
|
6419
8430
|
return request_default.get(messages({ conversationId }));
|
|
6420
8431
|
}
|
|
8432
|
+
function getMessageById(conversationId, messageId) {
|
|
8433
|
+
return request_default.get(messages({
|
|
8434
|
+
conversationId,
|
|
8435
|
+
messageId
|
|
8436
|
+
}));
|
|
8437
|
+
}
|
|
8438
|
+
function getParentSubagents(parentConversationId) {
|
|
8439
|
+
return request_default.get(parentSubagents(parentConversationId));
|
|
8440
|
+
}
|
|
8441
|
+
function getSubagentThread(parentConversationId, threadId, taskId, cursor) {
|
|
8442
|
+
return request_default.get(subagentThread(parentConversationId, threadId, taskId, cursor));
|
|
8443
|
+
}
|
|
8444
|
+
function controlSubagentTask(parentConversationId, threadId, body) {
|
|
8445
|
+
return request_default.post(subagentControl(parentConversationId, threadId), body);
|
|
8446
|
+
}
|
|
6421
8447
|
function getPrompt(id) {
|
|
6422
8448
|
return request_default.get(getPrompt$1(id));
|
|
6423
8449
|
}
|
|
@@ -6466,6 +8492,33 @@ function getRandomPrompts(variables) {
|
|
|
6466
8492
|
function listSkills(params) {
|
|
6467
8493
|
return request_default.get(listSkillsWithFilters(params ?? {}));
|
|
6468
8494
|
}
|
|
8495
|
+
function getSchedules() {
|
|
8496
|
+
return request_default.get(schedules());
|
|
8497
|
+
}
|
|
8498
|
+
function enqueueAgentQueuedTurn(payload) {
|
|
8499
|
+
return request_default.post(agentQueuedTurns(), payload);
|
|
8500
|
+
}
|
|
8501
|
+
function listAgentQueuedTurns(conversationId, clientRequestIds) {
|
|
8502
|
+
return request_default.get(agentQueuedTurnsByConversation(conversationId, clientRequestIds));
|
|
8503
|
+
}
|
|
8504
|
+
function cancelAgentQueuedTurn(queuedTurnId) {
|
|
8505
|
+
return request_default.delete(agentQueuedTurn(queuedTurnId));
|
|
8506
|
+
}
|
|
8507
|
+
function getSchedule(id) {
|
|
8508
|
+
return request_default.get(schedule(id));
|
|
8509
|
+
}
|
|
8510
|
+
function createSchedule(payload) {
|
|
8511
|
+
return request_default.post(schedules(), payload);
|
|
8512
|
+
}
|
|
8513
|
+
function updateSchedule(id, payload) {
|
|
8514
|
+
return request_default.patch(schedule(id), payload);
|
|
8515
|
+
}
|
|
8516
|
+
function deleteSchedule(id) {
|
|
8517
|
+
return request_default.delete(schedule(id));
|
|
8518
|
+
}
|
|
8519
|
+
function runScheduleNow(id) {
|
|
8520
|
+
return request_default.post(runSchedule(id), {});
|
|
8521
|
+
}
|
|
6469
8522
|
function getSkill(id) {
|
|
6470
8523
|
return request_default.get(getSkill$1(id));
|
|
6471
8524
|
}
|
|
@@ -6653,15 +8706,24 @@ function verifyTwoFactorTemp(payload) {
|
|
|
6653
8706
|
const getMemories = () => {
|
|
6654
8707
|
return request_default.get(memories());
|
|
6655
8708
|
};
|
|
6656
|
-
const deleteMemory = (key) => {
|
|
6657
|
-
return request_default.delete(memory(key));
|
|
8709
|
+
const deleteMemory = (key, agentId) => {
|
|
8710
|
+
return request_default.delete(memory(key, agentId));
|
|
8711
|
+
};
|
|
8712
|
+
const deleteMemoryById = (id, agentId) => {
|
|
8713
|
+
return request_default.delete(memoryById(id, agentId));
|
|
6658
8714
|
};
|
|
6659
|
-
const updateMemory = (key, value, originalKey) => {
|
|
6660
|
-
return request_default.patch(memory(originalKey || key), {
|
|
8715
|
+
const updateMemory = (key, value, originalKey, agentId) => {
|
|
8716
|
+
return request_default.patch(memory(originalKey || key, agentId), {
|
|
6661
8717
|
key,
|
|
6662
8718
|
value
|
|
6663
8719
|
});
|
|
6664
8720
|
};
|
|
8721
|
+
const updateMemoryById = (id, value, key, agentId) => {
|
|
8722
|
+
return request_default.patch(memoryById(id, agentId), {
|
|
8723
|
+
value,
|
|
8724
|
+
...key ? { key } : {}
|
|
8725
|
+
});
|
|
8726
|
+
};
|
|
6665
8727
|
const updateMemoryPreferences = (preferences) => {
|
|
6666
8728
|
return request_default.patch(memoryPreferences(), preferences);
|
|
6667
8729
|
};
|
|
@@ -6696,6 +8758,24 @@ const getActiveJobs = () => {
|
|
|
6696
8758
|
return request_default.get(activeJobs());
|
|
6697
8759
|
};
|
|
6698
8760
|
//#endregion
|
|
8761
|
+
Object.defineProperty(exports, "ACTION_METADATA_FILTER_FIELDS", {
|
|
8762
|
+
enumerable: true,
|
|
8763
|
+
get: function() {
|
|
8764
|
+
return ACTION_METADATA_FILTER_FIELDS;
|
|
8765
|
+
}
|
|
8766
|
+
});
|
|
8767
|
+
Object.defineProperty(exports, "AGENT_INSTRUCTION_FILTER_FIELDS", {
|
|
8768
|
+
enumerable: true,
|
|
8769
|
+
get: function() {
|
|
8770
|
+
return AGENT_INSTRUCTION_FILTER_FIELDS;
|
|
8771
|
+
}
|
|
8772
|
+
});
|
|
8773
|
+
Object.defineProperty(exports, "AUTH_USER_DOC_BY_ID_PREFIX", {
|
|
8774
|
+
enumerable: true,
|
|
8775
|
+
get: function() {
|
|
8776
|
+
return AUTH_USER_DOC_BY_ID_PREFIX;
|
|
8777
|
+
}
|
|
8778
|
+
});
|
|
6699
8779
|
Object.defineProperty(exports, "AccessRoleIds", {
|
|
6700
8780
|
enumerable: true,
|
|
6701
8781
|
get: function() {
|
|
@@ -6756,6 +8836,12 @@ Object.defineProperty(exports, "BASE_ONLY_CONFIG_SECTIONS", {
|
|
|
6756
8836
|
return BASE_ONLY_CONFIG_SECTIONS;
|
|
6757
8837
|
}
|
|
6758
8838
|
});
|
|
8839
|
+
Object.defineProperty(exports, "BASE_PRINCIPAL_CONFIG_SECTIONS", {
|
|
8840
|
+
enumerable: true,
|
|
8841
|
+
get: function() {
|
|
8842
|
+
return BASE_PRINCIPAL_CONFIG_SECTIONS;
|
|
8843
|
+
}
|
|
8844
|
+
});
|
|
6759
8845
|
Object.defineProperty(exports, "BedrockProviders", {
|
|
6760
8846
|
enumerable: true,
|
|
6761
8847
|
get: function() {
|
|
@@ -6768,6 +8854,18 @@ Object.defineProperty(exports, "BedrockReasoningConfig", {
|
|
|
6768
8854
|
return BedrockReasoningConfig;
|
|
6769
8855
|
}
|
|
6770
8856
|
});
|
|
8857
|
+
Object.defineProperty(exports, "CONVERSATION_STARTER_FILTER_FIELDS", {
|
|
8858
|
+
enumerable: true,
|
|
8859
|
+
get: function() {
|
|
8860
|
+
return CONVERSATION_STARTER_FILTER_FIELDS;
|
|
8861
|
+
}
|
|
8862
|
+
});
|
|
8863
|
+
Object.defineProperty(exports, "CONVERSATION_TITLE_FILTER_FIELDS", {
|
|
8864
|
+
enumerable: true,
|
|
8865
|
+
get: function() {
|
|
8866
|
+
return CONVERSATION_TITLE_FILTER_FIELDS;
|
|
8867
|
+
}
|
|
8868
|
+
});
|
|
6771
8869
|
Object.defineProperty(exports, "CacheKeys", {
|
|
6772
8870
|
enumerable: true,
|
|
6773
8871
|
get: function() {
|
|
@@ -6840,6 +8938,12 @@ Object.defineProperty(exports, "ErrorTypes", {
|
|
|
6840
8938
|
return ErrorTypes;
|
|
6841
8939
|
}
|
|
6842
8940
|
});
|
|
8941
|
+
Object.defineProperty(exports, "FEEDBACK_FILTER_FIELDS", {
|
|
8942
|
+
enumerable: true,
|
|
8943
|
+
get: function() {
|
|
8944
|
+
return FEEDBACK_FILTER_FIELDS;
|
|
8945
|
+
}
|
|
8946
|
+
});
|
|
6843
8947
|
Object.defineProperty(exports, "FEEDBACK_RATINGS", {
|
|
6844
8948
|
enumerable: true,
|
|
6845
8949
|
get: function() {
|
|
@@ -6858,6 +8962,18 @@ Object.defineProperty(exports, "FEEDBACK_TAGS", {
|
|
|
6858
8962
|
return FEEDBACK_TAGS;
|
|
6859
8963
|
}
|
|
6860
8964
|
});
|
|
8965
|
+
Object.defineProperty(exports, "FILE_FILTER_FIELDS", {
|
|
8966
|
+
enumerable: true,
|
|
8967
|
+
get: function() {
|
|
8968
|
+
return FILE_FILTER_FIELDS;
|
|
8969
|
+
}
|
|
8970
|
+
});
|
|
8971
|
+
Object.defineProperty(exports, "FILTER_PII_STARTER_PATTERNS", {
|
|
8972
|
+
enumerable: true,
|
|
8973
|
+
get: function() {
|
|
8974
|
+
return FILTER_PII_STARTER_PATTERNS;
|
|
8975
|
+
}
|
|
8976
|
+
});
|
|
6861
8977
|
Object.defineProperty(exports, "FetchTokenConfig", {
|
|
6862
8978
|
enumerable: true,
|
|
6863
8979
|
get: function() {
|
|
@@ -6888,6 +9004,12 @@ Object.defineProperty(exports, "ForkOptions", {
|
|
|
6888
9004
|
return ForkOptions;
|
|
6889
9005
|
}
|
|
6890
9006
|
});
|
|
9007
|
+
Object.defineProperty(exports, "HITL_MESSAGE_FILTER_FIELDS", {
|
|
9008
|
+
enumerable: true,
|
|
9009
|
+
get: function() {
|
|
9010
|
+
return HITL_MESSAGE_FILTER_FIELDS;
|
|
9011
|
+
}
|
|
9012
|
+
});
|
|
6891
9013
|
Object.defineProperty(exports, "ImageDetail", {
|
|
6892
9014
|
enumerable: true,
|
|
6893
9015
|
get: function() {
|
|
@@ -6924,94 +9046,202 @@ Object.defineProperty(exports, "LocalStorageKeys", {
|
|
|
6924
9046
|
return LocalStorageKeys;
|
|
6925
9047
|
}
|
|
6926
9048
|
});
|
|
6927
|
-
Object.defineProperty(exports, "
|
|
9049
|
+
Object.defineProperty(exports, "MAX_CHAT_PROJECT_DESCRIPTION_LENGTH", {
|
|
6928
9050
|
enumerable: true,
|
|
6929
9051
|
get: function() {
|
|
6930
|
-
return
|
|
9052
|
+
return MAX_CHAT_PROJECT_DESCRIPTION_LENGTH;
|
|
6931
9053
|
}
|
|
6932
9054
|
});
|
|
6933
|
-
Object.defineProperty(exports, "
|
|
9055
|
+
Object.defineProperty(exports, "MAX_CHAT_PROJECT_NAME_LENGTH", {
|
|
6934
9056
|
enumerable: true,
|
|
6935
9057
|
get: function() {
|
|
6936
|
-
return
|
|
9058
|
+
return MAX_CHAT_PROJECT_NAME_LENGTH;
|
|
6937
9059
|
}
|
|
6938
9060
|
});
|
|
6939
|
-
Object.defineProperty(exports, "
|
|
9061
|
+
Object.defineProperty(exports, "MAX_GRAPH_SUBAGENT_MEMBERS", {
|
|
6940
9062
|
enumerable: true,
|
|
6941
9063
|
get: function() {
|
|
6942
|
-
return
|
|
9064
|
+
return MAX_GRAPH_SUBAGENT_MEMBERS;
|
|
6943
9065
|
}
|
|
6944
9066
|
});
|
|
6945
|
-
Object.defineProperty(exports, "
|
|
9067
|
+
Object.defineProperty(exports, "MAX_PII_CUSTOM_PATTERNS_TOTAL", {
|
|
6946
9068
|
enumerable: true,
|
|
6947
9069
|
get: function() {
|
|
6948
|
-
return
|
|
9070
|
+
return MAX_PII_CUSTOM_PATTERNS_TOTAL;
|
|
6949
9071
|
}
|
|
6950
9072
|
});
|
|
6951
|
-
Object.defineProperty(exports, "
|
|
9073
|
+
Object.defineProperty(exports, "MAX_PII_CUSTOM_REGEX_CHARACTERS", {
|
|
6952
9074
|
enumerable: true,
|
|
6953
9075
|
get: function() {
|
|
6954
|
-
return
|
|
9076
|
+
return MAX_PII_CUSTOM_REGEX_CHARACTERS;
|
|
6955
9077
|
}
|
|
6956
9078
|
});
|
|
6957
|
-
Object.defineProperty(exports, "
|
|
9079
|
+
Object.defineProperty(exports, "MAX_PII_CUSTOM_REGEX_INSTRUCTIONS", {
|
|
6958
9080
|
enumerable: true,
|
|
6959
9081
|
get: function() {
|
|
6960
|
-
return
|
|
9082
|
+
return MAX_PII_CUSTOM_REGEX_INSTRUCTIONS;
|
|
6961
9083
|
}
|
|
6962
9084
|
});
|
|
6963
|
-
Object.defineProperty(exports, "
|
|
9085
|
+
Object.defineProperty(exports, "MAX_PII_PATTERNS_PER_SOURCE", {
|
|
6964
9086
|
enumerable: true,
|
|
6965
9087
|
get: function() {
|
|
6966
|
-
return
|
|
9088
|
+
return MAX_PII_PATTERNS_PER_SOURCE;
|
|
6967
9089
|
}
|
|
6968
9090
|
});
|
|
6969
|
-
Object.defineProperty(exports, "
|
|
9091
|
+
Object.defineProperty(exports, "MAX_PII_PATTERN_ID_LENGTH", {
|
|
6970
9092
|
enumerable: true,
|
|
6971
9093
|
get: function() {
|
|
6972
|
-
return
|
|
9094
|
+
return MAX_PII_PATTERN_ID_LENGTH;
|
|
6973
9095
|
}
|
|
6974
9096
|
});
|
|
6975
|
-
Object.defineProperty(exports, "
|
|
9097
|
+
Object.defineProperty(exports, "MAX_PII_PATTERN_LABEL_LENGTH", {
|
|
6976
9098
|
enumerable: true,
|
|
6977
9099
|
get: function() {
|
|
6978
|
-
return
|
|
9100
|
+
return MAX_PII_PATTERN_LABEL_LENGTH;
|
|
6979
9101
|
}
|
|
6980
9102
|
});
|
|
6981
|
-
Object.defineProperty(exports, "
|
|
9103
|
+
Object.defineProperty(exports, "MAX_PII_PATTERN_LENGTH", {
|
|
6982
9104
|
enumerable: true,
|
|
6983
9105
|
get: function() {
|
|
6984
|
-
return
|
|
9106
|
+
return MAX_PII_PATTERN_LENGTH;
|
|
6985
9107
|
}
|
|
6986
9108
|
});
|
|
6987
|
-
Object.defineProperty(exports, "
|
|
9109
|
+
Object.defineProperty(exports, "MAX_SUBAGENTS", {
|
|
6988
9110
|
enumerable: true,
|
|
6989
9111
|
get: function() {
|
|
6990
|
-
return
|
|
9112
|
+
return MAX_SUBAGENTS;
|
|
6991
9113
|
}
|
|
6992
9114
|
});
|
|
6993
|
-
Object.defineProperty(exports, "
|
|
9115
|
+
Object.defineProperty(exports, "MAX_SUBAGENTS_CEILING", {
|
|
6994
9116
|
enumerable: true,
|
|
6995
9117
|
get: function() {
|
|
6996
|
-
return
|
|
9118
|
+
return MAX_SUBAGENTS_CEILING;
|
|
6997
9119
|
}
|
|
6998
9120
|
});
|
|
6999
|
-
Object.defineProperty(exports, "
|
|
9121
|
+
Object.defineProperty(exports, "MAX_SUBAGENT_DEPTH", {
|
|
7000
9122
|
enumerable: true,
|
|
7001
9123
|
get: function() {
|
|
7002
|
-
return
|
|
9124
|
+
return MAX_SUBAGENT_DEPTH;
|
|
7003
9125
|
}
|
|
7004
9126
|
});
|
|
7005
|
-
Object.defineProperty(exports, "
|
|
9127
|
+
Object.defineProperty(exports, "MAX_SUBAGENT_GRAPH_NODES", {
|
|
7006
9128
|
enumerable: true,
|
|
7007
9129
|
get: function() {
|
|
7008
|
-
return
|
|
9130
|
+
return MAX_SUBAGENT_GRAPH_NODES;
|
|
7009
9131
|
}
|
|
7010
9132
|
});
|
|
7011
|
-
Object.defineProperty(exports, "
|
|
9133
|
+
Object.defineProperty(exports, "MAX_SUBAGENT_RUN_CONFIGS", {
|
|
7012
9134
|
enumerable: true,
|
|
7013
9135
|
get: function() {
|
|
7014
|
-
return
|
|
9136
|
+
return MAX_SUBAGENT_RUN_CONFIGS;
|
|
9137
|
+
}
|
|
9138
|
+
});
|
|
9139
|
+
Object.defineProperty(exports, "MCPOptionsSchema", {
|
|
9140
|
+
enumerable: true,
|
|
9141
|
+
get: function() {
|
|
9142
|
+
return MCPOptionsSchema;
|
|
9143
|
+
}
|
|
9144
|
+
});
|
|
9145
|
+
Object.defineProperty(exports, "MCPServerUserInputSchema", {
|
|
9146
|
+
enumerable: true,
|
|
9147
|
+
get: function() {
|
|
9148
|
+
return MCPServerUserInputSchema;
|
|
9149
|
+
}
|
|
9150
|
+
});
|
|
9151
|
+
Object.defineProperty(exports, "MCPServersSchema", {
|
|
9152
|
+
enumerable: true,
|
|
9153
|
+
get: function() {
|
|
9154
|
+
return MCPServersSchema;
|
|
9155
|
+
}
|
|
9156
|
+
});
|
|
9157
|
+
Object.defineProperty(exports, "MCP_SERVER_TITLE_ERROR", {
|
|
9158
|
+
enumerable: true,
|
|
9159
|
+
get: function() {
|
|
9160
|
+
return MCP_SERVER_TITLE_ERROR;
|
|
9161
|
+
}
|
|
9162
|
+
});
|
|
9163
|
+
Object.defineProperty(exports, "MCP_SERVER_TITLE_PATTERN", {
|
|
9164
|
+
enumerable: true,
|
|
9165
|
+
get: function() {
|
|
9166
|
+
return MCP_SERVER_TITLE_PATTERN;
|
|
9167
|
+
}
|
|
9168
|
+
});
|
|
9169
|
+
Object.defineProperty(exports, "MCP_USER_INPUT_FIELDS", {
|
|
9170
|
+
enumerable: true,
|
|
9171
|
+
get: function() {
|
|
9172
|
+
return MCP_USER_INPUT_FIELDS;
|
|
9173
|
+
}
|
|
9174
|
+
});
|
|
9175
|
+
Object.defineProperty(exports, "MEMORY_FILTER_FIELDS", {
|
|
9176
|
+
enumerable: true,
|
|
9177
|
+
get: function() {
|
|
9178
|
+
return MEMORY_FILTER_FIELDS;
|
|
9179
|
+
}
|
|
9180
|
+
});
|
|
9181
|
+
Object.defineProperty(exports, "MESSAGE_FILTER_FIELDS", {
|
|
9182
|
+
enumerable: true,
|
|
9183
|
+
get: function() {
|
|
9184
|
+
return MESSAGE_FILTER_FIELDS;
|
|
9185
|
+
}
|
|
9186
|
+
});
|
|
9187
|
+
Object.defineProperty(exports, "MODEL_PARAMETER_FILTER_FIELDS", {
|
|
9188
|
+
enumerable: true,
|
|
9189
|
+
get: function() {
|
|
9190
|
+
return MODEL_PARAMETER_FILTER_FIELDS;
|
|
9191
|
+
}
|
|
9192
|
+
});
|
|
9193
|
+
Object.defineProperty(exports, "MYTHOS_CLASS_FAMILIES", {
|
|
9194
|
+
enumerable: true,
|
|
9195
|
+
get: function() {
|
|
9196
|
+
return MYTHOS_CLASS_FAMILIES;
|
|
9197
|
+
}
|
|
9198
|
+
});
|
|
9199
|
+
Object.defineProperty(exports, "MemoryScope", {
|
|
9200
|
+
enumerable: true,
|
|
9201
|
+
get: function() {
|
|
9202
|
+
return MemoryScope;
|
|
9203
|
+
}
|
|
9204
|
+
});
|
|
9205
|
+
Object.defineProperty(exports, "MessageContentTypes", {
|
|
9206
|
+
enumerable: true,
|
|
9207
|
+
get: function() {
|
|
9208
|
+
return MessageContentTypes;
|
|
9209
|
+
}
|
|
9210
|
+
});
|
|
9211
|
+
Object.defineProperty(exports, "MutationKeys", {
|
|
9212
|
+
enumerable: true,
|
|
9213
|
+
get: function() {
|
|
9214
|
+
return MutationKeys;
|
|
9215
|
+
}
|
|
9216
|
+
});
|
|
9217
|
+
Object.defineProperty(exports, "OCRStrategy", {
|
|
9218
|
+
enumerable: true,
|
|
9219
|
+
get: function() {
|
|
9220
|
+
return OCRStrategy;
|
|
9221
|
+
}
|
|
9222
|
+
});
|
|
9223
|
+
Object.defineProperty(exports, "OptionTypes", {
|
|
9224
|
+
enumerable: true,
|
|
9225
|
+
get: function() {
|
|
9226
|
+
return OptionTypes;
|
|
9227
|
+
}
|
|
9228
|
+
});
|
|
9229
|
+
Object.defineProperty(exports, "PROMPT_FILTER_FIELDS", {
|
|
9230
|
+
enumerable: true,
|
|
9231
|
+
get: function() {
|
|
9232
|
+
return PROMPT_FILTER_FIELDS;
|
|
9233
|
+
}
|
|
9234
|
+
});
|
|
9235
|
+
Object.defineProperty(exports, "PermissionBits", {
|
|
9236
|
+
enumerable: true,
|
|
9237
|
+
get: function() {
|
|
9238
|
+
return PermissionBits;
|
|
9239
|
+
}
|
|
9240
|
+
});
|
|
9241
|
+
Object.defineProperty(exports, "PrincipalModel", {
|
|
9242
|
+
enumerable: true,
|
|
9243
|
+
get: function() {
|
|
9244
|
+
return PrincipalModel;
|
|
7015
9245
|
}
|
|
7016
9246
|
});
|
|
7017
9247
|
Object.defineProperty(exports, "PrincipalType", {
|
|
@@ -7044,12 +9274,24 @@ Object.defineProperty(exports, "RateLimitPrefix", {
|
|
|
7044
9274
|
return RateLimitPrefix;
|
|
7045
9275
|
}
|
|
7046
9276
|
});
|
|
9277
|
+
Object.defineProperty(exports, "ReasoningContext", {
|
|
9278
|
+
enumerable: true,
|
|
9279
|
+
get: function() {
|
|
9280
|
+
return ReasoningContext;
|
|
9281
|
+
}
|
|
9282
|
+
});
|
|
7047
9283
|
Object.defineProperty(exports, "ReasoningEffort", {
|
|
7048
9284
|
enumerable: true,
|
|
7049
9285
|
get: function() {
|
|
7050
9286
|
return ReasoningEffort;
|
|
7051
9287
|
}
|
|
7052
9288
|
});
|
|
9289
|
+
Object.defineProperty(exports, "ReasoningMode", {
|
|
9290
|
+
enumerable: true,
|
|
9291
|
+
get: function() {
|
|
9292
|
+
return ReasoningMode;
|
|
9293
|
+
}
|
|
9294
|
+
});
|
|
7053
9295
|
Object.defineProperty(exports, "ReasoningParameterFormat", {
|
|
7054
9296
|
enumerable: true,
|
|
7055
9297
|
get: function() {
|
|
@@ -7092,6 +9334,12 @@ Object.defineProperty(exports, "RunStatus", {
|
|
|
7092
9334
|
return RunStatus;
|
|
7093
9335
|
}
|
|
7094
9336
|
});
|
|
9337
|
+
Object.defineProperty(exports, "SKILL_FILTER_FIELDS", {
|
|
9338
|
+
enumerable: true,
|
|
9339
|
+
get: function() {
|
|
9340
|
+
return SKILL_FILTER_FIELDS;
|
|
9341
|
+
}
|
|
9342
|
+
});
|
|
7095
9343
|
Object.defineProperty(exports, "SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH", {
|
|
7096
9344
|
enumerable: true,
|
|
7097
9345
|
get: function() {
|
|
@@ -7122,6 +9370,18 @@ Object.defineProperty(exports, "SSEOptionsSchema", {
|
|
|
7122
9370
|
return SSEOptionsSchema;
|
|
7123
9371
|
}
|
|
7124
9372
|
});
|
|
9373
|
+
Object.defineProperty(exports, "STATEFUL_CODE_ENVIRONMENTS", {
|
|
9374
|
+
enumerable: true,
|
|
9375
|
+
get: function() {
|
|
9376
|
+
return STATEFUL_CODE_ENVIRONMENTS;
|
|
9377
|
+
}
|
|
9378
|
+
});
|
|
9379
|
+
Object.defineProperty(exports, "STORED_MESSAGE_FILTER_FIELDS", {
|
|
9380
|
+
enumerable: true,
|
|
9381
|
+
get: function() {
|
|
9382
|
+
return STORED_MESSAGE_FILTER_FIELDS;
|
|
9383
|
+
}
|
|
9384
|
+
});
|
|
7125
9385
|
Object.defineProperty(exports, "STTProviders", {
|
|
7126
9386
|
enumerable: true,
|
|
7127
9387
|
get: function() {
|
|
@@ -7170,6 +9430,12 @@ Object.defineProperty(exports, "SettingsViews", {
|
|
|
7170
9430
|
return SettingsViews;
|
|
7171
9431
|
}
|
|
7172
9432
|
});
|
|
9433
|
+
Object.defineProperty(exports, "SkillsScope", {
|
|
9434
|
+
enumerable: true,
|
|
9435
|
+
get: function() {
|
|
9436
|
+
return SkillsScope;
|
|
9437
|
+
}
|
|
9438
|
+
});
|
|
7173
9439
|
Object.defineProperty(exports, "StdioOptionsSchema", {
|
|
7174
9440
|
enumerable: true,
|
|
7175
9441
|
get: function() {
|
|
@@ -7194,6 +9460,12 @@ Object.defineProperty(exports, "SystemCategories", {
|
|
|
7194
9460
|
return SystemCategories;
|
|
7195
9461
|
}
|
|
7196
9462
|
});
|
|
9463
|
+
Object.defineProperty(exports, "TOOL_ARGUMENT_FILTER_FIELDS", {
|
|
9464
|
+
enumerable: true,
|
|
9465
|
+
get: function() {
|
|
9466
|
+
return TOOL_ARGUMENT_FILTER_FIELDS;
|
|
9467
|
+
}
|
|
9468
|
+
});
|
|
7197
9469
|
Object.defineProperty(exports, "TTSProviders", {
|
|
7198
9470
|
enumerable: true,
|
|
7199
9471
|
get: function() {
|
|
@@ -7284,6 +9556,18 @@ Object.defineProperty(exports, "actionDomainSeparator", {
|
|
|
7284
9556
|
return actionDomainSeparator;
|
|
7285
9557
|
}
|
|
7286
9558
|
});
|
|
9559
|
+
Object.defineProperty(exports, "actionMetadataFilterFieldSchema", {
|
|
9560
|
+
enumerable: true,
|
|
9561
|
+
get: function() {
|
|
9562
|
+
return actionMetadataFilterFieldSchema;
|
|
9563
|
+
}
|
|
9564
|
+
});
|
|
9565
|
+
Object.defineProperty(exports, "agentInstructionFilterFieldSchema", {
|
|
9566
|
+
enumerable: true,
|
|
9567
|
+
get: function() {
|
|
9568
|
+
return agentInstructionFilterFieldSchema;
|
|
9569
|
+
}
|
|
9570
|
+
});
|
|
7287
9571
|
Object.defineProperty(exports, "agentsBaseSchema", {
|
|
7288
9572
|
enumerable: true,
|
|
7289
9573
|
get: function() {
|
|
@@ -7428,6 +9712,12 @@ Object.defineProperty(exports, "bedrockDocumentFormats", {
|
|
|
7428
9712
|
return bedrockDocumentFormats;
|
|
7429
9713
|
}
|
|
7430
9714
|
});
|
|
9715
|
+
Object.defineProperty(exports, "bedrockDocumentMimeTypes", {
|
|
9716
|
+
enumerable: true,
|
|
9717
|
+
get: function() {
|
|
9718
|
+
return bedrockDocumentMimeTypes;
|
|
9719
|
+
}
|
|
9720
|
+
});
|
|
7431
9721
|
Object.defineProperty(exports, "bedrockEndpointSchema", {
|
|
7432
9722
|
enumerable: true,
|
|
7433
9723
|
get: function() {
|
|
@@ -7452,6 +9742,12 @@ Object.defineProperty(exports, "buildLoginRedirectUrl", {
|
|
|
7452
9742
|
return buildLoginRedirectUrl;
|
|
7453
9743
|
}
|
|
7454
9744
|
});
|
|
9745
|
+
Object.defineProperty(exports, "buildServerNameAliases", {
|
|
9746
|
+
enumerable: true,
|
|
9747
|
+
get: function() {
|
|
9748
|
+
return buildServerNameAliases;
|
|
9749
|
+
}
|
|
9750
|
+
});
|
|
7455
9751
|
Object.defineProperty(exports, "cacheSubsetProviders", {
|
|
7456
9752
|
enumerable: true,
|
|
7457
9753
|
get: function() {
|
|
@@ -7470,6 +9766,24 @@ Object.defineProperty(exports, "checkOpenAIStorage", {
|
|
|
7470
9766
|
return checkOpenAIStorage;
|
|
7471
9767
|
}
|
|
7472
9768
|
});
|
|
9769
|
+
Object.defineProperty(exports, "checkpointerSchema", {
|
|
9770
|
+
enumerable: true,
|
|
9771
|
+
get: function() {
|
|
9772
|
+
return checkpointerSchema;
|
|
9773
|
+
}
|
|
9774
|
+
});
|
|
9775
|
+
Object.defineProperty(exports, "checkpointerTypeSchema", {
|
|
9776
|
+
enumerable: true,
|
|
9777
|
+
get: function() {
|
|
9778
|
+
return checkpointerTypeSchema;
|
|
9779
|
+
}
|
|
9780
|
+
});
|
|
9781
|
+
Object.defineProperty(exports, "clampSettingRange", {
|
|
9782
|
+
enumerable: true,
|
|
9783
|
+
get: function() {
|
|
9784
|
+
return clampSettingRange;
|
|
9785
|
+
}
|
|
9786
|
+
});
|
|
7473
9787
|
Object.defineProperty(exports, "clearAllConversations", {
|
|
7474
9788
|
enumerable: true,
|
|
7475
9789
|
get: function() {
|
|
@@ -7482,6 +9796,24 @@ Object.defineProperty(exports, "cloudfrontConfigSchema", {
|
|
|
7482
9796
|
return cloudfrontConfigSchema;
|
|
7483
9797
|
}
|
|
7484
9798
|
});
|
|
9799
|
+
Object.defineProperty(exports, "codeEnvironmentPermissionDecisionSchema", {
|
|
9800
|
+
enumerable: true,
|
|
9801
|
+
get: function() {
|
|
9802
|
+
return codeEnvironmentPermissionDecisionSchema;
|
|
9803
|
+
}
|
|
9804
|
+
});
|
|
9805
|
+
Object.defineProperty(exports, "codeEnvironmentUserConfigSchema", {
|
|
9806
|
+
enumerable: true,
|
|
9807
|
+
get: function() {
|
|
9808
|
+
return codeEnvironmentUserConfigSchema;
|
|
9809
|
+
}
|
|
9810
|
+
});
|
|
9811
|
+
Object.defineProperty(exports, "codeEnvironmentUserSettingsSchema", {
|
|
9812
|
+
enumerable: true,
|
|
9813
|
+
get: function() {
|
|
9814
|
+
return codeEnvironmentUserSettingsSchema;
|
|
9815
|
+
}
|
|
9816
|
+
});
|
|
7485
9817
|
Object.defineProperty(exports, "codeInterpreterMimeTypes", {
|
|
7486
9818
|
enumerable: true,
|
|
7487
9819
|
get: function() {
|
|
@@ -7542,6 +9874,18 @@ Object.defineProperty(exports, "contextPruningSchema", {
|
|
|
7542
9874
|
return contextPruningSchema;
|
|
7543
9875
|
}
|
|
7544
9876
|
});
|
|
9877
|
+
Object.defineProperty(exports, "conversationStarterFilterFieldSchema", {
|
|
9878
|
+
enumerable: true,
|
|
9879
|
+
get: function() {
|
|
9880
|
+
return conversationStarterFilterFieldSchema;
|
|
9881
|
+
}
|
|
9882
|
+
});
|
|
9883
|
+
Object.defineProperty(exports, "conversationTitleFilterFieldSchema", {
|
|
9884
|
+
enumerable: true,
|
|
9885
|
+
get: function() {
|
|
9886
|
+
return conversationTitleFilterFieldSchema;
|
|
9887
|
+
}
|
|
9888
|
+
});
|
|
7545
9889
|
Object.defineProperty(exports, "convertStringsToRegex", {
|
|
7546
9890
|
enumerable: true,
|
|
7547
9891
|
get: function() {
|
|
@@ -7680,12 +10024,24 @@ Object.defineProperty(exports, "eModelEndpointSchema", {
|
|
|
7680
10024
|
return eModelEndpointSchema;
|
|
7681
10025
|
}
|
|
7682
10026
|
});
|
|
10027
|
+
Object.defineProperty(exports, "eReasoningContextSchema", {
|
|
10028
|
+
enumerable: true,
|
|
10029
|
+
get: function() {
|
|
10030
|
+
return eReasoningContextSchema;
|
|
10031
|
+
}
|
|
10032
|
+
});
|
|
7683
10033
|
Object.defineProperty(exports, "eReasoningEffortSchema", {
|
|
7684
10034
|
enumerable: true,
|
|
7685
10035
|
get: function() {
|
|
7686
10036
|
return eReasoningEffortSchema;
|
|
7687
10037
|
}
|
|
7688
10038
|
});
|
|
10039
|
+
Object.defineProperty(exports, "eReasoningModeSchema", {
|
|
10040
|
+
enumerable: true,
|
|
10041
|
+
get: function() {
|
|
10042
|
+
return eReasoningModeSchema;
|
|
10043
|
+
}
|
|
10044
|
+
});
|
|
7689
10045
|
Object.defineProperty(exports, "eReasoningParameterFormatSchema", {
|
|
7690
10046
|
enumerable: true,
|
|
7691
10047
|
get: function() {
|
|
@@ -7788,6 +10144,12 @@ Object.defineProperty(exports, "extractVariableName", {
|
|
|
7788
10144
|
return extractVariableName;
|
|
7789
10145
|
}
|
|
7790
10146
|
});
|
|
10147
|
+
Object.defineProperty(exports, "feedbackFilterFieldSchema", {
|
|
10148
|
+
enumerable: true,
|
|
10149
|
+
get: function() {
|
|
10150
|
+
return feedbackFilterFieldSchema;
|
|
10151
|
+
}
|
|
10152
|
+
});
|
|
7791
10153
|
Object.defineProperty(exports, "feedbackRatingSchema", {
|
|
7792
10154
|
enumerable: true,
|
|
7793
10155
|
get: function() {
|
|
@@ -7818,6 +10180,12 @@ Object.defineProperty(exports, "fileConfigSchema", {
|
|
|
7818
10180
|
return fileConfigSchema;
|
|
7819
10181
|
}
|
|
7820
10182
|
});
|
|
10183
|
+
Object.defineProperty(exports, "fileFilterFieldSchema", {
|
|
10184
|
+
enumerable: true,
|
|
10185
|
+
get: function() {
|
|
10186
|
+
return fileFilterFieldSchema;
|
|
10187
|
+
}
|
|
10188
|
+
});
|
|
7821
10189
|
Object.defineProperty(exports, "fileSourceSchema", {
|
|
7822
10190
|
enumerable: true,
|
|
7823
10191
|
get: function() {
|
|
@@ -7836,6 +10204,36 @@ Object.defineProperty(exports, "fileStrategiesSchema", {
|
|
|
7836
10204
|
return fileStrategiesSchema;
|
|
7837
10205
|
}
|
|
7838
10206
|
});
|
|
10207
|
+
Object.defineProperty(exports, "filterPiiActionSchema", {
|
|
10208
|
+
enumerable: true,
|
|
10209
|
+
get: function() {
|
|
10210
|
+
return filterPiiActionSchema;
|
|
10211
|
+
}
|
|
10212
|
+
});
|
|
10213
|
+
Object.defineProperty(exports, "filterPiiCustomPatternSchema", {
|
|
10214
|
+
enumerable: true,
|
|
10215
|
+
get: function() {
|
|
10216
|
+
return filterPiiCustomPatternSchema;
|
|
10217
|
+
}
|
|
10218
|
+
});
|
|
10219
|
+
Object.defineProperty(exports, "filterPiiRegexSchema", {
|
|
10220
|
+
enumerable: true,
|
|
10221
|
+
get: function() {
|
|
10222
|
+
return filterPiiRegexSchema;
|
|
10223
|
+
}
|
|
10224
|
+
});
|
|
10225
|
+
Object.defineProperty(exports, "filterPiiStarterPatternSchema", {
|
|
10226
|
+
enumerable: true,
|
|
10227
|
+
get: function() {
|
|
10228
|
+
return filterPiiStarterPatternSchema;
|
|
10229
|
+
}
|
|
10230
|
+
});
|
|
10231
|
+
Object.defineProperty(exports, "filtersConfigSchema", {
|
|
10232
|
+
enumerable: true,
|
|
10233
|
+
get: function() {
|
|
10234
|
+
return filtersConfigSchema;
|
|
10235
|
+
}
|
|
10236
|
+
});
|
|
7839
10237
|
Object.defineProperty(exports, "fullMimeTypesList", {
|
|
7840
10238
|
enumerable: true,
|
|
7841
10239
|
get: function() {
|
|
@@ -7890,6 +10288,12 @@ Object.defineProperty(exports, "getConfigDefaults", {
|
|
|
7890
10288
|
return getConfigDefaults;
|
|
7891
10289
|
}
|
|
7892
10290
|
});
|
|
10291
|
+
Object.defineProperty(exports, "getConfiguredMimeAccept", {
|
|
10292
|
+
enumerable: true,
|
|
10293
|
+
get: function() {
|
|
10294
|
+
return getConfiguredMimeAccept;
|
|
10295
|
+
}
|
|
10296
|
+
});
|
|
7893
10297
|
Object.defineProperty(exports, "getConversationById", {
|
|
7894
10298
|
enumerable: true,
|
|
7895
10299
|
get: function() {
|
|
@@ -7926,12 +10330,30 @@ Object.defineProperty(exports, "getEndpointFileConfig", {
|
|
|
7926
10330
|
return getEndpointFileConfig;
|
|
7927
10331
|
}
|
|
7928
10332
|
});
|
|
10333
|
+
Object.defineProperty(exports, "getGoogleThinkingBudgetBounds", {
|
|
10334
|
+
enumerable: true,
|
|
10335
|
+
get: function() {
|
|
10336
|
+
return getGoogleThinkingBudgetBounds;
|
|
10337
|
+
}
|
|
10338
|
+
});
|
|
10339
|
+
Object.defineProperty(exports, "getGoogleThinkingBudgetMax", {
|
|
10340
|
+
enumerable: true,
|
|
10341
|
+
get: function() {
|
|
10342
|
+
return getGoogleThinkingBudgetMax;
|
|
10343
|
+
}
|
|
10344
|
+
});
|
|
7929
10345
|
Object.defineProperty(exports, "getMCPServerConnectionStatus", {
|
|
7930
10346
|
enumerable: true,
|
|
7931
10347
|
get: function() {
|
|
7932
10348
|
return getMCPServerConnectionStatus;
|
|
7933
10349
|
}
|
|
7934
10350
|
});
|
|
10351
|
+
Object.defineProperty(exports, "getMaxSubagents", {
|
|
10352
|
+
enumerable: true,
|
|
10353
|
+
get: function() {
|
|
10354
|
+
return getMaxSubagents;
|
|
10355
|
+
}
|
|
10356
|
+
});
|
|
7935
10357
|
Object.defineProperty(exports, "getModelKey", {
|
|
7936
10358
|
enumerable: true,
|
|
7937
10359
|
get: function() {
|
|
@@ -7944,6 +10366,12 @@ Object.defineProperty(exports, "getModels", {
|
|
|
7944
10366
|
return getModels;
|
|
7945
10367
|
}
|
|
7946
10368
|
});
|
|
10369
|
+
Object.defineProperty(exports, "getPiiRegexProgramSize", {
|
|
10370
|
+
enumerable: true,
|
|
10371
|
+
get: function() {
|
|
10372
|
+
return getPiiRegexProgramSize;
|
|
10373
|
+
}
|
|
10374
|
+
});
|
|
7947
10375
|
Object.defineProperty(exports, "getRefillEligibilityDate", {
|
|
7948
10376
|
enumerable: true,
|
|
7949
10377
|
get: function() {
|
|
@@ -8028,12 +10456,36 @@ Object.defineProperty(exports, "googleSettings", {
|
|
|
8028
10456
|
return googleSettings;
|
|
8029
10457
|
}
|
|
8030
10458
|
});
|
|
10459
|
+
Object.defineProperty(exports, "hasActiveFiltersConfig", {
|
|
10460
|
+
enumerable: true,
|
|
10461
|
+
get: function() {
|
|
10462
|
+
return hasActiveFiltersConfig;
|
|
10463
|
+
}
|
|
10464
|
+
});
|
|
10465
|
+
Object.defineProperty(exports, "hasActivePiiFields", {
|
|
10466
|
+
enumerable: true,
|
|
10467
|
+
get: function() {
|
|
10468
|
+
return hasActivePiiFields;
|
|
10469
|
+
}
|
|
10470
|
+
});
|
|
10471
|
+
Object.defineProperty(exports, "hasActivePiiPatterns", {
|
|
10472
|
+
enumerable: true,
|
|
10473
|
+
get: function() {
|
|
10474
|
+
return hasActivePiiPatterns;
|
|
10475
|
+
}
|
|
10476
|
+
});
|
|
8031
10477
|
Object.defineProperty(exports, "hasPermissions", {
|
|
8032
10478
|
enumerable: true,
|
|
8033
10479
|
get: function() {
|
|
8034
10480
|
return hasPermissions;
|
|
8035
10481
|
}
|
|
8036
10482
|
});
|
|
10483
|
+
Object.defineProperty(exports, "hasProcessMCPServerConfig", {
|
|
10484
|
+
enumerable: true,
|
|
10485
|
+
get: function() {
|
|
10486
|
+
return hasProcessMCPServerConfig;
|
|
10487
|
+
}
|
|
10488
|
+
});
|
|
8037
10489
|
Object.defineProperty(exports, "hostImageIdSuffix", {
|
|
8038
10490
|
enumerable: true,
|
|
8039
10491
|
get: function() {
|
|
@@ -8118,6 +10570,18 @@ Object.defineProperty(exports, "isAgentsEndpoint", {
|
|
|
8118
10570
|
return isAgentsEndpoint;
|
|
8119
10571
|
}
|
|
8120
10572
|
});
|
|
10573
|
+
Object.defineProperty(exports, "isAnthropicDocumentType", {
|
|
10574
|
+
enumerable: true,
|
|
10575
|
+
get: function() {
|
|
10576
|
+
return isAnthropicDocumentType;
|
|
10577
|
+
}
|
|
10578
|
+
});
|
|
10579
|
+
Object.defineProperty(exports, "isAnthropicTextDocumentType", {
|
|
10580
|
+
enumerable: true,
|
|
10581
|
+
get: function() {
|
|
10582
|
+
return isAnthropicTextDocumentType;
|
|
10583
|
+
}
|
|
10584
|
+
});
|
|
8121
10585
|
Object.defineProperty(exports, "isAssistantsEndpoint", {
|
|
8122
10586
|
enumerable: true,
|
|
8123
10587
|
get: function() {
|
|
@@ -8166,12 +10630,30 @@ Object.defineProperty(exports, "isPermissiveMimeConfig", {
|
|
|
8166
10630
|
return isPermissiveMimeConfig;
|
|
8167
10631
|
}
|
|
8168
10632
|
});
|
|
10633
|
+
Object.defineProperty(exports, "isProcessMCPServerConfig", {
|
|
10634
|
+
enumerable: true,
|
|
10635
|
+
get: function() {
|
|
10636
|
+
return isProcessMCPServerConfig;
|
|
10637
|
+
}
|
|
10638
|
+
});
|
|
10639
|
+
Object.defineProperty(exports, "isProcessMCPServerField", {
|
|
10640
|
+
enumerable: true,
|
|
10641
|
+
get: function() {
|
|
10642
|
+
return isProcessMCPServerField;
|
|
10643
|
+
}
|
|
10644
|
+
});
|
|
8169
10645
|
Object.defineProperty(exports, "isRemoteOidcUrlAllowed", {
|
|
8170
10646
|
enumerable: true,
|
|
8171
10647
|
get: function() {
|
|
8172
10648
|
return isRemoteOidcUrlAllowed;
|
|
8173
10649
|
}
|
|
8174
10650
|
});
|
|
10651
|
+
Object.defineProperty(exports, "isSecureCodeEnvironmentControlURL", {
|
|
10652
|
+
enumerable: true,
|
|
10653
|
+
get: function() {
|
|
10654
|
+
return isSecureCodeEnvironmentControlURL;
|
|
10655
|
+
}
|
|
10656
|
+
});
|
|
8175
10657
|
Object.defineProperty(exports, "isSensitiveEnvVar", {
|
|
8176
10658
|
enumerable: true,
|
|
8177
10659
|
get: function() {
|
|
@@ -8184,12 +10666,24 @@ Object.defineProperty(exports, "isUUID", {
|
|
|
8184
10666
|
return isUUID;
|
|
8185
10667
|
}
|
|
8186
10668
|
});
|
|
10669
|
+
Object.defineProperty(exports, "langfuseConfigSchema", {
|
|
10670
|
+
enumerable: true,
|
|
10671
|
+
get: function() {
|
|
10672
|
+
return langfuseConfigSchema;
|
|
10673
|
+
}
|
|
10674
|
+
});
|
|
8187
10675
|
Object.defineProperty(exports, "loginPage", {
|
|
8188
10676
|
enumerable: true,
|
|
8189
10677
|
get: function() {
|
|
8190
10678
|
return loginPage;
|
|
8191
10679
|
}
|
|
8192
10680
|
});
|
|
10681
|
+
Object.defineProperty(exports, "materializeModelSpecEndpoints", {
|
|
10682
|
+
enumerable: true,
|
|
10683
|
+
get: function() {
|
|
10684
|
+
return materializeModelSpecEndpoints;
|
|
10685
|
+
}
|
|
10686
|
+
});
|
|
8193
10687
|
Object.defineProperty(exports, "mbToBytes", {
|
|
8194
10688
|
enumerable: true,
|
|
8195
10689
|
get: function() {
|
|
@@ -8202,6 +10696,12 @@ Object.defineProperty(exports, "megabyte", {
|
|
|
8202
10696
|
return megabyte;
|
|
8203
10697
|
}
|
|
8204
10698
|
});
|
|
10699
|
+
Object.defineProperty(exports, "memoryFilterFieldSchema", {
|
|
10700
|
+
enumerable: true,
|
|
10701
|
+
get: function() {
|
|
10702
|
+
return memoryFilterFieldSchema;
|
|
10703
|
+
}
|
|
10704
|
+
});
|
|
8205
10705
|
Object.defineProperty(exports, "memorySchema", {
|
|
8206
10706
|
enumerable: true,
|
|
8207
10707
|
get: function() {
|
|
@@ -8214,6 +10714,12 @@ Object.defineProperty(exports, "mergeFileConfig", {
|
|
|
8214
10714
|
return mergeFileConfig;
|
|
8215
10715
|
}
|
|
8216
10716
|
});
|
|
10717
|
+
Object.defineProperty(exports, "messageFilterFieldSchema", {
|
|
10718
|
+
enumerable: true,
|
|
10719
|
+
get: function() {
|
|
10720
|
+
return messageFilterFieldSchema;
|
|
10721
|
+
}
|
|
10722
|
+
});
|
|
8217
10723
|
Object.defineProperty(exports, "messageFilterPiiSchema", {
|
|
8218
10724
|
enumerable: true,
|
|
8219
10725
|
get: function() {
|
|
@@ -8238,6 +10744,12 @@ Object.defineProperty(exports, "modelConfigSchema", {
|
|
|
8238
10744
|
return modelConfigSchema;
|
|
8239
10745
|
}
|
|
8240
10746
|
});
|
|
10747
|
+
Object.defineProperty(exports, "modelParameterFilterFieldSchema", {
|
|
10748
|
+
enumerable: true,
|
|
10749
|
+
get: function() {
|
|
10750
|
+
return modelParameterFilterFieldSchema;
|
|
10751
|
+
}
|
|
10752
|
+
});
|
|
8241
10753
|
Object.defineProperty(exports, "modelSpecSubagentsSchema", {
|
|
8242
10754
|
enumerable: true,
|
|
8243
10755
|
get: function() {
|
|
@@ -8256,6 +10768,24 @@ Object.defineProperty(exports, "normalizeEndpointName", {
|
|
|
8256
10768
|
return normalizeEndpointName;
|
|
8257
10769
|
}
|
|
8258
10770
|
});
|
|
10771
|
+
Object.defineProperty(exports, "normalizeMCPToolKey", {
|
|
10772
|
+
enumerable: true,
|
|
10773
|
+
get: function() {
|
|
10774
|
+
return normalizeMCPToolKey;
|
|
10775
|
+
}
|
|
10776
|
+
});
|
|
10777
|
+
Object.defineProperty(exports, "normalizeSearxngEngines", {
|
|
10778
|
+
enumerable: true,
|
|
10779
|
+
get: function() {
|
|
10780
|
+
return normalizeSearxngEngines;
|
|
10781
|
+
}
|
|
10782
|
+
});
|
|
10783
|
+
Object.defineProperty(exports, "normalizeServerName", {
|
|
10784
|
+
enumerable: true,
|
|
10785
|
+
get: function() {
|
|
10786
|
+
return normalizeServerName;
|
|
10787
|
+
}
|
|
10788
|
+
});
|
|
8259
10789
|
Object.defineProperty(exports, "ocrSchema", {
|
|
8260
10790
|
enumerable: true,
|
|
8261
10791
|
get: function() {
|
|
@@ -8316,6 +10846,12 @@ Object.defineProperty(exports, "principalSchema", {
|
|
|
8316
10846
|
return principalSchema;
|
|
8317
10847
|
}
|
|
8318
10848
|
});
|
|
10849
|
+
Object.defineProperty(exports, "promptFilterFieldSchema", {
|
|
10850
|
+
enumerable: true,
|
|
10851
|
+
get: function() {
|
|
10852
|
+
return promptFilterFieldSchema;
|
|
10853
|
+
}
|
|
10854
|
+
});
|
|
8319
10855
|
Object.defineProperty(exports, "providerEndpointMap", {
|
|
8320
10856
|
enumerable: true,
|
|
8321
10857
|
get: function() {
|
|
@@ -8370,18 +10906,48 @@ Object.defineProperty(exports, "resetPassword", {
|
|
|
8370
10906
|
return resetPassword;
|
|
8371
10907
|
}
|
|
8372
10908
|
});
|
|
10909
|
+
Object.defineProperty(exports, "resolveAgentSkillsScope", {
|
|
10910
|
+
enumerable: true,
|
|
10911
|
+
get: function() {
|
|
10912
|
+
return resolveAgentSkillsScope;
|
|
10913
|
+
}
|
|
10914
|
+
});
|
|
10915
|
+
Object.defineProperty(exports, "resolveAllowedStatefulCodeEnvironments", {
|
|
10916
|
+
enumerable: true,
|
|
10917
|
+
get: function() {
|
|
10918
|
+
return resolveAllowedStatefulCodeEnvironments;
|
|
10919
|
+
}
|
|
10920
|
+
});
|
|
8373
10921
|
Object.defineProperty(exports, "resolveEndpointType", {
|
|
8374
10922
|
enumerable: true,
|
|
8375
10923
|
get: function() {
|
|
8376
10924
|
return resolveEndpointType;
|
|
8377
10925
|
}
|
|
8378
10926
|
});
|
|
10927
|
+
Object.defineProperty(exports, "resolveModelSpecEndpoint", {
|
|
10928
|
+
enumerable: true,
|
|
10929
|
+
get: function() {
|
|
10930
|
+
return resolveModelSpecEndpoint;
|
|
10931
|
+
}
|
|
10932
|
+
});
|
|
10933
|
+
Object.defineProperty(exports, "resolveStatefulCodeEnvironment", {
|
|
10934
|
+
enumerable: true,
|
|
10935
|
+
get: function() {
|
|
10936
|
+
return resolveStatefulCodeEnvironment;
|
|
10937
|
+
}
|
|
10938
|
+
});
|
|
8379
10939
|
Object.defineProperty(exports, "resourcePermissionsResponseSchema", {
|
|
8380
10940
|
enumerable: true,
|
|
8381
10941
|
get: function() {
|
|
8382
10942
|
return resourcePermissionsResponseSchema;
|
|
8383
10943
|
}
|
|
8384
10944
|
});
|
|
10945
|
+
Object.defineProperty(exports, "retainRecentConfigSchema", {
|
|
10946
|
+
enumerable: true,
|
|
10947
|
+
get: function() {
|
|
10948
|
+
return retainRecentConfigSchema;
|
|
10949
|
+
}
|
|
10950
|
+
});
|
|
8385
10951
|
Object.defineProperty(exports, "retrievalMimeTypes", {
|
|
8386
10952
|
enumerable: true,
|
|
8387
10953
|
get: function() {
|
|
@@ -8418,6 +10984,24 @@ Object.defineProperty(exports, "setAcceptLanguageHeader", {
|
|
|
8418
10984
|
return setAcceptLanguageHeader;
|
|
8419
10985
|
}
|
|
8420
10986
|
});
|
|
10987
|
+
Object.defineProperty(exports, "setFileConfigRegexCompiler", {
|
|
10988
|
+
enumerable: true,
|
|
10989
|
+
get: function() {
|
|
10990
|
+
return setFileConfigRegexCompiler;
|
|
10991
|
+
}
|
|
10992
|
+
});
|
|
10993
|
+
Object.defineProperty(exports, "setMaxSubagents", {
|
|
10994
|
+
enumerable: true,
|
|
10995
|
+
get: function() {
|
|
10996
|
+
return setMaxSubagents;
|
|
10997
|
+
}
|
|
10998
|
+
});
|
|
10999
|
+
Object.defineProperty(exports, "setMessageFilterRegexValidator", {
|
|
11000
|
+
enumerable: true,
|
|
11001
|
+
get: function() {
|
|
11002
|
+
return setMessageFilterRegexValidator;
|
|
11003
|
+
}
|
|
11004
|
+
});
|
|
8421
11005
|
Object.defineProperty(exports, "setTokenHeader", {
|
|
8422
11006
|
enumerable: true,
|
|
8423
11007
|
get: function() {
|
|
@@ -8430,6 +11014,12 @@ Object.defineProperty(exports, "sharedFileDownload", {
|
|
|
8430
11014
|
return sharedFileDownload;
|
|
8431
11015
|
}
|
|
8432
11016
|
});
|
|
11017
|
+
Object.defineProperty(exports, "skillFilterFieldSchema", {
|
|
11018
|
+
enumerable: true,
|
|
11019
|
+
get: function() {
|
|
11020
|
+
return skillFilterFieldSchema;
|
|
11021
|
+
}
|
|
11022
|
+
});
|
|
8433
11023
|
Object.defineProperty(exports, "skillSyncConfigSchema", {
|
|
8434
11024
|
enumerable: true,
|
|
8435
11025
|
get: function() {
|
|
@@ -8454,6 +11044,36 @@ Object.defineProperty(exports, "specsConfigSchema", {
|
|
|
8454
11044
|
return specsConfigSchema;
|
|
8455
11045
|
}
|
|
8456
11046
|
});
|
|
11047
|
+
Object.defineProperty(exports, "splitMCPToolKey", {
|
|
11048
|
+
enumerable: true,
|
|
11049
|
+
get: function() {
|
|
11050
|
+
return splitMCPToolKey;
|
|
11051
|
+
}
|
|
11052
|
+
});
|
|
11053
|
+
Object.defineProperty(exports, "splitToolCallName", {
|
|
11054
|
+
enumerable: true,
|
|
11055
|
+
get: function() {
|
|
11056
|
+
return splitToolCallName;
|
|
11057
|
+
}
|
|
11058
|
+
});
|
|
11059
|
+
Object.defineProperty(exports, "stripServerNamePrefix", {
|
|
11060
|
+
enumerable: true,
|
|
11061
|
+
get: function() {
|
|
11062
|
+
return stripServerNamePrefix;
|
|
11063
|
+
}
|
|
11064
|
+
});
|
|
11065
|
+
Object.defineProperty(exports, "stripServerNamePrefixes", {
|
|
11066
|
+
enumerable: true,
|
|
11067
|
+
get: function() {
|
|
11068
|
+
return stripServerNamePrefixes;
|
|
11069
|
+
}
|
|
11070
|
+
});
|
|
11071
|
+
Object.defineProperty(exports, "subagentThreadLineageSchema", {
|
|
11072
|
+
enumerable: true,
|
|
11073
|
+
get: function() {
|
|
11074
|
+
return subagentThreadLineageSchema;
|
|
11075
|
+
}
|
|
11076
|
+
});
|
|
8457
11077
|
Object.defineProperty(exports, "summarizationConfigSchema", {
|
|
8458
11078
|
enumerable: true,
|
|
8459
11079
|
get: function() {
|
|
@@ -8574,6 +11194,30 @@ Object.defineProperty(exports, "toMinimalFeedback", {
|
|
|
8574
11194
|
return toMinimalFeedback;
|
|
8575
11195
|
}
|
|
8576
11196
|
});
|
|
11197
|
+
Object.defineProperty(exports, "toolApprovalHookConfigSchema", {
|
|
11198
|
+
enumerable: true,
|
|
11199
|
+
get: function() {
|
|
11200
|
+
return toolApprovalHookConfigSchema;
|
|
11201
|
+
}
|
|
11202
|
+
});
|
|
11203
|
+
Object.defineProperty(exports, "toolApprovalModeSchema", {
|
|
11204
|
+
enumerable: true,
|
|
11205
|
+
get: function() {
|
|
11206
|
+
return toolApprovalModeSchema;
|
|
11207
|
+
}
|
|
11208
|
+
});
|
|
11209
|
+
Object.defineProperty(exports, "toolApprovalPolicySchema", {
|
|
11210
|
+
enumerable: true,
|
|
11211
|
+
get: function() {
|
|
11212
|
+
return toolApprovalPolicySchema;
|
|
11213
|
+
}
|
|
11214
|
+
});
|
|
11215
|
+
Object.defineProperty(exports, "toolArgumentFilterFieldSchema", {
|
|
11216
|
+
enumerable: true,
|
|
11217
|
+
get: function() {
|
|
11218
|
+
return toolArgumentFilterFieldSchema;
|
|
11219
|
+
}
|
|
11220
|
+
});
|
|
8577
11221
|
Object.defineProperty(exports, "transactionsSchema", {
|
|
8578
11222
|
enumerable: true,
|
|
8579
11223
|
get: function() {
|
|
@@ -8592,6 +11236,12 @@ Object.defineProperty(exports, "turnstileSchema", {
|
|
|
8592
11236
|
return turnstileSchema;
|
|
8593
11237
|
}
|
|
8594
11238
|
});
|
|
11239
|
+
Object.defineProperty(exports, "unattributedAssistantContentSchema", {
|
|
11240
|
+
enumerable: true,
|
|
11241
|
+
get: function() {
|
|
11242
|
+
return unattributedAssistantContentSchema;
|
|
11243
|
+
}
|
|
11244
|
+
});
|
|
8595
11245
|
Object.defineProperty(exports, "updateFeedback", {
|
|
8596
11246
|
enumerable: true,
|
|
8597
11247
|
get: function() {
|
|
@@ -8652,6 +11302,12 @@ Object.defineProperty(exports, "userKeyQuery", {
|
|
|
8652
11302
|
return userKeyQuery;
|
|
8653
11303
|
}
|
|
8654
11304
|
});
|
|
11305
|
+
Object.defineProperty(exports, "userSubmittedMessageFieldPathSchema", {
|
|
11306
|
+
enumerable: true,
|
|
11307
|
+
get: function() {
|
|
11308
|
+
return userSubmittedMessageFieldPathSchema;
|
|
11309
|
+
}
|
|
11310
|
+
});
|
|
8655
11311
|
Object.defineProperty(exports, "validateSettingDefinitions", {
|
|
8656
11312
|
enumerable: true,
|
|
8657
11313
|
get: function() {
|
|
@@ -8695,4 +11351,4 @@ Object.defineProperty(exports, "webSearchSchema", {
|
|
|
8695
11351
|
}
|
|
8696
11352
|
});
|
|
8697
11353
|
|
|
8698
|
-
//# sourceMappingURL=data-service-
|
|
11354
|
+
//# sourceMappingURL=data-service-D5kHzBt-.js.map
|