fastmcp 4.15.0 → 4.15.2

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.
@@ -23,7 +23,6 @@ var _fusejs = require('fuse.js'); var _fusejs2 = _interopRequireDefault(_fusejs)
23
23
  var _hono = require('hono');
24
24
  var _mcpproxy = require('mcp-proxy');
25
25
  var _promises3 = require('timers/promises');
26
- var _undici = require('undici');
27
26
  var _uritemplates = require('uri-templates'); var _uritemplates2 = _interopRequireDefault(_uritemplates);
28
27
  var _xsschema = require('xsschema');
29
28
  var _zod = require('zod');
@@ -204,7 +203,7 @@ var imageContent = async (input) => {
204
203
  if ("url" in input) {
205
204
  const timeoutMs = _nullishCoalesce(input.timeoutMs, () => ( MEDIA_FETCH_TIMEOUT_MS));
206
205
  try {
207
- const response = await _undici.fetch.call(void 0, input.url, {
206
+ const response = await fetch(input.url, {
208
207
  signal: AbortSignal.timeout(timeoutMs)
209
208
  });
210
209
  if (!response.ok) {
@@ -265,7 +264,7 @@ var audioContent = async (input) => {
265
264
  if ("url" in input) {
266
265
  const timeoutMs = _nullishCoalesce(input.timeoutMs, () => ( MEDIA_FETCH_TIMEOUT_MS));
267
266
  try {
268
- const response = await _undici.fetch.call(void 0, input.url, {
267
+ const response = await fetch(input.url, {
269
268
  signal: AbortSignal.timeout(timeoutMs)
270
269
  });
271
270
  if (!response.ok) {
@@ -465,8 +464,20 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter {
465
464
  get server() {
466
465
  return this.#server;
467
466
  }
467
+ /**
468
+ * The HTTP session ID, or `undefined` for transports that do not have one.
469
+ *
470
+ * Resolved from the transport on every read rather than captured when the
471
+ * session connects: `StreamableHTTPServerTransport` assigns its `sessionId`
472
+ * while it handles `initialize`, which happens after `connect()` resolves.
473
+ * A value read at connect time is therefore still `undefined`.
474
+ */
468
475
  get sessionId() {
469
- return this.#sessionId;
476
+ if (this.#sessionId !== void 0) {
477
+ return this.#sessionId;
478
+ }
479
+ const transport = this.#server.transport;
480
+ return typeof _optionalChain([transport, 'optionalAccess', _9 => _9.sessionId]) === "string" ? transport.sessionId : void 0;
470
481
  }
471
482
  set sessionId(value) {
472
483
  this.#sessionId = value;
@@ -605,12 +616,6 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter {
605
616
  this.#connectionState = "connecting";
606
617
  try {
607
618
  await this.#server.connect(transport);
608
- if ("sessionId" in transport) {
609
- const transportWithSessionId = transport;
610
- if (typeof transportWithSessionId.sessionId === "string") {
611
- this.#sessionId = transportWithSessionId.sessionId;
612
- }
613
- }
614
619
  if (!this.#stateless) {
615
620
  let attempt = 0;
616
621
  const maxAttempts = 10;
@@ -629,10 +634,10 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter {
629
634
  );
630
635
  }
631
636
  }
632
- if (_optionalChain([this, 'access', _9 => _9.#rootsConfig, 'optionalAccess', _10 => _10.enabled]) !== false && _optionalChain([this, 'access', _11 => _11.#clientCapabilities, 'optionalAccess', _12 => _12.roots, 'optionalAccess', _13 => _13.listChanged]) && typeof this.#server.listRoots === "function") {
637
+ if (_optionalChain([this, 'access', _10 => _10.#rootsConfig, 'optionalAccess', _11 => _11.enabled]) !== false && _optionalChain([this, 'access', _12 => _12.#clientCapabilities, 'optionalAccess', _13 => _13.roots, 'optionalAccess', _14 => _14.listChanged]) && typeof this.#server.listRoots === "function") {
633
638
  try {
634
639
  const roots = await this.#server.listRoots();
635
- this.#roots = _optionalChain([roots, 'optionalAccess', _14 => _14.roots]) || [];
640
+ this.#roots = _optionalChain([roots, 'optionalAccess', _15 => _15.roots]) || [];
636
641
  } catch (e) {
637
642
  if (e instanceof _typesjs.McpError && e.code === _typesjs.ErrorCode.MethodNotFound) {
638
643
  this.#logger.debug(
@@ -805,9 +810,9 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
805
810
  },
806
811
  elicit: (params, options) => this.#server.elicitInput(params, options),
807
812
  log: this.#createLog(),
808
- requestId: typeof _optionalChain([meta, 'optionalAccess', _15 => _15.requestId]) === "string" ? meta.requestId : void 0,
813
+ requestId: typeof _optionalChain([meta, 'optionalAccess', _16 => _16.requestId]) === "string" ? meta.requestId : void 0,
809
814
  session: this.#auth,
810
- sessionId: this.#sessionId
815
+ sessionId: this.sessionId
811
816
  };
812
817
  }
813
818
  #createLog() {
@@ -851,8 +856,8 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
851
856
  };
852
857
  }
853
858
  #formatSchemaIssues(issues) {
854
- return _optionalChain([this, 'access', _16 => _16.#utils, 'optionalAccess', _17 => _17.formatInvalidParamsErrorMessage]) ? this.#utils.formatInvalidParamsErrorMessage(issues) : issues.map((issue) => {
855
- const path = _optionalChain([issue, 'access', _18 => _18.path, 'optionalAccess', _19 => _19.join, 'call', _20 => _20(".")]) || "root";
859
+ return _optionalChain([this, 'access', _17 => _17.#utils, 'optionalAccess', _18 => _18.formatInvalidParamsErrorMessage]) ? this.#utils.formatInvalidParamsErrorMessage(issues) : issues.map((issue) => {
860
+ const path = _optionalChain([issue, 'access', _19 => _19.path, 'optionalAccess', _20 => _20.join, 'call', _21 => _21(".")]) || "root";
856
861
  return `${path}: ${issue.message}`;
857
862
  }).join(", ");
858
863
  }
@@ -883,7 +888,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
883
888
  */
884
889
  #startStreamKeepalive(extra, toolName) {
885
890
  const config = this.#streamKeepaliveConfig;
886
- if (!_optionalChain([config, 'optionalAccess', _21 => _21.enabled])) {
891
+ if (!_optionalChain([config, 'optionalAccess', _22 => _22.enabled])) {
887
892
  return () => {
888
893
  };
889
894
  }
@@ -903,9 +908,9 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
903
908
  );
904
909
  });
905
910
  }, intervalMs);
906
- _optionalChain([timer, 'access', _22 => _22.unref, 'optionalCall', _23 => _23()]);
911
+ _optionalChain([timer, 'access', _23 => _23.unref, 'optionalCall', _24 => _24()]);
907
912
  const stop = () => clearInterval(timer);
908
- _optionalChain([extra, 'access', _24 => _24.signal, 'optionalAccess', _25 => _25.addEventListener, 'call', _26 => _26("abort", stop, { once: true })]);
913
+ _optionalChain([extra, 'access', _25 => _25.signal, 'optionalAccess', _26 => _26.addEventListener, 'call', _27 => _27("abort", stop, { once: true })]);
909
914
  return stop;
910
915
  }
911
916
  async #validateStructuredContent(tool, value, toolName) {
@@ -1106,7 +1111,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1106
1111
  result = await prompt.load(
1107
1112
  args,
1108
1113
  this.#auth,
1109
- this.#createLoadContext(_optionalChain([request, 'access', _27 => _27.params, 'optionalAccess', _28 => _28._meta]))
1114
+ this.#createLoadContext(_optionalChain([request, 'access', _28 => _28.params, 'optionalAccess', _29 => _29._meta]))
1110
1115
  );
1111
1116
  } catch (error) {
1112
1117
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -1171,7 +1176,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1171
1176
  const result = await resourceTemplate.load(
1172
1177
  match,
1173
1178
  this.#auth,
1174
- this.#createLoadContext(_optionalChain([request, 'access', _29 => _29.params, 'optionalAccess', _30 => _30._meta]))
1179
+ this.#createLoadContext(_optionalChain([request, 'access', _30 => _30.params, 'optionalAccess', _31 => _31._meta]))
1175
1180
  );
1176
1181
  const resources = Array.isArray(result) ? result : [result];
1177
1182
  return {
@@ -1196,7 +1201,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1196
1201
  try {
1197
1202
  maybeArrayResult = await resource.load(
1198
1203
  this.#auth,
1199
- this.#createLoadContext(_optionalChain([request, 'access', _31 => _31.params, 'optionalAccess', _32 => _32._meta]))
1204
+ this.#createLoadContext(_optionalChain([request, 'access', _32 => _32.params, 'optionalAccess', _33 => _33._meta]))
1200
1205
  );
1201
1206
  } catch (error) {
1202
1207
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -1259,7 +1264,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1259
1264
  );
1260
1265
  }
1261
1266
  setupRootsHandlers() {
1262
- if (_optionalChain([this, 'access', _33 => _33.#rootsConfig, 'optionalAccess', _34 => _34.enabled]) === false) {
1267
+ if (_optionalChain([this, 'access', _34 => _34.#rootsConfig, 'optionalAccess', _35 => _35.enabled]) === false) {
1263
1268
  this.#logger.debug(
1264
1269
  "[FastMCP debug] roots capability explicitly disabled via config"
1265
1270
  );
@@ -1353,7 +1358,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1353
1358
  }
1354
1359
  args = parsed.value;
1355
1360
  }
1356
- const progressToken = _optionalChain([request, 'access', _35 => _35.params, 'optionalAccess', _36 => _36._meta, 'optionalAccess', _37 => _37.progressToken]);
1361
+ const progressToken = _optionalChain([request, 'access', _36 => _36.params, 'optionalAccess', _37 => _37._meta, 'optionalAccess', _38 => _38.progressToken]);
1357
1362
  let result;
1358
1363
  try {
1359
1364
  const reportProgress = async (progress) => {
@@ -1413,9 +1418,9 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
1413
1418
  elicit: (params, options) => this.#server.elicitInput(params, options),
1414
1419
  log,
1415
1420
  reportProgress,
1416
- requestId: typeof _optionalChain([request, 'access', _38 => _38.params, 'optionalAccess', _39 => _39._meta, 'optionalAccess', _40 => _40.requestId]) === "string" ? request.params._meta.requestId : void 0,
1421
+ requestId: typeof _optionalChain([request, 'access', _39 => _39.params, 'optionalAccess', _40 => _40._meta, 'optionalAccess', _41 => _41.requestId]) === "string" ? request.params._meta.requestId : void 0,
1417
1422
  session: this.#auth,
1418
- sessionId: this.#sessionId,
1423
+ sessionId: this.sessionId,
1419
1424
  streamContent
1420
1425
  })
1421
1426
  );
@@ -1529,7 +1534,7 @@ function normalizePath(path) {
1529
1534
  return path.startsWith("/") ? path : `/${path}`;
1530
1535
  }
1531
1536
  function parseBasicAuthHeader(authHeader) {
1532
- const basicMatch = _optionalChain([authHeader, 'optionalAccess', _41 => _41.match, 'call', _42 => _42(/^Basic\s+(.+)$/)]);
1537
+ const basicMatch = _optionalChain([authHeader, 'optionalAccess', _42 => _42.match, 'call', _43 => _43(/^Basic\s+(.+)$/)]);
1533
1538
  if (!basicMatch) return null;
1534
1539
  try {
1535
1540
  const credentials = Buffer.from(basicMatch[1], "base64").toString("utf-8");
@@ -2014,7 +2019,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2014
2019
  enableJsonResponse: httpConfig.enableJsonResponse,
2015
2020
  eventStore: httpConfig.eventStore,
2016
2021
  host: httpConfig.host,
2017
- ..._optionalChain([this, 'access', _43 => _43.#options, 'access', _44 => _44.oauth, 'optionalAccess', _45 => _45.enabled]) && _optionalChain([this, 'access', _46 => _46.#options, 'access', _47 => _47.oauth, 'access', _48 => _48.protectedResource, 'optionalAccess', _49 => _49.resource]) ? {
2022
+ ..._optionalChain([this, 'access', _44 => _44.#options, 'access', _45 => _45.oauth, 'optionalAccess', _46 => _46.enabled]) && _optionalChain([this, 'access', _47 => _47.#options, 'access', _48 => _48.oauth, 'access', _49 => _49.protectedResource, 'optionalAccess', _50 => _50.resource]) ? {
2018
2023
  oauth: {
2019
2024
  protectedResource: {
2020
2025
  resource: this.#options.oauth.protectedResource.resource
@@ -2063,7 +2068,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2063
2068
  enableJsonResponse: httpConfig.enableJsonResponse,
2064
2069
  eventStore: httpConfig.eventStore,
2065
2070
  host: httpConfig.host,
2066
- ..._optionalChain([this, 'access', _50 => _50.#options, 'access', _51 => _51.oauth, 'optionalAccess', _52 => _52.enabled]) && _optionalChain([this, 'access', _53 => _53.#options, 'access', _54 => _54.oauth, 'access', _55 => _55.protectedResource, 'optionalAccess', _56 => _56.resource]) ? {
2071
+ ..._optionalChain([this, 'access', _51 => _51.#options, 'access', _52 => _52.oauth, 'optionalAccess', _53 => _53.enabled]) && _optionalChain([this, 'access', _54 => _54.#options, 'access', _55 => _55.oauth, 'access', _56 => _56.protectedResource, 'optionalAccess', _57 => _57.resource]) ? {
2067
2072
  oauth: {
2068
2073
  protectedResource: {
2069
2074
  resource: this.#options.oauth.protectedResource.resource
@@ -2169,7 +2174,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2169
2174
  */
2170
2175
  #createUnauthorizedResponse(message) {
2171
2176
  const oauth = this.#options.oauth;
2172
- const resource = _optionalChain([oauth, 'optionalAccess', _57 => _57.enabled]) ? _optionalChain([oauth, 'access', _58 => _58.protectedResource, 'optionalAccess', _59 => _59.resource]) : void 0;
2177
+ const resource = _optionalChain([oauth, 'optionalAccess', _58 => _58.enabled]) ? _optionalChain([oauth, 'access', _59 => _59.protectedResource, 'optionalAccess', _60 => _60.resource]) : void 0;
2173
2178
  const wwwAuthenticateParts = [
2174
2179
  'error="invalid_token"',
2175
2180
  `error_description="${message.replace(/"/g, '\\"')}"`
@@ -2281,7 +2286,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2281
2286
  }
2282
2287
  }
2283
2288
  const oauthConfig = this.#options.oauth;
2284
- if (_optionalChain([oauthConfig, 'optionalAccess', _60 => _60.enabled]) && req.method === "GET") {
2289
+ if (_optionalChain([oauthConfig, 'optionalAccess', _61 => _61.enabled]) && req.method === "GET") {
2285
2290
  const url2 = new URL(req.url || "", `http://${host}`);
2286
2291
  const authorizationServerMetadataPath = joinPaths(
2287
2292
  "",
@@ -2315,8 +2320,8 @@ var FastMCP = class extends FastMCPEventEmitter {
2315
2320
  }
2316
2321
  }
2317
2322
  }
2318
- const oauthProxy = _optionalChain([oauthConfig, 'optionalAccess', _61 => _61.proxy]);
2319
- if (oauthProxy && _optionalChain([oauthConfig, 'optionalAccess', _62 => _62.enabled])) {
2323
+ const oauthProxy = _optionalChain([oauthConfig, 'optionalAccess', _62 => _62.proxy]);
2324
+ if (oauthProxy && _optionalChain([oauthConfig, 'optionalAccess', _63 => _63.enabled])) {
2320
2325
  const url2 = new URL(req.url || "", `http://${host}`);
2321
2326
  const oauthPath = basePathRelativePath;
2322
2327
  try {
@@ -2369,7 +2374,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2369
2374
  const statusCode = error.statusCode || 400;
2370
2375
  res.writeHead(statusCode, { "Content-Type": "application/json" }).end(
2371
2376
  JSON.stringify(
2372
- _optionalChain([error, 'access', _63 => _63.toJSON, 'optionalCall', _64 => _64()]) || {
2377
+ _optionalChain([error, 'access', _64 => _64.toJSON, 'optionalCall', _65 => _65()]) || {
2373
2378
  error: "invalid_request"
2374
2379
  }
2375
2380
  )
@@ -2396,7 +2401,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2396
2401
  } catch (error) {
2397
2402
  res.writeHead(400, { "Content-Type": "application/json" }).end(
2398
2403
  JSON.stringify(
2399
- _optionalChain([error, 'access', _65 => _65.toJSON, 'optionalCall', _66 => _66()]) || {
2404
+ _optionalChain([error, 'access', _66 => _66.toJSON, 'optionalCall', _67 => _67()]) || {
2400
2405
  error: "invalid_request"
2401
2406
  }
2402
2407
  )
@@ -2418,7 +2423,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2418
2423
  } catch (error) {
2419
2424
  res.writeHead(400, { "Content-Type": "application/json" }).end(
2420
2425
  JSON.stringify(
2421
- _optionalChain([error, 'access', _67 => _67.toJSON, 'optionalCall', _68 => _68()]) || {
2426
+ _optionalChain([error, 'access', _68 => _68.toJSON, 'optionalCall', _69 => _69()]) || {
2422
2427
  error: "server_error"
2423
2428
  }
2424
2429
  )
@@ -2487,7 +2492,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2487
2492
  } catch (error) {
2488
2493
  res.writeHead(400, { "Content-Type": "application/json" }).end(
2489
2494
  JSON.stringify(
2490
- _optionalChain([error, 'access', _69 => _69.toJSON, 'optionalCall', _70 => _70()]) || {
2495
+ _optionalChain([error, 'access', _70 => _70.toJSON, 'optionalCall', _71 => _71()]) || {
2491
2496
  error: "server_error"
2492
2497
  }
2493
2498
  )
@@ -2545,8 +2550,8 @@ var FastMCP = class extends FastMCPEventEmitter {
2545
2550
  const basicAuth = parseBasicAuthHeader(
2546
2551
  req.headers.authorization
2547
2552
  );
2548
- const clientId = _optionalChain([basicAuth, 'optionalAccess', _71 => _71.clientId]) || params.get("client_id") || "";
2549
- const clientSecret = _nullishCoalesce(_nullishCoalesce(_optionalChain([basicAuth, 'optionalAccess', _72 => _72.clientSecret]), () => ( params.get("client_secret"))), () => ( void 0));
2553
+ const clientId = _optionalChain([basicAuth, 'optionalAccess', _72 => _72.clientId]) || params.get("client_id") || "";
2554
+ const clientSecret = _nullishCoalesce(_nullishCoalesce(_optionalChain([basicAuth, 'optionalAccess', _73 => _73.clientSecret]), () => ( params.get("client_secret"))), () => ( void 0));
2550
2555
  let response;
2551
2556
  if (grantType === "authorization_code") {
2552
2557
  response = await oauthProxy.exchangeAuthorizationCode({
@@ -2576,7 +2581,7 @@ var FastMCP = class extends FastMCPEventEmitter {
2576
2581
  const statusCode = error.statusCode || 400;
2577
2582
  res.writeHead(statusCode, { "Content-Type": "application/json" }).end(
2578
2583
  JSON.stringify(
2579
- _optionalChain([error, 'access', _73 => _73.toJSON, 'optionalCall', _74 => _74()]) || {
2584
+ _optionalChain([error, 'access', _74 => _74.toJSON, 'optionalCall', _75 => _75()]) || {
2580
2585
  error: "invalid_request"
2581
2586
  }
2582
2587
  )
@@ -2647,23 +2652,23 @@ var FastMCP = class extends FastMCPEventEmitter {
2647
2652
  const envBasePath = process.env.FASTMCP_BASE_PATH;
2648
2653
  const envStateless = process.env.FASTMCP_STATELESS;
2649
2654
  const envHost = process.env.FASTMCP_HOST;
2650
- const transportType = _optionalChain([overrides, 'optionalAccess', _75 => _75.transportType]) || (transportArg === "http-stream" ? "httpStream" : transportArg) || envTransport || "stdio";
2655
+ const transportType = _optionalChain([overrides, 'optionalAccess', _76 => _76.transportType]) || (transportArg === "http-stream" ? "httpStream" : transportArg) || envTransport || "stdio";
2651
2656
  if (transportType === "httpStream") {
2652
2657
  const port = parseInt(
2653
- _optionalChain([overrides, 'optionalAccess', _76 => _76.httpStream, 'optionalAccess', _77 => _77.port, 'optionalAccess', _78 => _78.toString, 'call', _79 => _79()]) || portArg || envPort || "8080"
2658
+ _optionalChain([overrides, 'optionalAccess', _77 => _77.httpStream, 'optionalAccess', _78 => _78.port, 'optionalAccess', _79 => _79.toString, 'call', _80 => _80()]) || portArg || envPort || "8080"
2654
2659
  );
2655
- const host = _optionalChain([overrides, 'optionalAccess', _80 => _80.httpStream, 'optionalAccess', _81 => _81.host]) || hostArg || envHost || "localhost";
2656
- const endpoint = _optionalChain([overrides, 'optionalAccess', _82 => _82.httpStream, 'optionalAccess', _83 => _83.endpoint]) || endpointArg || envEndpoint || "/mcp";
2660
+ const host = _optionalChain([overrides, 'optionalAccess', _81 => _81.httpStream, 'optionalAccess', _82 => _82.host]) || hostArg || envHost || "localhost";
2661
+ const endpoint = _optionalChain([overrides, 'optionalAccess', _83 => _83.httpStream, 'optionalAccess', _84 => _84.endpoint]) || endpointArg || envEndpoint || "/mcp";
2657
2662
  const basePath = normalizeBasePath(
2658
- _optionalChain([overrides, 'optionalAccess', _84 => _84.httpStream, 'optionalAccess', _85 => _85.basePath]) || basePathArg || envBasePath
2663
+ _optionalChain([overrides, 'optionalAccess', _85 => _85.httpStream, 'optionalAccess', _86 => _86.basePath]) || basePathArg || envBasePath
2659
2664
  );
2660
- const enableJsonResponse = _optionalChain([overrides, 'optionalAccess', _86 => _86.httpStream, 'optionalAccess', _87 => _87.enableJsonResponse]) || false;
2661
- const stateless = _optionalChain([overrides, 'optionalAccess', _88 => _88.httpStream, 'optionalAccess', _89 => _89.stateless]) || statelessArg === "true" || envStateless === "true" || false;
2662
- const cors = _optionalChain([overrides, 'optionalAccess', _90 => _90.httpStream, 'optionalAccess', _91 => _91.cors]);
2663
- const eventStore = _optionalChain([overrides, 'optionalAccess', _92 => _92.httpStream, 'optionalAccess', _93 => _93.eventStore]);
2664
- const sslCa = _optionalChain([overrides, 'optionalAccess', _94 => _94.httpStream, 'optionalAccess', _95 => _95.sslCa]);
2665
- const sslCert = _optionalChain([overrides, 'optionalAccess', _96 => _96.httpStream, 'optionalAccess', _97 => _97.sslCert]);
2666
- const sslKey = _optionalChain([overrides, 'optionalAccess', _98 => _98.httpStream, 'optionalAccess', _99 => _99.sslKey]);
2665
+ const enableJsonResponse = _optionalChain([overrides, 'optionalAccess', _87 => _87.httpStream, 'optionalAccess', _88 => _88.enableJsonResponse]) || false;
2666
+ const stateless = _optionalChain([overrides, 'optionalAccess', _89 => _89.httpStream, 'optionalAccess', _90 => _90.stateless]) || statelessArg === "true" || envStateless === "true" || false;
2667
+ const cors = _optionalChain([overrides, 'optionalAccess', _91 => _91.httpStream, 'optionalAccess', _92 => _92.cors]);
2668
+ const eventStore = _optionalChain([overrides, 'optionalAccess', _93 => _93.httpStream, 'optionalAccess', _94 => _94.eventStore]);
2669
+ const sslCa = _optionalChain([overrides, 'optionalAccess', _95 => _95.httpStream, 'optionalAccess', _96 => _96.sslCa]);
2670
+ const sslCert = _optionalChain([overrides, 'optionalAccess', _97 => _97.httpStream, 'optionalAccess', _98 => _98.sslCert]);
2671
+ const sslKey = _optionalChain([overrides, 'optionalAccess', _99 => _99.httpStream, 'optionalAccess', _100 => _100.sslKey]);
2667
2672
  return {
2668
2673
  httpStream: {
2669
2674
  basePath,
@@ -2762,4 +2767,4 @@ var FastMCP = class extends FastMCPEventEmitter {
2762
2767
 
2763
2768
 
2764
2769
  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;
2765
- //# sourceMappingURL=chunk-6I3JC3FN.cjs.map
2770
+ //# sourceMappingURL=chunk-N6ZZF5YB.cjs.map