librechat-data-provider 0.8.507 → 0.8.508

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.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_data_service = require("../data-service-CCdWvcRd.js");
2
+ const require_data_service = require("../data-service-DN-HeTC-.js");
3
3
  let _tanstack_react_query = require("@tanstack/react-query");
4
4
  //#region src/react-query/react-query-service.ts
5
5
  const useGetSharedMessages = (shareId, config) => {
@@ -1,4 +1,4 @@
1
- import { A as updateResourcePermissions, C as resetPassword, Cn as initialModelsConfig, D as updateFeedback, E as searchPrincipals, M as updateUserKey, N as updateUserPlugins, O as updateMessage, P as userKeyQuery, S as requestPasswordReset, T as revokeUserKey, Wa as defaultOrderQuery, Z as hasPermissions, _ as getResourcePermissions, b as register, c as getAccessRoles, d as getAvailablePlugins, f as getConversationById, g as getModels, h as getMCPServerConnectionStatus, i as createPreset, j as updateTokenCount, k as updateMessageContent, l as getAgentApiKeys, la as isAssistantsEndpoint, m as getEffectivePermissions, n as clearAllConversations, o as deleteAgentApiKey, p as getCustomConfigSpeech, r as createAgentApiKey, s as deletePreset, t as cancelMCPOAuth, u as getAllEffectivePermissions, v as getSharedLink, w as revokeAllUserKeys, x as reinitializeMCPServer, y as getSharedMessages } from "../data-service-D7mtXwG5.mjs";
1
+ import { A as updateResourcePermissions, C as resetPassword, Cn as initialModelsConfig, D as updateFeedback, E as searchPrincipals, Ga as defaultOrderQuery, M as updateUserKey, N as updateUserPlugins, O as updateMessage, P as userKeyQuery, S as requestPasswordReset, T as revokeUserKey, Z as hasPermissions, _ as getResourcePermissions, b as register, c as getAccessRoles, d as getAvailablePlugins, f as getConversationById, g as getModels, h as getMCPServerConnectionStatus, i as createPreset, j as updateTokenCount, k as updateMessageContent, l as getAgentApiKeys, m as getEffectivePermissions, n as clearAllConversations, o as deleteAgentApiKey, p as getCustomConfigSpeech, r as createAgentApiKey, s as deletePreset, t as cancelMCPOAuth, u as getAllEffectivePermissions, ua as isAssistantsEndpoint, v as getSharedLink, w as revokeAllUserKeys, x as reinitializeMCPServer, y as getSharedMessages } from "../data-service-DgNwjhBS.mjs";
2
2
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  //#region src/react-query/react-query-service.ts
4
4
  const useGetSharedMessages = (shareId, config) => {
@@ -16,6 +16,10 @@ export declare const getSharedLink: (conversationId: string) => string;
16
16
  export declare const getSharedLinks: (pageSize: number, sortBy: "title" | "createdAt", sortDirection: "asc" | "desc", search?: string, cursor?: string) => string;
17
17
  export declare const createSharedLink: (conversationId: string) => string;
18
18
  export declare const updateSharedLink: (shareId: string) => string;
19
+ /** Share-scoped file routes: serve snapshotted files via shared-link permission. */
20
+ export declare const sharedFile: (shareId: string, fileId: string) => string;
21
+ export declare const sharedFileDownload: (shareId: string, fileId: string) => string;
22
+ export declare const sharedFilePreview: (shareId: string, fileId: string) => string;
19
23
  export declare const keys: () => string;
20
24
  export declare const userKeyQuery: (name: string) => string;
21
25
  export declare const revokeUserKey: (name: string) => string;
@@ -2326,6 +2326,8 @@ export declare const interfaceSchema: z.ZodDefault<z.ZodObject<{
2326
2326
  }>>;
2327
2327
  fileSearch: z.ZodOptional<z.ZodBoolean>;
2328
2328
  fileCitations: z.ZodOptional<z.ZodBoolean>;
2329
+ /** Tool keys (and `'mcp'` or an MCP server name) pinned to the prompt bar by default */
2330
+ defaultPinnedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2329
2331
  buildInfo: z.ZodOptional<z.ZodBoolean>;
2330
2332
  remoteAgents: z.ZodOptional<z.ZodObject<{
2331
2333
  use: z.ZodOptional<z.ZodBoolean>;
@@ -2366,14 +2368,17 @@ export declare const interfaceSchema: z.ZodDefault<z.ZodObject<{
2366
2368
  create: z.ZodOptional<z.ZodBoolean>;
2367
2369
  share: z.ZodOptional<z.ZodBoolean>;
2368
2370
  public: z.ZodOptional<z.ZodBoolean>;
2371
+ snapshotFiles: z.ZodOptional<z.ZodBoolean>;
2369
2372
  }, "strip", z.ZodTypeAny, {
2370
2373
  public?: boolean | undefined;
2371
2374
  share?: boolean | undefined;
2372
2375
  create?: boolean | undefined;
2376
+ snapshotFiles?: boolean | undefined;
2373
2377
  }, {
2374
2378
  public?: boolean | undefined;
2375
2379
  share?: boolean | undefined;
2376
2380
  create?: boolean | undefined;
2381
+ snapshotFiles?: boolean | undefined;
2377
2382
  }>]>>;
2378
2383
  }, "strip", z.ZodTypeAny, {
2379
2384
  retentionMode: RetentionMode;
@@ -2448,6 +2453,7 @@ export declare const interfaceSchema: z.ZodDefault<z.ZodObject<{
2448
2453
  use?: boolean | undefined;
2449
2454
  } | undefined;
2450
2455
  fileCitations?: boolean | undefined;
2456
+ defaultPinnedTools?: string[] | undefined;
2451
2457
  buildInfo?: boolean | undefined;
2452
2458
  remoteAgents?: {
2453
2459
  public?: boolean | undefined;
@@ -2459,6 +2465,7 @@ export declare const interfaceSchema: z.ZodDefault<z.ZodObject<{
2459
2465
  public?: boolean | undefined;
2460
2466
  share?: boolean | undefined;
2461
2467
  create?: boolean | undefined;
2468
+ snapshotFiles?: boolean | undefined;
2462
2469
  } | undefined;
2463
2470
  }, {
2464
2471
  agents?: boolean | {
@@ -2533,6 +2540,7 @@ export declare const interfaceSchema: z.ZodDefault<z.ZodObject<{
2533
2540
  use?: boolean | undefined;
2534
2541
  } | undefined;
2535
2542
  fileCitations?: boolean | undefined;
2543
+ defaultPinnedTools?: string[] | undefined;
2536
2544
  buildInfo?: boolean | undefined;
2537
2545
  remoteAgents?: {
2538
2546
  public?: boolean | undefined;
@@ -2544,6 +2552,7 @@ export declare const interfaceSchema: z.ZodDefault<z.ZodObject<{
2544
2552
  public?: boolean | undefined;
2545
2553
  share?: boolean | undefined;
2546
2554
  create?: boolean | undefined;
2555
+ snapshotFiles?: boolean | undefined;
2547
2556
  } | undefined;
2548
2557
  }>>;
2549
2558
  export type TInterfaceConfig = z.infer<typeof interfaceSchema>;
@@ -2639,6 +2648,8 @@ export type TStartupConfig = {
2639
2648
  modelDescriptions?: Record<string, Record<string, string>>;
2640
2649
  sharedLinksEnabled: boolean;
2641
2650
  publicSharedLinksEnabled: boolean;
2651
+ /** Whether shared links snapshot conversation files (gates the per-link "share files" checkbox). */
2652
+ sharedLinksSnapshotFilesEnabled?: boolean;
2642
2653
  /** Effective default timing for when conversation titles become fetchable.
2643
2654
  * `immediate` = fetch in parallel with the active stream (default);
2644
2655
  * `final` = fetch only after the stream completes (legacy). */
@@ -5549,6 +5560,8 @@ export declare const configSchema: z.ZodObject<{
5549
5560
  }>>;
5550
5561
  fileSearch: z.ZodOptional<z.ZodBoolean>;
5551
5562
  fileCitations: z.ZodOptional<z.ZodBoolean>;
5563
+ /** Tool keys (and `'mcp'` or an MCP server name) pinned to the prompt bar by default */
5564
+ defaultPinnedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5552
5565
  buildInfo: z.ZodOptional<z.ZodBoolean>;
5553
5566
  remoteAgents: z.ZodOptional<z.ZodObject<{
5554
5567
  use: z.ZodOptional<z.ZodBoolean>;
@@ -5589,14 +5602,17 @@ export declare const configSchema: z.ZodObject<{
5589
5602
  create: z.ZodOptional<z.ZodBoolean>;
5590
5603
  share: z.ZodOptional<z.ZodBoolean>;
5591
5604
  public: z.ZodOptional<z.ZodBoolean>;
5605
+ snapshotFiles: z.ZodOptional<z.ZodBoolean>;
5592
5606
  }, "strip", z.ZodTypeAny, {
5593
5607
  public?: boolean | undefined;
5594
5608
  share?: boolean | undefined;
5595
5609
  create?: boolean | undefined;
5610
+ snapshotFiles?: boolean | undefined;
5596
5611
  }, {
5597
5612
  public?: boolean | undefined;
5598
5613
  share?: boolean | undefined;
5599
5614
  create?: boolean | undefined;
5615
+ snapshotFiles?: boolean | undefined;
5600
5616
  }>]>>;
5601
5617
  }, "strip", z.ZodTypeAny, {
5602
5618
  retentionMode: RetentionMode;
@@ -5671,6 +5687,7 @@ export declare const configSchema: z.ZodObject<{
5671
5687
  use?: boolean | undefined;
5672
5688
  } | undefined;
5673
5689
  fileCitations?: boolean | undefined;
5690
+ defaultPinnedTools?: string[] | undefined;
5674
5691
  buildInfo?: boolean | undefined;
5675
5692
  remoteAgents?: {
5676
5693
  public?: boolean | undefined;
@@ -5682,6 +5699,7 @@ export declare const configSchema: z.ZodObject<{
5682
5699
  public?: boolean | undefined;
5683
5700
  share?: boolean | undefined;
5684
5701
  create?: boolean | undefined;
5702
+ snapshotFiles?: boolean | undefined;
5685
5703
  } | undefined;
5686
5704
  }, {
5687
5705
  agents?: boolean | {
@@ -5756,6 +5774,7 @@ export declare const configSchema: z.ZodObject<{
5756
5774
  use?: boolean | undefined;
5757
5775
  } | undefined;
5758
5776
  fileCitations?: boolean | undefined;
5777
+ defaultPinnedTools?: string[] | undefined;
5759
5778
  buildInfo?: boolean | undefined;
5760
5779
  remoteAgents?: {
5761
5780
  public?: boolean | undefined;
@@ -5767,6 +5786,7 @@ export declare const configSchema: z.ZodObject<{
5767
5786
  public?: boolean | undefined;
5768
5787
  share?: boolean | undefined;
5769
5788
  create?: boolean | undefined;
5789
+ snapshotFiles?: boolean | undefined;
5770
5790
  } | undefined;
5771
5791
  }>>;
5772
5792
  turnstile: z.ZodOptional<z.ZodObject<{
@@ -10246,6 +10266,7 @@ export declare const configSchema: z.ZodObject<{
10246
10266
  use?: boolean | undefined;
10247
10267
  } | undefined;
10248
10268
  fileCitations?: boolean | undefined;
10269
+ defaultPinnedTools?: string[] | undefined;
10249
10270
  buildInfo?: boolean | undefined;
10250
10271
  remoteAgents?: {
10251
10272
  public?: boolean | undefined;
@@ -10257,6 +10278,7 @@ export declare const configSchema: z.ZodObject<{
10257
10278
  public?: boolean | undefined;
10258
10279
  share?: boolean | undefined;
10259
10280
  create?: boolean | undefined;
10281
+ snapshotFiles?: boolean | undefined;
10260
10282
  } | undefined;
10261
10283
  };
10262
10284
  fileStrategy: FileSources.local | FileSources.firebase | FileSources.azure_blob | FileSources.s3 | FileSources.cloudfront;
@@ -11946,6 +11968,7 @@ export declare const configSchema: z.ZodObject<{
11946
11968
  use?: boolean | undefined;
11947
11969
  } | undefined;
11948
11970
  fileCitations?: boolean | undefined;
11971
+ defaultPinnedTools?: string[] | undefined;
11949
11972
  buildInfo?: boolean | undefined;
11950
11973
  remoteAgents?: {
11951
11974
  public?: boolean | undefined;
@@ -11957,6 +11980,7 @@ export declare const configSchema: z.ZodObject<{
11957
11980
  public?: boolean | undefined;
11958
11981
  share?: boolean | undefined;
11959
11982
  create?: boolean | undefined;
11983
+ snapshotFiles?: boolean | undefined;
11960
11984
  } | undefined;
11961
11985
  } | undefined;
11962
11986
  turnstile?: {
@@ -13989,6 +14013,8 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
13989
14013
  }>>;
13990
14014
  fileSearch: z.ZodOptional<z.ZodBoolean>;
13991
14015
  fileCitations: z.ZodOptional<z.ZodBoolean>;
14016
+ /** Tool keys (and `'mcp'` or an MCP server name) pinned to the prompt bar by default */
14017
+ defaultPinnedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13992
14018
  buildInfo: z.ZodOptional<z.ZodBoolean>;
13993
14019
  remoteAgents: z.ZodOptional<z.ZodObject<{
13994
14020
  use: z.ZodOptional<z.ZodBoolean>;
@@ -14029,14 +14055,17 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
14029
14055
  create: z.ZodOptional<z.ZodBoolean>;
14030
14056
  share: z.ZodOptional<z.ZodBoolean>;
14031
14057
  public: z.ZodOptional<z.ZodBoolean>;
14058
+ snapshotFiles: z.ZodOptional<z.ZodBoolean>;
14032
14059
  }, "strip", z.ZodTypeAny, {
14033
14060
  public?: boolean | undefined;
14034
14061
  share?: boolean | undefined;
14035
14062
  create?: boolean | undefined;
14063
+ snapshotFiles?: boolean | undefined;
14036
14064
  }, {
14037
14065
  public?: boolean | undefined;
14038
14066
  share?: boolean | undefined;
14039
14067
  create?: boolean | undefined;
14068
+ snapshotFiles?: boolean | undefined;
14040
14069
  }>]>>;
14041
14070
  }, "strip", z.ZodTypeAny, {
14042
14071
  retentionMode: RetentionMode;
@@ -14111,6 +14140,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
14111
14140
  use?: boolean | undefined;
14112
14141
  } | undefined;
14113
14142
  fileCitations?: boolean | undefined;
14143
+ defaultPinnedTools?: string[] | undefined;
14114
14144
  buildInfo?: boolean | undefined;
14115
14145
  remoteAgents?: {
14116
14146
  public?: boolean | undefined;
@@ -14122,6 +14152,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
14122
14152
  public?: boolean | undefined;
14123
14153
  share?: boolean | undefined;
14124
14154
  create?: boolean | undefined;
14155
+ snapshotFiles?: boolean | undefined;
14125
14156
  } | undefined;
14126
14157
  }, {
14127
14158
  agents?: boolean | {
@@ -14196,6 +14227,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
14196
14227
  use?: boolean | undefined;
14197
14228
  } | undefined;
14198
14229
  fileCitations?: boolean | undefined;
14230
+ defaultPinnedTools?: string[] | undefined;
14199
14231
  buildInfo?: boolean | undefined;
14200
14232
  remoteAgents?: {
14201
14233
  public?: boolean | undefined;
@@ -14207,6 +14239,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
14207
14239
  public?: boolean | undefined;
14208
14240
  share?: boolean | undefined;
14209
14241
  create?: boolean | undefined;
14242
+ snapshotFiles?: boolean | undefined;
14210
14243
  } | undefined;
14211
14244
  }>>;
14212
14245
  turnstile: z.ZodOptional<z.ZodObject<{
@@ -31,8 +31,8 @@ export declare function updateSkillStates(skillStates: sk.TSkillStatesResponse):
31
31
  export declare function getSharedMessages(shareId: string): Promise<t.TSharedMessagesResponse>;
32
32
  export declare const listSharedLinks: (params: q.SharedLinksListParams) => Promise<q.SharedLinksResponse>;
33
33
  export declare function getSharedLink(conversationId: string): Promise<t.TSharedLinkGetResponse>;
34
- export declare function createSharedLink(conversationId: string, targetMessageId?: string): Promise<t.TSharedLinkResponse>;
35
- export declare function updateSharedLink(shareId: string, targetMessageId?: string): Promise<t.TSharedLinkResponse>;
34
+ export declare function createSharedLink(conversationId: string, targetMessageId?: string, snapshotFiles?: boolean): Promise<t.TSharedLinkResponse>;
35
+ export declare function updateSharedLink(shareId: string, targetMessageId?: string, snapshotFiles?: boolean): Promise<t.TSharedLinkResponse>;
36
36
  export declare function deleteSharedLink(shareId: string): Promise<m.TDeleteSharedLinkResponse>;
37
37
  export declare function updateUserKey(payload: t.TUpdateUserKeyRequest): Promise<any>;
38
38
  export declare function getAgentApiKeys(): Promise<t.TAgentApiKeyListResponse>;
@@ -122,6 +122,8 @@ export declare const getFiles: () => Promise<f.TFile[]>;
122
122
  * polls while `status === 'pending'` and stops on terminal status.
123
123
  */
124
124
  export declare const getFilePreview: (fileId: string) => Promise<f.TFilePreview>;
125
+ /** Preview status for a snapshotted file served through a shared link. */
126
+ export declare const getSharedFilePreview: (shareId: string, fileId: string) => Promise<f.TFilePreview>;
125
127
  export declare const getAgentFiles: (agentId: string) => Promise<f.TFile[]>;
126
128
  export declare const getFileConfig: () => Promise<TFileConfig>;
127
129
  export declare const uploadImage: (data: FormData, signal?: AbortSignal | null) => Promise<f.TFileUpload>;
@@ -211,6 +213,8 @@ export declare const uploadAssistantAvatar: (data: m.AssistantAvatarVariables) =
211
213
  export declare const uploadAgentAvatar: (data: m.AgentAvatarVariables) => Promise<a.Agent>;
212
214
  export declare const getFileDownload: (userId: string, file_id: string) => Promise<AxiosResponse>;
213
215
  export declare const getFileDownloadURL: (userId: string, file_id: string) => Promise<f.FileDownloadURLResponse>;
216
+ /** Blob download for a snapshotted file served through a shared link. */
217
+ export declare const getSharedFileDownload: (shareId: string, file_id: string) => Promise<AxiosResponse>;
214
218
  export declare const getCodeOutputDownload: (url: string) => Promise<AxiosResponse>;
215
219
  export declare const deleteFiles: (payload: {
216
220
  files: f.BatchFile[];
@@ -25,7 +25,7 @@ export * from './types/graph';
25
25
  export * from './accessPermissions';
26
26
  export * from './keys';
27
27
  export * from './headers-helpers';
28
- export { loginPage, registerPage, apiBaseUrl, buildLoginRedirectUrl } from './api-endpoints';
28
+ export { loginPage, registerPage, apiBaseUrl, sharedFileDownload, buildLoginRedirectUrl, } from './api-endpoints';
29
29
  export { default as request } from './request';
30
30
  export { dataService };
31
31
  import * as dataService from './data-service';
@@ -877,6 +877,14 @@ export declare const tMessageSchema: z.ZodObject<{
877
877
  * what actually ran, not the current catalog).
878
878
  */
879
879
  alwaysAppliedSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
880
+ /**
881
+ * Verbatim excerpts the user quoted (via the "Add to chat" selection
882
+ * popup) to reference on this turn. UI metadata that `MessageQuotes`
883
+ * renders above the user bubble so the references persist on reload. The
884
+ * excerpts are merged into the user message text sent to the model at
885
+ * request time and counted in the user message token count.
886
+ */
887
+ quotes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
880
888
  }, "strip", z.ZodTypeAny, {
881
889
  conversationId: string | null;
882
890
  title: string | null;
@@ -917,6 +925,7 @@ export declare const tMessageSchema: z.ZodObject<{
917
925
  } | undefined;
918
926
  manualSkills?: string[] | undefined;
919
927
  alwaysAppliedSkills?: string[] | undefined;
928
+ quotes?: string[] | undefined;
920
929
  }, {
921
930
  conversationId: string | null;
922
931
  parentMessageId: string | null;
@@ -957,6 +966,7 @@ export declare const tMessageSchema: z.ZodObject<{
957
966
  } | undefined;
958
967
  manualSkills?: string[] | undefined;
959
968
  alwaysAppliedSkills?: string[] | undefined;
969
+ quotes?: string[] | undefined;
960
970
  }>;
961
971
  export type MemoryArtifact = {
962
972
  key: string;
@@ -1,10 +1,10 @@
1
- import * as types from '../types';
2
- import * as r from '../roles';
3
- import * as p from '../permissions';
4
- import { Tools, Assistant, AssistantCreateParams, AssistantUpdateParams, FunctionTool, AssistantDocument, Agent, AgentCreateParams, AgentUpdateParams } from './assistants';
5
- import { Action, ActionMetadata } from './agents';
6
1
  import type { InfiniteData, QueryKey } from '@tanstack/react-query';
7
2
  import type { TSkill, TSkillFile, TCreateSkill, TUpdateSkillVariables, TUpdateSkillResponse, TDeleteSkillResponse, TUploadSkillFileVariables, TDeleteSkillFileVariables, TDeleteSkillFileResponse, TSkillListResponse } from './skills';
3
+ import { Tools, Assistant, AssistantCreateParams, AssistantUpdateParams, FunctionTool, AssistantDocument, Agent, AgentCreateParams, AgentUpdateParams } from './assistants';
4
+ import { Action, ActionMetadata } from './agents';
5
+ import * as p from '../permissions';
6
+ import * as types from '../types';
7
+ import * as r from '../roles';
8
8
  export type MutationOptions<Response, Request, Context = unknown, Error = unknown, Snapshot = void> = {
9
9
  onSuccess?: (data: Response, variables: Request, context?: Context) => void;
10
10
  onMutate?: (variables: Request) => Snapshot | Promise<Snapshot>;
@@ -255,6 +255,8 @@ export type TSharedLinkResponse = Pick<TSharedLink, 'shareId'> & Pick<TSharedLin
255
255
  export type TSharedLinkGetResponse = Omit<TSharedLinkResponse, 'shareId'> & {
256
256
  shareId: string | null;
257
257
  success: boolean;
258
+ /** Per-link "share files" choice; absent on legacy links (treated as enabled). */
259
+ snapshotFiles?: boolean;
258
260
  };
259
261
  export type TConversationTagsResponse = TConversationTag[];
260
262
  export type TConversationTagRequest = Partial<Omit<TConversationTag, 'createdAt' | 'updatedAt' | 'count' | 'user'>> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "librechat-data-provider",
3
- "version": "0.8.507",
3
+ "version": "0.8.508",
4
4
  "description": "data services for librechat apps",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",