fastmcp 4.23.4 → 4.23.5
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 +2 -2
- package/dist/FastMCP.d.cts +10 -1
- package/dist/FastMCP.d.ts +10 -1
- package/dist/FastMCP.js +1 -1
- package/dist/{chunk-TBJSX5UF.cjs → chunk-MI6R72UA.cjs} +13 -43
- package/dist/chunk-MI6R72UA.cjs.map +1 -0
- package/dist/{chunk-G6TNGO7A.js → chunk-OUD755CE.js} +13 -43
- package/dist/chunk-OUD755CE.js.map +1 -0
- package/dist/edge/index.cjs +3 -9
- package/dist/edge/index.cjs.map +1 -1
- package/dist/edge/index.js +3 -9
- package/dist/edge/index.js.map +1 -1
- package/dist/examples/custom-routes.cjs +2 -2
- package/dist/examples/custom-routes.js +1 -1
- package/dist/openapi/index.cjs +6 -6
- package/dist/openapi/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-G6TNGO7A.js.map +0 -1
- package/dist/chunk-TBJSX5UF.cjs.map +0 -1
package/dist/FastMCP.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkMI6R72UAcjs = require('./chunk-MI6R72UA.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -50,5 +50,5 @@ require('./chunk-O22SYZMC.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
exports.AuthProvider = _chunkC7TBI7A5cjs.AuthProvider; exports.AzureProvider = _chunkC7TBI7A5cjs.AzureProvider; exports.DiscoveryDocumentCache =
|
|
53
|
+
exports.AuthProvider = _chunkC7TBI7A5cjs.AuthProvider; exports.AzureProvider = _chunkC7TBI7A5cjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkMI6R72UAcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkMI6R72UAcjs.FastMCP; exports.FastMCPError = _chunkMI6R72UAcjs.FastMCPError; exports.FastMCPSession = _chunkMI6R72UAcjs.FastMCPSession; exports.GitHubProvider = _chunkC7TBI7A5cjs.GitHubProvider; exports.GoogleProvider = _chunkC7TBI7A5cjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkMI6R72UAcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunkC7TBI7A5cjs.OAuthProvider; exports.ServerState = _chunkMI6R72UAcjs.ServerState; exports.SessionError = _chunkMI6R72UAcjs.SessionError; exports.UnexpectedStateError = _chunkMI6R72UAcjs.UnexpectedStateError; exports.UserError = _chunkMI6R72UAcjs.UserError; exports.audioContent = _chunkMI6R72UAcjs.audioContent; exports.getAuthSession = _chunkC7TBI7A5cjs.getAuthSession; exports.imageContent = _chunkMI6R72UAcjs.imageContent; exports.jsonSchemaAdapter = _chunkMI6R72UAcjs.jsonSchemaAdapter; exports.requireAll = _chunkC7TBI7A5cjs.requireAll; exports.requireAny = _chunkC7TBI7A5cjs.requireAny; exports.requireAuth = _chunkC7TBI7A5cjs.requireAuth; exports.requireRole = _chunkC7TBI7A5cjs.requireRole; exports.requireScopes = _chunkC7TBI7A5cjs.requireScopes;
|
|
54
54
|
//# sourceMappingURL=FastMCP.cjs.map
|
package/dist/FastMCP.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
|
2
2
|
import { EventStore } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
3
3
|
import { RequestOptions } from '@modelcontextprotocol/sdk/shared/protocol.js';
|
|
4
4
|
import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
5
|
-
import { ResourceLink, ElicitRequestFormParams, ElicitRequestURLParams, ElicitResult, Root, ClientCapabilities, Icon, GetPromptResult, CreateMessageRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
import { Annotations, ResourceLink, ElicitRequestFormParams, ElicitRequestURLParams, ElicitResult, Root, ClientCapabilities, Icon, GetPromptResult, CreateMessageRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
6
6
|
export { Icon, ResourceLink } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
8
8
|
import { EventEmitter } from 'events';
|
|
@@ -254,6 +254,8 @@ type SerializableValue = {
|
|
|
254
254
|
[key: string]: SerializableValue;
|
|
255
255
|
} | Literal | SerializableValue[];
|
|
256
256
|
type TextContent = {
|
|
257
|
+
_meta?: Record<string, unknown>;
|
|
258
|
+
annotations?: Annotations;
|
|
257
259
|
text: string;
|
|
258
260
|
type: "text";
|
|
259
261
|
};
|
|
@@ -284,17 +286,24 @@ declare class UnexpectedStateError extends FastMCPError {
|
|
|
284
286
|
declare class UserError extends UnexpectedStateError {
|
|
285
287
|
}
|
|
286
288
|
type ImageContent = {
|
|
289
|
+
_meta?: Record<string, unknown>;
|
|
290
|
+
annotations?: Annotations;
|
|
287
291
|
data: string;
|
|
288
292
|
mimeType: string;
|
|
289
293
|
type: "image";
|
|
290
294
|
};
|
|
291
295
|
type AudioContent = {
|
|
296
|
+
_meta?: Record<string, unknown>;
|
|
297
|
+
annotations?: Annotations;
|
|
292
298
|
data: string;
|
|
293
299
|
mimeType: string;
|
|
294
300
|
type: "audio";
|
|
295
301
|
};
|
|
296
302
|
type ResourceContent = {
|
|
303
|
+
_meta?: Record<string, unknown>;
|
|
304
|
+
annotations?: Annotations;
|
|
297
305
|
resource: {
|
|
306
|
+
_meta?: Record<string, unknown>;
|
|
298
307
|
blob?: string;
|
|
299
308
|
mimeType?: string;
|
|
300
309
|
text?: string;
|
package/dist/FastMCP.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
|
2
2
|
import { EventStore } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
3
3
|
import { RequestOptions } from '@modelcontextprotocol/sdk/shared/protocol.js';
|
|
4
4
|
import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
5
|
-
import { ResourceLink, ElicitRequestFormParams, ElicitRequestURLParams, ElicitResult, Root, ClientCapabilities, Icon, GetPromptResult, CreateMessageRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
import { Annotations, ResourceLink, ElicitRequestFormParams, ElicitRequestURLParams, ElicitResult, Root, ClientCapabilities, Icon, GetPromptResult, CreateMessageRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
6
6
|
export { Icon, ResourceLink } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
8
8
|
import { EventEmitter } from 'events';
|
|
@@ -254,6 +254,8 @@ type SerializableValue = {
|
|
|
254
254
|
[key: string]: SerializableValue;
|
|
255
255
|
} | Literal | SerializableValue[];
|
|
256
256
|
type TextContent = {
|
|
257
|
+
_meta?: Record<string, unknown>;
|
|
258
|
+
annotations?: Annotations;
|
|
257
259
|
text: string;
|
|
258
260
|
type: "text";
|
|
259
261
|
};
|
|
@@ -284,17 +286,24 @@ declare class UnexpectedStateError extends FastMCPError {
|
|
|
284
286
|
declare class UserError extends UnexpectedStateError {
|
|
285
287
|
}
|
|
286
288
|
type ImageContent = {
|
|
289
|
+
_meta?: Record<string, unknown>;
|
|
290
|
+
annotations?: Annotations;
|
|
287
291
|
data: string;
|
|
288
292
|
mimeType: string;
|
|
289
293
|
type: "image";
|
|
290
294
|
};
|
|
291
295
|
type AudioContent = {
|
|
296
|
+
_meta?: Record<string, unknown>;
|
|
297
|
+
annotations?: Annotations;
|
|
292
298
|
data: string;
|
|
293
299
|
mimeType: string;
|
|
294
300
|
type: "audio";
|
|
295
301
|
};
|
|
296
302
|
type ResourceContent = {
|
|
303
|
+
_meta?: Record<string, unknown>;
|
|
304
|
+
annotations?: Annotations;
|
|
297
305
|
resource: {
|
|
306
|
+
_meta?: Record<string, unknown>;
|
|
298
307
|
blob?: string;
|
|
299
308
|
mimeType?: string;
|
|
300
309
|
text?: string;
|
package/dist/FastMCP.js
CHANGED
|
@@ -23,6 +23,11 @@ var _stdiojs = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
26
31
|
var _typesjs = require('@modelcontextprotocol/sdk/types.js');
|
|
27
32
|
var _events = require('events');
|
|
28
33
|
var _promises = require('fs/promises');
|
|
@@ -381,55 +386,20 @@ function assertToolSchemas(tool) {
|
|
|
381
386
|
}
|
|
382
387
|
var STREAM_KEEPALIVE_LOGGER = "fastmcp-keepalive";
|
|
383
388
|
var STREAM_KEEPALIVE_DEFAULT_INTERVAL_MS = 2e4;
|
|
384
|
-
var TextContentZodSchema =
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
*/
|
|
388
|
-
text: _zod.z.string(),
|
|
389
|
-
type: _zod.z.literal("text")
|
|
390
|
-
}).strict();
|
|
391
|
-
var ImageContentZodSchema = _zod.z.object({
|
|
392
|
-
/**
|
|
393
|
-
* The base64-encoded image data.
|
|
394
|
-
*/
|
|
395
|
-
data: _zod.z.string().base64(),
|
|
396
|
-
/**
|
|
397
|
-
* The MIME type of the image. Different providers may support different image types.
|
|
398
|
-
*/
|
|
399
|
-
mimeType: _zod.z.string(),
|
|
400
|
-
type: _zod.z.literal("image")
|
|
389
|
+
var TextContentZodSchema = _typesjs.TextContentSchema.strict();
|
|
390
|
+
var ImageContentZodSchema = _typesjs.ImageContentSchema.extend({
|
|
391
|
+
data: _zod.z.string().base64()
|
|
401
392
|
}).strict();
|
|
402
|
-
var AudioContentZodSchema =
|
|
403
|
-
|
|
404
|
-
* The base64-encoded audio data.
|
|
405
|
-
*/
|
|
406
|
-
data: _zod.z.string().base64(),
|
|
407
|
-
mimeType: _zod.z.string(),
|
|
408
|
-
type: _zod.z.literal("audio")
|
|
393
|
+
var AudioContentZodSchema = _typesjs.AudioContentSchema.extend({
|
|
394
|
+
data: _zod.z.string().base64()
|
|
409
395
|
}).strict();
|
|
410
|
-
var ResourceContentZodSchema =
|
|
411
|
-
resource: _zod.z.object({
|
|
412
|
-
blob: _zod.z.string().optional(),
|
|
413
|
-
mimeType: _zod.z.string().optional(),
|
|
414
|
-
text: _zod.z.string().optional(),
|
|
415
|
-
uri: _zod.z.string()
|
|
416
|
-
}),
|
|
417
|
-
type: _zod.z.literal("resource")
|
|
418
|
-
}).strict();
|
|
419
|
-
var ResourceLinkZodSchema = _zod.z.object({
|
|
420
|
-
description: _zod.z.string().optional(),
|
|
421
|
-
mimeType: _zod.z.string().optional(),
|
|
422
|
-
name: _zod.z.string(),
|
|
423
|
-
title: _zod.z.string().optional(),
|
|
424
|
-
type: _zod.z.literal("resource_link"),
|
|
425
|
-
uri: _zod.z.string()
|
|
426
|
-
});
|
|
396
|
+
var ResourceContentZodSchema = _typesjs.EmbeddedResourceSchema.strict();
|
|
427
397
|
var ContentZodSchema = _zod.z.discriminatedUnion("type", [
|
|
428
398
|
TextContentZodSchema,
|
|
429
399
|
ImageContentZodSchema,
|
|
430
400
|
AudioContentZodSchema,
|
|
431
401
|
ResourceContentZodSchema,
|
|
432
|
-
|
|
402
|
+
_typesjs.ResourceLinkSchema
|
|
433
403
|
]);
|
|
434
404
|
var ContentResultZodSchema = _zod.z.object({
|
|
435
405
|
_meta: _zod.z.record(_zod.z.string(), _zod.z.unknown()).optional(),
|
|
@@ -3186,4 +3156,4 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
3186
3156
|
|
|
3187
3157
|
|
|
3188
3158
|
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;
|
|
3189
|
-
//# sourceMappingURL=chunk-
|
|
3159
|
+
//# sourceMappingURL=chunk-MI6R72UA.cjs.map
|