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
package/node_modules/@modelcontextprotocol/client/dist/{src-DDAAhLnO.mjs → src-WCy6ifGf.mjs}
RENAMED
|
@@ -438,6 +438,13 @@ function resourceUrlFromServerUrl(url) {
|
|
|
438
438
|
resourceURL.hash = "";
|
|
439
439
|
return resourceURL;
|
|
440
440
|
}
|
|
441
|
+
/** Returns an authorization-server response body without `issuer`, which only the client sets, when it stores a value (SEP-2352). */
|
|
442
|
+
function withoutIssuer(body) {
|
|
443
|
+
if (typeof body !== "object" || body === null || Array.isArray(body)) return body;
|
|
444
|
+
const copy = { ...body };
|
|
445
|
+
delete copy.issuer;
|
|
446
|
+
return copy;
|
|
447
|
+
}
|
|
441
448
|
/**
|
|
442
449
|
* Checks if a requested resource URL matches a configured resource URL.
|
|
443
450
|
* A requested resource matches if it has the same scheme, domain, port,
|
|
@@ -3064,7 +3071,7 @@ function build() {
|
|
|
3064
3071
|
const subscriptionsListenParamsShape = { notifications: SubscriptionFilterSchema$1 };
|
|
3065
3072
|
const SubscriptionsListenRequestSchema$1 = wireRequest("subscriptions/listen", subscriptionsListenParamsShape);
|
|
3066
3073
|
/**
|
|
3067
|
-
* Anchor
|
|
3074
|
+
* Anchor SubscriptionsListenResultMetaObject — required subscriptionId stamp on
|
|
3068
3075
|
* the graceful-close result. Extends `ResultMetaObject` since spec PR
|
|
3069
3076
|
* #3002 (composed, so the serverInfo key and its leniency stay single-sourced).
|
|
3070
3077
|
*/
|
|
@@ -3337,7 +3344,8 @@ function build() {
|
|
|
3337
3344
|
ListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),
|
|
3338
3345
|
ReadResourceResultResponseSchema: wireResultResponse(z.union([ReadResourceResultSchema$1, InputRequiredResultSchema])),
|
|
3339
3346
|
CompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),
|
|
3340
|
-
DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)
|
|
3347
|
+
DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1),
|
|
3348
|
+
SubscriptionsListenResultResponseSchema: wireResultResponse(SubscriptionsListenResultSchema$1)
|
|
3341
3349
|
};
|
|
3342
3350
|
}
|
|
3343
3351
|
let memo;
|
|
@@ -3964,6 +3972,8 @@ const rev2026Codec = {
|
|
|
3964
3972
|
const rawInputRequests = raw["inputRequests"];
|
|
3965
3973
|
const inputRequests = isPlainObject$3(rawInputRequests) ? rawInputRequests : {};
|
|
3966
3974
|
const requestState = raw["requestState"];
|
|
3975
|
+
const metaParse = raw["_meta"] === void 0 ? void 0 : buildSchemas2026().ResultMetaSchema.safeParse(raw["_meta"]);
|
|
3976
|
+
const meta = metaParse?.success ? metaParse.data : void 0;
|
|
3967
3977
|
if (Object.keys(inputRequests).length === 0 && typeof requestState !== "string") return {
|
|
3968
3978
|
kind: "invalid",
|
|
3969
3979
|
error: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`, {
|
|
@@ -3974,7 +3984,8 @@ const rev2026Codec = {
|
|
|
3974
3984
|
return {
|
|
3975
3985
|
kind: "input_required",
|
|
3976
3986
|
inputRequests,
|
|
3977
|
-
...typeof requestState === "string" && { requestState }
|
|
3987
|
+
...typeof requestState === "string" && { requestState },
|
|
3988
|
+
...meta !== void 0 && { _meta: meta }
|
|
3978
3989
|
};
|
|
3979
3990
|
}
|
|
3980
3991
|
if (rawResultType !== "complete") return {
|
|
@@ -4082,6 +4093,10 @@ function isSpecRequestMethod(method) {
|
|
|
4082
4093
|
function isSpecNotificationMethod(method) {
|
|
4083
4094
|
return ALL_CODECS.some((codec) => codec.hasNotificationMethod(method));
|
|
4084
4095
|
}
|
|
4096
|
+
/** The names SEP-2663 re-defines for the Tasks extension on the era that removed them from core. */
|
|
4097
|
+
function isExtensionReusedRequestMethod(method) {
|
|
4098
|
+
return method === "tasks/get" || method === "tasks/cancel";
|
|
4099
|
+
}
|
|
4085
4100
|
const ALL_CODECS = [rev2025Codec, rev2026Codec];
|
|
4086
4101
|
|
|
4087
4102
|
//#endregion
|
|
@@ -5018,13 +5033,14 @@ function buildInputRequired(spec) {
|
|
|
5018
5033
|
* @example Write-once tool requesting confirmation
|
|
5019
5034
|
* ```ts
|
|
5020
5035
|
* server.registerTool('deploy', { inputSchema: z.object({ env: z.string() }) }, async ({ env }, ctx) => {
|
|
5021
|
-
* const
|
|
5022
|
-
*
|
|
5036
|
+
* const confirmationSchema = z.object({ confirm: z.boolean() });
|
|
5037
|
+
* const confirmed = acceptedContent(ctx.mcpReq.inputResponses, 'confirm', confirmationSchema);
|
|
5038
|
+
* if (confirmed?.confirm !== true) {
|
|
5023
5039
|
* return inputRequired({
|
|
5024
5040
|
* inputRequests: {
|
|
5025
5041
|
* confirm: inputRequired.elicit({
|
|
5026
5042
|
* message: `Deploy to ${env}?`,
|
|
5027
|
-
* requestedSchema:
|
|
5043
|
+
* requestedSchema: confirmationSchema
|
|
5028
5044
|
* })
|
|
5029
5045
|
* }
|
|
5030
5046
|
* });
|
|
@@ -5635,6 +5651,8 @@ var Protocol = class {
|
|
|
5635
5651
|
_transport;
|
|
5636
5652
|
_requestMessageId = 0;
|
|
5637
5653
|
_requestHandlers = /* @__PURE__ */ new Map();
|
|
5654
|
+
/** Methods registered with an explicit schema; the era gate in `_onrequest` reads it for the Tasks extension names. */
|
|
5655
|
+
_customSchemaRequestMethods = /* @__PURE__ */ new Set();
|
|
5638
5656
|
_requestHandlerAbortControllers = /* @__PURE__ */ new Map();
|
|
5639
5657
|
_notificationHandlers = /* @__PURE__ */ new Map();
|
|
5640
5658
|
_responseHandlers = /* @__PURE__ */ new Map();
|
|
@@ -5916,7 +5934,7 @@ var Protocol = class {
|
|
|
5916
5934
|
return;
|
|
5917
5935
|
}
|
|
5918
5936
|
}
|
|
5919
|
-
if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method)) {
|
|
5937
|
+
if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method) && !(isExtensionReusedRequestMethod(request.method) && this._customSchemaRequestMethods.has(request.method))) {
|
|
5920
5938
|
sendErrorResponse(ProtocolErrorCode.MethodNotFound, "Method not found");
|
|
5921
5939
|
return;
|
|
5922
5940
|
}
|
|
@@ -6049,8 +6067,11 @@ var Protocol = class {
|
|
|
6049
6067
|
}
|
|
6050
6068
|
request(request, schemaOrOptions, maybeOptions) {
|
|
6051
6069
|
const codec = this._resolveOutboundCodec(request.method);
|
|
6070
|
+
if (isStandardSchema(schemaOrOptions)) {
|
|
6071
|
+
if (!isExtensionReusedRequestMethod(request.method)) this._assertOutboundRequestInEra(codec, request.method);
|
|
6072
|
+
return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
|
|
6073
|
+
}
|
|
6052
6074
|
this._assertOutboundRequestInEra(codec, request.method);
|
|
6053
|
-
if (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
|
|
6054
6075
|
const validate = codecResultValidator(codec, request.method);
|
|
6055
6076
|
if (validate === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);
|
|
6056
6077
|
return this._requestWithSchemaViaCodec(codec, request, validate, schemaOrOptions);
|
|
@@ -6243,7 +6264,7 @@ var Protocol = class {
|
|
|
6243
6264
|
* Emits a notification, which is a one-way message that does not expect a response.
|
|
6244
6265
|
*/
|
|
6245
6266
|
async notification(notification, options) {
|
|
6246
|
-
return this._notificationViaCodec(this._resolveOutboundCodec(notification.method), notification, options);
|
|
6267
|
+
return await this._notificationViaCodec(this._resolveOutboundCodec(notification.method), notification, options);
|
|
6247
6268
|
}
|
|
6248
6269
|
/**
|
|
6249
6270
|
* The notification funnel proper, keyed by the resolved era codec —
|
|
@@ -6294,6 +6315,8 @@ var Protocol = class {
|
|
|
6294
6315
|
return maybeHandler(parsed.data, ctx);
|
|
6295
6316
|
};
|
|
6296
6317
|
else throw new TypeError("setRequestHandler: handler is required");
|
|
6318
|
+
if (typeof schemasOrHandler === "function") this._customSchemaRequestMethods.delete(method);
|
|
6319
|
+
else this._customSchemaRequestMethods.add(method);
|
|
6297
6320
|
this._requestHandlers.set(method, this._wrapHandler(method, stored));
|
|
6298
6321
|
}
|
|
6299
6322
|
/**
|
|
@@ -6322,6 +6345,7 @@ var Protocol = class {
|
|
|
6322
6345
|
*/
|
|
6323
6346
|
removeRequestHandler(method) {
|
|
6324
6347
|
this._requestHandlers.delete(method);
|
|
6348
|
+
this._customSchemaRequestMethods.delete(method);
|
|
6325
6349
|
}
|
|
6326
6350
|
/**
|
|
6327
6351
|
* Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
|
|
@@ -6540,7 +6564,8 @@ function manualInputRequiredValue(decoded) {
|
|
|
6540
6564
|
return {
|
|
6541
6565
|
resultType: "input_required",
|
|
6542
6566
|
inputRequests: decoded.inputRequests,
|
|
6543
|
-
...decoded.requestState !== void 0 && { requestState: decoded.requestState }
|
|
6567
|
+
...decoded.requestState !== void 0 && { requestState: decoded.requestState },
|
|
6568
|
+
...decoded._meta !== void 0 && { _meta: decoded._meta }
|
|
6544
6569
|
};
|
|
6545
6570
|
}
|
|
6546
6571
|
|
|
@@ -6784,6 +6809,71 @@ function createFetchWithInit(baseFetch = fetch, baseInit) {
|
|
|
6784
6809
|
});
|
|
6785
6810
|
};
|
|
6786
6811
|
}
|
|
6812
|
+
const REDIRECT_STATUSES = new Set([
|
|
6813
|
+
301,
|
|
6814
|
+
302,
|
|
6815
|
+
303,
|
|
6816
|
+
307,
|
|
6817
|
+
308
|
|
6818
|
+
]);
|
|
6819
|
+
const MAX_REDIRECTS = 5;
|
|
6820
|
+
/** Whether `to` has the scheme, host and port of `from`, or is its https form with both on the default port. */
|
|
6821
|
+
function isWithinOrigin(from, to) {
|
|
6822
|
+
if (from.protocol === to.protocol && from.host === to.host) return true;
|
|
6823
|
+
return from.protocol === "http:" && to.protocol === "https:" && from.hostname === to.hostname && !from.port && !to.port;
|
|
6824
|
+
}
|
|
6825
|
+
/** The URL that a redirect `response` to a request for `url` points at, if it names one. */
|
|
6826
|
+
function redirectTarget(url, response) {
|
|
6827
|
+
const location = REDIRECT_STATUSES.has(response.status) ? response.headers?.get("location") : void 0;
|
|
6828
|
+
if (!location) return void 0;
|
|
6829
|
+
try {
|
|
6830
|
+
return new URL(location, url);
|
|
6831
|
+
} catch {
|
|
6832
|
+
return;
|
|
6833
|
+
}
|
|
6834
|
+
}
|
|
6835
|
+
const leftToFetch = /* @__PURE__ */ new WeakSet();
|
|
6836
|
+
/** A copy of `baseFetch` that `fetchWithinOrigin` returns as it is, which leaves redirects to `baseFetch`. */
|
|
6837
|
+
function fetchLeavingRedirects(baseFetch) {
|
|
6838
|
+
const copy = (url, init) => baseFetch(url, init);
|
|
6839
|
+
leftToFetch.add(copy);
|
|
6840
|
+
return copy;
|
|
6841
|
+
}
|
|
6842
|
+
/** Wraps `baseFetch` to follow a redirect only when it keeps the method and stays within the origin of the request. */
|
|
6843
|
+
function fetchWithinOrigin(baseFetch) {
|
|
6844
|
+
if (leftToFetch.has(baseFetch)) return baseFetch;
|
|
6845
|
+
return async (url, init) => {
|
|
6846
|
+
if (init?.redirect === "error" || init?.redirect === "manual") return baseFetch(url, init);
|
|
6847
|
+
const method = (init?.method ?? "GET").toUpperCase();
|
|
6848
|
+
let current = url;
|
|
6849
|
+
for (let followed = 0;; followed++) {
|
|
6850
|
+
const response = await baseFetch(current, {
|
|
6851
|
+
...init,
|
|
6852
|
+
redirect: "manual"
|
|
6853
|
+
});
|
|
6854
|
+
const target = redirectTarget(current, response);
|
|
6855
|
+
if (!target || followed === MAX_REDIRECTS) return response;
|
|
6856
|
+
const from = new URL(current);
|
|
6857
|
+
const keepsMethod = method === "GET" || response.status === 307 || response.status === 308;
|
|
6858
|
+
const keepsUserinfo = !(target.username || target.password) || target.username === from.username && target.password === from.password;
|
|
6859
|
+
if (!keepsMethod || !keepsUserinfo || !isWithinOrigin(from, target)) return response;
|
|
6860
|
+
await response.text?.().catch(() => {});
|
|
6861
|
+
current = target;
|
|
6862
|
+
}
|
|
6863
|
+
};
|
|
6864
|
+
}
|
|
6865
|
+
/** Error text for a redirect `response` to a request for `url` that was not followed, or `undefined` for any other response. */
|
|
6866
|
+
function unfollowedRedirect(url, response) {
|
|
6867
|
+
if (response.type === "opaqueredirect") return "Redirect not followed: this runtime does not expose where it points";
|
|
6868
|
+
const target = redirectTarget(response.url || url, response);
|
|
6869
|
+
if (!target) return void 0;
|
|
6870
|
+
target.username = target.password = target.search = target.hash = "";
|
|
6871
|
+
if (target.protocol === "http:" && new URL(response.url || url).protocol === "https:") {
|
|
6872
|
+
target.protocol = "https:";
|
|
6873
|
+
return `Redirect from https to plain http not followed; try ${target.href} as the endpoint`;
|
|
6874
|
+
}
|
|
6875
|
+
return `Redirect to ${target.href} not followed; use that URL as the endpoint if it is the intended server`;
|
|
6876
|
+
}
|
|
6787
6877
|
|
|
6788
6878
|
//#endregion
|
|
6789
6879
|
//#region ../core-internal/src/shared/uriTemplate.ts
|
|
@@ -7132,5 +7222,5 @@ function fromJsonSchema(schema, validator) {
|
|
|
7132
7222
|
}
|
|
7133
7223
|
|
|
7134
7224
|
//#endregion
|
|
7135
|
-
export {
|
|
7136
|
-
//# sourceMappingURL=src-
|
|
7225
|
+
export { ProtocolErrorCode as $, assertCompleteRequestPrompt as A, OAuthProtectedResourceMetadataSchema as At, isJSONRPCResultResponse as B, withInputRequired as C, checkResourceAllowed as Ct, buildMcpParamHeaders as D, OAuthClientInformationFullSchema as Dt, mcpNameSource as E, IdJagTokenExchangeResponseSchema as Et, isInputRequiredResult as F, SdkHttpError as Ft, ListChangedOptionsBaseSchema as G, parseJSONRPCMessage as H, isJSONRPCErrorResponse as I, OAuthError as It, MissingRequiredClientCapabilityError as J, MODERN_WIRE_REVISION as K, isJSONRPCNotification as L, OAuthErrorCode as Lt, isCallToolResult as M, OpenIdProviderDiscoveryMetadataSchema as Mt, isInitializeRequest as N, SdkError as Nt, encodeMcpParamValue as O, OAuthErrorResponseSchema as Ot, isInitializedNotification as P, SdkErrorCode as Pt, UrlElicitationRequiredError as Q, isJSONRPCRequest as R, brandedHasInstance as Rt, resolveInputRequiredDriverConfig as S, TRACESTATE_META_KEY as St, HEADER_MISMATCH_ERROR_CODE as T, withoutIssuer as Tt, DiscoverResultSchema as U, isTaskAugmentedRequestParams as V, JSONRPCMessageSchema as W, ResourceNotFoundError as X, ProtocolError as Y, UnsupportedProtocolVersionError as Z, DEFAULT_REQUEST_TIMEOUT_MSEC as _, RELATED_TASK_META_KEY as _t, createFetchWithInit as a, CLIENT_CAPABILITIES_META_KEY as at, isSpecType as b, SUPPORTED_PROTOCOL_VERSIONS as bt, unfollowedRedirect as c, INTERNAL_ERROR as ct, deserializeMessage as d, JSONRPC_VERSION as dt, SUPPORTED_MODERN_PROTOCOL_VERSIONS as et, serializeMessage as f, LATEST_PROTOCOL_VERSION as ft, runInputRequiredFlow as g, PROTOCOL_VERSION_META_KEY as gt, mediaTypeEssence as h, PARSE_ERROR as ht, UriTemplate as i, BAGGAGE_META_KEY as it, assertCompleteRequestResourceTemplate as j, OAuthTokensSchema as jt, scanXMcpHeaderDeclarations as k, OAuthMetadataSchema as kt, ReadBuffer as l, INVALID_PARAMS as lt, isJsonContentType as m, METHOD_NOT_FOUND as mt, preloadSchemas as n, legacyProtocolVersions as nt, fetchLeavingRedirects as o, CLIENT_INFO_META_KEY as ot, getDisplayName as p, LOG_LEVEL_META_KEY as pt, codecForVersion as q, InMemoryTransport as r, modernProtocolVersions as rt, fetchWithinOrigin as s, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as st, fromJsonSchema as t, isModernProtocolVersion as tt, STDIO_DEFAULT_MAX_BUFFER_SIZE as u, INVALID_REQUEST as ut, Protocol as v, SERVER_INFO_META_KEY as vt, parseSchema as w, resourceUrlFromServerUrl as wt, specTypeSchemas as x, TRACEPARENT_META_KEY as xt, mergeCapabilities as y, SUBSCRIPTION_ID_META_KEY as yt, isJSONRPCResponse as z, stampErrorBrands as zt };
|
|
7226
|
+
//# sourceMappingURL=src-WCy6ifGf.mjs.map
|