librechat-data-provider 0.8.501 → 0.8.503

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/index.es.js +1 -1
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/react-query/index.es.js +1 -1
  6. package/dist/react-query/index.es.js.map +1 -1
  7. package/dist/types/accessPermissions.d.ts +6 -2
  8. package/dist/types/api-endpoints.d.ts +20 -1
  9. package/dist/types/balance.d.ts +3 -0
  10. package/dist/types/balance.spec.d.ts +1 -0
  11. package/dist/types/bedrock.d.ts +9 -1
  12. package/dist/types/cloudfront-config.spec.d.ts +1 -0
  13. package/dist/types/codeEnvRef.d.ts +62 -0
  14. package/dist/types/codeEnvRef.spec.d.ts +1 -0
  15. package/dist/types/config.d.ts +2278 -131
  16. package/dist/types/data-service.d.ts +69 -2
  17. package/dist/types/file-config.d.ts +16 -0
  18. package/dist/types/generate.d.ts +2 -0
  19. package/dist/types/headers-helpers.d.ts +1 -0
  20. package/dist/types/index.d.ts +3 -0
  21. package/dist/types/keys.d.ts +16 -2
  22. package/dist/types/mcp.d.ts +1304 -58
  23. package/dist/types/models.d.ts +50 -8
  24. package/dist/types/parameterSettings.d.ts +6 -0
  25. package/dist/types/parameterSettings.spec.d.ts +1 -0
  26. package/dist/types/parsers.d.ts +2 -1
  27. package/dist/types/permissions.d.ts +50 -1
  28. package/dist/types/roles.d.ts +52 -0
  29. package/dist/types/schemas.d.ts +477 -14
  30. package/dist/types/types/assistants.d.ts +25 -3
  31. package/dist/types/types/files.d.ts +71 -0
  32. package/dist/types/types/mutations.d.ts +46 -0
  33. package/dist/types/types/queries.d.ts +2 -0
  34. package/dist/types/types/runs.d.ts +20 -1
  35. package/dist/types/types/skills.d.ts +275 -0
  36. package/dist/types/types/web.d.ts +14 -1
  37. package/dist/types/types.d.ts +65 -5
  38. package/package.json +2 -2
@@ -38,7 +38,8 @@ export declare enum ResourceType {
38
38
  AGENT = "agent",
39
39
  PROMPTGROUP = "promptGroup",
40
40
  MCPSERVER = "mcpServer",
41
- REMOTE_AGENT = "remoteAgent"
41
+ REMOTE_AGENT = "remoteAgent",
42
+ SKILL = "skill"
42
43
  }
43
44
  /**
44
45
  * Permission bit constants for bitwise operations
@@ -68,7 +69,10 @@ export declare enum AccessRoleIds {
68
69
  MCPSERVER_OWNER = "mcpServer_owner",
69
70
  REMOTE_AGENT_VIEWER = "remoteAgent_viewer",
70
71
  REMOTE_AGENT_EDITOR = "remoteAgent_editor",
71
- REMOTE_AGENT_OWNER = "remoteAgent_owner"
72
+ REMOTE_AGENT_OWNER = "remoteAgent_owner",
73
+ SKILL_VIEWER = "skill_viewer",
74
+ SKILL_EDITOR = "skill_editor",
75
+ SKILL_OWNER = "skill_owner"
72
76
  }
73
77
  /**
74
78
  * Principal schema - represents a user, group, role, or public access
@@ -1,3 +1,4 @@
1
+ import type { StartupConfigContext } from './config';
1
2
  import type { AssistantsEndpoint } from './schemas';
2
3
  import * as q from './types/queries';
3
4
  import { ResourceType } from './accessPermissions';
@@ -64,7 +65,7 @@ export declare const mcpAuthValues: (serverName: string) => string;
64
65
  export declare const cancelMCPOAuth: (serverName: string) => string;
65
66
  export declare const mcpOAuthBind: (serverName: string) => string;
66
67
  export declare const actionOAuthBind: (actionId: string) => string;
67
- export declare const config: () => string;
68
+ export declare const config: (context?: StartupConfigContext) => string;
68
69
  export declare const prompts: () => string;
69
70
  export declare const addPromptToGroup: (groupId: string) => string;
70
71
  export declare const assistants: ({ path, options, version, endpoint, isAvatar, }: {
@@ -89,6 +90,7 @@ export declare const files: () => string;
89
90
  export declare const fileUpload: () => string;
90
91
  export declare const fileDelete: () => string;
91
92
  export declare const fileDownload: (userId: string, fileId: string) => string;
93
+ export declare const filePreview: (fileId: string) => string;
92
94
  export declare const fileConfig: () => string;
93
95
  export declare const agentFiles: (agentId: string) => string;
94
96
  export declare const images: () => string;
@@ -116,6 +118,22 @@ export declare const deletePrompt: ({ _id, groupId }: {
116
118
  }) => string;
117
119
  export declare const getCategories: () => string;
118
120
  export declare const getAllPromptGroups: () => string;
121
+ export declare const skills: () => string;
122
+ export declare const importSkill: () => string;
123
+ export declare const getSkill: (id: string) => string;
124
+ export declare const listSkillsWithFilters: (filter: Record<string, string | number | undefined | null>) => string;
125
+ export declare const skillFiles: (id: string) => string;
126
+ export declare const skillFile: (id: string, relativePath: string) => string;
127
+ /**
128
+ * Skill filesystem tree (phase 2). URL shape mirrors the original UI PR so
129
+ * the tree hooks keep their call surface. `path` is pre-encoded by the
130
+ * caller (e.g. `${nodeId}/content`).
131
+ */
132
+ export declare const skillTree: ({ skillId, path }: {
133
+ skillId: string;
134
+ path?: string | undefined;
135
+ }) => string;
136
+ export declare const skillStates: () => string;
119
137
  export declare const roles: () => string;
120
138
  export declare const adminRoles: () => string;
121
139
  export declare const getRole: (roleName: string) => string;
@@ -126,6 +144,7 @@ export declare const updatePeoplePickerPermissions: (roleName: string) => string
126
144
  export declare const updateMCPServersPermissions: (roleName: string) => string;
127
145
  export declare const updateRemoteAgentsPermissions: (roleName: string) => string;
128
146
  export declare const updateMarketplacePermissions: (roleName: string) => string;
147
+ export declare const updateSkillPermissions: (roleName: string) => string;
129
148
  export declare const conversationTags: (tag?: string) => string;
130
149
  export declare const conversationTagsList: (pageNumber: string, sort?: string, order?: string) => string;
131
150
  export declare const addTagToConversation: (conversationId: string) => string;
@@ -0,0 +1,3 @@
1
+ export declare const REFILL_INTERVAL_UNITS: readonly ["seconds", "minutes", "hours", "days", "weeks", "months"];
2
+ export type RefillIntervalUnit = (typeof REFILL_INTERVAL_UNITS)[number];
3
+ export declare function getRefillEligibilityDate(lastRefill: Date, value: number, unit: RefillIntervalUnit): Date;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import * as s from './schemas';
3
+ export declare const BEDROCK_OUTPUT_128K_BETA = "output-128k-2025-02-19";
4
+ export declare const BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA = "fine-grained-tool-streaming-2025-05-14";
3
5
  export declare function resolveThinkingDisplay(model: string, explicit?: s.ThinkingDisplay | string | null): s.ThinkingDisplayWireValue | undefined;
4
6
  /** Checks if a model supports adaptive thinking (Opus 4.6+, Sonnet 4.6+) */
5
7
  export declare function supportsAdaptiveThinking(model: string): boolean;
@@ -14,7 +16,8 @@ export declare function supportsAdaptiveThinking(model: string): boolean;
14
16
  * See https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7#thinking-content-omitted-by-default
15
17
  */
16
18
  export declare function omitsThinkingByDefault(model: string): boolean;
17
- /** Checks if a model qualifies for the context-1m beta header (Sonnet 4+, Opus 4.6+, Opus 5+) */
19
+ export declare function omitsSamplingParameters(model: string): boolean;
20
+ /** Checks if a model has a 1M context window (Sonnet 4.6+, Opus 4.6+, Opus 5+) */
18
21
  export declare function supportsContext1m(model: string): boolean;
19
22
  export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pick<{
20
23
  conversationId: z.ZodNullable<z.ZodString>;
@@ -208,6 +211,7 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
208
211
  spec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
209
212
  iconURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
213
  expiredAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ isTemporary: z.ZodOptional<z.ZodBoolean>;
211
215
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
212
216
  resendImages: z.ZodOptional<z.ZodBoolean>;
213
217
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -601,6 +605,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
601
605
  spec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
602
606
  iconURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
603
607
  expiredAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
608
+ isTemporary: z.ZodOptional<z.ZodBoolean>;
604
609
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
605
610
  resendImages: z.ZodOptional<z.ZodBoolean>;
606
611
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -796,6 +801,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
796
801
  spec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
797
802
  iconURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
798
803
  expiredAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
804
+ isTemporary: z.ZodOptional<z.ZodBoolean>;
799
805
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
800
806
  resendImages: z.ZodOptional<z.ZodBoolean>;
801
807
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -991,6 +997,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
991
997
  spec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
992
998
  iconURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
993
999
  expiredAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1000
+ isTemporary: z.ZodOptional<z.ZodBoolean>;
994
1001
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
995
1002
  resendImages: z.ZodOptional<z.ZodBoolean>;
996
1003
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1235,6 +1242,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
1235
1242
  spec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1236
1243
  iconURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1237
1244
  expiredAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1245
+ isTemporary: z.ZodOptional<z.ZodBoolean>;
1238
1246
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
1239
1247
  resendImages: z.ZodOptional<z.ZodBoolean>;
1240
1248
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Closed set of resource kinds for sandbox file caching. Defined as a
3
+ * `as const` tuple so the runtime list and the TypeScript union can't
4
+ * drift on future additions — adding a new kind to the tuple updates
5
+ * both at once.
6
+ *
7
+ * - `skill`: shared per skill identity. Cross-user-within-tenant
8
+ * sharing. Code API sessionKey omits the user dimension.
9
+ * `version` is required (the skill's monotonic counter scopes the
10
+ * cache per revision so any edit invalidates the prior cache
11
+ * entry naturally).
12
+ * - `agent`: shared per agent identity. Same sharing semantic as
13
+ * skills (agents are addressable resources accessible to a
14
+ * permission-defined audience).
15
+ * - `user`: user-private. Code API sessionKey is keyed by the
16
+ * requesting user from auth context. Used for chat attachments
17
+ * and code-output artifacts.
18
+ */
19
+ export declare const CODE_ENV_KINDS: readonly ["skill", "agent", "user"];
20
+ export type CodeEnvKind = (typeof CODE_ENV_KINDS)[number];
21
+ /**
22
+ * Typed reference to a file in the code-execution sandbox.
23
+ *
24
+ * `storage_session_id` is intentionally distinct from the *execution*
25
+ * session id at the top level of an execute response — they are
26
+ * different concepts that historically shared the field name
27
+ * `session_id`. This is the long-lived storage session keyed by the
28
+ * resource's identity (skill/agent/user), not the transient
29
+ * sandbox-run session.
30
+ *
31
+ * `kind` and `id` together name the resource that owns this file's
32
+ * storage session. Code API uses them (plus the auth-context tenant
33
+ * id) to derive the sessionKey, which determines who shares the
34
+ * cache. Cross-user sharing for shared resources (skills, agents) is
35
+ * a designed property of the kind switch, not an emergent side
36
+ * effect. See codeapi #1455 / agents #148 / LC #12960.
37
+ *
38
+ * `version` is statically required when `kind === 'skill'` and
39
+ * statically forbidden otherwise via the discriminated union below —
40
+ * the constraint is enforced at compile time, not just by codeapi's
41
+ * runtime validator.
42
+ */
43
+ interface CodeEnvRefBase {
44
+ /** Resource identity. Semantics depend on `kind`:
45
+ * - `skill`: skill `_id` (sessionKey-meaningful, cross-user shared).
46
+ * - `agent`: agent id (sessionKey-meaningful, cross-user shared).
47
+ * - `user`: informational only — sessionKey derivation uses the
48
+ * requesting user from auth context. Kept on the type for shape
49
+ * uniformity across kinds; do not rely on it for routing. */
50
+ id: string;
51
+ storage_session_id: string;
52
+ file_id: string;
53
+ }
54
+ export type CodeEnvRef = (CodeEnvRefBase & {
55
+ kind: 'skill';
56
+ version: number;
57
+ }) | (CodeEnvRefBase & {
58
+ kind: 'agent';
59
+ }) | (CodeEnvRefBase & {
60
+ kind: 'user';
61
+ });
62
+ export {};
@@ -0,0 +1 @@
1
+ export {};