deadbyte-mcp 0.15.49 → 0.15.50
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/MANIFEST.SHA256 +82 -78
- package/PROVENANCE.json +3 -3
- package/README.txt +18 -18
- package/RELEASE.json +5 -5
- package/SBOM.cdx.json +2 -2
- package/TEST-MATRIX.json +2 -2
- package/docs/R130-SDK-SECURITY-PATCH.md +34 -0
- package/node_modules/@modelcontextprotocol/client/README.md +1 -7
- package/node_modules/@modelcontextprotocol/client/dist/{index-BCtJi0p5.d.mts → index-B-4n9P0J.d.mts} +5 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-B-4n9P0J.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/{index-CEk3qkZM.d.cts → index-J2FaQ-KY.d.cts} +5 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-J2FaQ-KY.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +175 -76
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts +214 -35
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts +214 -35
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +175 -76
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/{src-D0qEN74R.cjs → src-DpAS0jfg.cjs} +125 -11
- package/node_modules/@modelcontextprotocol/client/dist/src-DpAS0jfg.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/{src-DDAAhLnO.mjs → src-WCy6ifGf.mjs} +102 -12
- package/node_modules/@modelcontextprotocol/client/dist/src-WCy6ifGf.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +1 -1
- package/node_modules/@modelcontextprotocol/client/package.json +5 -5
- package/node_modules/@modelcontextprotocol/core/dist/{auth--n_Yzytt.d.cts → auth-Anm-lwWi.d.mts} +9 -8
- package/node_modules/@modelcontextprotocol/core/dist/{auth--n_Yzytt.d.cts.map → auth-Anm-lwWi.d.mts.map} +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/{auth-CGP0BDVq.mjs → auth-BNDyLTqp.mjs} +5 -3
- package/node_modules/@modelcontextprotocol/core/dist/{auth-CGP0BDVq.mjs.map → auth-BNDyLTqp.mjs.map} +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/{auth-4-zilcqg.cjs → auth-D1CeV_Jr.cjs} +5 -3
- package/node_modules/@modelcontextprotocol/core/dist/{auth-4-zilcqg.cjs.map → auth-D1CeV_Jr.cjs.map} +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/{auth-YUQV3RRv.d.mts → auth-V9XJSCfa.d.cts} +9 -8
- package/node_modules/@modelcontextprotocol/core/dist/{auth-YUQV3RRv.d.mts.map → auth-V9XJSCfa.d.cts.map} +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +1 -1
- package/node_modules/@modelcontextprotocol/core/package.json +2 -2
- package/node_modules/@modelcontextprotocol/server/README.md +1 -7
- package/node_modules/@modelcontextprotocol/server/dist/{createMcpHandler-Bt6U_Fqb.d.mts → createMcpHandler-D4NN8WsG.d.mts} +35 -13
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D4NN8WsG.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/{createMcpHandler-BLVe3qmU.d.cts → createMcpHandler-DZmmlN8e.d.cts} +35 -13
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DZmmlN8e.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs +32 -5
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -1
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +41 -5
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -1
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +41 -5
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -1
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs +32 -5
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -1
- package/node_modules/@modelcontextprotocol/server/dist/{mcp-DUcCQSTW.cjs → mcp-BumlNux0.cjs} +73 -23
- package/node_modules/@modelcontextprotocol/server/dist/mcp-BumlNux0.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/{mcp-Dw2OlZ1f.mjs → mcp-DIH4cS6P.mjs} +73 -23
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DIH4cS6P.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +1 -1
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +1 -1
- package/node_modules/@modelcontextprotocol/server/dist/{src-CgFsfg3E.cjs → src-BhnGYybN.cjs} +29 -11
- package/node_modules/@modelcontextprotocol/server/dist/src-BhnGYybN.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/{src-D-y6h4N7.mjs → src-Cqbh3MYc.mjs} +29 -11
- package/node_modules/@modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +2 -2
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +1 -1
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +1 -1
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +2 -2
- package/node_modules/@modelcontextprotocol/server/package.json +4 -4
- package/node_modules/which/CHANGELOG.md +166 -0
- package/package.json +3 -3
- package/src/version.mjs +1 -1
- package/test/r129-sdk-security-baseline.test.mjs +38 -0
- package/test/r130-release-security-contract.test.mjs +28 -0
- package/test/r59-tool-surface-compat.test.mjs +1 -1
- package/test/r74-prepublish-contract.test.mjs +2 -2
- package/node_modules/@modelcontextprotocol/client/dist/index-BCtJi0p5.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-CEk3qkZM.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/src-D0qEN74R.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/src-DDAAhLnO.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-BLVe3qmU.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-Bt6U_Fqb.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DUcCQSTW.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/server/dist/mcp-Dw2OlZ1f.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/server/dist/src-CgFsfg3E.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/server/dist/src-D-y6h4N7.mjs.map +0 -1
|
@@ -1,8 +1,99 @@
|
|
|
1
|
-
import { $ as withInputRequired, $i as TRACESTATE_META_KEY, $n as Notification, $r as SetLevelRequest, $t as GetTaskResult, A as SpecTypes, Ai as UnsubscribeRequest, An as ListPromptsRequest, Ar as RequestTypeMap, At as CreateMessageRequestParamsWithTools, B as isJSONRPCNotification, Bi as INVALID_PARAMS, Bn as ListToolsRequest, Br as Result, Bt as ElicitRequestURLParams, C as ServerContext, Ca as StoredOAuthTokens, Ci as Tool, Cn as JSONRPCResponse, Cr as Request, Ct as CompleteRequestPrompt, D as TransportSendOptions, Di as ToolListChangedNotification, Dn as ListChangedCallback, Dr as RequestMetaObject, Dt as CreateMessageRequest, E as Transport, Ei as ToolExecution, En as LegacyTitledEnumSchema, Er as RequestMetaEnvelope, Et as ContentBlock, F as isCallToolResult, Fi as BAGGAGE_META_KEY, Fn as ListResourcesResult, Fr as ResourceRequestParams, Ft as DiscoverRequest, G as parseJSONRPCMessage, Gi as METHOD_NOT_FOUND, Gn as MessageClassification, Gr as RootsListChangedNotification, Gt as EmptyResult, H as isJSONRPCResponse, Hi as JSONRPC_VERSION, Hn as LoggingLevel, Hr as ResultTypeMap, Ht as ElicitationCompleteNotification, I as isInitializeRequest, Ii as CLIENT_CAPABILITIES_META_KEY, In as ListRootsRequest, Ir as ResourceTemplateReference, It as DiscoverResult, J as ResourceNotFoundError, Ji as RELATED_TASK_META_KEY, Jn as MethodNotFoundError, Jr as SamplingMessageContentBlock, Jt as GetPromptRequestParams, K as MissingRequiredClientCapabilityError, Ki as PARSE_ERROR, Kn as MessageExtraInfo, Kr as SamplingContent, Kt as EnumSchema, L as isInitializedNotification, Li as CLIENT_INFO_META_KEY, Ln as ListRootsResult, Lr as ResourceTemplateType, Lt as ElicitRequest, M as specTypeSchemas, Mi as UnsupportedProtocolVersionErrorData, Mn as ListResourceTemplatesRequest, Mr as ResourceContents, Mt as CreateMessageResultWithTools, N as assertCompleteRequestPrompt, Ni as UntitledMultiSelectEnumSchema, Nn as ListResourceTemplatesResult, Nr as ResourceLink, Nt as CreateTaskResult, O as createFetchWithInit, Oi as ToolResultContent, On as ListChangedHandlers, Or as RequestMethod, Ot as CreateMessageRequestParams, P as assertCompleteRequestResourceTemplate, Pi as UntitledSingleSelectEnumSchema, Pn as ListResourcesRequest, Pr as ResourceListChangedNotification, Pt as Cursor, Q as InputRequiredOptions, Qi as TRACEPARENT_META_KEY, Qn as MultiSelectEnumSchema, Qr as ServerResult, Qt as GetTaskRequest, R as isInputRequiredResult, Ri as DEFAULT_NEGOTIATED_PROTOCOL_VERSION, Rn as ListTasksRequest, Rr as ResourceUpdatedNotification, Rt as ElicitRequestFormParams, S as RequestStateAccessor, Sa as StoredOAuthClientInformation, Si as TitledSingleSelectEnumSchema, Sn as JSONRPCRequest, Sr as RelatedTaskMetadata, St as CompleteRequestParams, T as FetchLike, Ti as ToolChoice, Tn as JSONValue, Tr as RequestMeta, Tt as CompleteResult, U as isJSONRPCResultResponse, Ui as LATEST_PROTOCOL_VERSION, Un as LoggingMessageNotification, Ur as Role, Ut as ElicitationCompleteNotificationParams, V as isJSONRPCRequest, Vi as INVALID_REQUEST, Vn as ListToolsResult, Vr as ResultMetaObject, Vt as ElicitResult, W as isTaskAugmentedRequestParams, Wi as LOG_LEVEL_META_KEY, Wn as LoggingMessageNotificationParams, Wr as Root, Wt as EmbeddedResource, X as UrlElicitationRequiredError, Xi as SUBSCRIPTION_ID_META_KEY, Xn as ModelHint, Xr as ServerNotification, Xt as GetTaskPayloadRequest, Y as UnsupportedProtocolVersionError, Yi as SERVER_INFO_META_KEY, Yn as MissingRequiredClientCapabilityErrorData, Yr as ServerCapabilities, Yt as GetPromptResult, Z as ProtocolErrorCode, Zi as SUPPORTED_PROTOCOL_VERSIONS, Zn as ModelPreferences, Zr as ServerRequest, Zt as GetTaskPayloadResult, _ as ProgressCallback, _a as OAuthProtectedResourceMetadata, _i as TaskStatusNotification, _n as JSONArray, _r as PromptMessage, _t as ClientNotification, a as ReadBuffer, aa as SdkHttpErrorData, ai as SubscriptionFilter, an as InitializeRequest, ar as PaginatedRequestParams, at as AuthInfo, b as RequestHandlerSchemas, ba as OpenIdProviderDiscoveryMetadata, bi as TextResourceContents, bn as JSONRPCMessage, br as ReadResourceRequestParams, bt as CompatibilityCallToolResult, c as serializeMessage, ca as AuthorizationServerMetadata, ci as SubscriptionsListenRequest, cn as InitializedNotification, cr as PingRequest, ct as BooleanSchema, d as isJsonContentType, da as OAuthClientInformationFull, di as SubscriptionsListenResultMeta, dn as InputRequiredResult, dr as ProgressNotification, dt as CallToolResult, ea as checkResourceAllowed, ei as SetLevelRequestParams, en as HandlerResultTypeMap, er as NotificationMethod, et as StandardSchemaV1, f as BaseContext, fa as OAuthClientInformationMixed, fi as Task, fn as InputResponse, fr as ProgressNotificationParams, ft as CancelTaskRequest, g as NotificationOptions, ga as OAuthMetadata, gi as TaskStatus, gn as InvalidRequestError, gr as PromptListChangedNotification, gt as ClientCapabilities, h as NonCompleteResultFlow, ha as OAuthErrorResponse, hi as TaskMetadata, hn as InvalidParamsError, hr as PromptArgument, ht as CancelledNotificationParams, i as Variables, ia as SdkHttpError, ii as SubscribeRequestParams, in as Implementation, ir as PaginatedRequest, it as AudioContent, j as isSpecType, ji as UnsubscribeRequestParams, jn as ListPromptsResult, jr as Resource, jt as CreateMessageResult, k as SpecTypeName, ki as ToolUseContent, kn as ListChangedOptions, kr as RequestParams, kt as CreateMessageRequestParamsBase, l as ProtocolEra, la as IdJagTokenExchangeResponse, li as SubscriptionsListenRequestParams, ln as InputRequest, lr as PrimitiveSchemaDefinition, lt as CallToolRequest, m as DEFAULT_REQUEST_TIMEOUT_MSEC, ma as OAuthClientRegistrationError, mi as TaskCreationParams, mn as InternalError, mr as Prompt, mt as CancelledNotification, n as InMemoryTransport, na as SdkError, ni as StringSchema, nn as Icons, nr as NotificationTypeMap, nt as StandardSchemaWithJSON, o as STDIO_DEFAULT_MAX_BUFFER_SIZE, oa as OAuthError, oi as SubscriptionsAcknowledgedNotification, on as InitializeRequestParams, or as PaginatedResult, ot as BaseMetadata, p as ClientContext, pa as OAuthClientMetadata, pi as TaskAugmentedRequestParams, pn as InputResponses, pr as ProgressToken, pt as CancelTaskResult, q as ProtocolError, qi as PROTOCOL_VERSION_META_KEY, qn as MetaObject, qr as SamplingMessage, qt as GetPromptRequest, r as UriTemplate, ra as SdkErrorCode, ri as SubscribeRequest, rn as ImageContent, rr as NumberSchema, rt as Annotations, s as deserializeMessage, sa as OAuthErrorCode, si as SubscriptionsAcknowledgedNotificationParams, sn as InitializeResult, sr as ParseError, st as BlobResourceContents, t as preloadSchemas, ta as resourceUrlFromServerUrl, ti as SingleSelectEnumSchema, tn as Icon, tr as NotificationParams, tt as StandardSchemaV1Sync, u as getDisplayName, ua as OAuthClientInformation, ui as SubscriptionsListenResult, un as InputRequests, ur as Progress, ut as CallToolRequestParams, v as Protocol, va as OAuthTokenRevocationRequest, vi as TaskStatusNotificationParams, vn as JSONObject, vr as PromptReference, vt as ClientRequest, w as mergeCapabilities, wi as ToolAnnotations, wn as JSONRPCResultResponse, wr as RequestId, wt as CompleteRequestResourceTemplate, x as RequestOptions, xa as OpenIdProviderMetadata, xi as TitledMultiSelectEnumSchema, xn as JSONRPCNotification, xr as ReadResourceResult, xt as CompleteRequest, y as ProtocolOptions, ya as OAuthTokens, yi as TextContent, yn as JSONRPCErrorResponse, yr as ReadResourceRequest, yt as ClientResult, z as isJSONRPCErrorResponse, zi as INTERNAL_ERROR, zn as ListTasksResult, zr as ResourceUpdatedNotificationParams, zt as ElicitRequestParams } from "./index-
|
|
1
|
+
import { $ as withInputRequired, $i as TRACESTATE_META_KEY, $n as Notification, $r as SetLevelRequest, $t as GetTaskResult, A as SpecTypes, Ai as UnsubscribeRequest, An as ListPromptsRequest, Ar as RequestTypeMap, At as CreateMessageRequestParamsWithTools, B as isJSONRPCNotification, Bi as INVALID_PARAMS, Bn as ListToolsRequest, Br as Result, Bt as ElicitRequestURLParams, C as ServerContext, Ca as StoredOAuthTokens, Ci as Tool, Cn as JSONRPCResponse, Cr as Request, Ct as CompleteRequestPrompt, D as TransportSendOptions, Di as ToolListChangedNotification, Dn as ListChangedCallback, Dr as RequestMetaObject, Dt as CreateMessageRequest, E as Transport, Ei as ToolExecution, En as LegacyTitledEnumSchema, Er as RequestMetaEnvelope, Et as ContentBlock, F as isCallToolResult, Fi as BAGGAGE_META_KEY, Fn as ListResourcesResult, Fr as ResourceRequestParams, Ft as DiscoverRequest, G as parseJSONRPCMessage, Gi as METHOD_NOT_FOUND, Gn as MessageClassification, Gr as RootsListChangedNotification, Gt as EmptyResult, H as isJSONRPCResponse, Hi as JSONRPC_VERSION, Hn as LoggingLevel, Hr as ResultTypeMap, Ht as ElicitationCompleteNotification, I as isInitializeRequest, Ii as CLIENT_CAPABILITIES_META_KEY, In as ListRootsRequest, Ir as ResourceTemplateReference, It as DiscoverResult, J as ResourceNotFoundError, Ji as RELATED_TASK_META_KEY, Jn as MethodNotFoundError, Jr as SamplingMessageContentBlock, Jt as GetPromptRequestParams, K as MissingRequiredClientCapabilityError, Ki as PARSE_ERROR, Kn as MessageExtraInfo, Kr as SamplingContent, Kt as EnumSchema, L as isInitializedNotification, Li as CLIENT_INFO_META_KEY, Ln as ListRootsResult, Lr as ResourceTemplateType, Lt as ElicitRequest, M as specTypeSchemas, Mi as UnsupportedProtocolVersionErrorData, Mn as ListResourceTemplatesRequest, Mr as ResourceContents, Mt as CreateMessageResultWithTools, N as assertCompleteRequestPrompt, Ni as UntitledMultiSelectEnumSchema, Nn as ListResourceTemplatesResult, Nr as ResourceLink, Nt as CreateTaskResult, O as createFetchWithInit, Oi as ToolResultContent, On as ListChangedHandlers, Or as RequestMethod, Ot as CreateMessageRequestParams, P as assertCompleteRequestResourceTemplate, Pi as UntitledSingleSelectEnumSchema, Pn as ListResourcesRequest, Pr as ResourceListChangedNotification, Pt as Cursor, Q as InputRequiredOptions, Qi as TRACEPARENT_META_KEY, Qn as MultiSelectEnumSchema, Qr as ServerResult, Qt as GetTaskRequest, R as isInputRequiredResult, Ri as DEFAULT_NEGOTIATED_PROTOCOL_VERSION, Rn as ListTasksRequest, Rr as ResourceUpdatedNotification, Rt as ElicitRequestFormParams, S as RequestStateAccessor, Sa as StoredOAuthClientInformation, Si as TitledSingleSelectEnumSchema, Sn as JSONRPCRequest, Sr as RelatedTaskMetadata, St as CompleteRequestParams, T as FetchLike, Ti as ToolChoice, Tn as JSONValue, Tr as RequestMeta, Tt as CompleteResult, U as isJSONRPCResultResponse, Ui as LATEST_PROTOCOL_VERSION, Un as LoggingMessageNotification, Ur as Role, Ut as ElicitationCompleteNotificationParams, V as isJSONRPCRequest, Vi as INVALID_REQUEST, Vn as ListToolsResult, Vr as ResultMetaObject, Vt as ElicitResult, W as isTaskAugmentedRequestParams, Wi as LOG_LEVEL_META_KEY, Wn as LoggingMessageNotificationParams, Wr as Root, Wt as EmbeddedResource, X as UrlElicitationRequiredError, Xi as SUBSCRIPTION_ID_META_KEY, Xn as ModelHint, Xr as ServerNotification, Xt as GetTaskPayloadRequest, Y as UnsupportedProtocolVersionError, Yi as SERVER_INFO_META_KEY, Yn as MissingRequiredClientCapabilityErrorData, Yr as ServerCapabilities, Yt as GetPromptResult, Z as ProtocolErrorCode, Zi as SUPPORTED_PROTOCOL_VERSIONS, Zn as ModelPreferences, Zr as ServerRequest, Zt as GetTaskPayloadResult, _ as ProgressCallback, _a as OAuthProtectedResourceMetadata, _i as TaskStatusNotification, _n as JSONArray, _r as PromptMessage, _t as ClientNotification, a as ReadBuffer, aa as SdkHttpErrorData, ai as SubscriptionFilter, an as InitializeRequest, ar as PaginatedRequestParams, at as AuthInfo, b as RequestHandlerSchemas, ba as OpenIdProviderDiscoveryMetadata, bi as TextResourceContents, bn as JSONRPCMessage, br as ReadResourceRequestParams, bt as CompatibilityCallToolResult, c as serializeMessage, ca as AuthorizationServerMetadata, ci as SubscriptionsListenRequest, cn as InitializedNotification, cr as PingRequest, ct as BooleanSchema, d as isJsonContentType, da as OAuthClientInformationFull, di as SubscriptionsListenResultMeta, dn as InputRequiredResult, dr as ProgressNotification, dt as CallToolResult, ea as checkResourceAllowed, ei as SetLevelRequestParams, en as HandlerResultTypeMap, er as NotificationMethod, et as StandardSchemaV1, f as BaseContext, fa as OAuthClientInformationMixed, fi as Task, fn as InputResponse, fr as ProgressNotificationParams, ft as CancelTaskRequest, g as NotificationOptions, ga as OAuthMetadata, gi as TaskStatus, gn as InvalidRequestError, gr as PromptListChangedNotification, gt as ClientCapabilities, h as NonCompleteResultFlow, ha as OAuthErrorResponse, hi as TaskMetadata, hn as InvalidParamsError, hr as PromptArgument, ht as CancelledNotificationParams, i as Variables, ia as SdkHttpError, ii as SubscribeRequestParams, in as Implementation, ir as PaginatedRequest, it as AudioContent, j as isSpecType, ji as UnsubscribeRequestParams, jn as ListPromptsResult, jr as Resource, jt as CreateMessageResult, k as SpecTypeName, ki as ToolUseContent, kn as ListChangedOptions, kr as RequestParams, kt as CreateMessageRequestParamsBase, l as ProtocolEra, la as IdJagTokenExchangeResponse, li as SubscriptionsListenRequestParams, ln as InputRequest, lr as PrimitiveSchemaDefinition, lt as CallToolRequest, m as DEFAULT_REQUEST_TIMEOUT_MSEC, ma as OAuthClientRegistrationError, mi as TaskCreationParams, mn as InternalError, mr as Prompt, mt as CancelledNotification, n as InMemoryTransport, na as SdkError, ni as StringSchema, nn as Icons, nr as NotificationTypeMap, nt as StandardSchemaWithJSON, o as STDIO_DEFAULT_MAX_BUFFER_SIZE, oa as OAuthError, oi as SubscriptionsAcknowledgedNotification, on as InitializeRequestParams, or as PaginatedResult, ot as BaseMetadata, p as ClientContext, pa as OAuthClientMetadata, pi as TaskAugmentedRequestParams, pn as InputResponses, pr as ProgressToken, pt as CancelTaskResult, q as ProtocolError, qi as PROTOCOL_VERSION_META_KEY, qn as MetaObject, qr as SamplingMessage, qt as GetPromptRequest, r as UriTemplate, ra as SdkErrorCode, ri as SubscribeRequest, rn as ImageContent, rr as NumberSchema, rt as Annotations, s as deserializeMessage, sa as OAuthErrorCode, si as SubscriptionsAcknowledgedNotificationParams, sn as InitializeResult, sr as ParseError, st as BlobResourceContents, t as preloadSchemas, ta as resourceUrlFromServerUrl, ti as SingleSelectEnumSchema, tn as Icon, tr as NotificationParams, tt as StandardSchemaV1Sync, u as getDisplayName, ua as OAuthClientInformation, ui as SubscriptionsListenResult, un as InputRequests, ur as Progress, ut as CallToolRequestParams, v as Protocol, va as OAuthTokenRevocationRequest, vi as TaskStatusNotificationParams, vn as JSONObject, vr as PromptReference, vt as ClientRequest, w as mergeCapabilities, wi as ToolAnnotations, wn as JSONRPCResultResponse, wr as RequestId, wt as CompleteRequestResourceTemplate, x as RequestOptions, xa as OpenIdProviderMetadata, xi as TitledMultiSelectEnumSchema, xn as JSONRPCNotification, xr as ReadResourceResult, xt as CompleteRequest, y as ProtocolOptions, ya as OAuthTokens, yi as TextContent, yn as JSONRPCErrorResponse, yr as ReadResourceRequest, yt as ClientResult, z as isJSONRPCErrorResponse, zi as INTERNAL_ERROR, zn as ListTasksResult, zr as ResourceUpdatedNotificationParams, zt as ElicitRequestParams } from "./index-B-4n9P0J.mjs";
|
|
2
2
|
import { i as jsonSchemaValidator, n as JsonSchemaValidator, r as JsonSchemaValidatorResult, t as JsonSchemaType } from "./types-mS0yxCL0.mjs";
|
|
3
3
|
import { ErrorEvent, EventSourceInit } from "eventsource";
|
|
4
|
-
import { CryptoKey, JWK } from "jose";
|
|
5
4
|
|
|
5
|
+
//#region ../../node_modules/.pnpm/jose@6.2.2/node_modules/jose/dist/types/types.d.ts
|
|
6
|
+
/** Generic JSON Web Key Parameters. */
|
|
7
|
+
interface JWKParameters {
|
|
8
|
+
/** JWK "kty" (Key Type) Parameter */
|
|
9
|
+
kty?: string;
|
|
10
|
+
/**
|
|
11
|
+
* JWK "alg" (Algorithm) Parameter
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}
|
|
14
|
+
*/
|
|
15
|
+
alg?: string;
|
|
16
|
+
/** JWK "key_ops" (Key Operations) Parameter */
|
|
17
|
+
key_ops?: string[];
|
|
18
|
+
/** JWK "ext" (Extractable) Parameter */
|
|
19
|
+
ext?: boolean;
|
|
20
|
+
/** JWK "use" (Public Key Use) Parameter */
|
|
21
|
+
use?: string;
|
|
22
|
+
/** JWK "x5c" (X.509 Certificate Chain) Parameter */
|
|
23
|
+
x5c?: string[];
|
|
24
|
+
/** JWK "x5t" (X.509 Certificate SHA-1 Thumbprint) Parameter */
|
|
25
|
+
x5t?: string;
|
|
26
|
+
/** JWK "x5t#S256" (X.509 Certificate SHA-256 Thumbprint) Parameter */
|
|
27
|
+
'x5t#S256'?: string;
|
|
28
|
+
/** JWK "x5u" (X.509 URL) Parameter */
|
|
29
|
+
x5u?: string;
|
|
30
|
+
/** JWK "kid" (Key ID) Parameter */
|
|
31
|
+
kid?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* JSON Web Key ({@link https://www.rfc-editor.org/rfc/rfc7517 JWK}). "RSA", "EC", "OKP", "AKP", and
|
|
35
|
+
* "oct" key types are supported.
|
|
36
|
+
*
|
|
37
|
+
* @see {@link JWK_AKP_Public}
|
|
38
|
+
* @see {@link JWK_AKP_Private}
|
|
39
|
+
* @see {@link JWK_OKP_Public}
|
|
40
|
+
* @see {@link JWK_OKP_Private}
|
|
41
|
+
* @see {@link JWK_EC_Public}
|
|
42
|
+
* @see {@link JWK_EC_Private}
|
|
43
|
+
* @see {@link JWK_RSA_Public}
|
|
44
|
+
* @see {@link JWK_RSA_Private}
|
|
45
|
+
* @see {@link JWK_oct}
|
|
46
|
+
*/
|
|
47
|
+
interface JWK extends JWKParameters {
|
|
48
|
+
/**
|
|
49
|
+
* - EC JWK "crv" (Curve) Parameter
|
|
50
|
+
* - OKP JWK "crv" (The Subtype of Key Pair) Parameter
|
|
51
|
+
*/
|
|
52
|
+
crv?: string;
|
|
53
|
+
/**
|
|
54
|
+
* - Private RSA JWK "d" (Private Exponent) Parameter
|
|
55
|
+
* - Private EC JWK "d" (ECC Private Key) Parameter
|
|
56
|
+
* - Private OKP JWK "d" (The Private Key) Parameter
|
|
57
|
+
*/
|
|
58
|
+
d?: string;
|
|
59
|
+
/** Private RSA JWK "dp" (First Factor CRT Exponent) Parameter */
|
|
60
|
+
dp?: string;
|
|
61
|
+
/** Private RSA JWK "dq" (Second Factor CRT Exponent) Parameter */
|
|
62
|
+
dq?: string;
|
|
63
|
+
/** RSA JWK "e" (Exponent) Parameter */
|
|
64
|
+
e?: string;
|
|
65
|
+
/** Oct JWK "k" (Key Value) Parameter */
|
|
66
|
+
k?: string;
|
|
67
|
+
/** RSA JWK "n" (Modulus) Parameter */
|
|
68
|
+
n?: string;
|
|
69
|
+
/** Private RSA JWK "p" (First Prime Factor) Parameter */
|
|
70
|
+
p?: string;
|
|
71
|
+
/** Private RSA JWK "q" (Second Prime Factor) Parameter */
|
|
72
|
+
q?: string;
|
|
73
|
+
/** Private RSA JWK "qi" (First CRT Coefficient) Parameter */
|
|
74
|
+
qi?: string;
|
|
75
|
+
/**
|
|
76
|
+
* - EC JWK "x" (X Coordinate) Parameter
|
|
77
|
+
* - OKP JWK "x" (The public key) Parameter
|
|
78
|
+
*/
|
|
79
|
+
x?: string;
|
|
80
|
+
/** EC JWK "y" (Y Coordinate) Parameter */
|
|
81
|
+
y?: string;
|
|
82
|
+
/** AKP JWK "pub" (Public Key) Parameter */
|
|
83
|
+
pub?: string;
|
|
84
|
+
/** AKP JWK "priv" (Private key) Parameter */
|
|
85
|
+
priv?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* {@link !CryptoKey} is a representation of a key/secret available in all supported runtimes. In
|
|
89
|
+
* addition to the {@link key/import Key Import Functions} you may use the
|
|
90
|
+
* {@link !SubtleCrypto.importKey} API to obtain a {@link !CryptoKey} from your existing key
|
|
91
|
+
* material.
|
|
92
|
+
*/
|
|
93
|
+
type CryptoKey = Extract<Awaited<ReturnType<typeof crypto.subtle.generateKey>>, {
|
|
94
|
+
type: string;
|
|
95
|
+
}>;
|
|
96
|
+
//#endregion
|
|
6
97
|
//#region src/client/dpop.d.ts
|
|
7
98
|
|
|
8
99
|
/** Asymmetric JWS algorithms usable for a DPoP proof (RFC 9449 §11.6 forbids symmetric algs and `none`). */
|
|
@@ -191,10 +282,12 @@ declare class RegistrationRejectedError extends OAuthClientFlowError {
|
|
|
191
282
|
}
|
|
192
283
|
/**
|
|
193
284
|
* Thrown by the token-exchange and refresh paths when the resolved token
|
|
194
|
-
* endpoint is not `https:` and is not a loopback host
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
285
|
+
* endpoint is not `https:` and is not a loopback host. The MCP authorization
|
|
286
|
+
* specification requires authorization server endpoints to use HTTPS; loopback
|
|
287
|
+
* hosts are exempt here for local development. This is a configuration error —
|
|
288
|
+
* re-authorizing cannot fix it — so it intentionally does **not** extend
|
|
289
|
+
* `OAuthError` and `auth()`'s refresh branch rethrows it instead of falling
|
|
290
|
+
* through to a fresh `/authorize` redirect.
|
|
198
291
|
*/
|
|
199
292
|
declare class InsecureTokenEndpointError extends OAuthClientFlowError {
|
|
200
293
|
/** The token endpoint URL that was rejected. */
|
|
@@ -222,21 +315,25 @@ declare class InsecureTokenEndpointError extends OAuthClientFlowError {
|
|
|
222
315
|
* `requiredScope`, which appears in the error message).
|
|
223
316
|
*/
|
|
224
317
|
/**
|
|
225
|
-
* Thrown by `auth()`
|
|
226
|
-
*
|
|
227
|
-
* `discoveryState()` at redirect time. The `authorization_code` and PKCE
|
|
228
|
-
* `code_verifier` are bound to the AS that minted the code (RFC 7636); sending
|
|
229
|
-
* them to a different AS's token endpoint is a credential-exfiltration vector.
|
|
318
|
+
* Thrown by `auth()` and `fetchToken()` when the authorization server in use differs
|
|
319
|
+
* from the one a credential is bound to and the flow cannot simply start over:
|
|
230
320
|
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
321
|
+
* - on the authorization-code callback leg, when it differs from the one recorded
|
|
322
|
+
* in `discoveryState()` at redirect time — the `authorization_code` and PKCE
|
|
323
|
+
* `code_verifier` are bound to the AS that minted the code (RFC 7636);
|
|
324
|
+
* - for client information whose `issuer` stamp names a different authorization
|
|
325
|
+
* server on a provider that cannot re-register (no `saveClientInformation()`,
|
|
326
|
+
* e.g. the bundled static-credential providers); `fetchToken()` throws for any provider.
|
|
327
|
+
*
|
|
328
|
+
* Stored tokens and re-registrable client information are protected structurally
|
|
329
|
+
* by the `issuer` stamp instead (they read back as absent).
|
|
233
330
|
*/
|
|
234
331
|
declare class AuthorizationServerMismatchError extends OAuthClientFlowError {
|
|
235
|
-
/** The issuer recorded in `discoveryState()`
|
|
332
|
+
/** The issuer the credential is bound to (recorded in `discoveryState()` at redirect time, or stamped on the client information). */
|
|
236
333
|
readonly recordedIssuer: string;
|
|
237
334
|
/** The issuer resolved by discovery on this call. */
|
|
238
335
|
readonly currentIssuer: string;
|
|
239
|
-
constructor(/** The issuer recorded in `discoveryState()`
|
|
336
|
+
constructor(/** The issuer the credential is bound to (recorded in `discoveryState()` at redirect time, or stamped on the client information). */
|
|
240
337
|
recordedIssuer: string, /** The issuer resolved by discovery on this call. */
|
|
241
338
|
currentIssuer: string);
|
|
242
339
|
}
|
|
@@ -295,7 +392,8 @@ interface AuthProvider {
|
|
|
295
392
|
token(): Promise<string | undefined>;
|
|
296
393
|
/**
|
|
297
394
|
* Called when the server responds with 401. If provided, the transport will
|
|
298
|
-
* await this, then retry the request once. If the retry also gets 401,
|
|
395
|
+
* await this, then retry the request once. If the retry also gets 401, the
|
|
396
|
+
* transport throws `SdkHttpError` (`SdkErrorCode.ClientHttpAuthentication`). If
|
|
299
397
|
* this method is not provided, the transport throws {@linkcode UnauthorizedError}.
|
|
300
398
|
*
|
|
301
399
|
* Implementations should refresh tokens, re-authenticate, etc. — whatever is
|
|
@@ -655,8 +753,11 @@ type ClientAuthMethod = 'client_secret_basic' | 'client_secret_post' | 'none';
|
|
|
655
753
|
*/
|
|
656
754
|
declare function selectClientAuthMethod(clientInformation: OAuthClientInformationMixed, supportedMethods: string[]): ClientAuthMethod;
|
|
657
755
|
/**
|
|
658
|
-
*
|
|
659
|
-
*
|
|
756
|
+
* Refuse to send credentials to a non-TLS token endpoint. The MCP authorization
|
|
757
|
+
* specification requires authorization server endpoints to use HTTPS. Loopback
|
|
758
|
+
* hosts are exempt here for local development.
|
|
759
|
+
*
|
|
760
|
+
* @throws {@linkcode InsecureTokenEndpointError} if the endpoint is insecure.
|
|
660
761
|
*/
|
|
661
762
|
declare function assertSecureTokenEndpoint(tokenEndpoint: string | URL): URL;
|
|
662
763
|
/**
|
|
@@ -722,7 +823,8 @@ interface AuthOptions {
|
|
|
722
823
|
/**
|
|
723
824
|
* Opt-out for the RFC 8414 §3.3 issuer-echo check during authorization
|
|
724
825
|
* server discovery. Disabling it is **security-weakening** and intended only
|
|
725
|
-
* for authorization servers known to publish a mismatched `issuer`.
|
|
826
|
+
* for authorization servers known to publish a mismatched `issuer`. The unchecked
|
|
827
|
+
* `issuer` is also what `expectedIssuer` and stored `issuer` stamps are compared with.
|
|
726
828
|
*
|
|
727
829
|
* @default false
|
|
728
830
|
*/
|
|
@@ -1088,10 +1190,17 @@ declare function fetchToken(provider: OAuthClientProvider, authorizationServerUr
|
|
|
1088
1190
|
* consistently across both DCR and the subsequent authorization request.
|
|
1089
1191
|
*
|
|
1090
1192
|
* @deprecated Dynamic Client Registration is deprecated as of protocol version
|
|
1091
|
-
* 2026-07-28
|
|
1092
|
-
*
|
|
1093
|
-
*
|
|
1094
|
-
*
|
|
1193
|
+
* 2026-07-28 in favor of Client ID Metadata Documents (SEP-991); the deprecation
|
|
1194
|
+
* landed via spec PR
|
|
1195
|
+
* {@link https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2858 | modelcontextprotocol#2858}
|
|
1196
|
+
* (SEP-2577 is the separate roots/sampling/logging deprecation). Remains
|
|
1197
|
+
* functional during the deprecation window — at least twelve months under the
|
|
1198
|
+
* feature lifecycle policy (SEP-2596), so 2027-07-28 is the earliest possible
|
|
1199
|
+
* removal date. Prefer a CIMD URL `client_id` when the authorization server
|
|
1200
|
+
* advertises `client_id_metadata_document_supported`: the built-in `auth()` flow
|
|
1201
|
+
* skips registration for you when that capability is advertised AND your
|
|
1202
|
+
* provider supplies `clientMetadataUrl`, but `registerClient` itself does not
|
|
1203
|
+
* gate — calling it directly always sends the registration request.
|
|
1095
1204
|
*/
|
|
1096
1205
|
declare function registerClient(authorizationServerUrl: string | URL, {
|
|
1097
1206
|
metadata,
|
|
@@ -1152,9 +1261,10 @@ interface ClientCredentialsProviderOptions {
|
|
|
1152
1261
|
/**
|
|
1153
1262
|
* The authorization server's `issuer` identifier these credentials were registered with.
|
|
1154
1263
|
* Stamped onto the stored client information so `auth()`'s SEP-2352 issuer check
|
|
1155
|
-
* refuses to send the credential to any other authorization server.
|
|
1156
|
-
*
|
|
1157
|
-
*
|
|
1264
|
+
* refuses to send the credential to any other authorization server.
|
|
1265
|
+
*
|
|
1266
|
+
* Omitting it is deprecated: the credential then goes to whichever authorization server
|
|
1267
|
+
* the MCP server advertises.
|
|
1158
1268
|
*/
|
|
1159
1269
|
expectedIssuer?: string;
|
|
1160
1270
|
}
|
|
@@ -1168,7 +1278,8 @@ interface ClientCredentialsProviderOptions {
|
|
|
1168
1278
|
* ```ts source="./authExtensions.examples.ts#ClientCredentialsProvider_basicUsage"
|
|
1169
1279
|
* const provider = new ClientCredentialsProvider({
|
|
1170
1280
|
* clientId: 'my-client',
|
|
1171
|
-
* clientSecret: 'my-secret'
|
|
1281
|
+
* clientSecret: 'my-secret',
|
|
1282
|
+
* expectedIssuer: 'https://auth.example.com'
|
|
1172
1283
|
* });
|
|
1173
1284
|
*
|
|
1174
1285
|
* const transport = new StreamableHTTPClientTransport(serverUrl, {
|
|
@@ -1180,6 +1291,10 @@ declare class ClientCredentialsProvider implements OAuthClientProvider {
|
|
|
1180
1291
|
private _tokens?;
|
|
1181
1292
|
private _clientInfo;
|
|
1182
1293
|
private _clientMetadata;
|
|
1294
|
+
constructor(options: ClientCredentialsProviderOptions & {
|
|
1295
|
+
expectedIssuer: string;
|
|
1296
|
+
});
|
|
1297
|
+
/** @deprecated Pass `expectedIssuer` so the credentials are only sent to that authorization server. */
|
|
1183
1298
|
constructor(options: ClientCredentialsProviderOptions);
|
|
1184
1299
|
get redirectUrl(): undefined;
|
|
1185
1300
|
get clientMetadata(): OAuthClientMetadata;
|
|
@@ -1247,7 +1362,8 @@ interface PrivateKeyJwtProviderOptions {
|
|
|
1247
1362
|
* const provider = new PrivateKeyJwtProvider({
|
|
1248
1363
|
* clientId: 'my-client',
|
|
1249
1364
|
* privateKey: pemEncodedPrivateKey,
|
|
1250
|
-
* algorithm: 'RS256'
|
|
1365
|
+
* algorithm: 'RS256',
|
|
1366
|
+
* expectedIssuer: 'https://auth.example.com'
|
|
1251
1367
|
* });
|
|
1252
1368
|
*
|
|
1253
1369
|
* const transport = new StreamableHTTPClientTransport(serverUrl, {
|
|
@@ -1260,6 +1376,10 @@ declare class PrivateKeyJwtProvider implements OAuthClientProvider {
|
|
|
1260
1376
|
private _clientInfo;
|
|
1261
1377
|
private _clientMetadata;
|
|
1262
1378
|
addClientAuthentication: AddClientAuthentication;
|
|
1379
|
+
constructor(options: PrivateKeyJwtProviderOptions & {
|
|
1380
|
+
expectedIssuer: string;
|
|
1381
|
+
});
|
|
1382
|
+
/** @deprecated Pass `expectedIssuer` so the credentials are only sent to that authorization server. */
|
|
1263
1383
|
constructor(options: PrivateKeyJwtProviderOptions);
|
|
1264
1384
|
get redirectUrl(): undefined;
|
|
1265
1385
|
get clientMetadata(): OAuthClientMetadata;
|
|
@@ -1312,6 +1432,10 @@ declare class StaticPrivateKeyJwtProvider implements OAuthClientProvider {
|
|
|
1312
1432
|
private _clientInfo;
|
|
1313
1433
|
private _clientMetadata;
|
|
1314
1434
|
addClientAuthentication: AddClientAuthentication;
|
|
1435
|
+
constructor(options: StaticPrivateKeyJwtProviderOptions & {
|
|
1436
|
+
expectedIssuer: string;
|
|
1437
|
+
});
|
|
1438
|
+
/** @deprecated Pass `expectedIssuer` so the credentials are only sent to that authorization server. */
|
|
1315
1439
|
constructor(options: StaticPrivateKeyJwtProviderOptions);
|
|
1316
1440
|
get redirectUrl(): undefined;
|
|
1317
1441
|
get clientMetadata(): OAuthClientMetadata;
|
|
@@ -1440,7 +1564,8 @@ interface CrossAppAccessProviderOptions {
|
|
|
1440
1564
|
* return result.jwtAuthGrant;
|
|
1441
1565
|
* },
|
|
1442
1566
|
* clientId: 'my-mcp-client',
|
|
1443
|
-
* clientSecret: 'my-mcp-secret'
|
|
1567
|
+
* clientSecret: 'my-mcp-secret',
|
|
1568
|
+
* expectedIssuer: 'https://auth.example.com'
|
|
1444
1569
|
* });
|
|
1445
1570
|
*
|
|
1446
1571
|
* const transport = new StreamableHTTPClientTransport(serverUrl, {
|
|
@@ -1457,6 +1582,10 @@ declare class CrossAppAccessProvider implements OAuthClientProvider {
|
|
|
1457
1582
|
private _authorizationServerUrl?;
|
|
1458
1583
|
private _resourceUrl?;
|
|
1459
1584
|
private _scope?;
|
|
1585
|
+
constructor(options: CrossAppAccessProviderOptions & {
|
|
1586
|
+
expectedIssuer: string;
|
|
1587
|
+
});
|
|
1588
|
+
/** @deprecated Pass `expectedIssuer` so the credentials are only sent to that authorization server. */
|
|
1460
1589
|
constructor(options: CrossAppAccessProviderOptions);
|
|
1461
1590
|
get redirectUrl(): undefined;
|
|
1462
1591
|
get clientMetadata(): OAuthClientMetadata;
|
|
@@ -2359,8 +2488,7 @@ declare class Client extends Protocol<ClientContext> {
|
|
|
2359
2488
|
* methods' no-`cursor` auto-aggregate path. Page 1's result object is
|
|
2360
2489
|
* mutated in place (its items array is extended; `nextCursor` is
|
|
2361
2490
|
* cleared); page-1 metadata (`ttlMs`, `cacheScope`, `_meta`) is preserved.
|
|
2362
|
-
* A `nextCursor`
|
|
2363
|
-
* non-converging server, mcp.d's `drainList` guard);
|
|
2491
|
+
* A page with the same items and `nextCursor` as the previous page ends the walk;
|
|
2364
2492
|
* {@linkcode ClientOptions.listMaxPages} is a hard cap — hitting it
|
|
2365
2493
|
* throws, so a partial aggregate is never cached. The
|
|
2366
2494
|
* captured-generation guard skips the write when a `list_changed` landed
|
|
@@ -3034,8 +3162,8 @@ type SSEClientTransportOptions = {
|
|
|
3034
3162
|
* {@linkcode AuthProvider.token | token()} is called before every request to obtain the
|
|
3035
3163
|
* bearer token. When the server responds with 401, {@linkcode AuthProvider.onUnauthorized | onUnauthorized()}
|
|
3036
3164
|
* is called (if provided) to refresh credentials, then the request is retried once. If
|
|
3037
|
-
* the retry also gets 401,
|
|
3038
|
-
* is thrown.
|
|
3165
|
+
* the retry also gets 401, `SdkHttpError` (`SdkErrorCode.ClientHttpAuthentication`) is thrown.
|
|
3166
|
+
* If `onUnauthorized` is not provided, {@linkcode UnauthorizedError} is thrown.
|
|
3039
3167
|
*
|
|
3040
3168
|
* For simple bearer tokens: `{ token: async () => myApiKey }`.
|
|
3041
3169
|
*
|
|
@@ -3071,12 +3199,33 @@ type SSEClientTransportOptions = {
|
|
|
3071
3199
|
* `mcp-protocol-version`. A caller-supplied `Authorization` value is therefore only sent
|
|
3072
3200
|
* while the provider has no token, which lets a static API key fall back to OAuth once
|
|
3073
3201
|
* the provider obtains one.
|
|
3202
|
+
*
|
|
3203
|
+
* A `redirect` of `'error'` or `'manual'` is passed to fetch as it is for the `POST`
|
|
3204
|
+
* requests that carry messages. For the OAuth requests, and for any other value,
|
|
3205
|
+
* `redirect` is consulted only when
|
|
3206
|
+
* {@linkcode SSEClientTransportOptions.redirectPolicy | redirectPolicy} is `'follow'`. The
|
|
3207
|
+
* request that begins the stream does not read it.
|
|
3074
3208
|
*/
|
|
3075
3209
|
requestInit?: RequestInit;
|
|
3076
3210
|
/**
|
|
3077
3211
|
* Custom fetch implementation used for all network requests.
|
|
3078
3212
|
*/
|
|
3079
3213
|
fetch?: FetchLike;
|
|
3214
|
+
/**
|
|
3215
|
+
* How a redirect of one of the transport's requests is handled, including the OAuth
|
|
3216
|
+
* requests it makes for {@linkcode SSEClientTransportOptions.authProvider | authProvider}.
|
|
3217
|
+
* The option does not reach requests that a provider makes with a fetch of its own, such as
|
|
3218
|
+
* those of the `assertion` callback of a `CrossAppAccessProvider`.
|
|
3219
|
+
*
|
|
3220
|
+
* - `'same-origin'` (default): a redirect is followed only when it stays within the origin
|
|
3221
|
+
* of the request and keeps the method, and any other redirect fails the request.
|
|
3222
|
+
* - `'follow'`: redirects are left to the fetch implementation, as in earlier versions. It
|
|
3223
|
+
* follows them to any origin unless `requestInit.redirect` says otherwise, which the
|
|
3224
|
+
* request that begins the stream does not read.
|
|
3225
|
+
*
|
|
3226
|
+
* @default 'same-origin'
|
|
3227
|
+
*/
|
|
3228
|
+
redirectPolicy?: 'same-origin' | 'follow';
|
|
3080
3229
|
};
|
|
3081
3230
|
/**
|
|
3082
3231
|
* Client transport for SSE: this will connect to a server using Server-Sent Events for receiving
|
|
@@ -3097,6 +3246,7 @@ declare class SSEClientTransport implements Transport {
|
|
|
3097
3246
|
private _skipIssuerMetadataValidation?;
|
|
3098
3247
|
private _fetch?;
|
|
3099
3248
|
private _fetchWithInit;
|
|
3249
|
+
private _redirectPolicy?;
|
|
3100
3250
|
private _dpop?;
|
|
3101
3251
|
private _protocolVersion?;
|
|
3102
3252
|
onclose?: () => void;
|
|
@@ -3104,6 +3254,11 @@ declare class SSEClientTransport implements Transport {
|
|
|
3104
3254
|
onmessage?: (message: JSONRPCMessage) => void;
|
|
3105
3255
|
constructor(url: URL, opts?: SSEClientTransportOptions);
|
|
3106
3256
|
private _last401Response?;
|
|
3257
|
+
private _connectAuthRetried;
|
|
3258
|
+
/** `baseFetch` with redirects handled as `redirectPolicy` says. */
|
|
3259
|
+
private _redirects;
|
|
3260
|
+
/** Error text for a redirect `response` that was not followed, or `undefined` for any other response. */
|
|
3261
|
+
private _unfollowedRedirect;
|
|
3107
3262
|
private _commonHeaders;
|
|
3108
3263
|
private _startOrAuth;
|
|
3109
3264
|
start(): Promise<void>;
|
|
@@ -3233,8 +3388,8 @@ type StreamableHTTPClientTransportOptions = {
|
|
|
3233
3388
|
* {@linkcode AuthProvider.token | token()} is called before every request to obtain the
|
|
3234
3389
|
* bearer token. When the server responds with 401, {@linkcode AuthProvider.onUnauthorized | onUnauthorized()}
|
|
3235
3390
|
* is called (if provided) to refresh credentials, then the request is retried once. If
|
|
3236
|
-
* the retry also gets 401,
|
|
3237
|
-
* is thrown.
|
|
3391
|
+
* the retry also gets 401, `SdkHttpError` (`SdkErrorCode.ClientHttpAuthentication`) is thrown.
|
|
3392
|
+
* If `onUnauthorized` is not provided, {@linkcode UnauthorizedError} is thrown.
|
|
3238
3393
|
*
|
|
3239
3394
|
* For simple bearer tokens: `{ token: async () => myApiKey }`.
|
|
3240
3395
|
*
|
|
@@ -3262,12 +3417,31 @@ type StreamableHTTPClientTransportOptions = {
|
|
|
3262
3417
|
* token, `mcp-session-id`, and `mcp-protocol-version`. A caller-supplied `Authorization`
|
|
3263
3418
|
* value is therefore only sent while the provider has no token, which lets a static API
|
|
3264
3419
|
* key fall back to OAuth once the provider obtains one.
|
|
3420
|
+
*
|
|
3421
|
+
* A `redirect` of `'error'` or `'manual'` is passed to fetch as it is for the POST, GET and
|
|
3422
|
+
* DELETE requests to the server URL. For the OAuth requests, and for any other value,
|
|
3423
|
+
* `redirect` is consulted only when
|
|
3424
|
+
* {@linkcode StreamableHTTPClientTransportOptions.redirectPolicy | redirectPolicy} is `'follow'`.
|
|
3265
3425
|
*/
|
|
3266
3426
|
requestInit?: RequestInit;
|
|
3267
3427
|
/**
|
|
3268
3428
|
* Custom fetch implementation used for all network requests.
|
|
3269
3429
|
*/
|
|
3270
3430
|
fetch?: FetchLike;
|
|
3431
|
+
/**
|
|
3432
|
+
* How a redirect of one of the transport's requests is handled, including the OAuth
|
|
3433
|
+
* requests it makes for {@linkcode StreamableHTTPClientTransportOptions.authProvider | authProvider}.
|
|
3434
|
+
* The option does not reach requests that a provider makes with a fetch of its own, such as
|
|
3435
|
+
* those of the `assertion` callback of a `CrossAppAccessProvider`.
|
|
3436
|
+
*
|
|
3437
|
+
* - `'same-origin'` (default): a redirect is followed only when it stays within the origin
|
|
3438
|
+
* of the request and keeps the method, and any other redirect fails the request.
|
|
3439
|
+
* - `'follow'`: redirects are left to the fetch implementation, as in earlier versions. It
|
|
3440
|
+
* follows them to any origin unless `requestInit.redirect` says otherwise.
|
|
3441
|
+
*
|
|
3442
|
+
* @default 'same-origin'
|
|
3443
|
+
*/
|
|
3444
|
+
redirectPolicy?: 'same-origin' | 'follow';
|
|
3271
3445
|
/**
|
|
3272
3446
|
* Options to configure the reconnection behavior.
|
|
3273
3447
|
*/
|
|
@@ -3338,6 +3512,7 @@ declare class StreamableHTTPClientTransport implements Transport {
|
|
|
3338
3512
|
private _skipIssuerMetadataValidation?;
|
|
3339
3513
|
private _fetch?;
|
|
3340
3514
|
private _fetchWithInit;
|
|
3515
|
+
private _redirectPolicy?;
|
|
3341
3516
|
private _sessionId?;
|
|
3342
3517
|
private _reconnectionOptions;
|
|
3343
3518
|
private _protocolVersion?;
|
|
@@ -3366,6 +3541,10 @@ declare class StreamableHTTPClientTransport implements Transport {
|
|
|
3366
3541
|
*/
|
|
3367
3542
|
private _stepUpAuthorize;
|
|
3368
3543
|
private _stepUpAuthorizeInner;
|
|
3544
|
+
/** `baseFetch` with redirects handled as `redirectPolicy` says. */
|
|
3545
|
+
private _redirects;
|
|
3546
|
+
/** Error text for a redirect `response` that was not followed, or `undefined` for any other response. */
|
|
3547
|
+
private _unfollowedRedirect;
|
|
3369
3548
|
private _commonHeaders;
|
|
3370
3549
|
/**
|
|
3371
3550
|
* Body-derived per-request headers: when an outgoing request carries a
|