fastmcp 4.12.0 → 4.12.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 +7 -3
- package/dist/FastMCP.cjs.map +1 -1
- package/dist/FastMCP.d.cts +14 -1
- package/dist/FastMCP.d.ts +14 -1
- package/dist/FastMCP.js +6 -2
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-WPAZXREN.js → chunk-5BQXF2VT.js} +5 -1
- package/dist/chunk-5BQXF2VT.js.map +1 -0
- package/dist/{chunk-GM44BOI7.js → chunk-PNBJIDG6.js} +9 -5
- package/dist/chunk-PNBJIDG6.js.map +1 -0
- package/dist/{chunk-PGTM33AU.cjs → chunk-POXZCEYE.cjs} +6 -2
- package/dist/chunk-POXZCEYE.cjs.map +1 -0
- package/dist/{chunk-DZYT6QAH.cjs → chunk-RAIXP3PS.cjs} +7 -3
- package/dist/chunk-RAIXP3PS.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-DZYT6QAH.cjs.map +0 -1
- package/dist/chunk-GM44BOI7.js.map +0 -1
- package/dist/chunk-PGTM33AU.cjs.map +0 -1
- package/dist/chunk-WPAZXREN.js.map +0 -1
package/dist/FastMCP.cjs
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var _chunkPGTM33AUcjs = require('./chunk-PGTM33AU.cjs');
|
|
12
11
|
|
|
13
12
|
|
|
13
|
+
var _chunkPOXZCEYEcjs = require('./chunk-POXZCEYE.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -21,9 +21,9 @@ var _chunkPGTM33AUcjs = require('./chunk-PGTM33AU.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var _chunkDZYT6QAHcjs = require('./chunk-DZYT6QAH.cjs');
|
|
25
24
|
|
|
26
25
|
|
|
26
|
+
var _chunkRAIXP3PScjs = require('./chunk-RAIXP3PS.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -43,5 +43,9 @@ var _chunkDZYT6QAHcjs = require('./chunk-DZYT6QAH.cjs');
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
exports.AuthProvider = _chunkRAIXP3PScjs.AuthProvider; exports.AzureProvider = _chunkRAIXP3PScjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkPOXZCEYEcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkPOXZCEYEcjs.FastMCP; exports.FastMCPError = _chunkPOXZCEYEcjs.FastMCPError; exports.FastMCPSession = _chunkPOXZCEYEcjs.FastMCPSession; exports.GitHubProvider = _chunkRAIXP3PScjs.GitHubProvider; exports.GoogleProvider = _chunkRAIXP3PScjs.GoogleProvider; exports.OAuthProvider = _chunkRAIXP3PScjs.OAuthProvider; exports.ServerState = _chunkPOXZCEYEcjs.ServerState; exports.SessionError = _chunkPOXZCEYEcjs.SessionError; exports.UnexpectedStateError = _chunkPOXZCEYEcjs.UnexpectedStateError; exports.UserError = _chunkPOXZCEYEcjs.UserError; exports.audioContent = _chunkPOXZCEYEcjs.audioContent; exports.getAuthSession = _chunkRAIXP3PScjs.getAuthSession; exports.imageContent = _chunkPOXZCEYEcjs.imageContent; exports.jsonSchemaAdapter = _chunkPOXZCEYEcjs.jsonSchemaAdapter; exports.requireAll = _chunkRAIXP3PScjs.requireAll; exports.requireAny = _chunkRAIXP3PScjs.requireAny; exports.requireAuth = _chunkRAIXP3PScjs.requireAuth; exports.requireRole = _chunkRAIXP3PScjs.requireRole; exports.requireScopes = _chunkRAIXP3PScjs.requireScopes;
|
|
47
51
|
//# sourceMappingURL=FastMCP.cjs.map
|
package/dist/FastMCP.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/fastmcp/fastmcp/dist/FastMCP.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/fastmcp/fastmcp/dist/FastMCP.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,+tCAAC","file":"/home/runner/work/fastmcp/fastmcp/dist/FastMCP.cjs"}
|
package/dist/FastMCP.d.cts
CHANGED
|
@@ -242,6 +242,19 @@ type ToolParameters = StandardSchemaV1;
|
|
|
242
242
|
declare abstract class FastMCPError extends Error {
|
|
243
243
|
constructor(message?: string);
|
|
244
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* An error raised when a session encounters a problem (e.g. connection
|
|
247
|
+
* failures, protocol violations). Consumers can use this class to
|
|
248
|
+
* distinguish fastmcp session errors from unrelated runtime errors:
|
|
249
|
+
*
|
|
250
|
+
* ```ts
|
|
251
|
+
* server.on("error", ({ error }) => {
|
|
252
|
+
* if (error instanceof SessionError) { ... }
|
|
253
|
+
* });
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
declare class SessionError extends FastMCPError {
|
|
257
|
+
}
|
|
245
258
|
declare class UnexpectedStateError extends FastMCPError {
|
|
246
259
|
extras?: Extras;
|
|
247
260
|
constructor(message: string, extras?: Extras);
|
|
@@ -1039,4 +1052,4 @@ declare class FastMCP<T extends FastMCPSessionAuth = FastMCPSessionAuth> extends
|
|
|
1039
1052
|
stop(): Promise<void>;
|
|
1040
1053
|
}
|
|
1041
1054
|
|
|
1042
|
-
export { type AudioContent, AuthProvider, type Content, type ContentResult, type Context, DiscoveryDocumentCache, FastMCP, type FastMCPEvents, type FastMCPRequest, type FastMCPResponse, FastMCPSession, type FastMCPSessionAuth, type FastMCPSessionEvents, type HTTPMethod, type ImageContent, type InputPrompt, type InputPromptArgument, type JsonSchemaObject, type JsonSchemaStandardSchema, type LoadContext, type Logger, type LoggingLevel, OAuthSession, type Progress, type Prompt, type PromptArgument, type Resource, type ResourceContent, type ResourceResult, type ResourceTemplate, type ResourceTemplateArgument, type RouteHandler, type RouteOptions, type SSEServer, type SerializableValue, type ServerOptions, ServerState, type TextContent, type Tool, type ToolParameters, UnexpectedStateError, UserError, audioContent, imageContent, jsonSchemaAdapter };
|
|
1055
|
+
export { type AudioContent, AuthProvider, type Content, type ContentResult, type Context, DiscoveryDocumentCache, FastMCP, FastMCPError, type FastMCPEvents, type FastMCPRequest, type FastMCPResponse, FastMCPSession, type FastMCPSessionAuth, type FastMCPSessionEvents, type HTTPMethod, type ImageContent, type InputPrompt, type InputPromptArgument, type JsonSchemaObject, type JsonSchemaStandardSchema, type LoadContext, type Logger, type LoggingLevel, OAuthSession, type Progress, type Prompt, type PromptArgument, type Resource, type ResourceContent, type ResourceResult, type ResourceTemplate, type ResourceTemplateArgument, type RouteHandler, type RouteOptions, type SSEServer, type SerializableValue, type ServerOptions, ServerState, SessionError, type TextContent, type Tool, type ToolParameters, UnexpectedStateError, UserError, audioContent, imageContent, jsonSchemaAdapter };
|
package/dist/FastMCP.d.ts
CHANGED
|
@@ -242,6 +242,19 @@ type ToolParameters = StandardSchemaV1;
|
|
|
242
242
|
declare abstract class FastMCPError extends Error {
|
|
243
243
|
constructor(message?: string);
|
|
244
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* An error raised when a session encounters a problem (e.g. connection
|
|
247
|
+
* failures, protocol violations). Consumers can use this class to
|
|
248
|
+
* distinguish fastmcp session errors from unrelated runtime errors:
|
|
249
|
+
*
|
|
250
|
+
* ```ts
|
|
251
|
+
* server.on("error", ({ error }) => {
|
|
252
|
+
* if (error instanceof SessionError) { ... }
|
|
253
|
+
* });
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
declare class SessionError extends FastMCPError {
|
|
257
|
+
}
|
|
245
258
|
declare class UnexpectedStateError extends FastMCPError {
|
|
246
259
|
extras?: Extras;
|
|
247
260
|
constructor(message: string, extras?: Extras);
|
|
@@ -1039,4 +1052,4 @@ declare class FastMCP<T extends FastMCPSessionAuth = FastMCPSessionAuth> extends
|
|
|
1039
1052
|
stop(): Promise<void>;
|
|
1040
1053
|
}
|
|
1041
1054
|
|
|
1042
|
-
export { type AudioContent, AuthProvider, type Content, type ContentResult, type Context, DiscoveryDocumentCache, FastMCP, type FastMCPEvents, type FastMCPRequest, type FastMCPResponse, FastMCPSession, type FastMCPSessionAuth, type FastMCPSessionEvents, type HTTPMethod, type ImageContent, type InputPrompt, type InputPromptArgument, type JsonSchemaObject, type JsonSchemaStandardSchema, type LoadContext, type Logger, type LoggingLevel, OAuthSession, type Progress, type Prompt, type PromptArgument, type Resource, type ResourceContent, type ResourceResult, type ResourceTemplate, type ResourceTemplateArgument, type RouteHandler, type RouteOptions, type SSEServer, type SerializableValue, type ServerOptions, ServerState, type TextContent, type Tool, type ToolParameters, UnexpectedStateError, UserError, audioContent, imageContent, jsonSchemaAdapter };
|
|
1055
|
+
export { type AudioContent, AuthProvider, type Content, type ContentResult, type Context, DiscoveryDocumentCache, FastMCP, FastMCPError, type FastMCPEvents, type FastMCPRequest, type FastMCPResponse, FastMCPSession, type FastMCPSessionAuth, type FastMCPSessionEvents, type HTTPMethod, type ImageContent, type InputPrompt, type InputPromptArgument, type JsonSchemaObject, type JsonSchemaStandardSchema, type LoadContext, type Logger, type LoggingLevel, OAuthSession, type Progress, type Prompt, type PromptArgument, type Resource, type ResourceContent, type ResourceResult, type ResourceTemplate, type ResourceTemplateArgument, type RouteHandler, type RouteOptions, type SSEServer, type SerializableValue, type ServerOptions, ServerState, SessionError, type TextContent, type Tool, type ToolParameters, UnexpectedStateError, UserError, audioContent, imageContent, jsonSchemaAdapter };
|
package/dist/FastMCP.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DiscoveryDocumentCache,
|
|
3
3
|
FastMCP,
|
|
4
|
+
FastMCPError,
|
|
4
5
|
FastMCPSession,
|
|
5
6
|
ServerState,
|
|
7
|
+
SessionError,
|
|
6
8
|
UnexpectedStateError,
|
|
7
9
|
UserError,
|
|
8
10
|
audioContent,
|
|
9
11
|
imageContent,
|
|
10
12
|
jsonSchemaAdapter
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5BQXF2VT.js";
|
|
12
14
|
import {
|
|
13
15
|
AuthProvider,
|
|
14
16
|
AzureProvider,
|
|
@@ -21,17 +23,19 @@ import {
|
|
|
21
23
|
requireAuth,
|
|
22
24
|
requireRole,
|
|
23
25
|
requireScopes
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PNBJIDG6.js";
|
|
25
27
|
export {
|
|
26
28
|
AuthProvider,
|
|
27
29
|
AzureProvider,
|
|
28
30
|
DiscoveryDocumentCache,
|
|
29
31
|
FastMCP,
|
|
32
|
+
FastMCPError,
|
|
30
33
|
FastMCPSession,
|
|
31
34
|
GitHubProvider,
|
|
32
35
|
GoogleProvider,
|
|
33
36
|
OAuthProvider,
|
|
34
37
|
ServerState,
|
|
38
|
+
SessionError,
|
|
35
39
|
UnexpectedStateError,
|
|
36
40
|
UserError,
|
|
37
41
|
audioContent,
|
package/dist/auth/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkRAIXP3PScjs = require('../chunk-RAIXP3PS.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -51,5 +51,5 @@ var _chunkDZYT6QAHcjs = require('../chunk-DZYT6QAH.cjs');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
exports.AuthProvider =
|
|
54
|
+
exports.AuthProvider = _chunkRAIXP3PScjs.AuthProvider; exports.AzureProvider = _chunkRAIXP3PScjs.AzureProvider; exports.ConsentManager = _chunkRAIXP3PScjs.ConsentManager; exports.DEFAULT_ACCESS_TOKEN_TTL = _chunkRAIXP3PScjs.DEFAULT_ACCESS_TOKEN_TTL; exports.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH = _chunkRAIXP3PScjs.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH; exports.DEFAULT_AUTHORIZATION_CODE_TTL = _chunkRAIXP3PScjs.DEFAULT_AUTHORIZATION_CODE_TTL; exports.DEFAULT_REFRESH_TOKEN_TTL = _chunkRAIXP3PScjs.DEFAULT_REFRESH_TOKEN_TTL; exports.DEFAULT_TRANSACTION_TTL = _chunkRAIXP3PScjs.DEFAULT_TRANSACTION_TTL; exports.DiskStore = _chunkRAIXP3PScjs.DiskStore; exports.EncryptedTokenStorage = _chunkRAIXP3PScjs.EncryptedTokenStorage; exports.GitHubProvider = _chunkRAIXP3PScjs.GitHubProvider; exports.GoogleProvider = _chunkRAIXP3PScjs.GoogleProvider; exports.JWKSVerifier = _chunkRAIXP3PScjs.JWKSVerifier; exports.JWTIssuer = _chunkRAIXP3PScjs.JWTIssuer; exports.MemoryTokenStorage = _chunkRAIXP3PScjs.MemoryTokenStorage; exports.OAuthProvider = _chunkRAIXP3PScjs.OAuthProvider; exports.OAuthProxy = _chunkRAIXP3PScjs.OAuthProxy; exports.OAuthProxyError = _chunkRAIXP3PScjs.OAuthProxyError; exports.PKCEUtils = _chunkRAIXP3PScjs.PKCEUtils; exports.getAuthSession = _chunkRAIXP3PScjs.getAuthSession; exports.requireAll = _chunkRAIXP3PScjs.requireAll; exports.requireAny = _chunkRAIXP3PScjs.requireAny; exports.requireAuth = _chunkRAIXP3PScjs.requireAuth; exports.requireRole = _chunkRAIXP3PScjs.requireRole; exports.requireScopes = _chunkRAIXP3PScjs.requireScopes;
|
|
55
55
|
//# sourceMappingURL=index.cjs.map
|
package/dist/auth/index.js
CHANGED
|
@@ -294,6 +294,8 @@ var FastMCPError = class extends Error {
|
|
|
294
294
|
this.name = new.target.name;
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
|
+
var SessionError = class extends FastMCPError {
|
|
298
|
+
};
|
|
297
299
|
var UnexpectedStateError = class extends FastMCPError {
|
|
298
300
|
extras;
|
|
299
301
|
constructor(message, extras) {
|
|
@@ -2486,10 +2488,12 @@ export {
|
|
|
2486
2488
|
jsonSchemaAdapter,
|
|
2487
2489
|
imageContent,
|
|
2488
2490
|
audioContent,
|
|
2491
|
+
FastMCPError,
|
|
2492
|
+
SessionError,
|
|
2489
2493
|
UnexpectedStateError,
|
|
2490
2494
|
UserError,
|
|
2491
2495
|
ServerState,
|
|
2492
2496
|
FastMCPSession,
|
|
2493
2497
|
FastMCP
|
|
2494
2498
|
};
|
|
2495
|
-
//# sourceMappingURL=chunk-
|
|
2499
|
+
//# sourceMappingURL=chunk-5BQXF2VT.js.map
|