fastmcp 4.12.1 → 4.12.3
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 +3 -3
- package/dist/FastMCP.d.cts +4 -2
- package/dist/FastMCP.d.ts +4 -2
- package/dist/FastMCP.js +2 -2
- package/dist/{OAuthProvider-BNqoBTYA.d.cts → OAuthProvider-B_E71LUD.d.cts} +9 -0
- package/dist/{OAuthProvider-BNqoBTYA.d.ts → OAuthProvider-B_E71LUD.d.ts} +9 -0
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.d.cts +2 -2
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-GM44BOI7.js → chunk-2ZFQSPXZ.js} +42 -23
- package/dist/chunk-2ZFQSPXZ.js.map +1 -0
- package/dist/{chunk-POXZCEYE.cjs → chunk-3O5ZKWCC.cjs} +73 -39
- package/dist/chunk-3O5ZKWCC.cjs.map +1 -0
- package/dist/{chunk-5BQXF2VT.js → chunk-5K4GLQMV.js} +36 -2
- package/dist/chunk-5K4GLQMV.js.map +1 -0
- package/dist/{chunk-DZYT6QAH.cjs → chunk-ENMHHQJF.cjs} +40 -21
- package/dist/chunk-ENMHHQJF.cjs.map +1 -0
- package/dist/examples/custom-routes.cjs +3 -3
- package/dist/examples/custom-routes.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-5BQXF2VT.js.map +0 -1
- package/dist/chunk-DZYT6QAH.cjs.map +0 -1
- package/dist/chunk-GM44BOI7.js.map +0 -1
- package/dist/chunk-POXZCEYE.cjs.map +0 -1
|
@@ -35,12 +35,15 @@ var DiscoveryDocumentCache = class {
|
|
|
35
35
|
}
|
|
36
36
|
#cache = /* @__PURE__ */ new Map();
|
|
37
37
|
#inFlight = /* @__PURE__ */ new Map();
|
|
38
|
+
#timeoutMs;
|
|
38
39
|
#ttl;
|
|
39
40
|
/**
|
|
40
41
|
* @param options - configuration options
|
|
42
|
+
* @param options.timeoutMs - timeout in miliseconds for the upstream fetch
|
|
41
43
|
* @param options.ttl - time-to-live in miliseconds
|
|
42
44
|
*/
|
|
43
45
|
constructor(options = {}) {
|
|
46
|
+
this.#timeoutMs = _nullishCoalesce(options.timeoutMs, () => ( 1e4));
|
|
44
47
|
this.#ttl = _nullishCoalesce(options.ttl, () => ( 36e5));
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
@@ -98,7 +101,19 @@ var DiscoveryDocumentCache = class {
|
|
|
98
101
|
return true;
|
|
99
102
|
}
|
|
100
103
|
async #fetchAndCache(url) {
|
|
101
|
-
|
|
104
|
+
let res;
|
|
105
|
+
try {
|
|
106
|
+
res = await fetch(url, {
|
|
107
|
+
signal: AbortSignal.timeout(this.#timeoutMs)
|
|
108
|
+
});
|
|
109
|
+
} catch (error) {
|
|
110
|
+
if (error instanceof Error && (error.name === "AbortError" || error.name === "TimeoutError")) {
|
|
111
|
+
throw new Error(
|
|
112
|
+
`Failed to fetch discovery document from ${url}: timed out after ${this.#timeoutMs}ms`
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
102
117
|
if (!res.ok) {
|
|
103
118
|
throw new Error(
|
|
104
119
|
`Failed to fetch discovery document from ${url}: ${res.status} ${res.statusText}`
|
|
@@ -306,6 +321,23 @@ var UnexpectedStateError = class extends FastMCPError {
|
|
|
306
321
|
};
|
|
307
322
|
var UserError = class extends UnexpectedStateError {
|
|
308
323
|
};
|
|
324
|
+
function assertStandardSchema(toolName, schemaName, schema) {
|
|
325
|
+
const standard = schema["~standard"];
|
|
326
|
+
if (typeof _optionalChain([standard, 'optionalAccess', _8 => _8.validate]) === "function") {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
throw new UserError(
|
|
330
|
+
`Tool '${toolName}' ${schemaName} must implement Standard Schema. If you are using Zod, upgrade to version 3.24 or later.`
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
function assertToolSchemas(tool) {
|
|
334
|
+
if (tool.parameters) {
|
|
335
|
+
assertStandardSchema(tool.name, "parameters", tool.parameters);
|
|
336
|
+
}
|
|
337
|
+
if (tool.outputSchema) {
|
|
338
|
+
assertStandardSchema(tool.name, "outputSchema", tool.outputSchema);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
309
341
|
var TextContentZodSchema = _zod.z.object({
|
|
310
342
|
/**
|
|
311
343
|
* The text content of the message.
|
|
@@ -553,10 +585,10 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter {
|
|
|
553
585
|
);
|
|
554
586
|
}
|
|
555
587
|
}
|
|
556
|
-
if (_optionalChain([this, 'access',
|
|
588
|
+
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") {
|
|
557
589
|
try {
|
|
558
590
|
const roots = await this.#server.listRoots();
|
|
559
|
-
this.#roots = _optionalChain([roots, 'optionalAccess',
|
|
591
|
+
this.#roots = _optionalChain([roots, 'optionalAccess', _14 => _14.roots]) || [];
|
|
560
592
|
} catch (e) {
|
|
561
593
|
if (e instanceof _typesjs.McpError && e.code === _typesjs.ErrorCode.MethodNotFound) {
|
|
562
594
|
this.#logger.debug(
|
|
@@ -729,7 +761,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
729
761
|
},
|
|
730
762
|
elicit: (params, options) => this.#server.elicitInput(params, options),
|
|
731
763
|
log: this.#createLog(),
|
|
732
|
-
requestId: typeof _optionalChain([meta, 'optionalAccess',
|
|
764
|
+
requestId: typeof _optionalChain([meta, 'optionalAccess', _15 => _15.requestId]) === "string" ? meta.requestId : void 0,
|
|
733
765
|
session: this.#auth,
|
|
734
766
|
sessionId: this.#sessionId
|
|
735
767
|
};
|
|
@@ -775,8 +807,8 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
775
807
|
};
|
|
776
808
|
}
|
|
777
809
|
#formatSchemaIssues(issues) {
|
|
778
|
-
return _optionalChain([this, 'access',
|
|
779
|
-
const path = _optionalChain([issue, 'access',
|
|
810
|
+
return _optionalChain([this, 'access', _16 => _16.#utils, 'optionalAccess', _17 => _17.formatInvalidParamsErrorMessage]) ? this.#utils.formatInvalidParamsErrorMessage(issues) : issues.map((issue) => {
|
|
811
|
+
const path = _optionalChain([issue, 'access', _18 => _18.path, 'optionalAccess', _19 => _19.join, 'call', _20 => _20(".")]) || "root";
|
|
780
812
|
return `${path}: ${issue.message}`;
|
|
781
813
|
}).join(", ");
|
|
782
814
|
}
|
|
@@ -988,7 +1020,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
988
1020
|
result = await prompt.load(
|
|
989
1021
|
args,
|
|
990
1022
|
this.#auth,
|
|
991
|
-
this.#createLoadContext(_optionalChain([request, 'access',
|
|
1023
|
+
this.#createLoadContext(_optionalChain([request, 'access', _21 => _21.params, 'optionalAccess', _22 => _22._meta]))
|
|
992
1024
|
);
|
|
993
1025
|
} catch (error) {
|
|
994
1026
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -1053,7 +1085,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
1053
1085
|
const result = await resourceTemplate.load(
|
|
1054
1086
|
match,
|
|
1055
1087
|
this.#auth,
|
|
1056
|
-
this.#createLoadContext(_optionalChain([request, 'access',
|
|
1088
|
+
this.#createLoadContext(_optionalChain([request, 'access', _23 => _23.params, 'optionalAccess', _24 => _24._meta]))
|
|
1057
1089
|
);
|
|
1058
1090
|
const resources = Array.isArray(result) ? result : [result];
|
|
1059
1091
|
return {
|
|
@@ -1078,7 +1110,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
1078
1110
|
try {
|
|
1079
1111
|
maybeArrayResult = await resource.load(
|
|
1080
1112
|
this.#auth,
|
|
1081
|
-
this.#createLoadContext(_optionalChain([request, 'access',
|
|
1113
|
+
this.#createLoadContext(_optionalChain([request, 'access', _25 => _25.params, 'optionalAccess', _26 => _26._meta]))
|
|
1082
1114
|
);
|
|
1083
1115
|
} catch (error) {
|
|
1084
1116
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -1141,7 +1173,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
1141
1173
|
);
|
|
1142
1174
|
}
|
|
1143
1175
|
setupRootsHandlers() {
|
|
1144
|
-
if (_optionalChain([this, 'access',
|
|
1176
|
+
if (_optionalChain([this, 'access', _27 => _27.#rootsConfig, 'optionalAccess', _28 => _28.enabled]) === false) {
|
|
1145
1177
|
this.#logger.debug(
|
|
1146
1178
|
"[FastMCP debug] roots capability explicitly disabled via config"
|
|
1147
1179
|
);
|
|
@@ -1233,7 +1265,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
1233
1265
|
}
|
|
1234
1266
|
args = parsed.value;
|
|
1235
1267
|
}
|
|
1236
|
-
const progressToken = _optionalChain([request, 'access',
|
|
1268
|
+
const progressToken = _optionalChain([request, 'access', _29 => _29.params, 'optionalAccess', _30 => _30._meta, 'optionalAccess', _31 => _31.progressToken]);
|
|
1237
1269
|
let result;
|
|
1238
1270
|
try {
|
|
1239
1271
|
const reportProgress = async (progress) => {
|
|
@@ -1292,7 +1324,7 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
1292
1324
|
elicit: (params, options) => this.#server.elicitInput(params, options),
|
|
1293
1325
|
log,
|
|
1294
1326
|
reportProgress,
|
|
1295
|
-
requestId: typeof _optionalChain([request, 'access',
|
|
1327
|
+
requestId: typeof _optionalChain([request, 'access', _32 => _32.params, 'optionalAccess', _33 => _33._meta, 'optionalAccess', _34 => _34.requestId]) === "string" ? request.params._meta.requestId : void 0,
|
|
1296
1328
|
session: this.#auth,
|
|
1297
1329
|
sessionId: this.#sessionId,
|
|
1298
1330
|
streamContent
|
|
@@ -1402,7 +1434,7 @@ function normalizePath(path) {
|
|
|
1402
1434
|
return path.startsWith("/") ? path : `/${path}`;
|
|
1403
1435
|
}
|
|
1404
1436
|
function parseBasicAuthHeader(authHeader) {
|
|
1405
|
-
const basicMatch = _optionalChain([authHeader, 'optionalAccess',
|
|
1437
|
+
const basicMatch = _optionalChain([authHeader, 'optionalAccess', _35 => _35.match, 'call', _36 => _36(/^Basic\s+(.+)$/)]);
|
|
1406
1438
|
if (!basicMatch) return null;
|
|
1407
1439
|
try {
|
|
1408
1440
|
const credentials = Buffer.from(basicMatch[1], "base64").toString("utf-8");
|
|
@@ -1544,6 +1576,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
1544
1576
|
* Adds a tool to the server.
|
|
1545
1577
|
*/
|
|
1546
1578
|
addTool(tool) {
|
|
1579
|
+
assertToolSchemas(tool);
|
|
1547
1580
|
this.#tools = this.#tools.filter((t) => t.name !== tool.name);
|
|
1548
1581
|
this.#tools.push(tool);
|
|
1549
1582
|
if (this.#serverState === "running" /* Running */) {
|
|
@@ -1554,6 +1587,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
1554
1587
|
* Adds tools to the server.
|
|
1555
1588
|
*/
|
|
1556
1589
|
addTools(tools) {
|
|
1590
|
+
tools.forEach(assertToolSchemas);
|
|
1557
1591
|
const newToolNames = new Set(tools.map((tool) => tool.name));
|
|
1558
1592
|
this.#tools = this.#tools.filter((t) => !newToolNames.has(t.name));
|
|
1559
1593
|
this.#tools.push(...tools);
|
|
@@ -1883,7 +1917,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
1883
1917
|
enableJsonResponse: httpConfig.enableJsonResponse,
|
|
1884
1918
|
eventStore: httpConfig.eventStore,
|
|
1885
1919
|
host: httpConfig.host,
|
|
1886
|
-
..._optionalChain([this, 'access',
|
|
1920
|
+
..._optionalChain([this, 'access', _37 => _37.#options, 'access', _38 => _38.oauth, 'optionalAccess', _39 => _39.enabled]) && _optionalChain([this, 'access', _40 => _40.#options, 'access', _41 => _41.oauth, 'access', _42 => _42.protectedResource, 'optionalAccess', _43 => _43.resource]) ? {
|
|
1887
1921
|
oauth: {
|
|
1888
1922
|
protectedResource: {
|
|
1889
1923
|
resource: this.#options.oauth.protectedResource.resource
|
|
@@ -1930,7 +1964,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
1930
1964
|
enableJsonResponse: httpConfig.enableJsonResponse,
|
|
1931
1965
|
eventStore: httpConfig.eventStore,
|
|
1932
1966
|
host: httpConfig.host,
|
|
1933
|
-
..._optionalChain([this, 'access',
|
|
1967
|
+
..._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]) ? {
|
|
1934
1968
|
oauth: {
|
|
1935
1969
|
protectedResource: {
|
|
1936
1970
|
resource: this.#options.oauth.protectedResource.resource
|
|
@@ -2032,7 +2066,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2032
2066
|
*/
|
|
2033
2067
|
#createUnauthorizedResponse(message) {
|
|
2034
2068
|
const oauth = this.#options.oauth;
|
|
2035
|
-
const resource = _optionalChain([oauth, 'optionalAccess',
|
|
2069
|
+
const resource = _optionalChain([oauth, 'optionalAccess', _51 => _51.enabled]) ? _optionalChain([oauth, 'access', _52 => _52.protectedResource, 'optionalAccess', _53 => _53.resource]) : void 0;
|
|
2036
2070
|
const wwwAuthenticateParts = [
|
|
2037
2071
|
'error="invalid_token"',
|
|
2038
2072
|
`error_description="${message.replace(/"/g, '\\"')}"`
|
|
@@ -2144,7 +2178,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2144
2178
|
}
|
|
2145
2179
|
}
|
|
2146
2180
|
const oauthConfig = this.#options.oauth;
|
|
2147
|
-
if (_optionalChain([oauthConfig, 'optionalAccess',
|
|
2181
|
+
if (_optionalChain([oauthConfig, 'optionalAccess', _54 => _54.enabled]) && req.method === "GET") {
|
|
2148
2182
|
const url2 = new URL(req.url || "", `http://${host}`);
|
|
2149
2183
|
const authorizationServerMetadataPath = joinPaths(
|
|
2150
2184
|
"",
|
|
@@ -2178,8 +2212,8 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2178
2212
|
}
|
|
2179
2213
|
}
|
|
2180
2214
|
}
|
|
2181
|
-
const oauthProxy = _optionalChain([oauthConfig, 'optionalAccess',
|
|
2182
|
-
if (oauthProxy && _optionalChain([oauthConfig, 'optionalAccess',
|
|
2215
|
+
const oauthProxy = _optionalChain([oauthConfig, 'optionalAccess', _55 => _55.proxy]);
|
|
2216
|
+
if (oauthProxy && _optionalChain([oauthConfig, 'optionalAccess', _56 => _56.enabled])) {
|
|
2183
2217
|
const url2 = new URL(req.url || "", `http://${host}`);
|
|
2184
2218
|
const oauthPath = basePathRelativePath;
|
|
2185
2219
|
try {
|
|
@@ -2196,7 +2230,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2196
2230
|
const statusCode = error.statusCode || 400;
|
|
2197
2231
|
res.writeHead(statusCode, { "Content-Type": "application/json" }).end(
|
|
2198
2232
|
JSON.stringify(
|
|
2199
|
-
_optionalChain([error, 'access',
|
|
2233
|
+
_optionalChain([error, 'access', _57 => _57.toJSON, 'optionalCall', _58 => _58()]) || {
|
|
2200
2234
|
error: "invalid_request"
|
|
2201
2235
|
}
|
|
2202
2236
|
)
|
|
@@ -2223,7 +2257,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2223
2257
|
} catch (error) {
|
|
2224
2258
|
res.writeHead(400, { "Content-Type": "application/json" }).end(
|
|
2225
2259
|
JSON.stringify(
|
|
2226
|
-
_optionalChain([error, 'access',
|
|
2260
|
+
_optionalChain([error, 'access', _59 => _59.toJSON, 'optionalCall', _60 => _60()]) || {
|
|
2227
2261
|
error: "invalid_request"
|
|
2228
2262
|
}
|
|
2229
2263
|
)
|
|
@@ -2245,7 +2279,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2245
2279
|
} catch (error) {
|
|
2246
2280
|
res.writeHead(400, { "Content-Type": "application/json" }).end(
|
|
2247
2281
|
JSON.stringify(
|
|
2248
|
-
_optionalChain([error, 'access',
|
|
2282
|
+
_optionalChain([error, 'access', _61 => _61.toJSON, 'optionalCall', _62 => _62()]) || {
|
|
2249
2283
|
error: "server_error"
|
|
2250
2284
|
}
|
|
2251
2285
|
)
|
|
@@ -2280,7 +2314,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2280
2314
|
} catch (error) {
|
|
2281
2315
|
res.writeHead(400, { "Content-Type": "application/json" }).end(
|
|
2282
2316
|
JSON.stringify(
|
|
2283
|
-
_optionalChain([error, 'access',
|
|
2317
|
+
_optionalChain([error, 'access', _63 => _63.toJSON, 'optionalCall', _64 => _64()]) || {
|
|
2284
2318
|
error: "server_error"
|
|
2285
2319
|
}
|
|
2286
2320
|
)
|
|
@@ -2302,8 +2336,8 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2302
2336
|
const basicAuth = parseBasicAuthHeader(
|
|
2303
2337
|
req.headers.authorization
|
|
2304
2338
|
);
|
|
2305
|
-
const clientId = _optionalChain([basicAuth, 'optionalAccess',
|
|
2306
|
-
const clientSecret = _nullishCoalesce(_nullishCoalesce(_optionalChain([basicAuth, 'optionalAccess',
|
|
2339
|
+
const clientId = _optionalChain([basicAuth, 'optionalAccess', _65 => _65.clientId]) || params.get("client_id") || "";
|
|
2340
|
+
const clientSecret = _nullishCoalesce(_nullishCoalesce(_optionalChain([basicAuth, 'optionalAccess', _66 => _66.clientSecret]), () => ( params.get("client_secret"))), () => ( void 0));
|
|
2307
2341
|
let response;
|
|
2308
2342
|
if (grantType === "authorization_code") {
|
|
2309
2343
|
response = await oauthProxy.exchangeAuthorizationCode({
|
|
@@ -2333,7 +2367,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2333
2367
|
const statusCode = error.statusCode || 400;
|
|
2334
2368
|
res.writeHead(statusCode, { "Content-Type": "application/json" }).end(
|
|
2335
2369
|
JSON.stringify(
|
|
2336
|
-
_optionalChain([error, 'access',
|
|
2370
|
+
_optionalChain([error, 'access', _67 => _67.toJSON, 'optionalCall', _68 => _68()]) || {
|
|
2337
2371
|
error: "invalid_request"
|
|
2338
2372
|
}
|
|
2339
2373
|
)
|
|
@@ -2404,23 +2438,23 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2404
2438
|
const envBasePath = process.env.FASTMCP_BASE_PATH;
|
|
2405
2439
|
const envStateless = process.env.FASTMCP_STATELESS;
|
|
2406
2440
|
const envHost = process.env.FASTMCP_HOST;
|
|
2407
|
-
const transportType = _optionalChain([overrides, 'optionalAccess',
|
|
2441
|
+
const transportType = _optionalChain([overrides, 'optionalAccess', _69 => _69.transportType]) || (transportArg === "http-stream" ? "httpStream" : transportArg) || envTransport || "stdio";
|
|
2408
2442
|
if (transportType === "httpStream") {
|
|
2409
2443
|
const port = parseInt(
|
|
2410
|
-
_optionalChain([overrides, 'optionalAccess',
|
|
2444
|
+
_optionalChain([overrides, 'optionalAccess', _70 => _70.httpStream, 'optionalAccess', _71 => _71.port, 'optionalAccess', _72 => _72.toString, 'call', _73 => _73()]) || portArg || envPort || "8080"
|
|
2411
2445
|
);
|
|
2412
|
-
const host = _optionalChain([overrides, 'optionalAccess',
|
|
2413
|
-
const endpoint = _optionalChain([overrides, 'optionalAccess',
|
|
2446
|
+
const host = _optionalChain([overrides, 'optionalAccess', _74 => _74.httpStream, 'optionalAccess', _75 => _75.host]) || hostArg || envHost || "localhost";
|
|
2447
|
+
const endpoint = _optionalChain([overrides, 'optionalAccess', _76 => _76.httpStream, 'optionalAccess', _77 => _77.endpoint]) || endpointArg || envEndpoint || "/mcp";
|
|
2414
2448
|
const basePath = normalizeBasePath(
|
|
2415
|
-
_optionalChain([overrides, 'optionalAccess',
|
|
2449
|
+
_optionalChain([overrides, 'optionalAccess', _78 => _78.httpStream, 'optionalAccess', _79 => _79.basePath]) || basePathArg || envBasePath
|
|
2416
2450
|
);
|
|
2417
|
-
const enableJsonResponse = _optionalChain([overrides, 'optionalAccess',
|
|
2418
|
-
const stateless = _optionalChain([overrides, 'optionalAccess',
|
|
2419
|
-
const cors = _optionalChain([overrides, 'optionalAccess',
|
|
2420
|
-
const eventStore = _optionalChain([overrides, 'optionalAccess',
|
|
2421
|
-
const sslCa = _optionalChain([overrides, 'optionalAccess',
|
|
2422
|
-
const sslCert = _optionalChain([overrides, 'optionalAccess',
|
|
2423
|
-
const sslKey = _optionalChain([overrides, 'optionalAccess',
|
|
2451
|
+
const enableJsonResponse = _optionalChain([overrides, 'optionalAccess', _80 => _80.httpStream, 'optionalAccess', _81 => _81.enableJsonResponse]) || false;
|
|
2452
|
+
const stateless = _optionalChain([overrides, 'optionalAccess', _82 => _82.httpStream, 'optionalAccess', _83 => _83.stateless]) || statelessArg === "true" || envStateless === "true" || false;
|
|
2453
|
+
const cors = _optionalChain([overrides, 'optionalAccess', _84 => _84.httpStream, 'optionalAccess', _85 => _85.cors]);
|
|
2454
|
+
const eventStore = _optionalChain([overrides, 'optionalAccess', _86 => _86.httpStream, 'optionalAccess', _87 => _87.eventStore]);
|
|
2455
|
+
const sslCa = _optionalChain([overrides, 'optionalAccess', _88 => _88.httpStream, 'optionalAccess', _89 => _89.sslCa]);
|
|
2456
|
+
const sslCert = _optionalChain([overrides, 'optionalAccess', _90 => _90.httpStream, 'optionalAccess', _91 => _91.sslCert]);
|
|
2457
|
+
const sslKey = _optionalChain([overrides, 'optionalAccess', _92 => _92.httpStream, 'optionalAccess', _93 => _93.sslKey]);
|
|
2424
2458
|
return {
|
|
2425
2459
|
httpStream: {
|
|
2426
2460
|
basePath,
|
|
@@ -2496,4 +2530,4 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2496
2530
|
|
|
2497
2531
|
|
|
2498
2532
|
exports.DiscoveryDocumentCache = DiscoveryDocumentCache; exports.jsonSchemaAdapter = jsonSchemaAdapter; 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;
|
|
2499
|
-
//# sourceMappingURL=chunk-
|
|
2533
|
+
//# sourceMappingURL=chunk-3O5ZKWCC.cjs.map
|