fastmcp 4.23.0 → 4.23.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.d.cts +2 -1
- package/dist/FastMCP.d.ts +2 -1
- package/dist/FastMCP.js +2 -2
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.d.cts +6 -0
- package/dist/auth/index.d.ts +6 -0
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-YLLBANV4.cjs → chunk-C7TBI7A5.cjs} +22 -2
- package/dist/chunk-C7TBI7A5.cjs.map +1 -0
- package/dist/{chunk-ISYL7EKR.js → chunk-CA2EPNZF.js} +22 -2
- package/dist/{chunk-ISYL7EKR.js.map → chunk-CA2EPNZF.js.map} +1 -1
- package/dist/{chunk-ETHWZXZK.js → chunk-G6TNGO7A.js} +25 -8
- package/dist/chunk-G6TNGO7A.js.map +1 -0
- package/dist/{chunk-X7KNHPR4.cjs → chunk-TBJSX5UF.cjs} +28 -11
- package/dist/chunk-TBJSX5UF.cjs.map +1 -0
- package/dist/examples/custom-routes.cjs +3 -3
- package/dist/examples/custom-routes.js +2 -2
- package/dist/openapi/index.cjs +7 -7
- package/dist/openapi/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-ETHWZXZK.js.map +0 -1
- package/dist/chunk-X7KNHPR4.cjs.map +0 -1
- package/dist/chunk-YLLBANV4.cjs.map +0 -1
package/dist/openapi/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var _chunkTBJSX5UFcjs = require('../chunk-TBJSX5UF.cjs');
|
|
6
|
+
require('../chunk-C7TBI7A5.cjs');
|
|
7
7
|
require('../chunk-O22SYZMC.cjs');
|
|
8
8
|
|
|
9
9
|
// src/openapi/loadSpec.ts
|
|
@@ -140,7 +140,7 @@ async function executeRequest(options) {
|
|
|
140
140
|
});
|
|
141
141
|
const text = await response.text();
|
|
142
142
|
if (!response.ok) {
|
|
143
|
-
throw new (0,
|
|
143
|
+
throw new (0, _chunkTBJSX5UFcjs.UserError)(
|
|
144
144
|
`${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
|
|
145
145
|
);
|
|
146
146
|
}
|
|
@@ -242,7 +242,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
|
|
|
242
242
|
const templateSegments = new Set(route.path.split("/"));
|
|
243
243
|
for (const segment of resolvedPath.split("/")) {
|
|
244
244
|
if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
|
|
245
|
-
throw new (0,
|
|
245
|
+
throw new (0, _chunkTBJSX5UFcjs.UserError)(
|
|
246
246
|
`${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
|
|
247
247
|
);
|
|
248
248
|
}
|
|
@@ -776,7 +776,7 @@ async function fromOpenAPI(options) {
|
|
|
776
776
|
const selected = selectRoutes(routes, options);
|
|
777
777
|
const names = generateNames(selected, options.mcpNames);
|
|
778
778
|
const sharedDefs = buildSharedDefs(document);
|
|
779
|
-
const server = _nullishCoalesce(options.server, () => ( new (0,
|
|
779
|
+
const server = _nullishCoalesce(options.server, () => ( new (0, _chunkTBJSX5UFcjs.FastMCP)({
|
|
780
780
|
name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _32 => _32.info, 'optionalAccess', _33 => _33.title]))), () => ( "OpenAPI Server")),
|
|
781
781
|
version: _nullishCoalesce(options.version, () => ( "1.0.0"))
|
|
782
782
|
})));
|
|
@@ -822,7 +822,7 @@ async function fromOpenAPI(options) {
|
|
|
822
822
|
continue;
|
|
823
823
|
}
|
|
824
824
|
const outputSchemaJson = buildOutputSchema(route, sharedDefs);
|
|
825
|
-
const outputSchema = outputSchemaJson ?
|
|
825
|
+
const outputSchema = outputSchemaJson ? _chunkTBJSX5UFcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
|
|
826
826
|
server.addTool({
|
|
827
827
|
description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
|
|
828
828
|
execute: async (args) => {
|
|
@@ -835,7 +835,7 @@ async function fromOpenAPI(options) {
|
|
|
835
835
|
return resolveToolResult(result, outputSchema);
|
|
836
836
|
},
|
|
837
837
|
name,
|
|
838
|
-
parameters:
|
|
838
|
+
parameters: _chunkTBJSX5UFcjs.jsonSchemaAdapter.call(void 0, flatSchema),
|
|
839
839
|
...outputSchema ? { outputSchema } : {}
|
|
840
840
|
});
|
|
841
841
|
}
|
package/dist/openapi/index.js
CHANGED