librechat-data-provider 0.8.503 → 0.8.504

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 (48) hide show
  1. package/dist/data-service-BFGYAHRx.mjs +6519 -0
  2. package/dist/data-service-BFGYAHRx.mjs.map +1 -0
  3. package/dist/data-service-Dk-uLruo.js +8518 -0
  4. package/dist/data-service-Dk-uLruo.js.map +1 -0
  5. package/dist/index.js +6592 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +6161 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/dist/react-query/index.js +361 -0
  10. package/dist/react-query/index.js.map +1 -0
  11. package/dist/react-query/index.mjs +326 -0
  12. package/dist/react-query/index.mjs.map +1 -0
  13. package/dist/types/accessPermissions.d.ts +13 -10
  14. package/dist/types/actions.d.ts +2 -2
  15. package/dist/types/api-endpoints.d.ts +17 -9
  16. package/dist/types/bedrock.d.ts +252 -212
  17. package/dist/types/config.d.ts +4208 -2629
  18. package/dist/types/data-service.d.ts +23 -6
  19. package/dist/types/file-config.d.ts +12 -12
  20. package/dist/types/generate.d.ts +64 -53
  21. package/dist/types/keys.d.ts +7 -0
  22. package/dist/types/limits.d.ts +2 -0
  23. package/dist/types/mcp.d.ts +489 -210
  24. package/dist/types/models.d.ts +325 -206
  25. package/dist/types/parsers.d.ts +8 -8
  26. package/dist/types/permissions.d.ts +65 -9
  27. package/dist/types/react-query/react-query-service.d.ts +1 -31
  28. package/dist/types/request.d.ts +1 -1
  29. package/dist/types/roles.d.ts +52 -0
  30. package/dist/types/schemas.d.ts +386 -161
  31. package/dist/types/types/agents.d.ts +15 -1
  32. package/dist/types/types/files.d.ts +1 -1
  33. package/dist/types/types/queries.d.ts +16 -3
  34. package/dist/types/types/skills.d.ts +72 -9
  35. package/dist/types/types.d.ts +40 -3
  36. package/package.json +11 -13
  37. package/dist/index.es.js +0 -2
  38. package/dist/index.es.js.map +0 -1
  39. package/dist/react-query/index.es.js +0 -2
  40. package/dist/react-query/index.es.js.map +0 -1
  41. package/dist/types/balance.spec.d.ts +0 -1
  42. package/dist/types/cloudfront-config.spec.d.ts +0 -1
  43. package/dist/types/codeEnvRef.spec.d.ts +0 -1
  44. package/dist/types/config.spec.d.ts +0 -1
  45. package/dist/types/file-config.spec.d.ts +0 -1
  46. package/dist/types/parameterSettings.spec.d.ts +0 -1
  47. package/dist/types/roles.spec.d.ts +0 -1
  48. package/dist/types/schemas.spec.d.ts +0 -1
@@ -17,19 +17,19 @@ export type TPossibleValues = {
17
17
  };
18
18
  export declare const parseConvo: ({ endpoint, endpointType, conversation, possibleValues, defaultParamsEndpoint, }: {
19
19
  endpoint: EndpointSchemaKey;
20
- endpointType?: s.EModelEndpoint | null | undefined;
20
+ endpointType?: EndpointSchemaKey | null;
21
21
  conversation: Partial<s.TConversation | s.TPreset> | null;
22
- possibleValues?: TPossibleValues | undefined;
23
- defaultParamsEndpoint?: string | null | undefined;
22
+ possibleValues?: TPossibleValues;
23
+ defaultParamsEndpoint?: string | null;
24
24
  }) => s.TConversation | undefined;
25
25
  export declare const getResponseSender: (endpointOption: Partial<t.TEndpointOption>) => string;
26
26
  export declare const parseCompactConvo: ({ endpoint, endpointType, conversation, possibleValues, defaultParamsEndpoint, }: {
27
- endpoint?: s.EModelEndpoint | undefined;
28
- endpointType?: s.EModelEndpoint | null | undefined;
27
+ endpoint?: EndpointSchemaKey;
28
+ endpointType?: EndpointSchemaKey | null;
29
29
  conversation: Partial<s.TConversation | s.TPreset>;
30
- possibleValues?: TPossibleValues | undefined;
31
- defaultParamsEndpoint?: string | null | undefined;
32
- }) => Omit<s.TConversation, 'iconURL'> | null;
30
+ possibleValues?: TPossibleValues;
31
+ defaultParamsEndpoint?: string | null;
32
+ }) => Omit<s.TConversation, "iconURL"> | null;
33
33
  export declare function parseTextParts(contentParts: Array<a.TMessageContentParts | undefined>, skipReasoning?: boolean): string;
34
34
  export declare const SEPARATORS: string[];
35
35
  export declare function findLastSeparatorIndex(text: string, separators?: string[]): number;
@@ -62,7 +62,11 @@ export declare enum PermissionTypes {
62
62
  /**
63
63
  * Type for Skill Permissions
64
64
  */
65
- SKILLS = "SKILLS"
65
+ SKILLS = "SKILLS",
66
+ /**
67
+ * Type for Shared Link Permissions
68
+ */
69
+ SHARED_LINKS = "SHARED_LINKS"
66
70
  }
67
71
  /**
68
72
  * Maps PermissionTypes to their corresponding `interface` config field names.
@@ -78,13 +82,14 @@ export declare const INTERFACE_PERMISSION_FIELDS: Set<string>;
78
82
  * DB overrides — other sub-keys (like `placeholder`, `trustCheckbox`) are UI-only and pass through.
79
83
  *
80
84
  * Mapping to Permissions enum:
81
- * 'use' → Permissions.USE (agents, prompts, mcpServers, remoteAgents, marketplace)
82
- * 'create' → Permissions.CREATE (agents, prompts, mcpServers, remoteAgents)
83
- * 'share' → Permissions.SHARE (agents, prompts, mcpServers, remoteAgents)
84
- * 'public' → Permissions.SHARE_PUBLIC (agents, prompts, mcpServers, remoteAgents)
85
- * 'users' → Permissions.VIEW_USERS (peoplePicker only)
86
- * 'groups' → Permissions.VIEW_GROUPS (peoplePicker only)
87
- * 'roles' → Permissions.VIEW_ROLES (peoplePicker only)
85
+ * 'use' → Permissions.USE (agents, prompts, mcpServers, remoteAgents, marketplace)
86
+ * 'create' → Permissions.CREATE (agents, prompts, mcpServers, remoteAgents)
87
+ * 'share' → Permissions.SHARE (agents, prompts, mcpServers, remoteAgents)
88
+ * 'public' → Permissions.SHARE_PUBLIC (agents, prompts, mcpServers, remoteAgents)
89
+ * 'users' → Permissions.VIEW_USERS (peoplePicker only)
90
+ * 'groups' → Permissions.VIEW_GROUPS (peoplePicker only)
91
+ * 'roles' → Permissions.VIEW_ROLES (peoplePicker only)
92
+ * 'configureObo' → Permissions.CONFIGURE_OBO (mcpServers only)
88
93
  */
89
94
  export declare const PERMISSION_SUB_KEYS: Set<string>;
90
95
  /**
@@ -103,7 +108,13 @@ export declare enum Permissions {
103
108
  VIEW_GROUPS = "VIEW_GROUPS",
104
109
  VIEW_ROLES = "VIEW_ROLES",
105
110
  /** Can share resources publicly (with everyone) */
106
- SHARE_PUBLIC = "SHARE_PUBLIC"
111
+ SHARE_PUBLIC = "SHARE_PUBLIC",
112
+ /**
113
+ * Can configure MCP server On-Behalf-Of (OBO) token exchange. Gates the
114
+ * `obo` field on MCP server configs because OBO silently mints and forwards
115
+ * per-user delegated tokens to whatever URL the server points at.
116
+ */
117
+ CONFIGURE_OBO = "CONFIGURE_OBO"
107
118
  }
108
119
  export declare const promptPermissionsSchema: z.ZodObject<{
109
120
  USE: z.ZodDefault<z.ZodBoolean>;
@@ -242,16 +253,19 @@ export declare const mcpServersPermissionsSchema: z.ZodObject<{
242
253
  CREATE: z.ZodDefault<z.ZodBoolean>;
243
254
  SHARE: z.ZodDefault<z.ZodBoolean>;
244
255
  SHARE_PUBLIC: z.ZodDefault<z.ZodBoolean>;
256
+ CONFIGURE_OBO: z.ZodDefault<z.ZodBoolean>;
245
257
  }, "strip", z.ZodTypeAny, {
246
258
  USE: boolean;
247
259
  CREATE: boolean;
248
260
  SHARE: boolean;
249
261
  SHARE_PUBLIC: boolean;
262
+ CONFIGURE_OBO: boolean;
250
263
  }, {
251
264
  USE?: boolean | undefined;
252
265
  CREATE?: boolean | undefined;
253
266
  SHARE?: boolean | undefined;
254
267
  SHARE_PUBLIC?: boolean | undefined;
268
+ CONFIGURE_OBO?: boolean | undefined;
255
269
  }>;
256
270
  export type TMcpServersPermissions = z.infer<typeof mcpServersPermissionsSchema>;
257
271
  export declare const remoteAgentsPermissionsSchema: z.ZodObject<{
@@ -288,6 +302,20 @@ export declare const skillPermissionsSchema: z.ZodObject<{
288
302
  SHARE_PUBLIC?: boolean | undefined;
289
303
  }>;
290
304
  export type TSkillPermissions = z.infer<typeof skillPermissionsSchema>;
305
+ export declare const sharedLinksPermissionsSchema: z.ZodObject<{
306
+ CREATE: z.ZodDefault<z.ZodBoolean>;
307
+ SHARE: z.ZodDefault<z.ZodBoolean>;
308
+ SHARE_PUBLIC: z.ZodDefault<z.ZodBoolean>;
309
+ }, "strip", z.ZodTypeAny, {
310
+ CREATE: boolean;
311
+ SHARE: boolean;
312
+ SHARE_PUBLIC: boolean;
313
+ }, {
314
+ CREATE?: boolean | undefined;
315
+ SHARE?: boolean | undefined;
316
+ SHARE_PUBLIC?: boolean | undefined;
317
+ }>;
318
+ export type TSharedLinksPermissions = z.infer<typeof sharedLinksPermissionsSchema>;
291
319
  export declare const permissionsSchema: z.ZodObject<{
292
320
  PROMPTS: z.ZodObject<{
293
321
  USE: z.ZodDefault<z.ZodBoolean>;
@@ -414,16 +442,19 @@ export declare const permissionsSchema: z.ZodObject<{
414
442
  CREATE: z.ZodDefault<z.ZodBoolean>;
415
443
  SHARE: z.ZodDefault<z.ZodBoolean>;
416
444
  SHARE_PUBLIC: z.ZodDefault<z.ZodBoolean>;
445
+ CONFIGURE_OBO: z.ZodDefault<z.ZodBoolean>;
417
446
  }, "strip", z.ZodTypeAny, {
418
447
  USE: boolean;
419
448
  CREATE: boolean;
420
449
  SHARE: boolean;
421
450
  SHARE_PUBLIC: boolean;
451
+ CONFIGURE_OBO: boolean;
422
452
  }, {
423
453
  USE?: boolean | undefined;
424
454
  CREATE?: boolean | undefined;
425
455
  SHARE?: boolean | undefined;
426
456
  SHARE_PUBLIC?: boolean | undefined;
457
+ CONFIGURE_OBO?: boolean | undefined;
427
458
  }>;
428
459
  REMOTE_AGENTS: z.ZodObject<{
429
460
  USE: z.ZodDefault<z.ZodBoolean>;
@@ -457,6 +488,19 @@ export declare const permissionsSchema: z.ZodObject<{
457
488
  SHARE?: boolean | undefined;
458
489
  SHARE_PUBLIC?: boolean | undefined;
459
490
  }>;
491
+ SHARED_LINKS: z.ZodObject<{
492
+ CREATE: z.ZodDefault<z.ZodBoolean>;
493
+ SHARE: z.ZodDefault<z.ZodBoolean>;
494
+ SHARE_PUBLIC: z.ZodDefault<z.ZodBoolean>;
495
+ }, "strip", z.ZodTypeAny, {
496
+ CREATE: boolean;
497
+ SHARE: boolean;
498
+ SHARE_PUBLIC: boolean;
499
+ }, {
500
+ CREATE?: boolean | undefined;
501
+ SHARE?: boolean | undefined;
502
+ SHARE_PUBLIC?: boolean | undefined;
503
+ }>;
460
504
  }, "strip", z.ZodTypeAny, {
461
505
  PROMPTS: {
462
506
  USE: boolean;
@@ -511,6 +555,7 @@ export declare const permissionsSchema: z.ZodObject<{
511
555
  CREATE: boolean;
512
556
  SHARE: boolean;
513
557
  SHARE_PUBLIC: boolean;
558
+ CONFIGURE_OBO: boolean;
514
559
  };
515
560
  REMOTE_AGENTS: {
516
561
  USE: boolean;
@@ -524,6 +569,11 @@ export declare const permissionsSchema: z.ZodObject<{
524
569
  SHARE: boolean;
525
570
  SHARE_PUBLIC: boolean;
526
571
  };
572
+ SHARED_LINKS: {
573
+ CREATE: boolean;
574
+ SHARE: boolean;
575
+ SHARE_PUBLIC: boolean;
576
+ };
527
577
  }, {
528
578
  PROMPTS: {
529
579
  USE?: boolean | undefined;
@@ -578,6 +628,7 @@ export declare const permissionsSchema: z.ZodObject<{
578
628
  CREATE?: boolean | undefined;
579
629
  SHARE?: boolean | undefined;
580
630
  SHARE_PUBLIC?: boolean | undefined;
631
+ CONFIGURE_OBO?: boolean | undefined;
581
632
  };
582
633
  REMOTE_AGENTS: {
583
634
  USE?: boolean | undefined;
@@ -591,4 +642,9 @@ export declare const permissionsSchema: z.ZodObject<{
591
642
  SHARE?: boolean | undefined;
592
643
  SHARE_PUBLIC?: boolean | undefined;
593
644
  };
645
+ SHARED_LINKS: {
646
+ CREATE?: boolean | undefined;
647
+ SHARE?: boolean | undefined;
648
+ SHARE_PUBLIC?: boolean | undefined;
649
+ };
594
650
  }>;
@@ -27,37 +27,7 @@ export declare const useRegisterUserMutation: (options?: m.RegistrationOptions)
27
27
  export declare const useUserKeyQuery: (name: string, config?: UseQueryOptions<t.TCheckUserKeyResponse>) => QueryObserverResult<t.TCheckUserKeyResponse>;
28
28
  export declare const useRequestPasswordResetMutation: () => UseMutationResult<t.TRequestPasswordResetResponse, unknown, t.TRequestPasswordReset, unknown>;
29
29
  export declare const useResetPasswordMutation: () => UseMutationResult<unknown, unknown, t.TResetPassword, unknown>;
30
- export declare const useAvailablePluginsQuery: <TData = {
31
- name: string;
32
- pluginKey: string;
33
- description?: string | undefined;
34
- icon?: string | undefined;
35
- authConfig?: {
36
- description: string;
37
- authField: string;
38
- label: string;
39
- optional?: boolean | undefined;
40
- }[] | undefined;
41
- authenticated?: boolean | undefined;
42
- chatMenu?: boolean | undefined;
43
- isButton?: boolean | undefined;
44
- toolkit?: boolean | undefined;
45
- }[]>(config?: UseQueryOptions<{
46
- name: string;
47
- pluginKey: string;
48
- description?: string | undefined;
49
- icon?: string | undefined;
50
- authConfig?: {
51
- description: string;
52
- authField: string;
53
- label: string;
54
- optional?: boolean | undefined;
55
- }[] | undefined;
56
- authenticated?: boolean | undefined;
57
- chatMenu?: boolean | undefined;
58
- isButton?: boolean | undefined;
59
- toolkit?: boolean | undefined;
60
- }[], unknown, TData, import("@tanstack/react-query").QueryKey> | undefined) => QueryObserverResult<TData>;
30
+ export declare const useAvailablePluginsQuery: <TData = s.TPlugin[]>(config?: UseQueryOptions<s.TPlugin[], unknown, TData>) => QueryObserverResult<TData>;
61
31
  export declare const useUpdateUserPluginsMutation: (_options?: m.UpdatePluginAuthOptions) => UseMutationResult<t.TUser, unknown, t.TUpdateUserPlugins, unknown>;
62
32
  export declare const useReinitializeMCPServerMutation: () => UseMutationResult<{
63
33
  success: boolean;
@@ -19,7 +19,7 @@ declare const _default: {
19
19
  delete: typeof _delete;
20
20
  deleteWithOptions: typeof _deleteWithOptions;
21
21
  patch: typeof _patch;
22
- refreshToken: (retry?: boolean | undefined) => Promise<t.TRefreshTokenResponse | undefined>;
22
+ refreshToken: (retry?: boolean) => Promise<t.TRefreshTokenResponse | undefined>;
23
23
  dispatchTokenUpdatedEvent: (token: string) => void;
24
24
  };
25
25
  export default _default;
@@ -140,16 +140,19 @@ export declare const roleSchema: z.ZodObject<{
140
140
  CREATE: z.ZodDefault<z.ZodBoolean>;
141
141
  SHARE: z.ZodDefault<z.ZodBoolean>;
142
142
  SHARE_PUBLIC: z.ZodDefault<z.ZodBoolean>;
143
+ CONFIGURE_OBO: z.ZodDefault<z.ZodBoolean>;
143
144
  }, "strip", z.ZodTypeAny, {
144
145
  USE: boolean;
145
146
  CREATE: boolean;
146
147
  SHARE: boolean;
147
148
  SHARE_PUBLIC: boolean;
149
+ CONFIGURE_OBO: boolean;
148
150
  }, {
149
151
  USE?: boolean | undefined;
150
152
  CREATE?: boolean | undefined;
151
153
  SHARE?: boolean | undefined;
152
154
  SHARE_PUBLIC?: boolean | undefined;
155
+ CONFIGURE_OBO?: boolean | undefined;
153
156
  }>;
154
157
  REMOTE_AGENTS: z.ZodObject<{
155
158
  USE: z.ZodDefault<z.ZodBoolean>;
@@ -183,6 +186,19 @@ export declare const roleSchema: z.ZodObject<{
183
186
  SHARE?: boolean | undefined;
184
187
  SHARE_PUBLIC?: boolean | undefined;
185
188
  }>;
189
+ SHARED_LINKS: z.ZodObject<{
190
+ CREATE: z.ZodDefault<z.ZodBoolean>;
191
+ SHARE: z.ZodDefault<z.ZodBoolean>;
192
+ SHARE_PUBLIC: z.ZodDefault<z.ZodBoolean>;
193
+ }, "strip", z.ZodTypeAny, {
194
+ CREATE: boolean;
195
+ SHARE: boolean;
196
+ SHARE_PUBLIC: boolean;
197
+ }, {
198
+ CREATE?: boolean | undefined;
199
+ SHARE?: boolean | undefined;
200
+ SHARE_PUBLIC?: boolean | undefined;
201
+ }>;
186
202
  }, "strip", z.ZodTypeAny, {
187
203
  PROMPTS: {
188
204
  USE: boolean;
@@ -237,6 +253,7 @@ export declare const roleSchema: z.ZodObject<{
237
253
  CREATE: boolean;
238
254
  SHARE: boolean;
239
255
  SHARE_PUBLIC: boolean;
256
+ CONFIGURE_OBO: boolean;
240
257
  };
241
258
  REMOTE_AGENTS: {
242
259
  USE: boolean;
@@ -250,6 +267,11 @@ export declare const roleSchema: z.ZodObject<{
250
267
  SHARE: boolean;
251
268
  SHARE_PUBLIC: boolean;
252
269
  };
270
+ SHARED_LINKS: {
271
+ CREATE: boolean;
272
+ SHARE: boolean;
273
+ SHARE_PUBLIC: boolean;
274
+ };
253
275
  }, {
254
276
  PROMPTS: {
255
277
  USE?: boolean | undefined;
@@ -304,6 +326,7 @@ export declare const roleSchema: z.ZodObject<{
304
326
  CREATE?: boolean | undefined;
305
327
  SHARE?: boolean | undefined;
306
328
  SHARE_PUBLIC?: boolean | undefined;
329
+ CONFIGURE_OBO?: boolean | undefined;
307
330
  };
308
331
  REMOTE_AGENTS: {
309
332
  USE?: boolean | undefined;
@@ -317,6 +340,11 @@ export declare const roleSchema: z.ZodObject<{
317
340
  SHARE?: boolean | undefined;
318
341
  SHARE_PUBLIC?: boolean | undefined;
319
342
  };
343
+ SHARED_LINKS: {
344
+ CREATE?: boolean | undefined;
345
+ SHARE?: boolean | undefined;
346
+ SHARE_PUBLIC?: boolean | undefined;
347
+ };
320
348
  }>;
321
349
  }, "strip", z.ZodTypeAny, {
322
350
  name: string;
@@ -374,6 +402,7 @@ export declare const roleSchema: z.ZodObject<{
374
402
  CREATE: boolean;
375
403
  SHARE: boolean;
376
404
  SHARE_PUBLIC: boolean;
405
+ CONFIGURE_OBO: boolean;
377
406
  };
378
407
  REMOTE_AGENTS: {
379
408
  USE: boolean;
@@ -387,6 +416,11 @@ export declare const roleSchema: z.ZodObject<{
387
416
  SHARE: boolean;
388
417
  SHARE_PUBLIC: boolean;
389
418
  };
419
+ SHARED_LINKS: {
420
+ CREATE: boolean;
421
+ SHARE: boolean;
422
+ SHARE_PUBLIC: boolean;
423
+ };
390
424
  };
391
425
  }, {
392
426
  name: string;
@@ -444,6 +478,7 @@ export declare const roleSchema: z.ZodObject<{
444
478
  CREATE?: boolean | undefined;
445
479
  SHARE?: boolean | undefined;
446
480
  SHARE_PUBLIC?: boolean | undefined;
481
+ CONFIGURE_OBO?: boolean | undefined;
447
482
  };
448
483
  REMOTE_AGENTS: {
449
484
  USE?: boolean | undefined;
@@ -457,6 +492,11 @@ export declare const roleSchema: z.ZodObject<{
457
492
  SHARE?: boolean | undefined;
458
493
  SHARE_PUBLIC?: boolean | undefined;
459
494
  };
495
+ SHARED_LINKS: {
496
+ CREATE?: boolean | undefined;
497
+ SHARE?: boolean | undefined;
498
+ SHARE_PUBLIC?: boolean | undefined;
499
+ };
460
500
  };
461
501
  }>;
462
502
  export type TRole = z.infer<typeof roleSchema>;
@@ -519,6 +559,7 @@ export declare const roleDefaults: {
519
559
  CREATE: boolean;
520
560
  SHARE: boolean;
521
561
  SHARE_PUBLIC: boolean;
562
+ CONFIGURE_OBO: boolean;
522
563
  };
523
564
  REMOTE_AGENTS: {
524
565
  USE: boolean;
@@ -532,6 +573,11 @@ export declare const roleDefaults: {
532
573
  SHARE: boolean;
533
574
  SHARE_PUBLIC: boolean;
534
575
  };
576
+ SHARED_LINKS: {
577
+ CREATE: boolean;
578
+ SHARE: boolean;
579
+ SHARE_PUBLIC: boolean;
580
+ };
535
581
  };
536
582
  };
537
583
  USER: {
@@ -590,6 +636,7 @@ export declare const roleDefaults: {
590
636
  CREATE: boolean;
591
637
  SHARE: boolean;
592
638
  SHARE_PUBLIC: boolean;
639
+ CONFIGURE_OBO: boolean;
593
640
  };
594
641
  REMOTE_AGENTS: {
595
642
  USE: boolean;
@@ -603,6 +650,11 @@ export declare const roleDefaults: {
603
650
  SHARE: boolean;
604
651
  SHARE_PUBLIC: boolean;
605
652
  };
653
+ SHARED_LINKS: {
654
+ CREATE: boolean;
655
+ SHARE: boolean;
656
+ SHARE_PUBLIC: boolean;
657
+ };
606
658
  };
607
659
  };
608
660
  };