librechat-data-provider 0.8.501 → 0.8.502

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.
@@ -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
@@ -89,6 +89,7 @@ export declare const files: () => string;
89
89
  export declare const fileUpload: () => string;
90
90
  export declare const fileDelete: () => string;
91
91
  export declare const fileDownload: (userId: string, fileId: string) => string;
92
+ export declare const filePreview: (fileId: string) => string;
92
93
  export declare const fileConfig: () => string;
93
94
  export declare const agentFiles: (agentId: string) => string;
94
95
  export declare const images: () => string;
@@ -116,6 +117,22 @@ export declare const deletePrompt: ({ _id, groupId }: {
116
117
  }) => string;
117
118
  export declare const getCategories: () => string;
118
119
  export declare const getAllPromptGroups: () => string;
120
+ export declare const skills: () => string;
121
+ export declare const importSkill: () => string;
122
+ export declare const getSkill: (id: string) => string;
123
+ export declare const listSkillsWithFilters: (filter: Record<string, string | number | undefined | null>) => string;
124
+ export declare const skillFiles: (id: string) => string;
125
+ export declare const skillFile: (id: string, relativePath: string) => string;
126
+ /**
127
+ * Skill filesystem tree (phase 2). URL shape mirrors the original UI PR so
128
+ * the tree hooks keep their call surface. `path` is pre-encoded by the
129
+ * caller (e.g. `${nodeId}/content`).
130
+ */
131
+ export declare const skillTree: ({ skillId, path }: {
132
+ skillId: string;
133
+ path?: string | undefined;
134
+ }) => string;
135
+ export declare const skillStates: () => string;
119
136
  export declare const roles: () => string;
120
137
  export declare const adminRoles: () => string;
121
138
  export declare const getRole: (roleName: string) => string;
@@ -126,6 +143,7 @@ export declare const updatePeoplePickerPermissions: (roleName: string) => string
126
143
  export declare const updateMCPServersPermissions: (roleName: string) => string;
127
144
  export declare const updateRemoteAgentsPermissions: (roleName: string) => string;
128
145
  export declare const updateMarketplacePermissions: (roleName: string) => string;
146
+ export declare const updateSkillPermissions: (roleName: string) => string;
129
147
  export declare const conversationTags: (tag?: string) => string;
130
148
  export declare const conversationTagsList: (pageNumber: string, sort?: string, order?: string) => string;
131
149
  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,7 @@ 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
+ /** Checks if a model has a 1M context window (Sonnet 4.6+, Opus 4.6+, Opus 5+) */
18
20
  export declare function supportsContext1m(model: string): boolean;
19
21
  export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pick<{
20
22
  conversationId: 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 {};