@stackone/transport 2.42.0 → 2.43.0
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.
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +60 -8
- package/dist/index.d.mts +62 -10
- package/dist/index.mjs +9 -9
- package/package.json +5 -4
package/dist/index.d.cts
CHANGED
|
@@ -436,6 +436,7 @@ type HttpParameters = {
|
|
|
436
436
|
headers: HttpHeaders;
|
|
437
437
|
};
|
|
438
438
|
interface IHttpClient {
|
|
439
|
+
readonly egressProxyUrl?: string;
|
|
439
440
|
request<P, T>({
|
|
440
441
|
headers,
|
|
441
442
|
url,
|
|
@@ -579,13 +580,15 @@ type TransportFactory = ({
|
|
|
579
580
|
redisClientConfig,
|
|
580
581
|
context,
|
|
581
582
|
requestConfig,
|
|
582
|
-
httpsAgentConfig
|
|
583
|
+
httpsAgentConfig,
|
|
584
|
+
egressProxyUrl
|
|
583
585
|
}: {
|
|
584
586
|
logger?: ILogger;
|
|
585
587
|
redisClientConfig?: RedisClientConfig;
|
|
586
588
|
context?: RequestContext;
|
|
587
589
|
requestConfig?: RequestConfig;
|
|
588
590
|
httpsAgentConfig?: https.AgentOptions;
|
|
591
|
+
egressProxyUrl?: string;
|
|
589
592
|
}) => Promise<AxiosInstance>;
|
|
590
593
|
//#endregion
|
|
591
594
|
//#region src/signing/types.d.ts
|
|
@@ -663,6 +666,43 @@ declare const HttpErrorMessages: Record<number, string>;
|
|
|
663
666
|
//#region src/customErrors/index.d.ts
|
|
664
667
|
declare const translateCustomError: (response: HttpResponse, configs?: CustomErrorConfig[], credentials?: Record<string, unknown>) => HttpResponse;
|
|
665
668
|
//#endregion
|
|
669
|
+
//#region src/egressProxy/egressProxyError.d.ts
|
|
670
|
+
declare class EgressProxyError extends Error {
|
|
671
|
+
readonly status: number;
|
|
672
|
+
readonly proxyStatus?: number;
|
|
673
|
+
readonly proxyReason?: string;
|
|
674
|
+
readonly cause?: unknown;
|
|
675
|
+
constructor(message: string, {
|
|
676
|
+
status,
|
|
677
|
+
proxyStatus,
|
|
678
|
+
proxyReason,
|
|
679
|
+
cause
|
|
680
|
+
}: {
|
|
681
|
+
status: number;
|
|
682
|
+
proxyStatus?: number;
|
|
683
|
+
proxyReason?: string;
|
|
684
|
+
cause?: unknown;
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
declare class ConflictingProxyError extends Error {
|
|
688
|
+
name: string;
|
|
689
|
+
}
|
|
690
|
+
declare class UntunnelledTransportError extends Error {
|
|
691
|
+
name: string;
|
|
692
|
+
}
|
|
693
|
+
declare class InvalidEgressProxyUrlError extends Error {
|
|
694
|
+
name: string;
|
|
695
|
+
}
|
|
696
|
+
declare const isEgressProxyError: (value: unknown) => value is EgressProxyError;
|
|
697
|
+
declare const findEgressProxyError: (error: unknown) => EgressProxyError | undefined;
|
|
698
|
+
//#endregion
|
|
699
|
+
//#region src/egressProxy/egressProxyFetch.d.ts
|
|
700
|
+
declare const createEgressProxyFetch: (egressProxyUrl: string, {
|
|
701
|
+
connectTimeoutMs
|
|
702
|
+
}?: {
|
|
703
|
+
connectTimeoutMs?: number;
|
|
704
|
+
}) => FetchLike;
|
|
705
|
+
//#endregion
|
|
666
706
|
//#region src/errors/httpResponseError.d.ts
|
|
667
707
|
declare class HttpResponseError extends Error {
|
|
668
708
|
readonly response: HttpResponse;
|
|
@@ -754,13 +794,15 @@ declare const getTransportInstance: ({
|
|
|
754
794
|
redisClientConfig,
|
|
755
795
|
context,
|
|
756
796
|
requestConfig,
|
|
757
|
-
httpsAgentConfig
|
|
797
|
+
httpsAgentConfig,
|
|
798
|
+
egressProxyUrl
|
|
758
799
|
}?: {
|
|
759
800
|
logger?: ILogger;
|
|
760
801
|
redisClientConfig?: RedisClientConfig;
|
|
761
802
|
context?: RequestContext;
|
|
762
803
|
requestConfig?: RequestConfig;
|
|
763
804
|
httpsAgentConfig?: https.AgentOptions;
|
|
805
|
+
egressProxyUrl?: string;
|
|
764
806
|
}) => Promise<AxiosInstance>;
|
|
765
807
|
//#endregion
|
|
766
808
|
//#region src/httpClient/cancelledCalls.d.ts
|
|
@@ -770,18 +812,21 @@ declare const getCancelledCallCount: (signal: AbortSignal) => number;
|
|
|
770
812
|
declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
771
813
|
#private;
|
|
772
814
|
name: string;
|
|
815
|
+
readonly egressProxyUrl?: string;
|
|
773
816
|
constructor({
|
|
774
817
|
transportFactory,
|
|
775
818
|
getRedisClient,
|
|
776
819
|
logger,
|
|
777
820
|
redisClientConfig,
|
|
778
|
-
errorMappingFn
|
|
821
|
+
errorMappingFn,
|
|
822
|
+
egressProxyUrl
|
|
779
823
|
}?: {
|
|
780
824
|
transportFactory?: TransportFactory;
|
|
781
825
|
getRedisClient?: RedisClientBuilder;
|
|
782
826
|
logger?: ILogger;
|
|
783
827
|
redisClientConfig?: RedisClientConfig;
|
|
784
828
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
829
|
+
egressProxyUrl?: string;
|
|
785
830
|
});
|
|
786
831
|
request<P, T>({
|
|
787
832
|
headers,
|
|
@@ -896,19 +941,21 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
896
941
|
}
|
|
897
942
|
//#endregion
|
|
898
943
|
//#region src/httpClient/httpClientManager.d.ts
|
|
899
|
-
declare const buildHttpClientInstance: <TError extends Error = Error>(redisClientConfig: RedisClientConfig, logger?: ILogger, errorMappingFn?: ErrorMappingFn<TError
|
|
944
|
+
declare const buildHttpClientInstance: <TError extends Error = Error>(redisClientConfig: RedisClientConfig, logger?: ILogger, errorMappingFn?: ErrorMappingFn<TError>, egressProxyUrl?: string) => IHttpClient;
|
|
900
945
|
declare class HttpClientManager {
|
|
901
|
-
private static
|
|
946
|
+
private static httpClientInstances;
|
|
902
947
|
static getInstance<TError extends Error = Error>({
|
|
903
948
|
redisClientConfig,
|
|
904
949
|
logger,
|
|
905
950
|
errorMappingFn,
|
|
906
|
-
getHttpClient
|
|
951
|
+
getHttpClient,
|
|
952
|
+
egressProxyUrl
|
|
907
953
|
}: {
|
|
908
954
|
redisClientConfig: RedisClientConfig;
|
|
909
955
|
logger?: ILogger;
|
|
910
956
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
911
957
|
getHttpClient?: typeof buildHttpClientInstance;
|
|
958
|
+
egressProxyUrl?: string;
|
|
912
959
|
}): Promise<IHttpClient>;
|
|
913
960
|
static resetInstance(): void;
|
|
914
961
|
}
|
|
@@ -946,6 +993,7 @@ type HttpTransportInstanceConfig = {
|
|
|
946
993
|
requestConfig?: RequestConfig;
|
|
947
994
|
concurrencyManager?: ConcurrencyManager;
|
|
948
995
|
rateLimitManager?: RateLimitManager;
|
|
996
|
+
egressProxyUrl?: string;
|
|
949
997
|
};
|
|
950
998
|
interface InterceptorManager<V> extends AxiosInterceptorManager<V> {
|
|
951
999
|
forEach(fn: (handler: any) => unknown): void;
|
|
@@ -962,7 +1010,8 @@ declare class HttpTransportFactory {
|
|
|
962
1010
|
context,
|
|
963
1011
|
requestConfig,
|
|
964
1012
|
concurrencyManager,
|
|
965
|
-
rateLimitManager
|
|
1013
|
+
rateLimitManager,
|
|
1014
|
+
egressProxyUrl
|
|
966
1015
|
}: HttpTransportInstanceConfig): AxiosInstance;
|
|
967
1016
|
private static applyInterceptors;
|
|
968
1017
|
private static resolveInterceptorInstance;
|
|
@@ -1071,6 +1120,7 @@ type McpClientConfig = {
|
|
|
1071
1120
|
timeout?: number;
|
|
1072
1121
|
requestConfig?: RequestConfig;
|
|
1073
1122
|
context?: RequestContext;
|
|
1123
|
+
egressProxyUrl?: string;
|
|
1074
1124
|
};
|
|
1075
1125
|
type McpToolContentBlock = {
|
|
1076
1126
|
type: string;
|
|
@@ -1173,6 +1223,7 @@ type McpServerProbe = {
|
|
|
1173
1223
|
scopes?: string[];
|
|
1174
1224
|
authorizationServers?: string[];
|
|
1175
1225
|
dynamicRegistration?: boolean;
|
|
1226
|
+
clientIdMetadataDocument?: boolean;
|
|
1176
1227
|
resourceMetadataUrl?: string;
|
|
1177
1228
|
tokenEndpoint?: string;
|
|
1178
1229
|
refreshTokenGrant?: boolean;
|
|
@@ -1197,6 +1248,7 @@ type ResourceMetadata = {
|
|
|
1197
1248
|
};
|
|
1198
1249
|
type AuthorizationServerMetadata$1 = {
|
|
1199
1250
|
registration_endpoint?: string;
|
|
1251
|
+
client_id_metadata_document_supported?: boolean;
|
|
1200
1252
|
token_endpoint?: string;
|
|
1201
1253
|
grant_types_supported?: string[];
|
|
1202
1254
|
scopes_supported?: string[];
|
|
@@ -1391,4 +1443,4 @@ type LockEntry = {
|
|
|
1391
1443
|
unlock: Unlock;
|
|
1392
1444
|
};
|
|
1393
1445
|
//#endregion
|
|
1394
|
-
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorInterceptor, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeader, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParamValue, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type HttpTransportInstanceConfig, type ICacheClient, type IHttpClient, type IMcpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Interceptor, type InterceptorConfigs, type InterceptorDependencies, type InterceptorDependencyInjector, type InterceptorManager, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpIconFinder, type McpListToolsParams, type McpListToolsResult, type McpOAuthDiscoveryDependencies, type McpOAuthDiscoveryOptions, type McpSdkDependencies, type McpServerInfo, type McpServerProbe, type McpServerProber, type McpToolContentBlock, type McpToolDefinition, MemoryStore, type MemoryStoreConfig, type OnFulfilledInterceptors, PersistentInstanceManager, type ProbeDependencies, type PruneCount, type PubSubListener, type QueryArrayFormat, QueryArrayFormats, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, type RequestAbortReason, RequestAbortedError, RequestClientFactory, type RequestConfig, type RequestContext, type RequestInterceptor, type RequestInterceptorConfig, type RequestInterceptorTuple, type RequestParameter, RequestParameterLocations, type ResponseInterceptor, type ResponseInterceptorConfig, type ResponseInterceptorTuple, type ResponseType, type SameSiteIssuerFallback, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, discoverMcpOAuthServerInfo, discoverSameSiteAuthorizationServerMetadata, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSameSiteIssuer, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
|
1446
|
+
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, ConflictingProxyError, type CustomErrorConfig, EgressProxyError, type ErrorInterceptor, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeader, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParamValue, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type HttpTransportInstanceConfig, type ICacheClient, type IHttpClient, type IMcpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Interceptor, type InterceptorConfigs, type InterceptorDependencies, type InterceptorDependencyInjector, type InterceptorManager, InvalidEgressProxyUrlError, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpIconFinder, type McpListToolsParams, type McpListToolsResult, type McpOAuthDiscoveryDependencies, type McpOAuthDiscoveryOptions, type McpSdkDependencies, type McpServerInfo, type McpServerProbe, type McpServerProber, type McpToolContentBlock, type McpToolDefinition, MemoryStore, type MemoryStoreConfig, type OnFulfilledInterceptors, PersistentInstanceManager, type ProbeDependencies, type PruneCount, type PubSubListener, type QueryArrayFormat, QueryArrayFormats, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, type RequestAbortReason, RequestAbortedError, RequestClientFactory, type RequestConfig, type RequestContext, type RequestInterceptor, type RequestInterceptorConfig, type RequestInterceptorTuple, type RequestParameter, RequestParameterLocations, type ResponseInterceptor, type ResponseInterceptorConfig, type ResponseInterceptorTuple, type ResponseType, type SameSiteIssuerFallback, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, UntunnelledTransportError, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, createEgressProxyFetch, discoverMcpOAuthServerInfo, discoverSameSiteAuthorizationServerMetadata, findEgressProxyError, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isEgressProxyError, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSameSiteIssuer, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __name } from "./chunk-BhWHdk3m.mjs";
|
|
2
2
|
import { z } from "@stackone/utils";
|
|
3
3
|
import * as redis from "redis";
|
|
4
|
-
import { AxiosError, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from "axios";
|
|
5
|
-
import https from "node:https";
|
|
6
4
|
import http, { AgentOptions } from "node:http";
|
|
5
|
+
import https from "node:https";
|
|
6
|
+
import { AxiosError, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from "axios";
|
|
7
7
|
import { Readable } from "node:stream";
|
|
8
8
|
import { AuthorizationServerMetadata, Client, ClientOptions, FetchLike, OAuthProtectedResourceMetadata, OAuthServerInfo, StreamableHTTPClientTransportOptions, Transport } from "@modelcontextprotocol/client";
|
|
9
9
|
import { ILogger } from "@stackone/logger";
|
|
@@ -435,6 +435,7 @@ type HttpParameters = {
|
|
|
435
435
|
headers: HttpHeaders;
|
|
436
436
|
};
|
|
437
437
|
interface IHttpClient {
|
|
438
|
+
readonly egressProxyUrl?: string;
|
|
438
439
|
request<P, T>({
|
|
439
440
|
headers,
|
|
440
441
|
url,
|
|
@@ -578,13 +579,15 @@ type TransportFactory = ({
|
|
|
578
579
|
redisClientConfig,
|
|
579
580
|
context,
|
|
580
581
|
requestConfig,
|
|
581
|
-
httpsAgentConfig
|
|
582
|
+
httpsAgentConfig,
|
|
583
|
+
egressProxyUrl
|
|
582
584
|
}: {
|
|
583
585
|
logger?: ILogger;
|
|
584
586
|
redisClientConfig?: RedisClientConfig;
|
|
585
587
|
context?: RequestContext;
|
|
586
588
|
requestConfig?: RequestConfig;
|
|
587
589
|
httpsAgentConfig?: https.AgentOptions;
|
|
590
|
+
egressProxyUrl?: string;
|
|
588
591
|
}) => Promise<AxiosInstance>;
|
|
589
592
|
//#endregion
|
|
590
593
|
//#region src/signing/types.d.ts
|
|
@@ -662,6 +665,43 @@ declare const HttpErrorMessages: Record<number, string>;
|
|
|
662
665
|
//#region src/customErrors/index.d.ts
|
|
663
666
|
declare const translateCustomError: (response: HttpResponse, configs?: CustomErrorConfig[], credentials?: Record<string, unknown>) => HttpResponse;
|
|
664
667
|
//#endregion
|
|
668
|
+
//#region src/egressProxy/egressProxyError.d.ts
|
|
669
|
+
declare class EgressProxyError extends Error {
|
|
670
|
+
readonly status: number;
|
|
671
|
+
readonly proxyStatus?: number;
|
|
672
|
+
readonly proxyReason?: string;
|
|
673
|
+
readonly cause?: unknown;
|
|
674
|
+
constructor(message: string, {
|
|
675
|
+
status,
|
|
676
|
+
proxyStatus,
|
|
677
|
+
proxyReason,
|
|
678
|
+
cause
|
|
679
|
+
}: {
|
|
680
|
+
status: number;
|
|
681
|
+
proxyStatus?: number;
|
|
682
|
+
proxyReason?: string;
|
|
683
|
+
cause?: unknown;
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
declare class ConflictingProxyError extends Error {
|
|
687
|
+
name: string;
|
|
688
|
+
}
|
|
689
|
+
declare class UntunnelledTransportError extends Error {
|
|
690
|
+
name: string;
|
|
691
|
+
}
|
|
692
|
+
declare class InvalidEgressProxyUrlError extends Error {
|
|
693
|
+
name: string;
|
|
694
|
+
}
|
|
695
|
+
declare const isEgressProxyError: (value: unknown) => value is EgressProxyError;
|
|
696
|
+
declare const findEgressProxyError: (error: unknown) => EgressProxyError | undefined;
|
|
697
|
+
//#endregion
|
|
698
|
+
//#region src/egressProxy/egressProxyFetch.d.ts
|
|
699
|
+
declare const createEgressProxyFetch: (egressProxyUrl: string, {
|
|
700
|
+
connectTimeoutMs
|
|
701
|
+
}?: {
|
|
702
|
+
connectTimeoutMs?: number;
|
|
703
|
+
}) => FetchLike;
|
|
704
|
+
//#endregion
|
|
665
705
|
//#region src/errors/httpResponseError.d.ts
|
|
666
706
|
declare class HttpResponseError extends Error {
|
|
667
707
|
readonly response: HttpResponse;
|
|
@@ -753,13 +793,15 @@ declare const getTransportInstance: ({
|
|
|
753
793
|
redisClientConfig,
|
|
754
794
|
context,
|
|
755
795
|
requestConfig,
|
|
756
|
-
httpsAgentConfig
|
|
796
|
+
httpsAgentConfig,
|
|
797
|
+
egressProxyUrl
|
|
757
798
|
}?: {
|
|
758
799
|
logger?: ILogger;
|
|
759
800
|
redisClientConfig?: RedisClientConfig;
|
|
760
801
|
context?: RequestContext;
|
|
761
802
|
requestConfig?: RequestConfig;
|
|
762
803
|
httpsAgentConfig?: https.AgentOptions;
|
|
804
|
+
egressProxyUrl?: string;
|
|
763
805
|
}) => Promise<AxiosInstance>;
|
|
764
806
|
//#endregion
|
|
765
807
|
//#region src/httpClient/cancelledCalls.d.ts
|
|
@@ -769,18 +811,21 @@ declare const getCancelledCallCount: (signal: AbortSignal) => number;
|
|
|
769
811
|
declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
770
812
|
#private;
|
|
771
813
|
name: string;
|
|
814
|
+
readonly egressProxyUrl?: string;
|
|
772
815
|
constructor({
|
|
773
816
|
transportFactory,
|
|
774
817
|
getRedisClient,
|
|
775
818
|
logger,
|
|
776
819
|
redisClientConfig,
|
|
777
|
-
errorMappingFn
|
|
820
|
+
errorMappingFn,
|
|
821
|
+
egressProxyUrl
|
|
778
822
|
}?: {
|
|
779
823
|
transportFactory?: TransportFactory;
|
|
780
824
|
getRedisClient?: RedisClientBuilder;
|
|
781
825
|
logger?: ILogger;
|
|
782
826
|
redisClientConfig?: RedisClientConfig;
|
|
783
827
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
828
|
+
egressProxyUrl?: string;
|
|
784
829
|
});
|
|
785
830
|
request<P, T>({
|
|
786
831
|
headers,
|
|
@@ -895,19 +940,21 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
895
940
|
}
|
|
896
941
|
//#endregion
|
|
897
942
|
//#region src/httpClient/httpClientManager.d.ts
|
|
898
|
-
declare const buildHttpClientInstance: <TError extends Error = Error>(redisClientConfig: RedisClientConfig, logger?: ILogger, errorMappingFn?: ErrorMappingFn<TError
|
|
943
|
+
declare const buildHttpClientInstance: <TError extends Error = Error>(redisClientConfig: RedisClientConfig, logger?: ILogger, errorMappingFn?: ErrorMappingFn<TError>, egressProxyUrl?: string) => IHttpClient;
|
|
899
944
|
declare class HttpClientManager {
|
|
900
|
-
private static
|
|
945
|
+
private static httpClientInstances;
|
|
901
946
|
static getInstance<TError extends Error = Error>({
|
|
902
947
|
redisClientConfig,
|
|
903
948
|
logger,
|
|
904
949
|
errorMappingFn,
|
|
905
|
-
getHttpClient
|
|
950
|
+
getHttpClient,
|
|
951
|
+
egressProxyUrl
|
|
906
952
|
}: {
|
|
907
953
|
redisClientConfig: RedisClientConfig;
|
|
908
954
|
logger?: ILogger;
|
|
909
955
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
910
956
|
getHttpClient?: typeof buildHttpClientInstance;
|
|
957
|
+
egressProxyUrl?: string;
|
|
911
958
|
}): Promise<IHttpClient>;
|
|
912
959
|
static resetInstance(): void;
|
|
913
960
|
}
|
|
@@ -945,6 +992,7 @@ type HttpTransportInstanceConfig = {
|
|
|
945
992
|
requestConfig?: RequestConfig;
|
|
946
993
|
concurrencyManager?: ConcurrencyManager;
|
|
947
994
|
rateLimitManager?: RateLimitManager;
|
|
995
|
+
egressProxyUrl?: string;
|
|
948
996
|
};
|
|
949
997
|
interface InterceptorManager<V> extends AxiosInterceptorManager<V> {
|
|
950
998
|
forEach(fn: (handler: any) => unknown): void;
|
|
@@ -961,7 +1009,8 @@ declare class HttpTransportFactory {
|
|
|
961
1009
|
context,
|
|
962
1010
|
requestConfig,
|
|
963
1011
|
concurrencyManager,
|
|
964
|
-
rateLimitManager
|
|
1012
|
+
rateLimitManager,
|
|
1013
|
+
egressProxyUrl
|
|
965
1014
|
}: HttpTransportInstanceConfig): AxiosInstance;
|
|
966
1015
|
private static applyInterceptors;
|
|
967
1016
|
private static resolveInterceptorInstance;
|
|
@@ -1070,6 +1119,7 @@ type McpClientConfig = {
|
|
|
1070
1119
|
timeout?: number;
|
|
1071
1120
|
requestConfig?: RequestConfig;
|
|
1072
1121
|
context?: RequestContext;
|
|
1122
|
+
egressProxyUrl?: string;
|
|
1073
1123
|
};
|
|
1074
1124
|
type McpToolContentBlock = {
|
|
1075
1125
|
type: string;
|
|
@@ -1172,6 +1222,7 @@ type McpServerProbe = {
|
|
|
1172
1222
|
scopes?: string[];
|
|
1173
1223
|
authorizationServers?: string[];
|
|
1174
1224
|
dynamicRegistration?: boolean;
|
|
1225
|
+
clientIdMetadataDocument?: boolean;
|
|
1175
1226
|
resourceMetadataUrl?: string;
|
|
1176
1227
|
tokenEndpoint?: string;
|
|
1177
1228
|
refreshTokenGrant?: boolean;
|
|
@@ -1196,6 +1247,7 @@ type ResourceMetadata = {
|
|
|
1196
1247
|
};
|
|
1197
1248
|
type AuthorizationServerMetadata$1 = {
|
|
1198
1249
|
registration_endpoint?: string;
|
|
1250
|
+
client_id_metadata_document_supported?: boolean;
|
|
1199
1251
|
token_endpoint?: string;
|
|
1200
1252
|
grant_types_supported?: string[];
|
|
1201
1253
|
scopes_supported?: string[];
|
|
@@ -1390,4 +1442,4 @@ type LockEntry = {
|
|
|
1390
1442
|
unlock: Unlock;
|
|
1391
1443
|
};
|
|
1392
1444
|
//#endregion
|
|
1393
|
-
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorInterceptor, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeader, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParamValue, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type HttpTransportInstanceConfig, type ICacheClient, type IHttpClient, type IMcpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Interceptor, type InterceptorConfigs, type InterceptorDependencies, type InterceptorDependencyInjector, type InterceptorManager, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpIconFinder, type McpListToolsParams, type McpListToolsResult, type McpOAuthDiscoveryDependencies, type McpOAuthDiscoveryOptions, type McpSdkDependencies, type McpServerInfo, type McpServerProbe, type McpServerProber, type McpToolContentBlock, type McpToolDefinition, MemoryStore, type MemoryStoreConfig, type OnFulfilledInterceptors, PersistentInstanceManager, type ProbeDependencies, type PruneCount, type PubSubListener, type QueryArrayFormat, QueryArrayFormats, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, type RequestAbortReason, RequestAbortedError, RequestClientFactory, type RequestConfig, type RequestContext, type RequestInterceptor, type RequestInterceptorConfig, type RequestInterceptorTuple, type RequestParameter, RequestParameterLocations, type ResponseInterceptor, type ResponseInterceptorConfig, type ResponseInterceptorTuple, type ResponseType, type SameSiteIssuerFallback, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, discoverMcpOAuthServerInfo, discoverSameSiteAuthorizationServerMetadata, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSameSiteIssuer, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
|
1445
|
+
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, ConflictingProxyError, type CustomErrorConfig, EgressProxyError, type ErrorInterceptor, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeader, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParamValue, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type HttpTransportInstanceConfig, type ICacheClient, type IHttpClient, type IMcpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Interceptor, type InterceptorConfigs, type InterceptorDependencies, type InterceptorDependencyInjector, type InterceptorManager, InvalidEgressProxyUrlError, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpIconFinder, type McpListToolsParams, type McpListToolsResult, type McpOAuthDiscoveryDependencies, type McpOAuthDiscoveryOptions, type McpSdkDependencies, type McpServerInfo, type McpServerProbe, type McpServerProber, type McpToolContentBlock, type McpToolDefinition, MemoryStore, type MemoryStoreConfig, type OnFulfilledInterceptors, PersistentInstanceManager, type ProbeDependencies, type PruneCount, type PubSubListener, type QueryArrayFormat, QueryArrayFormats, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, type RequestAbortReason, RequestAbortedError, RequestClientFactory, type RequestConfig, type RequestContext, type RequestInterceptor, type RequestInterceptorConfig, type RequestInterceptorTuple, type RequestParameter, RequestParameterLocations, type ResponseInterceptor, type ResponseInterceptorConfig, type ResponseInterceptorTuple, type ResponseType, type SameSiteIssuerFallback, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, UntunnelledTransportError, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, createEgressProxyFetch, discoverMcpOAuthServerInfo, discoverSameSiteAuthorizationServerMetadata, findEgressProxyError, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isEgressProxyError, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSameSiteIssuer, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|