fastmcp 4.23.9 → 4.23.10

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/FastMCP.cjs CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkPV5VLW7Rcjs = require('./chunk-PV5VLW7R.cjs');
14
+ var _chunkB77E3EDNcjs = require('./chunk-B77E3EDN.cjs');
15
15
 
16
16
 
17
17
 
@@ -50,5 +50,5 @@ require('./chunk-6TDYSPLC.cjs');
50
50
 
51
51
 
52
52
 
53
- exports.AuthProvider = _chunk4OWHPJELcjs.AuthProvider; exports.AzureProvider = _chunk4OWHPJELcjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkPV5VLW7Rcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkPV5VLW7Rcjs.FastMCP; exports.FastMCPError = _chunkPV5VLW7Rcjs.FastMCPError; exports.FastMCPSession = _chunkPV5VLW7Rcjs.FastMCPSession; exports.GitHubProvider = _chunk4OWHPJELcjs.GitHubProvider; exports.GoogleProvider = _chunk4OWHPJELcjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkPV5VLW7Rcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunk4OWHPJELcjs.OAuthProvider; exports.ServerState = _chunkPV5VLW7Rcjs.ServerState; exports.SessionError = _chunkPV5VLW7Rcjs.SessionError; exports.UnexpectedStateError = _chunkPV5VLW7Rcjs.UnexpectedStateError; exports.UserError = _chunkPV5VLW7Rcjs.UserError; exports.audioContent = _chunkPV5VLW7Rcjs.audioContent; exports.getAuthSession = _chunk4OWHPJELcjs.getAuthSession; exports.imageContent = _chunkPV5VLW7Rcjs.imageContent; exports.jsonSchemaAdapter = _chunkPV5VLW7Rcjs.jsonSchemaAdapter; exports.requireAll = _chunk4OWHPJELcjs.requireAll; exports.requireAny = _chunk4OWHPJELcjs.requireAny; exports.requireAuth = _chunk4OWHPJELcjs.requireAuth; exports.requireRole = _chunk4OWHPJELcjs.requireRole; exports.requireScopes = _chunk4OWHPJELcjs.requireScopes;
53
+ exports.AuthProvider = _chunk4OWHPJELcjs.AuthProvider; exports.AzureProvider = _chunk4OWHPJELcjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkB77E3EDNcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkB77E3EDNcjs.FastMCP; exports.FastMCPError = _chunkB77E3EDNcjs.FastMCPError; exports.FastMCPSession = _chunkB77E3EDNcjs.FastMCPSession; exports.GitHubProvider = _chunk4OWHPJELcjs.GitHubProvider; exports.GoogleProvider = _chunk4OWHPJELcjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkB77E3EDNcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunk4OWHPJELcjs.OAuthProvider; exports.ServerState = _chunkB77E3EDNcjs.ServerState; exports.SessionError = _chunkB77E3EDNcjs.SessionError; exports.UnexpectedStateError = _chunkB77E3EDNcjs.UnexpectedStateError; exports.UserError = _chunkB77E3EDNcjs.UserError; exports.audioContent = _chunkB77E3EDNcjs.audioContent; exports.getAuthSession = _chunk4OWHPJELcjs.getAuthSession; exports.imageContent = _chunkB77E3EDNcjs.imageContent; exports.jsonSchemaAdapter = _chunkB77E3EDNcjs.jsonSchemaAdapter; exports.requireAll = _chunk4OWHPJELcjs.requireAll; exports.requireAny = _chunk4OWHPJELcjs.requireAny; exports.requireAuth = _chunk4OWHPJELcjs.requireAuth; exports.requireRole = _chunk4OWHPJELcjs.requireRole; exports.requireScopes = _chunk4OWHPJELcjs.requireScopes;
54
54
  //# sourceMappingURL=FastMCP.cjs.map
package/dist/FastMCP.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  audioContent,
12
12
  imageContent,
13
13
  jsonSchemaAdapter
14
- } from "./chunk-75ZLE5AS.js";
14
+ } from "./chunk-EHTAPWBU.js";
15
15
  import {
16
16
  AuthProvider,
17
17
  AzureProvider,
@@ -985,7 +985,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
985
985
  };
986
986
  }
987
987
  /**
988
- * Fetches the client's roots if it advertised `roots.listChanged`.
988
+ * Fetches the client's roots if it advertised the `roots` capability.
989
989
  *
990
990
  * Over Streamable HTTP a server-initiated request travels on the client's
991
991
  * standalone GET stream, which the client opens only after initialization,
@@ -993,7 +993,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
993
993
  * is bounded and retried, and the result is announced with `rootsChanged`.
994
994
  */
995
995
  async #loadRoots(streamableHttp) {
996
- if (_optionalChain([this, 'access', _36 => _36.#rootsConfig, 'optionalAccess', _37 => _37.enabled]) === false || !_optionalChain([this, 'access', _38 => _38.#clientCapabilities, 'optionalAccess', _39 => _39.roots, 'optionalAccess', _40 => _40.listChanged]) || typeof this.#server.listRoots !== "function") {
996
+ if (_optionalChain([this, 'access', _36 => _36.#rootsConfig, 'optionalAccess', _37 => _37.enabled]) === false || !_optionalChain([this, 'access', _38 => _38.#clientCapabilities, 'optionalAccess', _39 => _39.roots]) || typeof this.#server.listRoots !== "function") {
997
997
  return;
998
998
  }
999
999
  const maxAttempts = streamableHttp ? 5 : 1;
@@ -1003,7 +1003,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1003
1003
  void 0,
1004
1004
  streamableHttp ? { timeout: 1e3 } : void 0
1005
1005
  );
1006
- this.#roots = _optionalChain([roots, 'optionalAccess', _41 => _41.roots]) || [];
1006
+ this.#roots = _optionalChain([roots, 'optionalAccess', _40 => _40.roots]) || [];
1007
1007
  if (streamableHttp) {
1008
1008
  this.emit("rootsChanged", { roots: this.#roots });
1009
1009
  }
@@ -1141,7 +1141,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1141
1141
  */
1142
1142
  #startStreamKeepalive(extra, toolName) {
1143
1143
  const config = this.#streamKeepaliveConfig;
1144
- if (!_optionalChain([config, 'optionalAccess', _42 => _42.enabled]) || _optionalChain([extra, 'access', _43 => _43.signal, 'optionalAccess', _44 => _44.aborted])) {
1144
+ if (!_optionalChain([config, 'optionalAccess', _41 => _41.enabled]) || _optionalChain([extra, 'access', _42 => _42.signal, 'optionalAccess', _43 => _43.aborted])) {
1145
1145
  return () => {
1146
1146
  };
1147
1147
  }
@@ -1161,12 +1161,12 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1161
1161
  );
1162
1162
  });
1163
1163
  }, intervalMs);
1164
- _optionalChain([timer, 'access', _45 => _45.unref, 'optionalCall', _46 => _46()]);
1164
+ _optionalChain([timer, 'access', _44 => _44.unref, 'optionalCall', _45 => _45()]);
1165
1165
  const stop = () => {
1166
1166
  clearInterval(timer);
1167
- _optionalChain([extra, 'access', _47 => _47.signal, 'optionalAccess', _48 => _48.removeEventListener, 'call', _49 => _49("abort", stop)]);
1167
+ _optionalChain([extra, 'access', _46 => _46.signal, 'optionalAccess', _47 => _47.removeEventListener, 'call', _48 => _48("abort", stop)]);
1168
1168
  };
1169
- _optionalChain([extra, 'access', _50 => _50.signal, 'optionalAccess', _51 => _51.addEventListener, 'call', _52 => _52("abort", stop, { once: true })]);
1169
+ _optionalChain([extra, 'access', _49 => _49.signal, 'optionalAccess', _50 => _50.addEventListener, 'call', _51 => _51("abort", stop, { once: true })]);
1170
1170
  return stop;
1171
1171
  }
1172
1172
  async #validateStructuredContent(tool, value, toolName) {
@@ -1386,7 +1386,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1386
1386
  _nullishCoalesce(args, () => ( {})),
1387
1387
  this.#auth,
1388
1388
  this.#createLoadContext(
1389
- _optionalChain([request, 'access', _53 => _53.params, 'optionalAccess', _54 => _54._meta]),
1389
+ _optionalChain([request, 'access', _52 => _52.params, 'optionalAccess', _53 => _53._meta]),
1390
1390
  extra.sendNotification,
1391
1391
  extra.requestId
1392
1392
  )
@@ -1456,7 +1456,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1456
1456
  match,
1457
1457
  this.#auth,
1458
1458
  this.#createLoadContext(
1459
- _optionalChain([request, 'access', _55 => _55.params, 'optionalAccess', _56 => _56._meta]),
1459
+ _optionalChain([request, 'access', _54 => _54.params, 'optionalAccess', _55 => _55._meta]),
1460
1460
  extra.sendNotification,
1461
1461
  extra.requestId
1462
1462
  )
@@ -1486,7 +1486,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1486
1486
  maybeArrayResult = await resource.load(
1487
1487
  this.#auth,
1488
1488
  this.#createLoadContext(
1489
- _optionalChain([request, 'access', _57 => _57.params, 'optionalAccess', _58 => _58._meta]),
1489
+ _optionalChain([request, 'access', _56 => _56.params, 'optionalAccess', _57 => _57._meta]),
1490
1490
  extra.sendNotification,
1491
1491
  extra.requestId
1492
1492
  )
@@ -1552,7 +1552,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1552
1552
  );
1553
1553
  }
1554
1554
  setupRootsHandlers() {
1555
- if (_optionalChain([this, 'access', _59 => _59.#rootsConfig, 'optionalAccess', _60 => _60.enabled]) === false) {
1555
+ if (_optionalChain([this, 'access', _58 => _58.#rootsConfig, 'optionalAccess', _59 => _59.enabled]) === false) {
1556
1556
  this.#logger.debug(
1557
1557
  "[FastMCP debug] roots capability explicitly disabled via config"
1558
1558
  );
@@ -1649,7 +1649,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1649
1649
  }
1650
1650
  args = parsed.value;
1651
1651
  }
1652
- const progressToken = _optionalChain([request, 'access', _61 => _61.params, 'optionalAccess', _62 => _62._meta, 'optionalAccess', _63 => _63.progressToken]);
1652
+ const progressToken = _optionalChain([request, 'access', _60 => _60.params, 'optionalAccess', _61 => _61._meta, 'optionalAccess', _62 => _62.progressToken]);
1653
1653
  let result;
1654
1654
  const timeoutAbort = new AbortController();
1655
1655
  const signal = AbortSignal.any([
@@ -1729,7 +1729,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1729
1729
  elicit: this.#createElicit(extra.requestId),
1730
1730
  log,
1731
1731
  reportProgress,
1732
- requestId: typeof _optionalChain([request, 'access', _64 => _64.params, 'optionalAccess', _65 => _65._meta, 'optionalAccess', _66 => _66.requestId]) === "string" ? request.params._meta.requestId : void 0,
1732
+ requestId: typeof _optionalChain([request, 'access', _63 => _63.params, 'optionalAccess', _64 => _64._meta, 'optionalAccess', _65 => _65.requestId]) === "string" ? request.params._meta.requestId : void 0,
1733
1733
  session: this.#auth,
1734
1734
  sessionId: this.sessionId,
1735
1735
  signal,
@@ -1900,7 +1900,7 @@ function normalizePath(path) {
1900
1900
  return path.startsWith("/") ? path : `/${path}`;
1901
1901
  }
1902
1902
  function parseBasicAuthHeader(authHeader) {
1903
- const basicMatch = _optionalChain([authHeader, 'optionalAccess', _67 => _67.match, 'call', _68 => _68(/^Basic\s+(.+)$/)]);
1903
+ const basicMatch = _optionalChain([authHeader, 'optionalAccess', _66 => _66.match, 'call', _67 => _67(/^Basic\s+(.+)$/)]);
1904
1904
  if (!basicMatch) return null;
1905
1905
  try {
1906
1906
  const credentials = Buffer.from(basicMatch[1], "base64").toString("utf-8");
@@ -2570,9 +2570,9 @@ var FastMCP = class extends FastMCPEventEmitter {
2570
2570
  const originalOnClose = transport.onclose;
2571
2571
  transport.onclose = () => {
2572
2572
  closed = true;
2573
- _optionalChain([onClose, 'optionalCall', _69 => _69()]);
2573
+ _optionalChain([onClose, 'optionalCall', _68 => _68()]);
2574
2574
  this.#removeSession(session);
2575
- _optionalChain([originalOnClose, 'optionalCall', _70 => _70()]);
2575
+ _optionalChain([originalOnClose, 'optionalCall', _69 => _69()]);
2576
2576
  };
2577
2577
  await session.connect(transport);
2578
2578
  if (closed) {
@@ -2637,7 +2637,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2637
2637
  */
2638
2638
  #createUnauthorizedResponse(message) {
2639
2639
  const oauth = this.#options.oauth;
2640
- const resource = _optionalChain([oauth, 'optionalAccess', _71 => _71.enabled]) ? _optionalChain([oauth, 'access', _72 => _72.protectedResource, 'optionalAccess', _73 => _73.resource]) : void 0;
2640
+ const resource = _optionalChain([oauth, 'optionalAccess', _70 => _70.enabled]) ? _optionalChain([oauth, 'access', _71 => _71.protectedResource, 'optionalAccess', _72 => _72.resource]) : void 0;
2641
2641
  const wwwAuthenticateParts = [
2642
2642
  'error="invalid_token"',
2643
2643
  `error_description="${message.replace(/"/g, '\\"')}"`
@@ -2776,7 +2776,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2776
2776
  }
2777
2777
  }
2778
2778
  const oauthConfig = this.#options.oauth;
2779
- if (_optionalChain([oauthConfig, 'optionalAccess', _74 => _74.enabled]) && req.method === "GET") {
2779
+ if (_optionalChain([oauthConfig, 'optionalAccess', _73 => _73.enabled]) && req.method === "GET") {
2780
2780
  const url2 = new URL(req.url || "", `http://${host}`);
2781
2781
  const authorizationServerMetadataPath = joinPaths(
2782
2782
  "",
@@ -2810,8 +2810,8 @@ var FastMCP = class extends FastMCPEventEmitter {
2810
2810
  }
2811
2811
  }
2812
2812
  }
2813
- const oauthProxy = _optionalChain([oauthConfig, 'optionalAccess', _75 => _75.proxy]);
2814
- if (oauthProxy && _optionalChain([oauthConfig, 'optionalAccess', _76 => _76.enabled])) {
2813
+ const oauthProxy = _optionalChain([oauthConfig, 'optionalAccess', _74 => _74.proxy]);
2814
+ if (oauthProxy && _optionalChain([oauthConfig, 'optionalAccess', _75 => _75.enabled])) {
2815
2815
  const url2 = new URL(req.url || "", `http://${host}`);
2816
2816
  const oauthPath = basePathRelativePath;
2817
2817
  try {
@@ -2864,7 +2864,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2864
2864
  const statusCode = error.statusCode || 400;
2865
2865
  res.writeHead(statusCode, OAUTH_CREDENTIAL_RESPONSE_HEADERS).end(
2866
2866
  JSON.stringify(
2867
- _optionalChain([error, 'access', _77 => _77.toJSON, 'optionalCall', _78 => _78()]) || {
2867
+ _optionalChain([error, 'access', _76 => _76.toJSON, 'optionalCall', _77 => _77()]) || {
2868
2868
  error: "invalid_request"
2869
2869
  }
2870
2870
  )
@@ -2891,7 +2891,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2891
2891
  } catch (error) {
2892
2892
  res.writeHead(400, { "Content-Type": "application/json" }).end(
2893
2893
  JSON.stringify(
2894
- _optionalChain([error, 'access', _79 => _79.toJSON, 'optionalCall', _80 => _80()]) || {
2894
+ _optionalChain([error, 'access', _78 => _78.toJSON, 'optionalCall', _79 => _79()]) || {
2895
2895
  error: "invalid_request"
2896
2896
  }
2897
2897
  )
@@ -2913,7 +2913,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2913
2913
  } catch (error) {
2914
2914
  res.writeHead(400, { "Content-Type": "application/json" }).end(
2915
2915
  JSON.stringify(
2916
- _optionalChain([error, 'access', _81 => _81.toJSON, 'optionalCall', _82 => _82()]) || {
2916
+ _optionalChain([error, 'access', _80 => _80.toJSON, 'optionalCall', _81 => _81()]) || {
2917
2917
  error: "server_error"
2918
2918
  }
2919
2919
  )
@@ -2982,7 +2982,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2982
2982
  } catch (error) {
2983
2983
  res.writeHead(400, { "Content-Type": "application/json" }).end(
2984
2984
  JSON.stringify(
2985
- _optionalChain([error, 'access', _83 => _83.toJSON, 'optionalCall', _84 => _84()]) || {
2985
+ _optionalChain([error, 'access', _82 => _82.toJSON, 'optionalCall', _83 => _83()]) || {
2986
2986
  error: "server_error"
2987
2987
  }
2988
2988
  )
@@ -3040,8 +3040,8 @@ var FastMCP = class extends FastMCPEventEmitter {
3040
3040
  const basicAuth = parseBasicAuthHeader(
3041
3041
  req.headers.authorization
3042
3042
  );
3043
- const clientId = _optionalChain([basicAuth, 'optionalAccess', _85 => _85.clientId]) || params.get("client_id") || "";
3044
- const clientSecret = _nullishCoalesce(_nullishCoalesce(_optionalChain([basicAuth, 'optionalAccess', _86 => _86.clientSecret]), () => ( params.get("client_secret"))), () => ( void 0));
3043
+ const clientId = _optionalChain([basicAuth, 'optionalAccess', _84 => _84.clientId]) || params.get("client_id") || "";
3044
+ const clientSecret = _nullishCoalesce(_nullishCoalesce(_optionalChain([basicAuth, 'optionalAccess', _85 => _85.clientSecret]), () => ( params.get("client_secret"))), () => ( void 0));
3045
3045
  let response;
3046
3046
  if (grantType === "authorization_code") {
3047
3047
  response = await oauthProxy.exchangeAuthorizationCode({
@@ -3071,7 +3071,7 @@ var FastMCP = class extends FastMCPEventEmitter {
3071
3071
  const statusCode = error.statusCode || 400;
3072
3072
  res.writeHead(statusCode, OAUTH_CREDENTIAL_RESPONSE_HEADERS).end(
3073
3073
  JSON.stringify(
3074
- _optionalChain([error, 'access', _87 => _87.toJSON, 'optionalCall', _88 => _88()]) || {
3074
+ _optionalChain([error, 'access', _86 => _86.toJSON, 'optionalCall', _87 => _87()]) || {
3075
3075
  error: "invalid_request"
3076
3076
  }
3077
3077
  )
@@ -3097,7 +3097,7 @@ var FastMCP = class extends FastMCPEventEmitter {
3097
3097
  * regardless (RFC 7235), so no config is needed just to get the header.
3098
3098
  */
3099
3099
  #httpStreamOAuthConfig() {
3100
- const resource = _optionalChain([this, 'access', _89 => _89.#options, 'access', _90 => _90.oauth, 'optionalAccess', _91 => _91.enabled]) ? _optionalChain([this, 'access', _92 => _92.#options, 'access', _93 => _93.oauth, 'access', _94 => _94.protectedResource, 'optionalAccess', _95 => _95.resource]) : void 0;
3100
+ const resource = _optionalChain([this, 'access', _88 => _88.#options, 'access', _89 => _89.oauth, 'optionalAccess', _90 => _90.enabled]) ? _optionalChain([this, 'access', _91 => _91.#options, 'access', _92 => _92.oauth, 'access', _93 => _93.protectedResource, 'optionalAccess', _94 => _94.resource]) : void 0;
3101
3101
  if (!resource) {
3102
3102
  return {};
3103
3103
  }
@@ -3203,24 +3203,24 @@ var FastMCP = class extends FastMCPEventEmitter {
3203
3203
  const envBasePath = process.env.FASTMCP_BASE_PATH;
3204
3204
  const envStateless = process.env.FASTMCP_STATELESS;
3205
3205
  const envHost = process.env.FASTMCP_HOST;
3206
- const transportType = _optionalChain([overrides, 'optionalAccess', _96 => _96.transportType]) || parseTransportSetting(transportArg, "--transport") || parseTransportSetting(envTransport, "FASTMCP_TRANSPORT") || "stdio";
3206
+ const transportType = _optionalChain([overrides, 'optionalAccess', _95 => _95.transportType]) || parseTransportSetting(transportArg, "--transport") || parseTransportSetting(envTransport, "FASTMCP_TRANSPORT") || "stdio";
3207
3207
  if (transportType === "httpStream") {
3208
3208
  const port = parseInt(
3209
- _optionalChain([overrides, 'optionalAccess', _97 => _97.httpStream, 'optionalAccess', _98 => _98.port, 'optionalAccess', _99 => _99.toString, 'call', _100 => _100()]) || portArg || envPort || "8080"
3209
+ _optionalChain([overrides, 'optionalAccess', _96 => _96.httpStream, 'optionalAccess', _97 => _97.port, 'optionalAccess', _98 => _98.toString, 'call', _99 => _99()]) || portArg || envPort || "8080"
3210
3210
  );
3211
- const host = _optionalChain([overrides, 'optionalAccess', _101 => _101.httpStream, 'optionalAccess', _102 => _102.host]) || hostArg || envHost || "localhost";
3212
- const endpoint = _optionalChain([overrides, 'optionalAccess', _103 => _103.httpStream, 'optionalAccess', _104 => _104.endpoint]) || endpointArg || envEndpoint || "/mcp";
3211
+ const host = _optionalChain([overrides, 'optionalAccess', _100 => _100.httpStream, 'optionalAccess', _101 => _101.host]) || hostArg || envHost || "localhost";
3212
+ const endpoint = _optionalChain([overrides, 'optionalAccess', _102 => _102.httpStream, 'optionalAccess', _103 => _103.endpoint]) || endpointArg || envEndpoint || "/mcp";
3213
3213
  const basePath = normalizeBasePath(
3214
- _optionalChain([overrides, 'optionalAccess', _105 => _105.httpStream, 'optionalAccess', _106 => _106.basePath]) || basePathArg || envBasePath
3214
+ _optionalChain([overrides, 'optionalAccess', _104 => _104.httpStream, 'optionalAccess', _105 => _105.basePath]) || basePathArg || envBasePath
3215
3215
  );
3216
- const enableJsonResponse = _optionalChain([overrides, 'optionalAccess', _107 => _107.httpStream, 'optionalAccess', _108 => _108.enableJsonResponse]) || false;
3217
- const stateless = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([overrides, 'optionalAccess', _109 => _109.httpStream, 'optionalAccess', _110 => _110.stateless]), () => ( // A bare `--stateless` means `--stateless true`.
3216
+ const enableJsonResponse = _optionalChain([overrides, 'optionalAccess', _106 => _106.httpStream, 'optionalAccess', _107 => _107.enableJsonResponse]) || false;
3217
+ const stateless = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([overrides, 'optionalAccess', _108 => _108.httpStream, 'optionalAccess', _109 => _109.stateless]), () => ( // A bare `--stateless` means `--stateless true`.
3218
3218
  (statelessArg === "" ? true : parseBooleanSetting(statelessArg, "--stateless")))), () => ( parseBooleanSetting(envStateless, "FASTMCP_STATELESS"))), () => ( false));
3219
- const cors = _optionalChain([overrides, 'optionalAccess', _111 => _111.httpStream, 'optionalAccess', _112 => _112.cors]);
3220
- const eventStore = _optionalChain([overrides, 'optionalAccess', _113 => _113.httpStream, 'optionalAccess', _114 => _114.eventStore]);
3221
- const sslCa = _optionalChain([overrides, 'optionalAccess', _115 => _115.httpStream, 'optionalAccess', _116 => _116.sslCa]);
3222
- const sslCert = _optionalChain([overrides, 'optionalAccess', _117 => _117.httpStream, 'optionalAccess', _118 => _118.sslCert]);
3223
- const sslKey = _optionalChain([overrides, 'optionalAccess', _119 => _119.httpStream, 'optionalAccess', _120 => _120.sslKey]);
3219
+ const cors = _optionalChain([overrides, 'optionalAccess', _110 => _110.httpStream, 'optionalAccess', _111 => _111.cors]);
3220
+ const eventStore = _optionalChain([overrides, 'optionalAccess', _112 => _112.httpStream, 'optionalAccess', _113 => _113.eventStore]);
3221
+ const sslCa = _optionalChain([overrides, 'optionalAccess', _114 => _114.httpStream, 'optionalAccess', _115 => _115.sslCa]);
3222
+ const sslCert = _optionalChain([overrides, 'optionalAccess', _116 => _116.httpStream, 'optionalAccess', _117 => _117.sslCert]);
3223
+ const sslKey = _optionalChain([overrides, 'optionalAccess', _118 => _118.httpStream, 'optionalAccess', _119 => _119.sslKey]);
3224
3224
  return {
3225
3225
  httpStream: {
3226
3226
  basePath,
@@ -3312,7 +3312,7 @@ var FastMCP = class extends FastMCPEventEmitter {
3312
3312
  */
3313
3313
  #useEndpointAsResource(endpoint) {
3314
3314
  const oauth = this.#options.oauth;
3315
- if (this.#providerResourceBase === void 0 || !_optionalChain([oauth, 'optionalAccess', _121 => _121.protectedResource]))
3315
+ if (this.#providerResourceBase === void 0 || !_optionalChain([oauth, 'optionalAccess', _120 => _120.protectedResource]))
3316
3316
  return;
3317
3317
  this.#options = {
3318
3318
  ...this.#options,
@@ -3341,4 +3341,4 @@ var FastMCP = class extends FastMCPEventEmitter {
3341
3341
 
3342
3342
 
3343
3343
  exports.DiscoveryDocumentCache = DiscoveryDocumentCache; exports.jsonSchemaAdapter = jsonSchemaAdapter; exports.MEDIA_FETCH_TIMEOUT_MS = MEDIA_FETCH_TIMEOUT_MS; exports.imageContent = imageContent; exports.audioContent = audioContent; exports.FastMCPError = FastMCPError; exports.SessionError = SessionError; exports.UnexpectedStateError = UnexpectedStateError; exports.UserError = UserError; exports.ServerState = ServerState; exports.FastMCPSession = FastMCPSession; exports.FastMCP = FastMCP;
3344
- //# sourceMappingURL=chunk-PV5VLW7R.cjs.map
3344
+ //# sourceMappingURL=chunk-B77E3EDN.cjs.map