fastmcp 4.28.1 → 4.28.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.
- package/dist/FastMCP.cjs +3 -3
- package/dist/FastMCP.js +2 -2
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-PWSYODM5.js → chunk-76OY4FEK.js} +2 -2
- package/dist/{chunk-PWSYODM5.js.map → chunk-76OY4FEK.js.map} +1 -1
- package/dist/{chunk-2ABBQFJB.cjs → chunk-GW5MENCI.cjs} +5 -5
- package/dist/{chunk-2ABBQFJB.cjs.map → chunk-GW5MENCI.cjs.map} +1 -1
- package/dist/{chunk-3FM67CFK.cjs → chunk-HZJE6ZGH.cjs} +2 -2
- package/dist/{chunk-3FM67CFK.cjs.map → chunk-HZJE6ZGH.cjs.map} +1 -1
- package/dist/{chunk-NRATQX66.js → chunk-MBIVAKUB.js} +2 -2
- package/dist/examples/custom-routes.cjs +3 -3
- package/dist/examples/custom-routes.js +2 -2
- package/dist/openapi/index.cjs +8 -8
- package/dist/openapi/index.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-NRATQX66.js.map → chunk-MBIVAKUB.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cancelResponseBody
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-76OY4FEK.js";
|
|
4
4
|
import {
|
|
5
5
|
objectRootSchema,
|
|
6
6
|
strictInputSchema,
|
|
@@ -3706,4 +3706,4 @@ export {
|
|
|
3706
3706
|
FastMCPSession,
|
|
3707
3707
|
FastMCP
|
|
3708
3708
|
};
|
|
3709
|
-
//# sourceMappingURL=chunk-
|
|
3709
|
+
//# sourceMappingURL=chunk-MBIVAKUB.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkGW5MENCIcjs = require('../chunk-GW5MENCI.cjs');
|
|
5
|
+
require('../chunk-HZJE6ZGH.cjs');
|
|
6
6
|
require('../chunk-2NZFMD6I.cjs');
|
|
7
7
|
|
|
8
8
|
// src/examples/custom-routes.ts
|
|
@@ -12,7 +12,7 @@ var users = /* @__PURE__ */ new Map([
|
|
|
12
12
|
["2", { email: "bob@example.com", id: "2", name: "Bob" }]
|
|
13
13
|
]);
|
|
14
14
|
var requestCount = 0;
|
|
15
|
-
var server = new (0,
|
|
15
|
+
var server = new (0, _chunkGW5MENCIcjs.FastMCP)({
|
|
16
16
|
// Simple authentication - in production, use proper tokens/JWTs
|
|
17
17
|
authenticate: async (req) => {
|
|
18
18
|
const authHeader = req.headers.authorization;
|
package/dist/openapi/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var _chunkGW5MENCIcjs = require('../chunk-GW5MENCI.cjs');
|
|
6
|
+
require('../chunk-HZJE6ZGH.cjs');
|
|
7
7
|
require('../chunk-2NZFMD6I.cjs');
|
|
8
8
|
|
|
9
9
|
// src/openapi/loadSpec.ts
|
|
@@ -606,7 +606,7 @@ async function executeRequest(options) {
|
|
|
606
606
|
});
|
|
607
607
|
const text = await response.text();
|
|
608
608
|
if (!response.ok) {
|
|
609
|
-
throw new (0,
|
|
609
|
+
throw new (0, _chunkGW5MENCIcjs.UserError)(
|
|
610
610
|
`${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
|
|
611
611
|
);
|
|
612
612
|
}
|
|
@@ -709,7 +709,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
|
|
|
709
709
|
const templateSegments = new Set(route.path.split("/"));
|
|
710
710
|
for (const segment of resolvedPath.split("/")) {
|
|
711
711
|
if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
|
|
712
|
-
throw new (0,
|
|
712
|
+
throw new (0, _chunkGW5MENCIcjs.UserError)(
|
|
713
713
|
`${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
|
|
714
714
|
);
|
|
715
715
|
}
|
|
@@ -722,7 +722,7 @@ function encodeCookieValue(mapping, value) {
|
|
|
722
722
|
return encodePathComponent(text);
|
|
723
723
|
}
|
|
724
724
|
if (/[;,]/.test(text)) {
|
|
725
|
-
throw new (0,
|
|
725
|
+
throw new (0, _chunkGW5MENCIcjs.UserError)(
|
|
726
726
|
`Cookie parameter "${mapping.name}" uses style "cookie" and its value contains ";" or ","`
|
|
727
727
|
);
|
|
728
728
|
}
|
|
@@ -995,7 +995,7 @@ async function fromOpenAPI(options) {
|
|
|
995
995
|
const selected = selectRoutes(routes, options);
|
|
996
996
|
const names = generateNames(selected, options.mcpNames);
|
|
997
997
|
const sharedDefs = buildSharedDefs(document);
|
|
998
|
-
const server = _nullishCoalesce(options.server, () => ( new (0,
|
|
998
|
+
const server = _nullishCoalesce(options.server, () => ( new (0, _chunkGW5MENCIcjs.FastMCP)({
|
|
999
999
|
name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _35 => _35.info, 'optionalAccess', _36 => _36.title]))), () => ( "OpenAPI Server")),
|
|
1000
1000
|
version: _nullishCoalesce(options.version, () => ( "1.0.0"))
|
|
1001
1001
|
})));
|
|
@@ -1041,7 +1041,7 @@ async function fromOpenAPI(options) {
|
|
|
1041
1041
|
continue;
|
|
1042
1042
|
}
|
|
1043
1043
|
const outputSchemaJson = buildOutputSchema(route, sharedDefs);
|
|
1044
|
-
const outputSchema = outputSchemaJson ?
|
|
1044
|
+
const outputSchema = outputSchemaJson ? _chunkGW5MENCIcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
|
|
1045
1045
|
server.addTool({
|
|
1046
1046
|
description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
|
|
1047
1047
|
execute: async (args, context) => {
|
|
@@ -1056,7 +1056,7 @@ async function fromOpenAPI(options) {
|
|
|
1056
1056
|
return resolveToolResult(result, outputSchema);
|
|
1057
1057
|
},
|
|
1058
1058
|
name,
|
|
1059
|
-
parameters:
|
|
1059
|
+
parameters: _chunkGW5MENCIcjs.jsonSchemaAdapter.call(void 0, flatSchema),
|
|
1060
1060
|
...outputSchema ? { outputSchema } : {}
|
|
1061
1061
|
});
|
|
1062
1062
|
}
|
package/dist/openapi/index.js
CHANGED
package/package.json
CHANGED
|
File without changes
|