@stackone/transport 2.40.3 → 2.41.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 +8 -8
- package/dist/index.d.cts +26 -4
- package/dist/index.d.mts +26 -4
- package/dist/index.mjs +9 -9
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ import * as redis from "redis";
|
|
|
6
6
|
import * as tls$1 from "tls";
|
|
7
7
|
import { Readable } from "node:stream";
|
|
8
8
|
import { z } from "@stackone/utils";
|
|
9
|
-
import { Client, ClientOptions, StreamableHTTPClientTransportOptions, Transport } from "@modelcontextprotocol/client";
|
|
9
|
+
import { AuthorizationServerMetadata, Client, ClientOptions, FetchLike, OAuthProtectedResourceMetadata, OAuthServerInfo, StreamableHTTPClientTransportOptions, Transport } from "@modelcontextprotocol/client";
|
|
10
10
|
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
12
|
//#endregion
|
|
@@ -1140,6 +1140,28 @@ declare class McpClient implements IMcpClient {
|
|
|
1140
1140
|
type McpIconFinder = (serverUrl: string, advertisedIconUrl?: string) => Promise<string | undefined>;
|
|
1141
1141
|
declare const findMcpIcon: (serverUrl: string, advertisedIconUrl?: string, fetchFn?: typeof fetch) => Promise<string | undefined>;
|
|
1142
1142
|
//#endregion
|
|
1143
|
+
//#region src/mcpClient/mcpOAuthDiscovery.d.ts
|
|
1144
|
+
type SameSiteIssuerFallback = {
|
|
1145
|
+
expectedIssuer: string;
|
|
1146
|
+
receivedIssuer: string;
|
|
1147
|
+
};
|
|
1148
|
+
type McpOAuthDiscoveryOptions = {
|
|
1149
|
+
fetchFn?: FetchLike;
|
|
1150
|
+
onSameSiteIssuerFallback?: (fallback: SameSiteIssuerFallback) => void;
|
|
1151
|
+
};
|
|
1152
|
+
type McpOAuthDiscoveryDependencies = {
|
|
1153
|
+
discoverServerInfo: (serverUrl: string, options: {
|
|
1154
|
+
fetchFn?: FetchLike;
|
|
1155
|
+
}) => Promise<OAuthServerInfo>;
|
|
1156
|
+
discoverResourceMetadata: (serverUrl: string, fetchFn?: FetchLike) => Promise<OAuthProtectedResourceMetadata>;
|
|
1157
|
+
discoverAuthorizationServerMetadata: (authorizationServerUrl: string, options: {
|
|
1158
|
+
fetchFn?: FetchLike;
|
|
1159
|
+
}) => Promise<AuthorizationServerMetadata | undefined>;
|
|
1160
|
+
};
|
|
1161
|
+
declare const isSameSiteIssuer: (expected: string | undefined, received: string | undefined) => boolean;
|
|
1162
|
+
declare const discoverSameSiteAuthorizationServerMetadata: (authorizationServerUrl: string, options?: McpOAuthDiscoveryOptions, dependencies?: McpOAuthDiscoveryDependencies) => Promise<AuthorizationServerMetadata | undefined>;
|
|
1163
|
+
declare const discoverMcpOAuthServerInfo: (serverUrl: string, options?: McpOAuthDiscoveryOptions, dependencies?: McpOAuthDiscoveryDependencies) => Promise<OAuthServerInfo>;
|
|
1164
|
+
//#endregion
|
|
1143
1165
|
//#region src/mcpClient/probeMcpServer.d.ts
|
|
1144
1166
|
type McpServerProbe = {
|
|
1145
1167
|
requiresAuthorization: boolean;
|
|
@@ -1169,7 +1191,7 @@ type ResourceMetadata = {
|
|
|
1169
1191
|
resource_documentation?: string;
|
|
1170
1192
|
authorization_servers?: string[];
|
|
1171
1193
|
};
|
|
1172
|
-
type AuthorizationServerMetadata = {
|
|
1194
|
+
type AuthorizationServerMetadata$1 = {
|
|
1173
1195
|
registration_endpoint?: string;
|
|
1174
1196
|
token_endpoint?: string;
|
|
1175
1197
|
grant_types_supported?: string[];
|
|
@@ -1180,7 +1202,7 @@ type ProbeDependencies = {
|
|
|
1180
1202
|
createClient: (serverUrl: string) => IMcpClient;
|
|
1181
1203
|
fetchAuthorizationChallenge: (serverUrl: string) => Promise<AuthorizationChallenge | undefined>;
|
|
1182
1204
|
discoverResourceMetadata: (serverUrl: string, resourceMetadataUrl?: string) => Promise<ResourceMetadata>;
|
|
1183
|
-
discoverAuthorizationServer: (authorizationServerUrl: string) => Promise<AuthorizationServerMetadata | undefined>;
|
|
1205
|
+
discoverAuthorizationServer: (authorizationServerUrl: string) => Promise<AuthorizationServerMetadata$1 | undefined>;
|
|
1184
1206
|
};
|
|
1185
1207
|
declare const probeMcpServer: (serverUrl: string, dependencies?: ProbeDependencies) => Promise<McpServerProbe>;
|
|
1186
1208
|
//#endregion
|
|
@@ -1363,4 +1385,4 @@ type LockEntry = {
|
|
|
1363
1385
|
unlock: Unlock;
|
|
1364
1386
|
};
|
|
1365
1387
|
//#endregion
|
|
1366
|
-
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 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, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
|
1388
|
+
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { AxiosError, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOpt
|
|
|
5
5
|
import https from "node:https";
|
|
6
6
|
import http, { AgentOptions } from "node:http";
|
|
7
7
|
import { Readable } from "node:stream";
|
|
8
|
-
import { Client, ClientOptions, StreamableHTTPClientTransportOptions, Transport } from "@modelcontextprotocol/client";
|
|
8
|
+
import { AuthorizationServerMetadata, Client, ClientOptions, FetchLike, OAuthProtectedResourceMetadata, OAuthServerInfo, StreamableHTTPClientTransportOptions, Transport } from "@modelcontextprotocol/client";
|
|
9
9
|
import { ILogger } from "@stackone/logger";
|
|
10
10
|
import * as tls$1 from "tls";
|
|
11
11
|
|
|
@@ -1139,6 +1139,28 @@ declare class McpClient implements IMcpClient {
|
|
|
1139
1139
|
type McpIconFinder = (serverUrl: string, advertisedIconUrl?: string) => Promise<string | undefined>;
|
|
1140
1140
|
declare const findMcpIcon: (serverUrl: string, advertisedIconUrl?: string, fetchFn?: typeof fetch) => Promise<string | undefined>;
|
|
1141
1141
|
//#endregion
|
|
1142
|
+
//#region src/mcpClient/mcpOAuthDiscovery.d.ts
|
|
1143
|
+
type SameSiteIssuerFallback = {
|
|
1144
|
+
expectedIssuer: string;
|
|
1145
|
+
receivedIssuer: string;
|
|
1146
|
+
};
|
|
1147
|
+
type McpOAuthDiscoveryOptions = {
|
|
1148
|
+
fetchFn?: FetchLike;
|
|
1149
|
+
onSameSiteIssuerFallback?: (fallback: SameSiteIssuerFallback) => void;
|
|
1150
|
+
};
|
|
1151
|
+
type McpOAuthDiscoveryDependencies = {
|
|
1152
|
+
discoverServerInfo: (serverUrl: string, options: {
|
|
1153
|
+
fetchFn?: FetchLike;
|
|
1154
|
+
}) => Promise<OAuthServerInfo>;
|
|
1155
|
+
discoverResourceMetadata: (serverUrl: string, fetchFn?: FetchLike) => Promise<OAuthProtectedResourceMetadata>;
|
|
1156
|
+
discoverAuthorizationServerMetadata: (authorizationServerUrl: string, options: {
|
|
1157
|
+
fetchFn?: FetchLike;
|
|
1158
|
+
}) => Promise<AuthorizationServerMetadata | undefined>;
|
|
1159
|
+
};
|
|
1160
|
+
declare const isSameSiteIssuer: (expected: string | undefined, received: string | undefined) => boolean;
|
|
1161
|
+
declare const discoverSameSiteAuthorizationServerMetadata: (authorizationServerUrl: string, options?: McpOAuthDiscoveryOptions, dependencies?: McpOAuthDiscoveryDependencies) => Promise<AuthorizationServerMetadata | undefined>;
|
|
1162
|
+
declare const discoverMcpOAuthServerInfo: (serverUrl: string, options?: McpOAuthDiscoveryOptions, dependencies?: McpOAuthDiscoveryDependencies) => Promise<OAuthServerInfo>;
|
|
1163
|
+
//#endregion
|
|
1142
1164
|
//#region src/mcpClient/probeMcpServer.d.ts
|
|
1143
1165
|
type McpServerProbe = {
|
|
1144
1166
|
requiresAuthorization: boolean;
|
|
@@ -1168,7 +1190,7 @@ type ResourceMetadata = {
|
|
|
1168
1190
|
resource_documentation?: string;
|
|
1169
1191
|
authorization_servers?: string[];
|
|
1170
1192
|
};
|
|
1171
|
-
type AuthorizationServerMetadata = {
|
|
1193
|
+
type AuthorizationServerMetadata$1 = {
|
|
1172
1194
|
registration_endpoint?: string;
|
|
1173
1195
|
token_endpoint?: string;
|
|
1174
1196
|
grant_types_supported?: string[];
|
|
@@ -1179,7 +1201,7 @@ type ProbeDependencies = {
|
|
|
1179
1201
|
createClient: (serverUrl: string) => IMcpClient;
|
|
1180
1202
|
fetchAuthorizationChallenge: (serverUrl: string) => Promise<AuthorizationChallenge | undefined>;
|
|
1181
1203
|
discoverResourceMetadata: (serverUrl: string, resourceMetadataUrl?: string) => Promise<ResourceMetadata>;
|
|
1182
|
-
discoverAuthorizationServer: (authorizationServerUrl: string) => Promise<AuthorizationServerMetadata | undefined>;
|
|
1204
|
+
discoverAuthorizationServer: (authorizationServerUrl: string) => Promise<AuthorizationServerMetadata$1 | undefined>;
|
|
1183
1205
|
};
|
|
1184
1206
|
declare const probeMcpServer: (serverUrl: string, dependencies?: ProbeDependencies) => Promise<McpServerProbe>;
|
|
1185
1207
|
//#endregion
|
|
@@ -1362,4 +1384,4 @@ type LockEntry = {
|
|
|
1362
1384
|
unlock: Unlock;
|
|
1363
1385
|
};
|
|
1364
1386
|
//#endregion
|
|
1365
|
-
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 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, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
|
1387
|
+
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 };
|