11diff --git a/dist/index.cjs b/dist/index.cjs
2- index 635f1c0134274c89e7efbcae2adf3d9ecba575ee..3f4dfb779a55deaae2c188a442b78ca519d5c17d 100644
2+ index 71cf630..4c33e3b 100644
33--- a/dist/index.cjs
44+++ b/dist/index.cjs
5- @@ -517,7 +517,7 @@ function applyPublicAuth(clientId, params) {
6- }
7- /** Loopback hosts exempt from the in-transit `https:` requirement (RFC 8252 §7.3). */
8- function isLoopbackHost(hostname) {
9- - return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "[::1]" || hostname === "::1";
10- + return hostname === "localhost" || hostname.endsWith(".localhost") || hostname === "127.0.0.1" || hostname === "[::1]" || hostname === "::1";
11- }
12- /**
13- * SEP-2207: refuse to send credentials to a non-TLS, non-loopback token endpoint.
14- @@ -977,7 +977,6 @@ async function discoverMetadataWithFallback(serverUrl, wellKnownType, fetchFn, o
5+ @@ -1038,7 +1038,6 @@ async function discoverMetadataWithFallback(serverUrl, wellKnownType, fetchFn, o
156 else {
167 const wellKnownPath = buildWellKnownPath(wellKnownType, issuer.pathname);
178 url = new URL(wellKnownPath, opts?.metadataServerUrl ?? issuer);
189- url.search = issuer.search;
1910 }
2011 let response = await tryMetadataDiscovery(url, protocolVersion, fetchFn);
2112 if (!opts?.metadataUrl && shouldAttemptFallback(response, issuer.pathname)) response = await tryMetadataDiscovery(new URL(`/.well-known/${wellKnownType}`, issuer), protocolVersion, fetchFn);
22- @@ -1158 ,7 +1157 ,6 @@ async function startAuthorization(authorizationServerUrl, { metadata, clientInfo
13+ @@ -1222 ,7 +1221 ,6 @@ async function startAuthorization(authorizationServerUrl, { metadata, clientInfo
2314 authorizationUrl.searchParams.set("redirect_uri", String(redirectUrl));
2415 if (state) authorizationUrl.searchParams.set("state", state);
2516 if (scope) authorizationUrl.searchParams.set("scope", scope);
2617- if (scope?.split(" ").includes("offline_access")) authorizationUrl.searchParams.append("prompt", "consent");
27- if (resource) authorizationUrl.searchParams.set("resource", resource.href );
18+ if (resource) authorizationUrl.searchParams.set("resource", resourceIndicatorToString( resource) );
2819 return {
2920 authorizationUrl,
3021diff --git a/dist/index.mjs b/dist/index.mjs
31- index f02ce3ca394e826fc27c9848dbe9a214bf6ba7a9..3508b8e841bb8d3d724fa5ff573902dbca81cf89 100644
22+ index c1a09a8..f5b0e1d 100644
3223--- a/dist/index.mjs
3324+++ b/dist/index.mjs
34- @@ -514,7 +514,7 @@ function applyPublicAuth(clientId, params) {
35- }
36- /** Loopback hosts exempt from the in-transit `https:` requirement (RFC 8252 §7.3). */
37- function isLoopbackHost(hostname) {
38- - return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "[::1]" || hostname === "::1";
39- + return hostname === "localhost" || hostname.endsWith(".localhost") || hostname === "127.0.0.1" || hostname === "[::1]" || hostname === "::1";
40- }
41- /**
42- * SEP-2207: refuse to send credentials to a non-TLS, non-loopback token endpoint.
43- @@ -974,7 +974,6 @@ async function discoverMetadataWithFallback(serverUrl, wellKnownType, fetchFn, o
25+ @@ -1035,7 +1035,6 @@ async function discoverMetadataWithFallback(serverUrl, wellKnownType, fetchFn, o
4426 else {
4527 const wellKnownPath = buildWellKnownPath(wellKnownType, issuer.pathname);
4628 url = new URL(wellKnownPath, opts?.metadataServerUrl ?? issuer);
4729- url.search = issuer.search;
4830 }
4931 let response = await tryMetadataDiscovery(url, protocolVersion, fetchFn);
5032 if (!opts?.metadataUrl && shouldAttemptFallback(response, issuer.pathname)) response = await tryMetadataDiscovery(new URL(`/.well-known/${wellKnownType}`, issuer), protocolVersion, fetchFn);
51- @@ -1155 ,7 +1154 ,6 @@ async function startAuthorization(authorizationServerUrl, { metadata, clientInfo
33+ @@ -1219 ,7 +1218 ,6 @@ async function startAuthorization(authorizationServerUrl, { metadata, clientInfo
5234 authorizationUrl.searchParams.set("redirect_uri", String(redirectUrl));
5335 if (state) authorizationUrl.searchParams.set("state", state);
5436 if (scope) authorizationUrl.searchParams.set("scope", scope);
5537- if (scope?.split(" ").includes("offline_access")) authorizationUrl.searchParams.append("prompt", "consent");
56- if (resource) authorizationUrl.searchParams.set("resource", resource.href );
38+ if (resource) authorizationUrl.searchParams.set("resource", resourceIndicatorToString( resource) );
5739 return {
5840 authorizationUrl,
59- diff --git a/dist/src-NAgB4Mp8 .cjs b/dist/src-NAgB4Mp8 .cjs
60- index e8f2499..4436b61 100644
61- --- a/dist/src-NAgB4Mp8 .cjs
62- +++ b/dist/src-NAgB4Mp8 .cjs
63- @@ -1063 ,11 +1063 ,7 @@ function build$1() {
41+ diff --git a/dist/src-DpAS0jfg .cjs b/dist/src-DpAS0jfg .cjs
42+ index e2ffe64..af1153c 100644
43+ --- a/dist/src-DpAS0jfg .cjs
44+ +++ b/dist/src-DpAS0jfg .cjs
45+ @@ -1093 ,11 +1093 ,7 @@ function build$1() {
6446 properties: zod_v4.record(zod_v4.string(), JSONValueSchema$1).optional(),
6547 required: zod_v4.array(zod_v4.string()).optional()
6648 }).catchall(zod_v4.unknown()),
@@ -73,20 +55,11 @@ index e8f2499..4436b61 100644
7355 annotations: ToolAnnotationsSchema$1.optional(),
7456 execution: ToolExecutionSchema$1.optional(),
7557 _meta: zod_v4.record(zod_v4.string(), zod_v4.unknown()).optional()
76- @@ -5698,7 +5694,7 @@ var Protocol = class {
77- return this._requestHandlers.get(method);
78- }
79- async _oncancel(notification) {
80- - if (!notification.params.requestId) return;
81- + if (notification.params.requestId === void 0) return;
82- this._requestHandlerAbortControllers.get(notification.params.requestId)?.abort(notification.params.reason);
83- }
84- _setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {
85- diff --git a/dist/src-D_zzAWoS.mjs b/dist/src-D_zzAWoS.mjs
86- index 6ac3d53..9b8e48b 100644
87- --- a/dist/src-D_zzAWoS.mjs
88- +++ b/dist/src-D_zzAWoS.mjs
89- @@ -1062,11 +1062,7 @@ function build$1() {
58+ diff --git a/dist/src-WCy6ifGf.mjs b/dist/src-WCy6ifGf.mjs
59+ index 7a40fb4..16d9ac0 100644
60+ --- a/dist/src-WCy6ifGf.mjs
61+ +++ b/dist/src-WCy6ifGf.mjs
62+ @@ -1092,11 +1092,7 @@ function build$1() {
9063 properties: z.record(z.string(), JSONValueSchema$1).optional(),
9164 required: z.array(z.string()).optional()
9265 }).catchall(z.unknown()),
@@ -99,12 +72,3 @@ index 6ac3d53..9b8e48b 100644
9972 annotations: ToolAnnotationsSchema$1.optional(),
10073 execution: ToolExecutionSchema$1.optional(),
10174 _meta: z.record(z.string(), z.unknown()).optional()
102- @@ -5697,7 +5693,7 @@ var Protocol = class {
103- return this._requestHandlers.get(method);
104- }
105- async _oncancel(notification) {
106- - if (!notification.params.requestId) return;
107- + if (notification.params.requestId === void 0) return;
108- this._requestHandlerAbortControllers.get(notification.params.requestId)?.abort(notification.params.reason);
109- }
110- _setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {
0 commit comments