librechat-data-provider 0.8.521 → 0.8.522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{data-service-pwrlWjJs.mjs → data-service-CaB7saTP.mjs} +1145 -37
- package/dist/data-service-CaB7saTP.mjs.map +1 -0
- package/dist/{data-service-DOIF4BkW.js → data-service-D5kHzBt-.js} +1588 -36
- package/dist/data-service-D5kHzBt-.js.map +1 -0
- package/dist/index.js +947 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +825 -37
- package/dist/index.mjs.map +1 -1
- package/dist/react-query/index.js +2 -1
- package/dist/react-query/index.js.map +1 -1
- package/dist/react-query/index.mjs +2 -1
- package/dist/react-query/index.mjs.map +1 -1
- package/dist/types/accessPermissions.d.ts +4 -0
- package/dist/types/actions.d.ts +2 -2
- package/dist/types/agentToolOptions.d.ts +11 -0
- package/dist/types/api-endpoints.d.ts +18 -0
- package/dist/types/bedrock.d.ts +168 -0
- package/dist/types/cadence.d.ts +33 -0
- package/dist/types/codeEnvRef.d.ts +21 -0
- package/dist/types/config.d.ts +9060 -1135
- package/dist/types/data-service.d.ts +40 -2
- package/dist/types/file-config.d.ts +1 -0
- package/dist/types/filters.d.ts +1422 -0
- package/dist/types/generate.d.ts +79 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/types/keys.d.ts +23 -2
- package/dist/types/langchain.d.ts +4 -0
- package/dist/types/limits.d.ts +13 -0
- package/dist/types/mcp.d.ts +299 -210
- package/dist/types/messages.d.ts +5 -0
- package/dist/types/models.d.ts +732 -68
- package/dist/types/parameterSettings.d.ts +5 -1
- package/dist/types/parsers.d.ts +10 -0
- package/dist/types/permissions.d.ts +42 -1
- package/dist/types/providers.d.ts +36 -0
- package/dist/types/request.d.ts +2 -2
- package/dist/types/roles.d.ts +34 -0
- package/dist/types/runSteps.d.ts +59 -0
- package/dist/types/schemas.d.ts +1191 -26
- package/dist/types/stateful-code.d.ts +7 -0
- package/dist/types/types/agents.d.ts +92 -7
- package/dist/types/types/assistants.d.ts +96 -5
- package/dist/types/types/files.d.ts +12 -2
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/insights.d.ts +62 -0
- package/dist/types/types/mutations.d.ts +1 -0
- package/dist/types/types/queries.d.ts +30 -2
- package/dist/types/types/queuedTurns.d.ts +870 -0
- package/dist/types/types/runs.d.ts +95 -4
- package/dist/types/types/schedules.d.ts +306 -0
- package/dist/types/types/skills.d.ts +9 -0
- package/dist/types/types/subagents.d.ts +159 -0
- package/dist/types/types/web.d.ts +12 -2
- package/dist/types/types.d.ts +61 -1
- package/package.json +4 -2
- package/dist/data-service-DOIF4BkW.js.map +0 -1
- package/dist/data-service-pwrlWjJs.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SettingsConfiguration } from './generate';
|
|
1
|
+
import { SettingDefinition, SettingsConfiguration } from './generate';
|
|
2
2
|
export declare const librechat: {
|
|
3
3
|
modelLabel: {
|
|
4
4
|
readonly key: "modelLabel";
|
|
@@ -48,6 +48,9 @@ export declare const librechat: {
|
|
|
48
48
|
readonly placeholderCode: true;
|
|
49
49
|
readonly optionType: "model";
|
|
50
50
|
};
|
|
51
|
+
/** Controls how LibreChat encodes image content blocks, not a provider request
|
|
52
|
+
* parameter — so it belongs to this group and is stripped from model options. */
|
|
53
|
+
imageDetail: SettingDefinition;
|
|
51
54
|
fileTokenLimit: {
|
|
52
55
|
readonly key: "fileTokenLimit";
|
|
53
56
|
readonly label: "com_ui_file_token_limit";
|
|
@@ -71,5 +74,6 @@ export declare const agentParamSettings: Record<string, SettingsConfiguration |
|
|
|
71
74
|
* Resolves model-aware defaults for a settings configuration before rendering.
|
|
72
75
|
* Google's `maxOutputTokens` default depends on the selected Gemini model so that
|
|
73
76
|
* current models (2.5 and 3+) surface their 64K output limit instead of the legacy 8K value.
|
|
77
|
+
* Anthropic prompt-cache controls are only surfaced for models that support them.
|
|
74
78
|
*/
|
|
75
79
|
export declare function applyModelAwareDefaults(settings: SettingsConfiguration, endpoint: string, model?: string): SettingsConfiguration;
|
package/dist/types/parsers.d.ts
CHANGED
|
@@ -50,6 +50,16 @@ export type ParsedEphemeralAgentId = {
|
|
|
50
50
|
sender?: string;
|
|
51
51
|
index?: number;
|
|
52
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* Resolves the display label ("sender") for an ephemeral agent:
|
|
55
|
+
* `modelLabel` (user/preset) → model spec's `label` → endpoint config's
|
|
56
|
+
* `modelDisplayLabel` → `''` (lets consumers fall back to the model name).
|
|
57
|
+
*/
|
|
58
|
+
export declare function getEphemeralSender({ modelLabel, specLabel, modelDisplayLabel, }: {
|
|
59
|
+
modelLabel?: string | null;
|
|
60
|
+
specLabel?: string | null;
|
|
61
|
+
modelDisplayLabel?: string | null;
|
|
62
|
+
}): string;
|
|
53
63
|
/**
|
|
54
64
|
* Encodes an ephemeral agent ID from endpoint, model, optional sender, and optional index.
|
|
55
65
|
* Uses __ to replace : (reserved in graph node names) and ___ to separate sender.
|
|
@@ -66,7 +66,11 @@ export declare enum PermissionTypes {
|
|
|
66
66
|
/**
|
|
67
67
|
* Type for Shared Link Permissions
|
|
68
68
|
*/
|
|
69
|
-
SHARED_LINKS = "SHARED_LINKS"
|
|
69
|
+
SHARED_LINKS = "SHARED_LINKS",
|
|
70
|
+
/**
|
|
71
|
+
* Type for Scheduled Chats Permissions
|
|
72
|
+
*/
|
|
73
|
+
SCHEDULES = "SCHEDULES"
|
|
70
74
|
}
|
|
71
75
|
/**
|
|
72
76
|
* Maps PermissionTypes to their corresponding `interface` config field names.
|
|
@@ -76,6 +80,14 @@ export declare enum PermissionTypes {
|
|
|
76
80
|
export declare const PERMISSION_TYPE_INTERFACE_FIELDS: Record<PermissionTypes, string>;
|
|
77
81
|
/** Set of interface config field names that correspond to role permissions. */
|
|
78
82
|
export declare const INTERFACE_PERMISSION_FIELDS: Set<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Interface fields that seed a permission (use/create) BUT also carry runtime
|
|
85
|
+
* config that must survive DB/tenant/user overrides. For these, override
|
|
86
|
+
* sanitizers strip only the permission sub-keys (use/create) from the object
|
|
87
|
+
* form and PRESERVE the boolean form — for `schedules`, `interface.schedules: false`
|
|
88
|
+
* is the runtime feature disable that `getLimits` reads, not a permission toggle.
|
|
89
|
+
*/
|
|
90
|
+
export declare const RUNTIME_CONFIG_INTERFACE_FIELDS: Set<string>;
|
|
79
91
|
/**
|
|
80
92
|
* YAML sub-keys within composite interface permission fields that map to permission bits.
|
|
81
93
|
* When an interface permission field is an object, only these sub-keys are stripped from
|
|
@@ -302,6 +314,17 @@ export declare const skillPermissionsSchema: z.ZodObject<{
|
|
|
302
314
|
SHARE_PUBLIC?: boolean | undefined;
|
|
303
315
|
}>;
|
|
304
316
|
export type TSkillPermissions = z.infer<typeof skillPermissionsSchema>;
|
|
317
|
+
export declare const schedulesPermissionsSchema: z.ZodObject<{
|
|
318
|
+
USE: z.ZodDefault<z.ZodBoolean>;
|
|
319
|
+
CREATE: z.ZodDefault<z.ZodBoolean>;
|
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
|
321
|
+
USE: boolean;
|
|
322
|
+
CREATE: boolean;
|
|
323
|
+
}, {
|
|
324
|
+
USE?: boolean | undefined;
|
|
325
|
+
CREATE?: boolean | undefined;
|
|
326
|
+
}>;
|
|
327
|
+
export type TSchedulesPermissions = z.infer<typeof schedulesPermissionsSchema>;
|
|
305
328
|
export declare const sharedLinksPermissionsSchema: z.ZodObject<{
|
|
306
329
|
CREATE: z.ZodDefault<z.ZodBoolean>;
|
|
307
330
|
SHARE: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -501,6 +524,16 @@ export declare const permissionsSchema: z.ZodObject<{
|
|
|
501
524
|
SHARE?: boolean | undefined;
|
|
502
525
|
SHARE_PUBLIC?: boolean | undefined;
|
|
503
526
|
}>;
|
|
527
|
+
SCHEDULES: z.ZodObject<{
|
|
528
|
+
USE: z.ZodDefault<z.ZodBoolean>;
|
|
529
|
+
CREATE: z.ZodDefault<z.ZodBoolean>;
|
|
530
|
+
}, "strip", z.ZodTypeAny, {
|
|
531
|
+
USE: boolean;
|
|
532
|
+
CREATE: boolean;
|
|
533
|
+
}, {
|
|
534
|
+
USE?: boolean | undefined;
|
|
535
|
+
CREATE?: boolean | undefined;
|
|
536
|
+
}>;
|
|
504
537
|
}, "strip", z.ZodTypeAny, {
|
|
505
538
|
PROMPTS: {
|
|
506
539
|
USE: boolean;
|
|
@@ -574,6 +607,10 @@ export declare const permissionsSchema: z.ZodObject<{
|
|
|
574
607
|
SHARE: boolean;
|
|
575
608
|
SHARE_PUBLIC: boolean;
|
|
576
609
|
};
|
|
610
|
+
SCHEDULES: {
|
|
611
|
+
USE: boolean;
|
|
612
|
+
CREATE: boolean;
|
|
613
|
+
};
|
|
577
614
|
}, {
|
|
578
615
|
PROMPTS: {
|
|
579
616
|
USE?: boolean | undefined;
|
|
@@ -647,4 +684,8 @@ export declare const permissionsSchema: z.ZodObject<{
|
|
|
647
684
|
SHARE?: boolean | undefined;
|
|
648
685
|
SHARE_PUBLIC?: boolean | undefined;
|
|
649
686
|
};
|
|
687
|
+
SCHEDULES: {
|
|
688
|
+
USE?: boolean | undefined;
|
|
689
|
+
CREATE?: boolean | undefined;
|
|
690
|
+
};
|
|
650
691
|
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EModelEndpoint } from './schemas';
|
|
2
|
+
import { KnownEndpoints } from './config';
|
|
3
|
+
/** Canonical provider identity used for branding across client and server. */
|
|
4
|
+
export declare enum ProviderId {
|
|
5
|
+
openai = "openai",
|
|
6
|
+
anthropic = "anthropic",
|
|
7
|
+
google = "google",
|
|
8
|
+
azure = "azure",
|
|
9
|
+
bedrock = "bedrock",
|
|
10
|
+
xai = "xai",
|
|
11
|
+
moonshot = "moonshot",
|
|
12
|
+
anyscale = "anyscale",
|
|
13
|
+
apipie = "apipie",
|
|
14
|
+
cohere = "cohere",
|
|
15
|
+
deepseek = "deepseek",
|
|
16
|
+
fireworks = "fireworks",
|
|
17
|
+
groq = "groq",
|
|
18
|
+
helicone = "helicone",
|
|
19
|
+
huggingface = "huggingface",
|
|
20
|
+
mistral = "mistral",
|
|
21
|
+
mlx = "mlx",
|
|
22
|
+
ollama = "ollama",
|
|
23
|
+
openrouter = "openrouter",
|
|
24
|
+
perplexity = "perplexity",
|
|
25
|
+
qwen = "qwen",
|
|
26
|
+
shuttleai = "shuttleai",
|
|
27
|
+
together = "together",
|
|
28
|
+
unify = "unify",
|
|
29
|
+
vercel = "vercel"
|
|
30
|
+
}
|
|
31
|
+
export declare const endpointToProvider: Partial<Record<EModelEndpoint, ProviderId>>;
|
|
32
|
+
export declare const knownEndpointToProvider: Record<KnownEndpoints, ProviderId>;
|
|
33
|
+
/** Resolves free-form provider text to a canonical id, ignoring case and separators. */
|
|
34
|
+
export declare function resolveProviderId(input?: string | null): ProviderId | null;
|
|
35
|
+
/** Resolves a runtime provider to its model catalog, using a native alias only when needed. */
|
|
36
|
+
export declare function resolveModelCatalogKey<T>(provider?: string | null, catalogs?: Partial<Record<string, T>>): string;
|
package/dist/types/request.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AxiosRequestConfig } from 'axios';
|
|
1
|
+
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
2
|
import type * as t from './types';
|
|
3
3
|
declare function _get<T>(url: string, options?: AxiosRequestConfig): Promise<T>;
|
|
4
|
-
declare function _getResponse<T>(url: string, options?: AxiosRequestConfig): Promise<T
|
|
4
|
+
declare function _getResponse<T = unknown>(url: string, options?: AxiosRequestConfig): Promise<AxiosResponse<T>>;
|
|
5
5
|
declare function _post(url: string, data?: any): Promise<any>;
|
|
6
6
|
declare function _postMultiPart(url: string, formData: FormData, options?: AxiosRequestConfig): Promise<any>;
|
|
7
7
|
declare function _postTTS(url: string, formData: FormData, options?: AxiosRequestConfig): Promise<any>;
|
package/dist/types/roles.d.ts
CHANGED
|
@@ -199,6 +199,16 @@ export declare const roleSchema: z.ZodObject<{
|
|
|
199
199
|
SHARE?: boolean | undefined;
|
|
200
200
|
SHARE_PUBLIC?: boolean | undefined;
|
|
201
201
|
}>;
|
|
202
|
+
SCHEDULES: z.ZodObject<{
|
|
203
|
+
USE: z.ZodDefault<z.ZodBoolean>;
|
|
204
|
+
CREATE: z.ZodDefault<z.ZodBoolean>;
|
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
|
206
|
+
USE: boolean;
|
|
207
|
+
CREATE: boolean;
|
|
208
|
+
}, {
|
|
209
|
+
USE?: boolean | undefined;
|
|
210
|
+
CREATE?: boolean | undefined;
|
|
211
|
+
}>;
|
|
202
212
|
}, "strip", z.ZodTypeAny, {
|
|
203
213
|
PROMPTS: {
|
|
204
214
|
USE: boolean;
|
|
@@ -272,6 +282,10 @@ export declare const roleSchema: z.ZodObject<{
|
|
|
272
282
|
SHARE: boolean;
|
|
273
283
|
SHARE_PUBLIC: boolean;
|
|
274
284
|
};
|
|
285
|
+
SCHEDULES: {
|
|
286
|
+
USE: boolean;
|
|
287
|
+
CREATE: boolean;
|
|
288
|
+
};
|
|
275
289
|
}, {
|
|
276
290
|
PROMPTS: {
|
|
277
291
|
USE?: boolean | undefined;
|
|
@@ -345,6 +359,10 @@ export declare const roleSchema: z.ZodObject<{
|
|
|
345
359
|
SHARE?: boolean | undefined;
|
|
346
360
|
SHARE_PUBLIC?: boolean | undefined;
|
|
347
361
|
};
|
|
362
|
+
SCHEDULES: {
|
|
363
|
+
USE?: boolean | undefined;
|
|
364
|
+
CREATE?: boolean | undefined;
|
|
365
|
+
};
|
|
348
366
|
}>;
|
|
349
367
|
}, "strip", z.ZodTypeAny, {
|
|
350
368
|
name: string;
|
|
@@ -421,6 +439,10 @@ export declare const roleSchema: z.ZodObject<{
|
|
|
421
439
|
SHARE: boolean;
|
|
422
440
|
SHARE_PUBLIC: boolean;
|
|
423
441
|
};
|
|
442
|
+
SCHEDULES: {
|
|
443
|
+
USE: boolean;
|
|
444
|
+
CREATE: boolean;
|
|
445
|
+
};
|
|
424
446
|
};
|
|
425
447
|
}, {
|
|
426
448
|
name: string;
|
|
@@ -497,6 +519,10 @@ export declare const roleSchema: z.ZodObject<{
|
|
|
497
519
|
SHARE?: boolean | undefined;
|
|
498
520
|
SHARE_PUBLIC?: boolean | undefined;
|
|
499
521
|
};
|
|
522
|
+
SCHEDULES: {
|
|
523
|
+
USE?: boolean | undefined;
|
|
524
|
+
CREATE?: boolean | undefined;
|
|
525
|
+
};
|
|
500
526
|
};
|
|
501
527
|
}>;
|
|
502
528
|
export type TRole = z.infer<typeof roleSchema>;
|
|
@@ -578,6 +604,10 @@ export declare const roleDefaults: {
|
|
|
578
604
|
SHARE: boolean;
|
|
579
605
|
SHARE_PUBLIC: boolean;
|
|
580
606
|
};
|
|
607
|
+
SCHEDULES: {
|
|
608
|
+
USE: boolean;
|
|
609
|
+
CREATE: boolean;
|
|
610
|
+
};
|
|
581
611
|
};
|
|
582
612
|
};
|
|
583
613
|
USER: {
|
|
@@ -655,6 +685,10 @@ export declare const roleDefaults: {
|
|
|
655
685
|
SHARE: boolean;
|
|
656
686
|
SHARE_PUBLIC: boolean;
|
|
657
687
|
};
|
|
688
|
+
SCHEDULES: {
|
|
689
|
+
USE: boolean;
|
|
690
|
+
CREATE: boolean;
|
|
691
|
+
};
|
|
658
692
|
};
|
|
659
693
|
};
|
|
660
694
|
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The timestamp pair these helpers derive from.
|
|
3
|
+
*
|
|
4
|
+
* Both stamps are optional here even though `closed_at` is required on
|
|
5
|
+
* `Agents.RunStepClosedEvent`, because not every caller holds a well-typed
|
|
6
|
+
* event: the Redis replay branch reconstructs closures from persisted JSON and
|
|
7
|
+
* legitimately has nothing stronger than "might be a number". Widening the
|
|
8
|
+
* parameter rather than making callers assert keeps the guards below as the
|
|
9
|
+
* single place that decides what is trustworthy — an assertion at a call site
|
|
10
|
+
* would move that decision somewhere it cannot be enforced.
|
|
11
|
+
*/
|
|
12
|
+
export interface RunStepTimestamps {
|
|
13
|
+
created_at?: number;
|
|
14
|
+
closed_at?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Below this, a duration is noise rather than information: sub-second tool
|
|
18
|
+
* calls are the common case, and labelling every one of them `· 0.3s` adds a
|
|
19
|
+
* moving number to the end of most cards without telling the reader anything
|
|
20
|
+
* they could act on. Callers use {@link isReportableRunStepDuration} rather
|
|
21
|
+
* than comparing against this directly.
|
|
22
|
+
*/
|
|
23
|
+
export declare const MIN_REPORTABLE_RUN_STEP_DURATION_MS = 1000;
|
|
24
|
+
/**
|
|
25
|
+
* Wall-clock duration of a run step, derived from the terminal
|
|
26
|
+
* `on_run_step_closed` event.
|
|
27
|
+
*
|
|
28
|
+
* Returns `undefined` rather than a fallback whenever the value would be a
|
|
29
|
+
* guess, because a wrong duration is worse than an absent one — an absent one
|
|
30
|
+
* renders nothing, a wrong one is indistinguishable from a real measurement:
|
|
31
|
+
*
|
|
32
|
+
* - `created_at` is optional on the event; emitters that do not know when the
|
|
33
|
+
* step opened cannot have their duration inferred from anything else.
|
|
34
|
+
* - A negative result means the two timestamps came from clocks that disagree.
|
|
35
|
+
* That is not hypothetical: since `@librechat/agents` v3.6.0 a step can be
|
|
36
|
+
* opened in one process and closed in another after a checkpoint resume, so
|
|
37
|
+
* the two stamps can legitimately originate on different machines.
|
|
38
|
+
* - Non-finite input is treated as absent instead of propagating `NaN` into
|
|
39
|
+
* rendering.
|
|
40
|
+
*
|
|
41
|
+
* Known limits, accepted rather than guessed at: only the negative direction
|
|
42
|
+
* of clock skew is detectable from a single stamp pair — positive skew
|
|
43
|
+
* inflates the result and cannot be distinguished from a genuinely long
|
|
44
|
+
* step. And the value is wall-clock elapsed between open and close, so a
|
|
45
|
+
* step held open across a suspension (a checkpoint resume, a HITL approval
|
|
46
|
+
* wait) includes that held-open time. Both are properties of the only data
|
|
47
|
+
* available, not derivation bugs.
|
|
48
|
+
*/
|
|
49
|
+
export declare function getRunStepDurationMs(closed: RunStepTimestamps): number | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Whether a derived duration is worth showing to the reader.
|
|
52
|
+
*
|
|
53
|
+
* This is a presentation judgment, so it belongs at render time only. The
|
|
54
|
+
* stamp sites persist the raw {@link getRunStepDurationMs} value instead of
|
|
55
|
+
* pre-filtering through this — thresholding at write time would bake a
|
|
56
|
+
* display rule into stored data, making "fast" indistinguishable from "not
|
|
57
|
+
* derivable" and unrecoverable if the rule ever changes.
|
|
58
|
+
*/
|
|
59
|
+
export declare function isReportableRunStepDuration(durationMs?: number): durationMs is number;
|