librechat-data-provider 0.8.522 → 0.8.524

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 (57) hide show
  1. package/dist/{data-service-CaB7saTP.mjs → data-service-B-WUVvTH.mjs} +1044 -173
  2. package/dist/data-service-B-WUVvTH.mjs.map +1 -0
  3. package/dist/{data-service-D5kHzBt-.js → data-service-CUG1qdeC.js} +1426 -207
  4. package/dist/data-service-CUG1qdeC.js.map +1 -0
  5. package/dist/index.js +886 -74
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +780 -70
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react-query/index.js +1 -1
  10. package/dist/react-query/index.mjs +1 -1
  11. package/dist/types/accessPermissions.d.ts +54 -1
  12. package/dist/types/actions.d.ts +1 -1
  13. package/dist/types/agentToolOptions.d.ts +1 -1
  14. package/dist/types/api-endpoints.d.ts +7 -0
  15. package/dist/types/backgroundResults.d.ts +13 -0
  16. package/dist/types/balance.d.ts +4 -0
  17. package/dist/types/bedrock.d.ts +132 -65
  18. package/dist/types/code/approval.d.ts +26 -0
  19. package/dist/types/code/worker.d.ts +10 -0
  20. package/dist/types/code/workspace.d.ts +50 -0
  21. package/dist/types/codeEnvRef.d.ts +5 -0
  22. package/dist/types/config.d.ts +5859 -2469
  23. package/dist/types/data-service.d.ts +22 -12
  24. package/dist/types/errors.d.ts +2 -0
  25. package/dist/types/file-config.d.ts +179 -12
  26. package/dist/types/filters.d.ts +97 -97
  27. package/dist/types/footer.d.ts +20 -0
  28. package/dist/types/generate.d.ts +48 -24
  29. package/dist/types/index.d.ts +11 -0
  30. package/dist/types/keys.d.ts +13 -2
  31. package/dist/types/limits.d.ts +8 -0
  32. package/dist/types/mcp.d.ts +683 -30
  33. package/dist/types/messages.d.ts +25 -1
  34. package/dist/types/models.d.ts +312 -183
  35. package/dist/types/parameterSettings.d.ts +10 -1
  36. package/dist/types/parsers.d.ts +25 -1
  37. package/dist/types/providers.d.ts +1 -0
  38. package/dist/types/resolve-llm-delivery-path.d.ts +161 -0
  39. package/dist/types/schemas.d.ts +771 -457
  40. package/dist/types/svg.d.ts +34 -0
  41. package/dist/types/types/agents.d.ts +257 -2
  42. package/dist/types/types/assistants.d.ts +2 -617
  43. package/dist/types/types/content.d.ts +286 -0
  44. package/dist/types/types/files.d.ts +48 -1
  45. package/dist/types/types/insights.d.ts +9 -0
  46. package/dist/types/types/mutations.d.ts +3 -2
  47. package/dist/types/types/queries.d.ts +8 -1
  48. package/dist/types/types/queuedTurns.d.ts +140 -106
  49. package/dist/types/types/runs.d.ts +33 -5
  50. package/dist/types/types/schedules.d.ts +40 -7
  51. package/dist/types/types/skills.d.ts +43 -0
  52. package/dist/types/types/tools.d.ts +132 -0
  53. package/dist/types/types/traces.d.ts +134 -0
  54. package/dist/types/types.d.ts +72 -2
  55. package/package.json +2 -2
  56. package/dist/data-service-CaB7saTP.mjs.map +0 -1
  57. package/dist/data-service-D5kHzBt-.js.map +0 -1
@@ -1,5 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import { TokenExchangeMethodEnum } from './types/agents';
3
+ /**
4
+ * Upper bound on a stored MCP `iconPath` (URL or data URI). Enforced by
5
+ * `sanitizeMcpIconPath`, not a schema `.max()`, so re-submitting a server whose
6
+ * stored icon predates the cap clears the icon instead of rejecting the update.
7
+ */
8
+ export declare const MAX_MCP_ICON_PATH_LENGTH: number;
9
+ /** Keep persistence admission waits below the shared lease's 15-minute lifetime. */
10
+ export declare const MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS: number;
3
11
  export declare const MCP_SERVER_TITLE_PATTERN: RegExp;
4
12
  export declare const MCP_SERVER_TITLE_ERROR = "Title must start with a letter or number and can include spaces, hyphens, and apostrophes";
5
13
  export declare function isProcessMCPServerField(field: string): boolean;
@@ -22,6 +30,21 @@ export declare const StdioOptionsSchema: z.ZodObject<{
22
30
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
23
31
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
24
32
  initTimeout: z.ZodOptional<z.ZodNumber>;
33
+ /**
34
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
35
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
36
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
37
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
38
+ *
39
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
40
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
41
+ * common case this wait exists to serve. Omit the field to take the default.
42
+ */
43
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
44
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
45
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
46
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
47
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
25
48
  /**
26
49
  * Whether the server is offered in chat.
27
50
  *
@@ -110,6 +133,27 @@ export declare const StdioOptionsSchema: z.ZodObject<{
110
133
  * Ignored when `audience` itself is not configured.
111
134
  */
112
135
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
136
+ /**
137
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
138
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
139
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
140
+ * (RFC 9728), never an operator-supplied string.
141
+ *
142
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
143
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
144
+ * fails an `/authorize` request carrying both `resource` and `scope` with
145
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
146
+ * `audience` above) to obtain an API-scoped token.
147
+ *
148
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
149
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
150
+ * still recorded on the stored client binding, so scope discovery, authorization
151
+ * server discovery and re-authentication checks are unaffected.
152
+ *
153
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
154
+ * from user-managed servers.
155
+ */
156
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
113
157
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
114
158
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
115
159
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -129,6 +173,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
129
173
  skip_code_challenge_check?: boolean | undefined;
130
174
  audience?: string | undefined;
131
175
  forward_audience_on_refresh?: boolean | undefined;
176
+ send_resource_parameter?: boolean | undefined;
132
177
  revocation_endpoint?: string | undefined;
133
178
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
134
179
  }, {
@@ -146,6 +191,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
146
191
  skip_code_challenge_check?: boolean | undefined;
147
192
  audience?: string | undefined;
148
193
  forward_audience_on_refresh?: boolean | undefined;
194
+ send_resource_parameter?: boolean | undefined;
149
195
  revocation_endpoint?: string | undefined;
150
196
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
151
197
  }>, {
@@ -163,6 +209,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
163
209
  skip_code_challenge_check?: boolean | undefined;
164
210
  audience?: string | undefined;
165
211
  forward_audience_on_refresh?: boolean | undefined;
212
+ send_resource_parameter?: boolean | undefined;
166
213
  revocation_endpoint?: string | undefined;
167
214
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
168
215
  }, {
@@ -180,6 +227,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
180
227
  skip_code_challenge_check?: boolean | undefined;
181
228
  audience?: string | undefined;
182
229
  forward_audience_on_refresh?: boolean | undefined;
230
+ send_resource_parameter?: boolean | undefined;
183
231
  revocation_endpoint?: string | undefined;
184
232
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
185
233
  }>>;
@@ -264,12 +312,14 @@ export declare const StdioOptionsSchema: z.ZodObject<{
264
312
  description?: string | undefined;
265
313
  title?: string | undefined;
266
314
  chatMenu?: boolean | undefined;
267
- timeout?: number | undefined;
268
- env?: Record<string, string> | undefined;
269
315
  startup?: boolean | undefined;
270
316
  iconPath?: string | undefined;
317
+ timeout?: number | undefined;
271
318
  sseReadTimeout?: number | undefined;
272
319
  initTimeout?: number | undefined;
320
+ oauthRefreshWaitTimeout?: number | undefined;
321
+ oauthRefreshCoordination?: boolean | undefined;
322
+ oauthPersistenceWaitTimeout?: number | undefined;
273
323
  serverInstructions?: string | boolean | undefined;
274
324
  requiresOAuth?: boolean | undefined;
275
325
  oauth?: {
@@ -287,6 +337,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
287
337
  skip_code_challenge_check?: boolean | undefined;
288
338
  audience?: string | undefined;
289
339
  forward_audience_on_refresh?: boolean | undefined;
340
+ send_resource_parameter?: boolean | undefined;
290
341
  revocation_endpoint?: string | undefined;
291
342
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
292
343
  } | undefined;
@@ -302,6 +353,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
302
353
  title: string;
303
354
  sensitive?: boolean | undefined;
304
355
  }> | undefined;
356
+ env?: Record<string, string> | undefined;
305
357
  cwd?: string | undefined;
306
358
  stderr?: number | "pipe" | "ignore" | "inherit" | undefined;
307
359
  obo?: undefined;
@@ -312,12 +364,14 @@ export declare const StdioOptionsSchema: z.ZodObject<{
312
364
  description?: string | undefined;
313
365
  title?: string | undefined;
314
366
  chatMenu?: boolean | undefined;
315
- timeout?: number | undefined;
316
- env?: Record<string, string> | undefined;
317
367
  startup?: boolean | undefined;
318
368
  iconPath?: string | undefined;
369
+ timeout?: number | undefined;
319
370
  sseReadTimeout?: number | undefined;
320
371
  initTimeout?: number | undefined;
372
+ oauthRefreshWaitTimeout?: number | undefined;
373
+ oauthRefreshCoordination?: boolean | undefined;
374
+ oauthPersistenceWaitTimeout?: number | undefined;
321
375
  serverInstructions?: string | boolean | undefined;
322
376
  requiresOAuth?: boolean | undefined;
323
377
  oauth?: {
@@ -335,6 +389,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
335
389
  skip_code_challenge_check?: boolean | undefined;
336
390
  audience?: string | undefined;
337
391
  forward_audience_on_refresh?: boolean | undefined;
392
+ send_resource_parameter?: boolean | undefined;
338
393
  revocation_endpoint?: string | undefined;
339
394
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
340
395
  } | undefined;
@@ -350,6 +405,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
350
405
  title: string;
351
406
  sensitive?: boolean | undefined;
352
407
  }> | undefined;
408
+ env?: Record<string, string> | undefined;
353
409
  cwd?: string | undefined;
354
410
  stderr?: number | "pipe" | "ignore" | "inherit" | undefined;
355
411
  obo?: undefined;
@@ -371,6 +427,21 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
371
427
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
372
428
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
373
429
  initTimeout: z.ZodOptional<z.ZodNumber>;
430
+ /**
431
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
432
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
433
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
434
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
435
+ *
436
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
437
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
438
+ * common case this wait exists to serve. Omit the field to take the default.
439
+ */
440
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
441
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
442
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
443
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
444
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
374
445
  /**
375
446
  * Whether the server is offered in chat.
376
447
  *
@@ -459,6 +530,27 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
459
530
  * Ignored when `audience` itself is not configured.
460
531
  */
461
532
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
533
+ /**
534
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
535
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
536
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
537
+ * (RFC 9728), never an operator-supplied string.
538
+ *
539
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
540
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
541
+ * fails an `/authorize` request carrying both `resource` and `scope` with
542
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
543
+ * `audience` above) to obtain an API-scoped token.
544
+ *
545
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
546
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
547
+ * still recorded on the stored client binding, so scope discovery, authorization
548
+ * server discovery and re-authentication checks are unaffected.
549
+ *
550
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
551
+ * from user-managed servers.
552
+ */
553
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
462
554
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
463
555
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
464
556
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -478,6 +570,7 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
478
570
  skip_code_challenge_check?: boolean | undefined;
479
571
  audience?: string | undefined;
480
572
  forward_audience_on_refresh?: boolean | undefined;
573
+ send_resource_parameter?: boolean | undefined;
481
574
  revocation_endpoint?: string | undefined;
482
575
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
483
576
  }, {
@@ -495,6 +588,7 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
495
588
  skip_code_challenge_check?: boolean | undefined;
496
589
  audience?: string | undefined;
497
590
  forward_audience_on_refresh?: boolean | undefined;
591
+ send_resource_parameter?: boolean | undefined;
498
592
  revocation_endpoint?: string | undefined;
499
593
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
500
594
  }>, {
@@ -512,6 +606,7 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
512
606
  skip_code_challenge_check?: boolean | undefined;
513
607
  audience?: string | undefined;
514
608
  forward_audience_on_refresh?: boolean | undefined;
609
+ send_resource_parameter?: boolean | undefined;
515
610
  revocation_endpoint?: string | undefined;
516
611
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
517
612
  }, {
@@ -529,6 +624,7 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
529
624
  skip_code_challenge_check?: boolean | undefined;
530
625
  audience?: string | undefined;
531
626
  forward_audience_on_refresh?: boolean | undefined;
627
+ send_resource_parameter?: boolean | undefined;
532
628
  revocation_endpoint?: string | undefined;
533
629
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
534
630
  }>>;
@@ -587,11 +683,14 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
587
683
  description?: string | undefined;
588
684
  title?: string | undefined;
589
685
  chatMenu?: boolean | undefined;
590
- timeout?: number | undefined;
591
686
  startup?: boolean | undefined;
592
687
  iconPath?: string | undefined;
688
+ timeout?: number | undefined;
593
689
  sseReadTimeout?: number | undefined;
594
690
  initTimeout?: number | undefined;
691
+ oauthRefreshWaitTimeout?: number | undefined;
692
+ oauthRefreshCoordination?: boolean | undefined;
693
+ oauthPersistenceWaitTimeout?: number | undefined;
595
694
  serverInstructions?: string | boolean | undefined;
596
695
  requiresOAuth?: boolean | undefined;
597
696
  oauth?: {
@@ -609,6 +708,7 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
609
708
  skip_code_challenge_check?: boolean | undefined;
610
709
  audience?: string | undefined;
611
710
  forward_audience_on_refresh?: boolean | undefined;
711
+ send_resource_parameter?: boolean | undefined;
612
712
  revocation_endpoint?: string | undefined;
613
713
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
614
714
  } | undefined;
@@ -631,11 +731,14 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
631
731
  description?: string | undefined;
632
732
  title?: string | undefined;
633
733
  chatMenu?: boolean | undefined;
634
- timeout?: number | undefined;
635
734
  startup?: boolean | undefined;
636
735
  iconPath?: string | undefined;
736
+ timeout?: number | undefined;
637
737
  sseReadTimeout?: number | undefined;
638
738
  initTimeout?: number | undefined;
739
+ oauthRefreshWaitTimeout?: number | undefined;
740
+ oauthRefreshCoordination?: boolean | undefined;
741
+ oauthPersistenceWaitTimeout?: number | undefined;
639
742
  serverInstructions?: string | boolean | undefined;
640
743
  requiresOAuth?: boolean | undefined;
641
744
  oauth?: {
@@ -653,6 +756,7 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
653
756
  skip_code_challenge_check?: boolean | undefined;
654
757
  audience?: string | undefined;
655
758
  forward_audience_on_refresh?: boolean | undefined;
759
+ send_resource_parameter?: boolean | undefined;
656
760
  revocation_endpoint?: string | undefined;
657
761
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
658
762
  } | undefined;
@@ -687,6 +791,21 @@ export declare const SSEOptionsSchema: z.ZodObject<{
687
791
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
688
792
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
689
793
  initTimeout: z.ZodOptional<z.ZodNumber>;
794
+ /**
795
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
796
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
797
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
798
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
799
+ *
800
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
801
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
802
+ * common case this wait exists to serve. Omit the field to take the default.
803
+ */
804
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
805
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
806
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
807
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
808
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
690
809
  /**
691
810
  * Whether the server is offered in chat.
692
811
  *
@@ -775,6 +894,27 @@ export declare const SSEOptionsSchema: z.ZodObject<{
775
894
  * Ignored when `audience` itself is not configured.
776
895
  */
777
896
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
897
+ /**
898
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
899
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
900
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
901
+ * (RFC 9728), never an operator-supplied string.
902
+ *
903
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
904
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
905
+ * fails an `/authorize` request carrying both `resource` and `scope` with
906
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
907
+ * `audience` above) to obtain an API-scoped token.
908
+ *
909
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
910
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
911
+ * still recorded on the stored client binding, so scope discovery, authorization
912
+ * server discovery and re-authentication checks are unaffected.
913
+ *
914
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
915
+ * from user-managed servers.
916
+ */
917
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
778
918
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
779
919
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
780
920
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -794,6 +934,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
794
934
  skip_code_challenge_check?: boolean | undefined;
795
935
  audience?: string | undefined;
796
936
  forward_audience_on_refresh?: boolean | undefined;
937
+ send_resource_parameter?: boolean | undefined;
797
938
  revocation_endpoint?: string | undefined;
798
939
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
799
940
  }, {
@@ -811,6 +952,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
811
952
  skip_code_challenge_check?: boolean | undefined;
812
953
  audience?: string | undefined;
813
954
  forward_audience_on_refresh?: boolean | undefined;
955
+ send_resource_parameter?: boolean | undefined;
814
956
  revocation_endpoint?: string | undefined;
815
957
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
816
958
  }>, {
@@ -828,6 +970,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
828
970
  skip_code_challenge_check?: boolean | undefined;
829
971
  audience?: string | undefined;
830
972
  forward_audience_on_refresh?: boolean | undefined;
973
+ send_resource_parameter?: boolean | undefined;
831
974
  revocation_endpoint?: string | undefined;
832
975
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
833
976
  }, {
@@ -845,6 +988,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
845
988
  skip_code_challenge_check?: boolean | undefined;
846
989
  audience?: string | undefined;
847
990
  forward_audience_on_refresh?: boolean | undefined;
991
+ send_resource_parameter?: boolean | undefined;
848
992
  revocation_endpoint?: string | undefined;
849
993
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
850
994
  }>>;
@@ -896,6 +1040,13 @@ export declare const SSEOptionsSchema: z.ZodObject<{
896
1040
  } & {
897
1041
  type: z.ZodDefault<z.ZodLiteral<"sse">>;
898
1042
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1043
+ /**
1044
+ * Headers resolved from the live chat request and merged over `headers`.
1045
+ * Omitted during catalog discovery, which has no request context, so a
1046
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
1047
+ * On a duplicate header name the resolved `requestHeaders` value wins.
1048
+ */
1049
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
899
1050
  /**
900
1051
  * On-Behalf-Of (OBO) token exchange configuration.
901
1052
  * When configured, LibreChat exchanges the logged-in user's federated access token
@@ -920,11 +1071,14 @@ export declare const SSEOptionsSchema: z.ZodObject<{
920
1071
  description?: string | undefined;
921
1072
  title?: string | undefined;
922
1073
  chatMenu?: boolean | undefined;
923
- timeout?: number | undefined;
924
1074
  startup?: boolean | undefined;
925
1075
  iconPath?: string | undefined;
1076
+ timeout?: number | undefined;
926
1077
  sseReadTimeout?: number | undefined;
927
1078
  initTimeout?: number | undefined;
1079
+ oauthRefreshWaitTimeout?: number | undefined;
1080
+ oauthRefreshCoordination?: boolean | undefined;
1081
+ oauthPersistenceWaitTimeout?: number | undefined;
928
1082
  serverInstructions?: string | boolean | undefined;
929
1083
  requiresOAuth?: boolean | undefined;
930
1084
  oauth?: {
@@ -942,6 +1096,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
942
1096
  skip_code_challenge_check?: boolean | undefined;
943
1097
  audience?: string | undefined;
944
1098
  forward_audience_on_refresh?: boolean | undefined;
1099
+ send_resource_parameter?: boolean | undefined;
945
1100
  revocation_endpoint?: string | undefined;
946
1101
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
947
1102
  } | undefined;
@@ -961,6 +1116,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
961
1116
  scopes: string;
962
1117
  } | undefined;
963
1118
  headers?: Record<string, string> | undefined;
1119
+ requestHeaders?: Record<string, string> | undefined;
964
1120
  proxy?: string | undefined;
965
1121
  }, {
966
1122
  url: string;
@@ -968,11 +1124,14 @@ export declare const SSEOptionsSchema: z.ZodObject<{
968
1124
  description?: string | undefined;
969
1125
  title?: string | undefined;
970
1126
  chatMenu?: boolean | undefined;
971
- timeout?: number | undefined;
972
1127
  startup?: boolean | undefined;
973
1128
  iconPath?: string | undefined;
1129
+ timeout?: number | undefined;
974
1130
  sseReadTimeout?: number | undefined;
975
1131
  initTimeout?: number | undefined;
1132
+ oauthRefreshWaitTimeout?: number | undefined;
1133
+ oauthRefreshCoordination?: boolean | undefined;
1134
+ oauthPersistenceWaitTimeout?: number | undefined;
976
1135
  serverInstructions?: string | boolean | undefined;
977
1136
  requiresOAuth?: boolean | undefined;
978
1137
  oauth?: {
@@ -990,6 +1149,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
990
1149
  skip_code_challenge_check?: boolean | undefined;
991
1150
  audience?: string | undefined;
992
1151
  forward_audience_on_refresh?: boolean | undefined;
1152
+ send_resource_parameter?: boolean | undefined;
993
1153
  revocation_endpoint?: string | undefined;
994
1154
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
995
1155
  } | undefined;
@@ -1009,6 +1169,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
1009
1169
  scopes: string;
1010
1170
  } | undefined;
1011
1171
  headers?: Record<string, string> | undefined;
1172
+ requestHeaders?: Record<string, string> | undefined;
1012
1173
  proxy?: string | undefined;
1013
1174
  }>;
1014
1175
  export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
@@ -1028,6 +1189,21 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1028
1189
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
1029
1190
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
1030
1191
  initTimeout: z.ZodOptional<z.ZodNumber>;
1192
+ /**
1193
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
1194
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
1195
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
1196
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
1197
+ *
1198
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
1199
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
1200
+ * common case this wait exists to serve. Omit the field to take the default.
1201
+ */
1202
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
1203
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
1204
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
1205
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
1206
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
1031
1207
  /**
1032
1208
  * Whether the server is offered in chat.
1033
1209
  *
@@ -1116,6 +1292,27 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1116
1292
  * Ignored when `audience` itself is not configured.
1117
1293
  */
1118
1294
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
1295
+ /**
1296
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
1297
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
1298
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
1299
+ * (RFC 9728), never an operator-supplied string.
1300
+ *
1301
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
1302
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
1303
+ * fails an `/authorize` request carrying both `resource` and `scope` with
1304
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
1305
+ * `audience` above) to obtain an API-scoped token.
1306
+ *
1307
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
1308
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
1309
+ * still recorded on the stored client binding, so scope discovery, authorization
1310
+ * server discovery and re-authentication checks are unaffected.
1311
+ *
1312
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
1313
+ * from user-managed servers.
1314
+ */
1315
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
1119
1316
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
1120
1317
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
1121
1318
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -1135,6 +1332,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1135
1332
  skip_code_challenge_check?: boolean | undefined;
1136
1333
  audience?: string | undefined;
1137
1334
  forward_audience_on_refresh?: boolean | undefined;
1335
+ send_resource_parameter?: boolean | undefined;
1138
1336
  revocation_endpoint?: string | undefined;
1139
1337
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1140
1338
  }, {
@@ -1152,6 +1350,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1152
1350
  skip_code_challenge_check?: boolean | undefined;
1153
1351
  audience?: string | undefined;
1154
1352
  forward_audience_on_refresh?: boolean | undefined;
1353
+ send_resource_parameter?: boolean | undefined;
1155
1354
  revocation_endpoint?: string | undefined;
1156
1355
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1157
1356
  }>, {
@@ -1169,6 +1368,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1169
1368
  skip_code_challenge_check?: boolean | undefined;
1170
1369
  audience?: string | undefined;
1171
1370
  forward_audience_on_refresh?: boolean | undefined;
1371
+ send_resource_parameter?: boolean | undefined;
1172
1372
  revocation_endpoint?: string | undefined;
1173
1373
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1174
1374
  }, {
@@ -1186,6 +1386,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1186
1386
  skip_code_challenge_check?: boolean | undefined;
1187
1387
  audience?: string | undefined;
1188
1388
  forward_audience_on_refresh?: boolean | undefined;
1389
+ send_resource_parameter?: boolean | undefined;
1189
1390
  revocation_endpoint?: string | undefined;
1190
1391
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1191
1392
  }>>;
@@ -1237,6 +1438,13 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1237
1438
  } & {
1238
1439
  type: z.ZodUnion<[z.ZodLiteral<"streamable-http">, z.ZodLiteral<"http">]>;
1239
1440
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1441
+ /**
1442
+ * Headers resolved from the live chat request and merged over `headers`.
1443
+ * Omitted during catalog discovery, which has no request context, so a
1444
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
1445
+ * On a duplicate header name the resolved `requestHeaders` value wins.
1446
+ */
1447
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1240
1448
  /**
1241
1449
  * On-Behalf-Of (OBO) token exchange configuration.
1242
1450
  * When configured, LibreChat exchanges the logged-in user's federated access token
@@ -1261,11 +1469,14 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1261
1469
  description?: string | undefined;
1262
1470
  title?: string | undefined;
1263
1471
  chatMenu?: boolean | undefined;
1264
- timeout?: number | undefined;
1265
1472
  startup?: boolean | undefined;
1266
1473
  iconPath?: string | undefined;
1474
+ timeout?: number | undefined;
1267
1475
  sseReadTimeout?: number | undefined;
1268
1476
  initTimeout?: number | undefined;
1477
+ oauthRefreshWaitTimeout?: number | undefined;
1478
+ oauthRefreshCoordination?: boolean | undefined;
1479
+ oauthPersistenceWaitTimeout?: number | undefined;
1269
1480
  serverInstructions?: string | boolean | undefined;
1270
1481
  requiresOAuth?: boolean | undefined;
1271
1482
  oauth?: {
@@ -1283,6 +1494,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1283
1494
  skip_code_challenge_check?: boolean | undefined;
1284
1495
  audience?: string | undefined;
1285
1496
  forward_audience_on_refresh?: boolean | undefined;
1497
+ send_resource_parameter?: boolean | undefined;
1286
1498
  revocation_endpoint?: string | undefined;
1287
1499
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1288
1500
  } | undefined;
@@ -1302,6 +1514,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1302
1514
  scopes: string;
1303
1515
  } | undefined;
1304
1516
  headers?: Record<string, string> | undefined;
1517
+ requestHeaders?: Record<string, string> | undefined;
1305
1518
  proxy?: string | undefined;
1306
1519
  }, {
1307
1520
  type: "streamable-http" | "http";
@@ -1309,11 +1522,14 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1309
1522
  description?: string | undefined;
1310
1523
  title?: string | undefined;
1311
1524
  chatMenu?: boolean | undefined;
1312
- timeout?: number | undefined;
1313
1525
  startup?: boolean | undefined;
1314
1526
  iconPath?: string | undefined;
1527
+ timeout?: number | undefined;
1315
1528
  sseReadTimeout?: number | undefined;
1316
1529
  initTimeout?: number | undefined;
1530
+ oauthRefreshWaitTimeout?: number | undefined;
1531
+ oauthRefreshCoordination?: boolean | undefined;
1532
+ oauthPersistenceWaitTimeout?: number | undefined;
1317
1533
  serverInstructions?: string | boolean | undefined;
1318
1534
  requiresOAuth?: boolean | undefined;
1319
1535
  oauth?: {
@@ -1331,6 +1547,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1331
1547
  skip_code_challenge_check?: boolean | undefined;
1332
1548
  audience?: string | undefined;
1333
1549
  forward_audience_on_refresh?: boolean | undefined;
1550
+ send_resource_parameter?: boolean | undefined;
1334
1551
  revocation_endpoint?: string | undefined;
1335
1552
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1336
1553
  } | undefined;
@@ -1350,6 +1567,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
1350
1567
  scopes: string;
1351
1568
  } | undefined;
1352
1569
  headers?: Record<string, string> | undefined;
1570
+ requestHeaders?: Record<string, string> | undefined;
1353
1571
  proxy?: string | undefined;
1354
1572
  }>;
1355
1573
  export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
@@ -1369,6 +1587,21 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1369
1587
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
1370
1588
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
1371
1589
  initTimeout: z.ZodOptional<z.ZodNumber>;
1590
+ /**
1591
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
1592
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
1593
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
1594
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
1595
+ *
1596
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
1597
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
1598
+ * common case this wait exists to serve. Omit the field to take the default.
1599
+ */
1600
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
1601
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
1602
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
1603
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
1604
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
1372
1605
  /**
1373
1606
  * Whether the server is offered in chat.
1374
1607
  *
@@ -1457,6 +1690,27 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1457
1690
  * Ignored when `audience` itself is not configured.
1458
1691
  */
1459
1692
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
1693
+ /**
1694
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
1695
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
1696
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
1697
+ * (RFC 9728), never an operator-supplied string.
1698
+ *
1699
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
1700
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
1701
+ * fails an `/authorize` request carrying both `resource` and `scope` with
1702
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
1703
+ * `audience` above) to obtain an API-scoped token.
1704
+ *
1705
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
1706
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
1707
+ * still recorded on the stored client binding, so scope discovery, authorization
1708
+ * server discovery and re-authentication checks are unaffected.
1709
+ *
1710
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
1711
+ * from user-managed servers.
1712
+ */
1713
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
1460
1714
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
1461
1715
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
1462
1716
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -1476,6 +1730,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1476
1730
  skip_code_challenge_check?: boolean | undefined;
1477
1731
  audience?: string | undefined;
1478
1732
  forward_audience_on_refresh?: boolean | undefined;
1733
+ send_resource_parameter?: boolean | undefined;
1479
1734
  revocation_endpoint?: string | undefined;
1480
1735
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1481
1736
  }, {
@@ -1493,6 +1748,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1493
1748
  skip_code_challenge_check?: boolean | undefined;
1494
1749
  audience?: string | undefined;
1495
1750
  forward_audience_on_refresh?: boolean | undefined;
1751
+ send_resource_parameter?: boolean | undefined;
1496
1752
  revocation_endpoint?: string | undefined;
1497
1753
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1498
1754
  }>, {
@@ -1510,6 +1766,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1510
1766
  skip_code_challenge_check?: boolean | undefined;
1511
1767
  audience?: string | undefined;
1512
1768
  forward_audience_on_refresh?: boolean | undefined;
1769
+ send_resource_parameter?: boolean | undefined;
1513
1770
  revocation_endpoint?: string | undefined;
1514
1771
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1515
1772
  }, {
@@ -1527,6 +1784,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1527
1784
  skip_code_challenge_check?: boolean | undefined;
1528
1785
  audience?: string | undefined;
1529
1786
  forward_audience_on_refresh?: boolean | undefined;
1787
+ send_resource_parameter?: boolean | undefined;
1530
1788
  revocation_endpoint?: string | undefined;
1531
1789
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1532
1790
  }>>;
@@ -1611,12 +1869,14 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1611
1869
  description?: string | undefined;
1612
1870
  title?: string | undefined;
1613
1871
  chatMenu?: boolean | undefined;
1614
- timeout?: number | undefined;
1615
- env?: Record<string, string> | undefined;
1616
1872
  startup?: boolean | undefined;
1617
1873
  iconPath?: string | undefined;
1874
+ timeout?: number | undefined;
1618
1875
  sseReadTimeout?: number | undefined;
1619
1876
  initTimeout?: number | undefined;
1877
+ oauthRefreshWaitTimeout?: number | undefined;
1878
+ oauthRefreshCoordination?: boolean | undefined;
1879
+ oauthPersistenceWaitTimeout?: number | undefined;
1620
1880
  serverInstructions?: string | boolean | undefined;
1621
1881
  requiresOAuth?: boolean | undefined;
1622
1882
  oauth?: {
@@ -1634,6 +1894,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1634
1894
  skip_code_challenge_check?: boolean | undefined;
1635
1895
  audience?: string | undefined;
1636
1896
  forward_audience_on_refresh?: boolean | undefined;
1897
+ send_resource_parameter?: boolean | undefined;
1637
1898
  revocation_endpoint?: string | undefined;
1638
1899
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1639
1900
  } | undefined;
@@ -1649,6 +1910,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1649
1910
  title: string;
1650
1911
  sensitive?: boolean | undefined;
1651
1912
  }> | undefined;
1913
+ env?: Record<string, string> | undefined;
1652
1914
  cwd?: string | undefined;
1653
1915
  stderr?: number | "pipe" | "ignore" | "inherit" | undefined;
1654
1916
  obo?: undefined;
@@ -1659,12 +1921,14 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1659
1921
  description?: string | undefined;
1660
1922
  title?: string | undefined;
1661
1923
  chatMenu?: boolean | undefined;
1662
- timeout?: number | undefined;
1663
- env?: Record<string, string> | undefined;
1664
1924
  startup?: boolean | undefined;
1665
1925
  iconPath?: string | undefined;
1926
+ timeout?: number | undefined;
1666
1927
  sseReadTimeout?: number | undefined;
1667
1928
  initTimeout?: number | undefined;
1929
+ oauthRefreshWaitTimeout?: number | undefined;
1930
+ oauthRefreshCoordination?: boolean | undefined;
1931
+ oauthPersistenceWaitTimeout?: number | undefined;
1668
1932
  serverInstructions?: string | boolean | undefined;
1669
1933
  requiresOAuth?: boolean | undefined;
1670
1934
  oauth?: {
@@ -1682,6 +1946,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1682
1946
  skip_code_challenge_check?: boolean | undefined;
1683
1947
  audience?: string | undefined;
1684
1948
  forward_audience_on_refresh?: boolean | undefined;
1949
+ send_resource_parameter?: boolean | undefined;
1685
1950
  revocation_endpoint?: string | undefined;
1686
1951
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1687
1952
  } | undefined;
@@ -1697,6 +1962,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1697
1962
  title: string;
1698
1963
  sensitive?: boolean | undefined;
1699
1964
  }> | undefined;
1965
+ env?: Record<string, string> | undefined;
1700
1966
  cwd?: string | undefined;
1701
1967
  stderr?: number | "pipe" | "ignore" | "inherit" | undefined;
1702
1968
  obo?: undefined;
@@ -1717,6 +1983,21 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1717
1983
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
1718
1984
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
1719
1985
  initTimeout: z.ZodOptional<z.ZodNumber>;
1986
+ /**
1987
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
1988
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
1989
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
1990
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
1991
+ *
1992
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
1993
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
1994
+ * common case this wait exists to serve. Omit the field to take the default.
1995
+ */
1996
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
1997
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
1998
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
1999
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
2000
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
1720
2001
  /**
1721
2002
  * Whether the server is offered in chat.
1722
2003
  *
@@ -1805,6 +2086,27 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1805
2086
  * Ignored when `audience` itself is not configured.
1806
2087
  */
1807
2088
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
2089
+ /**
2090
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
2091
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
2092
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
2093
+ * (RFC 9728), never an operator-supplied string.
2094
+ *
2095
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
2096
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
2097
+ * fails an `/authorize` request carrying both `resource` and `scope` with
2098
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
2099
+ * `audience` above) to obtain an API-scoped token.
2100
+ *
2101
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
2102
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
2103
+ * still recorded on the stored client binding, so scope discovery, authorization
2104
+ * server discovery and re-authentication checks are unaffected.
2105
+ *
2106
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
2107
+ * from user-managed servers.
2108
+ */
2109
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
1808
2110
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
1809
2111
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
1810
2112
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -1824,6 +2126,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1824
2126
  skip_code_challenge_check?: boolean | undefined;
1825
2127
  audience?: string | undefined;
1826
2128
  forward_audience_on_refresh?: boolean | undefined;
2129
+ send_resource_parameter?: boolean | undefined;
1827
2130
  revocation_endpoint?: string | undefined;
1828
2131
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1829
2132
  }, {
@@ -1841,6 +2144,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1841
2144
  skip_code_challenge_check?: boolean | undefined;
1842
2145
  audience?: string | undefined;
1843
2146
  forward_audience_on_refresh?: boolean | undefined;
2147
+ send_resource_parameter?: boolean | undefined;
1844
2148
  revocation_endpoint?: string | undefined;
1845
2149
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1846
2150
  }>, {
@@ -1858,6 +2162,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1858
2162
  skip_code_challenge_check?: boolean | undefined;
1859
2163
  audience?: string | undefined;
1860
2164
  forward_audience_on_refresh?: boolean | undefined;
2165
+ send_resource_parameter?: boolean | undefined;
1861
2166
  revocation_endpoint?: string | undefined;
1862
2167
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1863
2168
  }, {
@@ -1875,6 +2180,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1875
2180
  skip_code_challenge_check?: boolean | undefined;
1876
2181
  audience?: string | undefined;
1877
2182
  forward_audience_on_refresh?: boolean | undefined;
2183
+ send_resource_parameter?: boolean | undefined;
1878
2184
  revocation_endpoint?: string | undefined;
1879
2185
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1880
2186
  }>>;
@@ -1933,11 +2239,14 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1933
2239
  description?: string | undefined;
1934
2240
  title?: string | undefined;
1935
2241
  chatMenu?: boolean | undefined;
1936
- timeout?: number | undefined;
1937
2242
  startup?: boolean | undefined;
1938
2243
  iconPath?: string | undefined;
2244
+ timeout?: number | undefined;
1939
2245
  sseReadTimeout?: number | undefined;
1940
2246
  initTimeout?: number | undefined;
2247
+ oauthRefreshWaitTimeout?: number | undefined;
2248
+ oauthRefreshCoordination?: boolean | undefined;
2249
+ oauthPersistenceWaitTimeout?: number | undefined;
1941
2250
  serverInstructions?: string | boolean | undefined;
1942
2251
  requiresOAuth?: boolean | undefined;
1943
2252
  oauth?: {
@@ -1955,6 +2264,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1955
2264
  skip_code_challenge_check?: boolean | undefined;
1956
2265
  audience?: string | undefined;
1957
2266
  forward_audience_on_refresh?: boolean | undefined;
2267
+ send_resource_parameter?: boolean | undefined;
1958
2268
  revocation_endpoint?: string | undefined;
1959
2269
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1960
2270
  } | undefined;
@@ -1977,11 +2287,14 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1977
2287
  description?: string | undefined;
1978
2288
  title?: string | undefined;
1979
2289
  chatMenu?: boolean | undefined;
1980
- timeout?: number | undefined;
1981
2290
  startup?: boolean | undefined;
1982
2291
  iconPath?: string | undefined;
2292
+ timeout?: number | undefined;
1983
2293
  sseReadTimeout?: number | undefined;
1984
2294
  initTimeout?: number | undefined;
2295
+ oauthRefreshWaitTimeout?: number | undefined;
2296
+ oauthRefreshCoordination?: boolean | undefined;
2297
+ oauthPersistenceWaitTimeout?: number | undefined;
1985
2298
  serverInstructions?: string | boolean | undefined;
1986
2299
  requiresOAuth?: boolean | undefined;
1987
2300
  oauth?: {
@@ -1999,6 +2312,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1999
2312
  skip_code_challenge_check?: boolean | undefined;
2000
2313
  audience?: string | undefined;
2001
2314
  forward_audience_on_refresh?: boolean | undefined;
2315
+ send_resource_parameter?: boolean | undefined;
2002
2316
  revocation_endpoint?: string | undefined;
2003
2317
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2004
2318
  } | undefined;
@@ -2032,6 +2346,21 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2032
2346
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
2033
2347
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
2034
2348
  initTimeout: z.ZodOptional<z.ZodNumber>;
2349
+ /**
2350
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
2351
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
2352
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
2353
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
2354
+ *
2355
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
2356
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
2357
+ * common case this wait exists to serve. Omit the field to take the default.
2358
+ */
2359
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
2360
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
2361
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
2362
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
2363
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
2035
2364
  /**
2036
2365
  * Whether the server is offered in chat.
2037
2366
  *
@@ -2120,6 +2449,27 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2120
2449
  * Ignored when `audience` itself is not configured.
2121
2450
  */
2122
2451
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
2452
+ /**
2453
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
2454
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
2455
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
2456
+ * (RFC 9728), never an operator-supplied string.
2457
+ *
2458
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
2459
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
2460
+ * fails an `/authorize` request carrying both `resource` and `scope` with
2461
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
2462
+ * `audience` above) to obtain an API-scoped token.
2463
+ *
2464
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
2465
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
2466
+ * still recorded on the stored client binding, so scope discovery, authorization
2467
+ * server discovery and re-authentication checks are unaffected.
2468
+ *
2469
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
2470
+ * from user-managed servers.
2471
+ */
2472
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
2123
2473
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
2124
2474
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
2125
2475
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -2139,6 +2489,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2139
2489
  skip_code_challenge_check?: boolean | undefined;
2140
2490
  audience?: string | undefined;
2141
2491
  forward_audience_on_refresh?: boolean | undefined;
2492
+ send_resource_parameter?: boolean | undefined;
2142
2493
  revocation_endpoint?: string | undefined;
2143
2494
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2144
2495
  }, {
@@ -2156,6 +2507,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2156
2507
  skip_code_challenge_check?: boolean | undefined;
2157
2508
  audience?: string | undefined;
2158
2509
  forward_audience_on_refresh?: boolean | undefined;
2510
+ send_resource_parameter?: boolean | undefined;
2159
2511
  revocation_endpoint?: string | undefined;
2160
2512
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2161
2513
  }>, {
@@ -2173,6 +2525,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2173
2525
  skip_code_challenge_check?: boolean | undefined;
2174
2526
  audience?: string | undefined;
2175
2527
  forward_audience_on_refresh?: boolean | undefined;
2528
+ send_resource_parameter?: boolean | undefined;
2176
2529
  revocation_endpoint?: string | undefined;
2177
2530
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2178
2531
  }, {
@@ -2190,6 +2543,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2190
2543
  skip_code_challenge_check?: boolean | undefined;
2191
2544
  audience?: string | undefined;
2192
2545
  forward_audience_on_refresh?: boolean | undefined;
2546
+ send_resource_parameter?: boolean | undefined;
2193
2547
  revocation_endpoint?: string | undefined;
2194
2548
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2195
2549
  }>>;
@@ -2241,6 +2595,13 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2241
2595
  } & {
2242
2596
  type: z.ZodDefault<z.ZodLiteral<"sse">>;
2243
2597
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2598
+ /**
2599
+ * Headers resolved from the live chat request and merged over `headers`.
2600
+ * Omitted during catalog discovery, which has no request context, so a
2601
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
2602
+ * On a duplicate header name the resolved `requestHeaders` value wins.
2603
+ */
2604
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2244
2605
  /**
2245
2606
  * On-Behalf-Of (OBO) token exchange configuration.
2246
2607
  * When configured, LibreChat exchanges the logged-in user's federated access token
@@ -2265,11 +2626,14 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2265
2626
  description?: string | undefined;
2266
2627
  title?: string | undefined;
2267
2628
  chatMenu?: boolean | undefined;
2268
- timeout?: number | undefined;
2269
2629
  startup?: boolean | undefined;
2270
2630
  iconPath?: string | undefined;
2631
+ timeout?: number | undefined;
2271
2632
  sseReadTimeout?: number | undefined;
2272
2633
  initTimeout?: number | undefined;
2634
+ oauthRefreshWaitTimeout?: number | undefined;
2635
+ oauthRefreshCoordination?: boolean | undefined;
2636
+ oauthPersistenceWaitTimeout?: number | undefined;
2273
2637
  serverInstructions?: string | boolean | undefined;
2274
2638
  requiresOAuth?: boolean | undefined;
2275
2639
  oauth?: {
@@ -2287,6 +2651,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2287
2651
  skip_code_challenge_check?: boolean | undefined;
2288
2652
  audience?: string | undefined;
2289
2653
  forward_audience_on_refresh?: boolean | undefined;
2654
+ send_resource_parameter?: boolean | undefined;
2290
2655
  revocation_endpoint?: string | undefined;
2291
2656
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2292
2657
  } | undefined;
@@ -2306,6 +2671,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2306
2671
  scopes: string;
2307
2672
  } | undefined;
2308
2673
  headers?: Record<string, string> | undefined;
2674
+ requestHeaders?: Record<string, string> | undefined;
2309
2675
  proxy?: string | undefined;
2310
2676
  }, {
2311
2677
  url: string;
@@ -2313,11 +2679,14 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2313
2679
  description?: string | undefined;
2314
2680
  title?: string | undefined;
2315
2681
  chatMenu?: boolean | undefined;
2316
- timeout?: number | undefined;
2317
2682
  startup?: boolean | undefined;
2318
2683
  iconPath?: string | undefined;
2684
+ timeout?: number | undefined;
2319
2685
  sseReadTimeout?: number | undefined;
2320
2686
  initTimeout?: number | undefined;
2687
+ oauthRefreshWaitTimeout?: number | undefined;
2688
+ oauthRefreshCoordination?: boolean | undefined;
2689
+ oauthPersistenceWaitTimeout?: number | undefined;
2321
2690
  serverInstructions?: string | boolean | undefined;
2322
2691
  requiresOAuth?: boolean | undefined;
2323
2692
  oauth?: {
@@ -2335,6 +2704,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2335
2704
  skip_code_challenge_check?: boolean | undefined;
2336
2705
  audience?: string | undefined;
2337
2706
  forward_audience_on_refresh?: boolean | undefined;
2707
+ send_resource_parameter?: boolean | undefined;
2338
2708
  revocation_endpoint?: string | undefined;
2339
2709
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2340
2710
  } | undefined;
@@ -2354,6 +2724,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2354
2724
  scopes: string;
2355
2725
  } | undefined;
2356
2726
  headers?: Record<string, string> | undefined;
2727
+ requestHeaders?: Record<string, string> | undefined;
2357
2728
  proxy?: string | undefined;
2358
2729
  }>, z.ZodObject<{
2359
2730
  /** Display name for the MCP server */
@@ -2372,6 +2743,21 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2372
2743
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
2373
2744
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
2374
2745
  initTimeout: z.ZodOptional<z.ZodNumber>;
2746
+ /**
2747
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
2748
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
2749
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
2750
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
2751
+ *
2752
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
2753
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
2754
+ * common case this wait exists to serve. Omit the field to take the default.
2755
+ */
2756
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
2757
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
2758
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
2759
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
2760
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
2375
2761
  /**
2376
2762
  * Whether the server is offered in chat.
2377
2763
  *
@@ -2460,6 +2846,27 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2460
2846
  * Ignored when `audience` itself is not configured.
2461
2847
  */
2462
2848
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
2849
+ /**
2850
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
2851
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
2852
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
2853
+ * (RFC 9728), never an operator-supplied string.
2854
+ *
2855
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
2856
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
2857
+ * fails an `/authorize` request carrying both `resource` and `scope` with
2858
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
2859
+ * `audience` above) to obtain an API-scoped token.
2860
+ *
2861
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
2862
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
2863
+ * still recorded on the stored client binding, so scope discovery, authorization
2864
+ * server discovery and re-authentication checks are unaffected.
2865
+ *
2866
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
2867
+ * from user-managed servers.
2868
+ */
2869
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
2463
2870
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
2464
2871
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
2465
2872
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -2479,6 +2886,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2479
2886
  skip_code_challenge_check?: boolean | undefined;
2480
2887
  audience?: string | undefined;
2481
2888
  forward_audience_on_refresh?: boolean | undefined;
2889
+ send_resource_parameter?: boolean | undefined;
2482
2890
  revocation_endpoint?: string | undefined;
2483
2891
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2484
2892
  }, {
@@ -2496,6 +2904,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2496
2904
  skip_code_challenge_check?: boolean | undefined;
2497
2905
  audience?: string | undefined;
2498
2906
  forward_audience_on_refresh?: boolean | undefined;
2907
+ send_resource_parameter?: boolean | undefined;
2499
2908
  revocation_endpoint?: string | undefined;
2500
2909
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2501
2910
  }>, {
@@ -2513,6 +2922,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2513
2922
  skip_code_challenge_check?: boolean | undefined;
2514
2923
  audience?: string | undefined;
2515
2924
  forward_audience_on_refresh?: boolean | undefined;
2925
+ send_resource_parameter?: boolean | undefined;
2516
2926
  revocation_endpoint?: string | undefined;
2517
2927
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2518
2928
  }, {
@@ -2530,6 +2940,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2530
2940
  skip_code_challenge_check?: boolean | undefined;
2531
2941
  audience?: string | undefined;
2532
2942
  forward_audience_on_refresh?: boolean | undefined;
2943
+ send_resource_parameter?: boolean | undefined;
2533
2944
  revocation_endpoint?: string | undefined;
2534
2945
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2535
2946
  }>>;
@@ -2581,6 +2992,13 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2581
2992
  } & {
2582
2993
  type: z.ZodUnion<[z.ZodLiteral<"streamable-http">, z.ZodLiteral<"http">]>;
2583
2994
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2995
+ /**
2996
+ * Headers resolved from the live chat request and merged over `headers`.
2997
+ * Omitted during catalog discovery, which has no request context, so a
2998
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
2999
+ * On a duplicate header name the resolved `requestHeaders` value wins.
3000
+ */
3001
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2584
3002
  /**
2585
3003
  * On-Behalf-Of (OBO) token exchange configuration.
2586
3004
  * When configured, LibreChat exchanges the logged-in user's federated access token
@@ -2605,11 +3023,14 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2605
3023
  description?: string | undefined;
2606
3024
  title?: string | undefined;
2607
3025
  chatMenu?: boolean | undefined;
2608
- timeout?: number | undefined;
2609
3026
  startup?: boolean | undefined;
2610
3027
  iconPath?: string | undefined;
3028
+ timeout?: number | undefined;
2611
3029
  sseReadTimeout?: number | undefined;
2612
3030
  initTimeout?: number | undefined;
3031
+ oauthRefreshWaitTimeout?: number | undefined;
3032
+ oauthRefreshCoordination?: boolean | undefined;
3033
+ oauthPersistenceWaitTimeout?: number | undefined;
2613
3034
  serverInstructions?: string | boolean | undefined;
2614
3035
  requiresOAuth?: boolean | undefined;
2615
3036
  oauth?: {
@@ -2627,6 +3048,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2627
3048
  skip_code_challenge_check?: boolean | undefined;
2628
3049
  audience?: string | undefined;
2629
3050
  forward_audience_on_refresh?: boolean | undefined;
3051
+ send_resource_parameter?: boolean | undefined;
2630
3052
  revocation_endpoint?: string | undefined;
2631
3053
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2632
3054
  } | undefined;
@@ -2646,6 +3068,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2646
3068
  scopes: string;
2647
3069
  } | undefined;
2648
3070
  headers?: Record<string, string> | undefined;
3071
+ requestHeaders?: Record<string, string> | undefined;
2649
3072
  proxy?: string | undefined;
2650
3073
  }, {
2651
3074
  type: "streamable-http" | "http";
@@ -2653,11 +3076,14 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2653
3076
  description?: string | undefined;
2654
3077
  title?: string | undefined;
2655
3078
  chatMenu?: boolean | undefined;
2656
- timeout?: number | undefined;
2657
3079
  startup?: boolean | undefined;
2658
3080
  iconPath?: string | undefined;
3081
+ timeout?: number | undefined;
2659
3082
  sseReadTimeout?: number | undefined;
2660
3083
  initTimeout?: number | undefined;
3084
+ oauthRefreshWaitTimeout?: number | undefined;
3085
+ oauthRefreshCoordination?: boolean | undefined;
3086
+ oauthPersistenceWaitTimeout?: number | undefined;
2661
3087
  serverInstructions?: string | boolean | undefined;
2662
3088
  requiresOAuth?: boolean | undefined;
2663
3089
  oauth?: {
@@ -2675,6 +3101,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2675
3101
  skip_code_challenge_check?: boolean | undefined;
2676
3102
  audience?: string | undefined;
2677
3103
  forward_audience_on_refresh?: boolean | undefined;
3104
+ send_resource_parameter?: boolean | undefined;
2678
3105
  revocation_endpoint?: string | undefined;
2679
3106
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2680
3107
  } | undefined;
@@ -2694,6 +3121,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
2694
3121
  scopes: string;
2695
3122
  } | undefined;
2696
3123
  headers?: Record<string, string> | undefined;
3124
+ requestHeaders?: Record<string, string> | undefined;
2697
3125
  proxy?: string | undefined;
2698
3126
  }>]>;
2699
3127
  export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -2713,6 +3141,21 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2713
3141
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
2714
3142
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
2715
3143
  initTimeout: z.ZodOptional<z.ZodNumber>;
3144
+ /**
3145
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
3146
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
3147
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
3148
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
3149
+ *
3150
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
3151
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
3152
+ * common case this wait exists to serve. Omit the field to take the default.
3153
+ */
3154
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
3155
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
3156
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
3157
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
3158
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
2716
3159
  /**
2717
3160
  * Whether the server is offered in chat.
2718
3161
  *
@@ -2801,6 +3244,27 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2801
3244
  * Ignored when `audience` itself is not configured.
2802
3245
  */
2803
3246
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
3247
+ /**
3248
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
3249
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
3250
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
3251
+ * (RFC 9728), never an operator-supplied string.
3252
+ *
3253
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
3254
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
3255
+ * fails an `/authorize` request carrying both `resource` and `scope` with
3256
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
3257
+ * `audience` above) to obtain an API-scoped token.
3258
+ *
3259
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
3260
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
3261
+ * still recorded on the stored client binding, so scope discovery, authorization
3262
+ * server discovery and re-authentication checks are unaffected.
3263
+ *
3264
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
3265
+ * from user-managed servers.
3266
+ */
3267
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
2804
3268
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
2805
3269
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
2806
3270
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -2820,6 +3284,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2820
3284
  skip_code_challenge_check?: boolean | undefined;
2821
3285
  audience?: string | undefined;
2822
3286
  forward_audience_on_refresh?: boolean | undefined;
3287
+ send_resource_parameter?: boolean | undefined;
2823
3288
  revocation_endpoint?: string | undefined;
2824
3289
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2825
3290
  }, {
@@ -2837,6 +3302,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2837
3302
  skip_code_challenge_check?: boolean | undefined;
2838
3303
  audience?: string | undefined;
2839
3304
  forward_audience_on_refresh?: boolean | undefined;
3305
+ send_resource_parameter?: boolean | undefined;
2840
3306
  revocation_endpoint?: string | undefined;
2841
3307
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2842
3308
  }>, {
@@ -2854,6 +3320,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2854
3320
  skip_code_challenge_check?: boolean | undefined;
2855
3321
  audience?: string | undefined;
2856
3322
  forward_audience_on_refresh?: boolean | undefined;
3323
+ send_resource_parameter?: boolean | undefined;
2857
3324
  revocation_endpoint?: string | undefined;
2858
3325
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2859
3326
  }, {
@@ -2871,6 +3338,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2871
3338
  skip_code_challenge_check?: boolean | undefined;
2872
3339
  audience?: string | undefined;
2873
3340
  forward_audience_on_refresh?: boolean | undefined;
3341
+ send_resource_parameter?: boolean | undefined;
2874
3342
  revocation_endpoint?: string | undefined;
2875
3343
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2876
3344
  }>>;
@@ -2955,12 +3423,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2955
3423
  description?: string | undefined;
2956
3424
  title?: string | undefined;
2957
3425
  chatMenu?: boolean | undefined;
2958
- timeout?: number | undefined;
2959
- env?: Record<string, string> | undefined;
2960
3426
  startup?: boolean | undefined;
2961
3427
  iconPath?: string | undefined;
3428
+ timeout?: number | undefined;
2962
3429
  sseReadTimeout?: number | undefined;
2963
3430
  initTimeout?: number | undefined;
3431
+ oauthRefreshWaitTimeout?: number | undefined;
3432
+ oauthRefreshCoordination?: boolean | undefined;
3433
+ oauthPersistenceWaitTimeout?: number | undefined;
2964
3434
  serverInstructions?: string | boolean | undefined;
2965
3435
  requiresOAuth?: boolean | undefined;
2966
3436
  oauth?: {
@@ -2978,6 +3448,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2978
3448
  skip_code_challenge_check?: boolean | undefined;
2979
3449
  audience?: string | undefined;
2980
3450
  forward_audience_on_refresh?: boolean | undefined;
3451
+ send_resource_parameter?: boolean | undefined;
2981
3452
  revocation_endpoint?: string | undefined;
2982
3453
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2983
3454
  } | undefined;
@@ -2993,6 +3464,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2993
3464
  title: string;
2994
3465
  sensitive?: boolean | undefined;
2995
3466
  }> | undefined;
3467
+ env?: Record<string, string> | undefined;
2996
3468
  cwd?: string | undefined;
2997
3469
  stderr?: number | "pipe" | "ignore" | "inherit" | undefined;
2998
3470
  obo?: undefined;
@@ -3003,12 +3475,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3003
3475
  description?: string | undefined;
3004
3476
  title?: string | undefined;
3005
3477
  chatMenu?: boolean | undefined;
3006
- timeout?: number | undefined;
3007
- env?: Record<string, string> | undefined;
3008
3478
  startup?: boolean | undefined;
3009
3479
  iconPath?: string | undefined;
3480
+ timeout?: number | undefined;
3010
3481
  sseReadTimeout?: number | undefined;
3011
3482
  initTimeout?: number | undefined;
3483
+ oauthRefreshWaitTimeout?: number | undefined;
3484
+ oauthRefreshCoordination?: boolean | undefined;
3485
+ oauthPersistenceWaitTimeout?: number | undefined;
3012
3486
  serverInstructions?: string | boolean | undefined;
3013
3487
  requiresOAuth?: boolean | undefined;
3014
3488
  oauth?: {
@@ -3026,6 +3500,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3026
3500
  skip_code_challenge_check?: boolean | undefined;
3027
3501
  audience?: string | undefined;
3028
3502
  forward_audience_on_refresh?: boolean | undefined;
3503
+ send_resource_parameter?: boolean | undefined;
3029
3504
  revocation_endpoint?: string | undefined;
3030
3505
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3031
3506
  } | undefined;
@@ -3041,6 +3516,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3041
3516
  title: string;
3042
3517
  sensitive?: boolean | undefined;
3043
3518
  }> | undefined;
3519
+ env?: Record<string, string> | undefined;
3044
3520
  cwd?: string | undefined;
3045
3521
  stderr?: number | "pipe" | "ignore" | "inherit" | undefined;
3046
3522
  obo?: undefined;
@@ -3061,6 +3537,21 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3061
3537
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
3062
3538
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
3063
3539
  initTimeout: z.ZodOptional<z.ZodNumber>;
3540
+ /**
3541
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
3542
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
3543
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
3544
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
3545
+ *
3546
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
3547
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
3548
+ * common case this wait exists to serve. Omit the field to take the default.
3549
+ */
3550
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
3551
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
3552
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
3553
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
3554
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
3064
3555
  /**
3065
3556
  * Whether the server is offered in chat.
3066
3557
  *
@@ -3149,6 +3640,27 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3149
3640
  * Ignored when `audience` itself is not configured.
3150
3641
  */
3151
3642
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
3643
+ /**
3644
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
3645
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
3646
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
3647
+ * (RFC 9728), never an operator-supplied string.
3648
+ *
3649
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
3650
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
3651
+ * fails an `/authorize` request carrying both `resource` and `scope` with
3652
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
3653
+ * `audience` above) to obtain an API-scoped token.
3654
+ *
3655
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
3656
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
3657
+ * still recorded on the stored client binding, so scope discovery, authorization
3658
+ * server discovery and re-authentication checks are unaffected.
3659
+ *
3660
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
3661
+ * from user-managed servers.
3662
+ */
3663
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
3152
3664
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
3153
3665
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
3154
3666
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -3168,6 +3680,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3168
3680
  skip_code_challenge_check?: boolean | undefined;
3169
3681
  audience?: string | undefined;
3170
3682
  forward_audience_on_refresh?: boolean | undefined;
3683
+ send_resource_parameter?: boolean | undefined;
3171
3684
  revocation_endpoint?: string | undefined;
3172
3685
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3173
3686
  }, {
@@ -3185,6 +3698,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3185
3698
  skip_code_challenge_check?: boolean | undefined;
3186
3699
  audience?: string | undefined;
3187
3700
  forward_audience_on_refresh?: boolean | undefined;
3701
+ send_resource_parameter?: boolean | undefined;
3188
3702
  revocation_endpoint?: string | undefined;
3189
3703
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3190
3704
  }>, {
@@ -3202,6 +3716,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3202
3716
  skip_code_challenge_check?: boolean | undefined;
3203
3717
  audience?: string | undefined;
3204
3718
  forward_audience_on_refresh?: boolean | undefined;
3719
+ send_resource_parameter?: boolean | undefined;
3205
3720
  revocation_endpoint?: string | undefined;
3206
3721
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3207
3722
  }, {
@@ -3219,6 +3734,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3219
3734
  skip_code_challenge_check?: boolean | undefined;
3220
3735
  audience?: string | undefined;
3221
3736
  forward_audience_on_refresh?: boolean | undefined;
3737
+ send_resource_parameter?: boolean | undefined;
3222
3738
  revocation_endpoint?: string | undefined;
3223
3739
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3224
3740
  }>>;
@@ -3277,11 +3793,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3277
3793
  description?: string | undefined;
3278
3794
  title?: string | undefined;
3279
3795
  chatMenu?: boolean | undefined;
3280
- timeout?: number | undefined;
3281
3796
  startup?: boolean | undefined;
3282
3797
  iconPath?: string | undefined;
3798
+ timeout?: number | undefined;
3283
3799
  sseReadTimeout?: number | undefined;
3284
3800
  initTimeout?: number | undefined;
3801
+ oauthRefreshWaitTimeout?: number | undefined;
3802
+ oauthRefreshCoordination?: boolean | undefined;
3803
+ oauthPersistenceWaitTimeout?: number | undefined;
3285
3804
  serverInstructions?: string | boolean | undefined;
3286
3805
  requiresOAuth?: boolean | undefined;
3287
3806
  oauth?: {
@@ -3299,6 +3818,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3299
3818
  skip_code_challenge_check?: boolean | undefined;
3300
3819
  audience?: string | undefined;
3301
3820
  forward_audience_on_refresh?: boolean | undefined;
3821
+ send_resource_parameter?: boolean | undefined;
3302
3822
  revocation_endpoint?: string | undefined;
3303
3823
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3304
3824
  } | undefined;
@@ -3321,11 +3841,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3321
3841
  description?: string | undefined;
3322
3842
  title?: string | undefined;
3323
3843
  chatMenu?: boolean | undefined;
3324
- timeout?: number | undefined;
3325
3844
  startup?: boolean | undefined;
3326
3845
  iconPath?: string | undefined;
3846
+ timeout?: number | undefined;
3327
3847
  sseReadTimeout?: number | undefined;
3328
3848
  initTimeout?: number | undefined;
3849
+ oauthRefreshWaitTimeout?: number | undefined;
3850
+ oauthRefreshCoordination?: boolean | undefined;
3851
+ oauthPersistenceWaitTimeout?: number | undefined;
3329
3852
  serverInstructions?: string | boolean | undefined;
3330
3853
  requiresOAuth?: boolean | undefined;
3331
3854
  oauth?: {
@@ -3343,6 +3866,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3343
3866
  skip_code_challenge_check?: boolean | undefined;
3344
3867
  audience?: string | undefined;
3345
3868
  forward_audience_on_refresh?: boolean | undefined;
3869
+ send_resource_parameter?: boolean | undefined;
3346
3870
  revocation_endpoint?: string | undefined;
3347
3871
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3348
3872
  } | undefined;
@@ -3376,6 +3900,21 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3376
3900
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
3377
3901
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
3378
3902
  initTimeout: z.ZodOptional<z.ZodNumber>;
3903
+ /**
3904
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
3905
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
3906
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
3907
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
3908
+ *
3909
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
3910
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
3911
+ * common case this wait exists to serve. Omit the field to take the default.
3912
+ */
3913
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
3914
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
3915
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
3916
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
3917
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
3379
3918
  /**
3380
3919
  * Whether the server is offered in chat.
3381
3920
  *
@@ -3464,6 +4003,27 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3464
4003
  * Ignored when `audience` itself is not configured.
3465
4004
  */
3466
4005
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
4006
+ /**
4007
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
4008
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
4009
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
4010
+ * (RFC 9728), never an operator-supplied string.
4011
+ *
4012
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
4013
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
4014
+ * fails an `/authorize` request carrying both `resource` and `scope` with
4015
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
4016
+ * `audience` above) to obtain an API-scoped token.
4017
+ *
4018
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
4019
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
4020
+ * still recorded on the stored client binding, so scope discovery, authorization
4021
+ * server discovery and re-authentication checks are unaffected.
4022
+ *
4023
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
4024
+ * from user-managed servers.
4025
+ */
4026
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
3467
4027
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
3468
4028
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
3469
4029
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -3483,6 +4043,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3483
4043
  skip_code_challenge_check?: boolean | undefined;
3484
4044
  audience?: string | undefined;
3485
4045
  forward_audience_on_refresh?: boolean | undefined;
4046
+ send_resource_parameter?: boolean | undefined;
3486
4047
  revocation_endpoint?: string | undefined;
3487
4048
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3488
4049
  }, {
@@ -3500,6 +4061,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3500
4061
  skip_code_challenge_check?: boolean | undefined;
3501
4062
  audience?: string | undefined;
3502
4063
  forward_audience_on_refresh?: boolean | undefined;
4064
+ send_resource_parameter?: boolean | undefined;
3503
4065
  revocation_endpoint?: string | undefined;
3504
4066
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3505
4067
  }>, {
@@ -3517,6 +4079,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3517
4079
  skip_code_challenge_check?: boolean | undefined;
3518
4080
  audience?: string | undefined;
3519
4081
  forward_audience_on_refresh?: boolean | undefined;
4082
+ send_resource_parameter?: boolean | undefined;
3520
4083
  revocation_endpoint?: string | undefined;
3521
4084
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3522
4085
  }, {
@@ -3534,6 +4097,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3534
4097
  skip_code_challenge_check?: boolean | undefined;
3535
4098
  audience?: string | undefined;
3536
4099
  forward_audience_on_refresh?: boolean | undefined;
4100
+ send_resource_parameter?: boolean | undefined;
3537
4101
  revocation_endpoint?: string | undefined;
3538
4102
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3539
4103
  }>>;
@@ -3585,6 +4149,13 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3585
4149
  } & {
3586
4150
  type: z.ZodDefault<z.ZodLiteral<"sse">>;
3587
4151
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4152
+ /**
4153
+ * Headers resolved from the live chat request and merged over `headers`.
4154
+ * Omitted during catalog discovery, which has no request context, so a
4155
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
4156
+ * On a duplicate header name the resolved `requestHeaders` value wins.
4157
+ */
4158
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3588
4159
  /**
3589
4160
  * On-Behalf-Of (OBO) token exchange configuration.
3590
4161
  * When configured, LibreChat exchanges the logged-in user's federated access token
@@ -3609,11 +4180,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3609
4180
  description?: string | undefined;
3610
4181
  title?: string | undefined;
3611
4182
  chatMenu?: boolean | undefined;
3612
- timeout?: number | undefined;
3613
4183
  startup?: boolean | undefined;
3614
4184
  iconPath?: string | undefined;
4185
+ timeout?: number | undefined;
3615
4186
  sseReadTimeout?: number | undefined;
3616
4187
  initTimeout?: number | undefined;
4188
+ oauthRefreshWaitTimeout?: number | undefined;
4189
+ oauthRefreshCoordination?: boolean | undefined;
4190
+ oauthPersistenceWaitTimeout?: number | undefined;
3617
4191
  serverInstructions?: string | boolean | undefined;
3618
4192
  requiresOAuth?: boolean | undefined;
3619
4193
  oauth?: {
@@ -3631,6 +4205,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3631
4205
  skip_code_challenge_check?: boolean | undefined;
3632
4206
  audience?: string | undefined;
3633
4207
  forward_audience_on_refresh?: boolean | undefined;
4208
+ send_resource_parameter?: boolean | undefined;
3634
4209
  revocation_endpoint?: string | undefined;
3635
4210
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3636
4211
  } | undefined;
@@ -3650,6 +4225,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3650
4225
  scopes: string;
3651
4226
  } | undefined;
3652
4227
  headers?: Record<string, string> | undefined;
4228
+ requestHeaders?: Record<string, string> | undefined;
3653
4229
  proxy?: string | undefined;
3654
4230
  }, {
3655
4231
  url: string;
@@ -3657,11 +4233,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3657
4233
  description?: string | undefined;
3658
4234
  title?: string | undefined;
3659
4235
  chatMenu?: boolean | undefined;
3660
- timeout?: number | undefined;
3661
4236
  startup?: boolean | undefined;
3662
4237
  iconPath?: string | undefined;
4238
+ timeout?: number | undefined;
3663
4239
  sseReadTimeout?: number | undefined;
3664
4240
  initTimeout?: number | undefined;
4241
+ oauthRefreshWaitTimeout?: number | undefined;
4242
+ oauthRefreshCoordination?: boolean | undefined;
4243
+ oauthPersistenceWaitTimeout?: number | undefined;
3665
4244
  serverInstructions?: string | boolean | undefined;
3666
4245
  requiresOAuth?: boolean | undefined;
3667
4246
  oauth?: {
@@ -3679,6 +4258,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3679
4258
  skip_code_challenge_check?: boolean | undefined;
3680
4259
  audience?: string | undefined;
3681
4260
  forward_audience_on_refresh?: boolean | undefined;
4261
+ send_resource_parameter?: boolean | undefined;
3682
4262
  revocation_endpoint?: string | undefined;
3683
4263
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3684
4264
  } | undefined;
@@ -3698,6 +4278,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3698
4278
  scopes: string;
3699
4279
  } | undefined;
3700
4280
  headers?: Record<string, string> | undefined;
4281
+ requestHeaders?: Record<string, string> | undefined;
3701
4282
  proxy?: string | undefined;
3702
4283
  }>, z.ZodObject<{
3703
4284
  /** Display name for the MCP server */
@@ -3716,6 +4297,21 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3716
4297
  /** Timeout (ms) for the long-lived SSE GET stream body before undici aborts it. Default: 300_000 (5 min). */
3717
4298
  sseReadTimeout: z.ZodOptional<z.ZodNumber>;
3718
4299
  initTimeout: z.ZodOptional<z.ZodNumber>;
4300
+ /**
4301
+ * How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
4302
+ * before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
4303
+ * faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
4304
+ * redemption aborts itself, because this wait runs inside the redemption that window governs.
4305
+ *
4306
+ * Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
4307
+ * contended refresh instead of adopting the rotation a peer is about to store, and that is the
4308
+ * common case this wait exists to serve. Omit the field to take the default.
4309
+ */
4310
+ oauthRefreshWaitTimeout: z.ZodOptional<z.ZodNumber>;
4311
+ /** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
4312
+ oauthRefreshCoordination: z.ZodOptional<z.ZodBoolean>;
4313
+ /** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
4314
+ oauthPersistenceWaitTimeout: z.ZodOptional<z.ZodNumber>;
3719
4315
  /**
3720
4316
  * Whether the server is offered in chat.
3721
4317
  *
@@ -3804,6 +4400,27 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3804
4400
  * Ignored when `audience` itself is not configured.
3805
4401
  */
3806
4402
  forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
4403
+ /**
4404
+ * Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
4405
+ * `authorization_code` exchange and the `refresh_token` grant. The value is the
4406
+ * canonical resource identifier from the MCP server's Protected Resource Metadata
4407
+ * (RFC 9728), never an operator-supplied string.
4408
+ *
4409
+ * Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
4410
+ * that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
4411
+ * fails an `/authorize` request carrying both `resource` and `scope` with
4412
+ * `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
4413
+ * `audience` above) to obtain an API-scoped token.
4414
+ *
4415
+ * Opting out suppresses the parameter only. Protected Resource Metadata is still
4416
+ * discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
4417
+ * still recorded on the stored client binding, so scope discovery, authorization
4418
+ * server discovery and re-authentication checks are unaffected.
4419
+ *
4420
+ * This field is only accepted from trusted/admin MCP configuration and is rejected
4421
+ * from user-managed servers.
4422
+ */
4423
+ send_resource_parameter: z.ZodOptional<z.ZodBoolean>;
3807
4424
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
3808
4425
  revocation_endpoint: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
3809
4426
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -3823,6 +4440,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3823
4440
  skip_code_challenge_check?: boolean | undefined;
3824
4441
  audience?: string | undefined;
3825
4442
  forward_audience_on_refresh?: boolean | undefined;
4443
+ send_resource_parameter?: boolean | undefined;
3826
4444
  revocation_endpoint?: string | undefined;
3827
4445
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3828
4446
  }, {
@@ -3840,6 +4458,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3840
4458
  skip_code_challenge_check?: boolean | undefined;
3841
4459
  audience?: string | undefined;
3842
4460
  forward_audience_on_refresh?: boolean | undefined;
4461
+ send_resource_parameter?: boolean | undefined;
3843
4462
  revocation_endpoint?: string | undefined;
3844
4463
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3845
4464
  }>, {
@@ -3857,6 +4476,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3857
4476
  skip_code_challenge_check?: boolean | undefined;
3858
4477
  audience?: string | undefined;
3859
4478
  forward_audience_on_refresh?: boolean | undefined;
4479
+ send_resource_parameter?: boolean | undefined;
3860
4480
  revocation_endpoint?: string | undefined;
3861
4481
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3862
4482
  }, {
@@ -3874,6 +4494,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3874
4494
  skip_code_challenge_check?: boolean | undefined;
3875
4495
  audience?: string | undefined;
3876
4496
  forward_audience_on_refresh?: boolean | undefined;
4497
+ send_resource_parameter?: boolean | undefined;
3877
4498
  revocation_endpoint?: string | undefined;
3878
4499
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3879
4500
  }>>;
@@ -3925,6 +4546,13 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3925
4546
  } & {
3926
4547
  type: z.ZodUnion<[z.ZodLiteral<"streamable-http">, z.ZodLiteral<"http">]>;
3927
4548
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4549
+ /**
4550
+ * Headers resolved from the live chat request and merged over `headers`.
4551
+ * Omitted during catalog discovery, which has no request context, so a
4552
+ * `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
4553
+ * On a duplicate header name the resolved `requestHeaders` value wins.
4554
+ */
4555
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3928
4556
  /**
3929
4557
  * On-Behalf-Of (OBO) token exchange configuration.
3930
4558
  * When configured, LibreChat exchanges the logged-in user's federated access token
@@ -3949,11 +4577,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3949
4577
  description?: string | undefined;
3950
4578
  title?: string | undefined;
3951
4579
  chatMenu?: boolean | undefined;
3952
- timeout?: number | undefined;
3953
4580
  startup?: boolean | undefined;
3954
4581
  iconPath?: string | undefined;
4582
+ timeout?: number | undefined;
3955
4583
  sseReadTimeout?: number | undefined;
3956
4584
  initTimeout?: number | undefined;
4585
+ oauthRefreshWaitTimeout?: number | undefined;
4586
+ oauthRefreshCoordination?: boolean | undefined;
4587
+ oauthPersistenceWaitTimeout?: number | undefined;
3957
4588
  serverInstructions?: string | boolean | undefined;
3958
4589
  requiresOAuth?: boolean | undefined;
3959
4590
  oauth?: {
@@ -3971,6 +4602,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3971
4602
  skip_code_challenge_check?: boolean | undefined;
3972
4603
  audience?: string | undefined;
3973
4604
  forward_audience_on_refresh?: boolean | undefined;
4605
+ send_resource_parameter?: boolean | undefined;
3974
4606
  revocation_endpoint?: string | undefined;
3975
4607
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
3976
4608
  } | undefined;
@@ -3990,6 +4622,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3990
4622
  scopes: string;
3991
4623
  } | undefined;
3992
4624
  headers?: Record<string, string> | undefined;
4625
+ requestHeaders?: Record<string, string> | undefined;
3993
4626
  proxy?: string | undefined;
3994
4627
  }, {
3995
4628
  type: "streamable-http" | "http";
@@ -3997,11 +4630,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
3997
4630
  description?: string | undefined;
3998
4631
  title?: string | undefined;
3999
4632
  chatMenu?: boolean | undefined;
4000
- timeout?: number | undefined;
4001
4633
  startup?: boolean | undefined;
4002
4634
  iconPath?: string | undefined;
4635
+ timeout?: number | undefined;
4003
4636
  sseReadTimeout?: number | undefined;
4004
4637
  initTimeout?: number | undefined;
4638
+ oauthRefreshWaitTimeout?: number | undefined;
4639
+ oauthRefreshCoordination?: boolean | undefined;
4640
+ oauthPersistenceWaitTimeout?: number | undefined;
4005
4641
  serverInstructions?: string | boolean | undefined;
4006
4642
  requiresOAuth?: boolean | undefined;
4007
4643
  oauth?: {
@@ -4019,6 +4655,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
4019
4655
  skip_code_challenge_check?: boolean | undefined;
4020
4656
  audience?: string | undefined;
4021
4657
  forward_audience_on_refresh?: boolean | undefined;
4658
+ send_resource_parameter?: boolean | undefined;
4022
4659
  revocation_endpoint?: string | undefined;
4023
4660
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4024
4661
  } | undefined;
@@ -4038,6 +4675,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
4038
4675
  scopes: string;
4039
4676
  } | undefined;
4040
4677
  headers?: Record<string, string> | undefined;
4678
+ requestHeaders?: Record<string, string> | undefined;
4041
4679
  proxy?: string | undefined;
4042
4680
  }>]>>;
4043
4681
  export type MCPOptions = z.infer<typeof MCPOptionsSchema>;
@@ -4079,6 +4717,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4079
4717
  revocation_endpoint: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
4080
4718
  audience: z.ZodOptional<z.ZodNever>;
4081
4719
  forward_audience_on_refresh: z.ZodOptional<z.ZodNever>;
4720
+ send_resource_parameter: z.ZodOptional<z.ZodNever>;
4082
4721
  }, "strip", z.ZodTypeAny, {
4083
4722
  authorization_url?: string | undefined;
4084
4723
  scope?: string | undefined;
@@ -4094,6 +4733,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4094
4733
  skip_code_challenge_check?: boolean | undefined;
4095
4734
  audience?: undefined;
4096
4735
  forward_audience_on_refresh?: undefined;
4736
+ send_resource_parameter?: undefined;
4097
4737
  revocation_endpoint?: string | undefined;
4098
4738
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4099
4739
  }, {
@@ -4111,6 +4751,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4111
4751
  skip_code_challenge_check?: boolean | undefined;
4112
4752
  audience?: undefined;
4113
4753
  forward_audience_on_refresh?: undefined;
4754
+ send_resource_parameter?: undefined;
4114
4755
  revocation_endpoint?: string | undefined;
4115
4756
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4116
4757
  }>, {
@@ -4128,6 +4769,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4128
4769
  skip_code_challenge_check?: boolean | undefined;
4129
4770
  audience?: undefined;
4130
4771
  forward_audience_on_refresh?: undefined;
4772
+ send_resource_parameter?: undefined;
4131
4773
  revocation_endpoint?: string | undefined;
4132
4774
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4133
4775
  }, {
@@ -4145,6 +4787,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4145
4787
  skip_code_challenge_check?: boolean | undefined;
4146
4788
  audience?: undefined;
4147
4789
  forward_audience_on_refresh?: undefined;
4790
+ send_resource_parameter?: undefined;
4148
4791
  revocation_endpoint?: string | undefined;
4149
4792
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4150
4793
  }>>;
@@ -4181,6 +4824,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4181
4824
  revocation_endpoint: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
4182
4825
  audience: z.ZodOptional<z.ZodNever>;
4183
4826
  forward_audience_on_refresh: z.ZodOptional<z.ZodNever>;
4827
+ send_resource_parameter: z.ZodOptional<z.ZodNever>;
4184
4828
  }, "strip", z.ZodTypeAny, {
4185
4829
  authorization_url?: string | undefined;
4186
4830
  scope?: string | undefined;
@@ -4196,6 +4840,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4196
4840
  skip_code_challenge_check?: boolean | undefined;
4197
4841
  audience?: undefined;
4198
4842
  forward_audience_on_refresh?: undefined;
4843
+ send_resource_parameter?: undefined;
4199
4844
  revocation_endpoint?: string | undefined;
4200
4845
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4201
4846
  }, {
@@ -4213,6 +4858,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4213
4858
  skip_code_challenge_check?: boolean | undefined;
4214
4859
  audience?: undefined;
4215
4860
  forward_audience_on_refresh?: undefined;
4861
+ send_resource_parameter?: undefined;
4216
4862
  revocation_endpoint?: string | undefined;
4217
4863
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4218
4864
  }>, {
@@ -4230,6 +4876,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4230
4876
  skip_code_challenge_check?: boolean | undefined;
4231
4877
  audience?: undefined;
4232
4878
  forward_audience_on_refresh?: undefined;
4879
+ send_resource_parameter?: undefined;
4233
4880
  revocation_endpoint?: string | undefined;
4234
4881
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4235
4882
  }, {
@@ -4247,6 +4894,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4247
4894
  skip_code_challenge_check?: boolean | undefined;
4248
4895
  audience?: undefined;
4249
4896
  forward_audience_on_refresh?: undefined;
4897
+ send_resource_parameter?: undefined;
4250
4898
  revocation_endpoint?: string | undefined;
4251
4899
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4252
4900
  }>>;
@@ -4286,6 +4934,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4286
4934
  revocation_endpoint: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
4287
4935
  audience: z.ZodOptional<z.ZodNever>;
4288
4936
  forward_audience_on_refresh: z.ZodOptional<z.ZodNever>;
4937
+ send_resource_parameter: z.ZodOptional<z.ZodNever>;
4289
4938
  }, "strip", z.ZodTypeAny, {
4290
4939
  authorization_url?: string | undefined;
4291
4940
  scope?: string | undefined;
@@ -4301,6 +4950,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4301
4950
  skip_code_challenge_check?: boolean | undefined;
4302
4951
  audience?: undefined;
4303
4952
  forward_audience_on_refresh?: undefined;
4953
+ send_resource_parameter?: undefined;
4304
4954
  revocation_endpoint?: string | undefined;
4305
4955
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4306
4956
  }, {
@@ -4318,6 +4968,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4318
4968
  skip_code_challenge_check?: boolean | undefined;
4319
4969
  audience?: undefined;
4320
4970
  forward_audience_on_refresh?: undefined;
4971
+ send_resource_parameter?: undefined;
4321
4972
  revocation_endpoint?: string | undefined;
4322
4973
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4323
4974
  }>, {
@@ -4335,6 +4986,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4335
4986
  skip_code_challenge_check?: boolean | undefined;
4336
4987
  audience?: undefined;
4337
4988
  forward_audience_on_refresh?: undefined;
4989
+ send_resource_parameter?: undefined;
4338
4990
  revocation_endpoint?: string | undefined;
4339
4991
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4340
4992
  }, {
@@ -4352,6 +5004,7 @@ export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
4352
5004
  skip_code_challenge_check?: boolean | undefined;
4353
5005
  audience?: undefined;
4354
5006
  forward_audience_on_refresh?: undefined;
5007
+ send_resource_parameter?: undefined;
4355
5008
  revocation_endpoint?: string | undefined;
4356
5009
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
4357
5010
  }>>;