fastmcp 4.25.1 → 4.26.0
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/README.md +2 -0
- package/dist/FastMCP.cjs +2 -2
- package/dist/FastMCP.d.cts +1 -0
- package/dist/FastMCP.d.ts +1 -0
- package/dist/FastMCP.js +1 -1
- package/dist/{chunk-SQSE766U.js → chunk-LUGELV2V.js} +5 -1
- package/dist/{chunk-SQSE766U.js.map → chunk-LUGELV2V.js.map} +1 -1
- package/dist/{chunk-VWHJYU4V.cjs → chunk-ZHTH5HQD.cjs} +9 -5
- package/dist/chunk-ZHTH5HQD.cjs.map +1 -0
- package/dist/examples/custom-routes.cjs +2 -2
- package/dist/examples/custom-routes.js +1 -1
- package/dist/openapi/index.cjs +21 -8
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.d.cts +5 -4
- package/dist/openapi/index.d.ts +5 -4
- package/dist/openapi/index.js +15 -2
- package/dist/openapi/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-VWHJYU4V.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -514,6 +514,8 @@ server.start({
|
|
|
514
514
|
|
|
515
515
|
> **Note:** Stateless mode is only available with HTTP streaming transport. Features that depend on persistent sessions (like session-specific state) will not be available in stateless mode.
|
|
516
516
|
|
|
517
|
+
> **Legacy SSE:** the HTTP Stream transport also answers the legacy SSE endpoints (`GET /sse` and `POST /messages`) by default. Set `httpStream.sseEndpoint` to another path to move `GET /sse` (the path is not prefixed with `basePath`, and `POST /messages` stays where it is), or to `null` to turn both off — in stateless deployments a long-lived SSE session contradicts the stateless contract.
|
|
518
|
+
|
|
517
519
|
You can also enable stateless mode using CLI arguments or environment variables:
|
|
518
520
|
|
|
519
521
|
```bash
|
package/dist/FastMCP.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkZHTH5HQDcjs = require('./chunk-ZHTH5HQD.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -50,5 +50,5 @@ require('./chunk-6TDYSPLC.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
exports.AuthProvider = _chunkAKHG27NYcjs.AuthProvider; exports.AzureProvider = _chunkAKHG27NYcjs.AzureProvider; exports.DiscoveryDocumentCache =
|
|
53
|
+
exports.AuthProvider = _chunkAKHG27NYcjs.AuthProvider; exports.AzureProvider = _chunkAKHG27NYcjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkZHTH5HQDcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkZHTH5HQDcjs.FastMCP; exports.FastMCPError = _chunkZHTH5HQDcjs.FastMCPError; exports.FastMCPSession = _chunkZHTH5HQDcjs.FastMCPSession; exports.GitHubProvider = _chunkAKHG27NYcjs.GitHubProvider; exports.GoogleProvider = _chunkAKHG27NYcjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkZHTH5HQDcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunkAKHG27NYcjs.OAuthProvider; exports.ServerState = _chunkZHTH5HQDcjs.ServerState; exports.SessionError = _chunkZHTH5HQDcjs.SessionError; exports.UnexpectedStateError = _chunkZHTH5HQDcjs.UnexpectedStateError; exports.UserError = _chunkZHTH5HQDcjs.UserError; exports.audioContent = _chunkZHTH5HQDcjs.audioContent; exports.getAuthSession = _chunkAKHG27NYcjs.getAuthSession; exports.imageContent = _chunkZHTH5HQDcjs.imageContent; exports.jsonSchemaAdapter = _chunkZHTH5HQDcjs.jsonSchemaAdapter; exports.requireAll = _chunkAKHG27NYcjs.requireAll; exports.requireAny = _chunkAKHG27NYcjs.requireAny; exports.requireAuth = _chunkAKHG27NYcjs.requireAuth; exports.requireRole = _chunkAKHG27NYcjs.requireRole; exports.requireScopes = _chunkAKHG27NYcjs.requireScopes;
|
|
54
54
|
//# sourceMappingURL=FastMCP.cjs.map
|
package/dist/FastMCP.d.cts
CHANGED
|
@@ -1182,6 +1182,7 @@ declare class FastMCP<T extends FastMCPSessionAuth = FastMCPSessionAuth> extends
|
|
|
1182
1182
|
eventStore?: EventStore;
|
|
1183
1183
|
host?: string;
|
|
1184
1184
|
port: number;
|
|
1185
|
+
sseEndpoint?: `/${string}` | null;
|
|
1185
1186
|
sslCa?: string;
|
|
1186
1187
|
sslCert?: string;
|
|
1187
1188
|
sslKey?: string;
|
package/dist/FastMCP.d.ts
CHANGED
|
@@ -1182,6 +1182,7 @@ declare class FastMCP<T extends FastMCPSessionAuth = FastMCPSessionAuth> extends
|
|
|
1182
1182
|
eventStore?: EventStore;
|
|
1183
1183
|
host?: string;
|
|
1184
1184
|
port: number;
|
|
1185
|
+
sseEndpoint?: `/${string}` | null;
|
|
1185
1186
|
sslCa?: string;
|
|
1186
1187
|
sslCert?: string;
|
|
1187
1188
|
sslKey?: string;
|
package/dist/FastMCP.js
CHANGED
|
@@ -2585,6 +2585,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2585
2585
|
);
|
|
2586
2586
|
},
|
|
2587
2587
|
port: httpConfig.port,
|
|
2588
|
+
sseEndpoint: httpConfig.sseEndpoint,
|
|
2588
2589
|
sslCa: httpConfig.sslCa,
|
|
2589
2590
|
sslCert: httpConfig.sslCert,
|
|
2590
2591
|
sslKey: httpConfig.sslKey,
|
|
@@ -2639,6 +2640,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
2639
2640
|
);
|
|
2640
2641
|
},
|
|
2641
2642
|
port: httpConfig.port,
|
|
2643
|
+
sseEndpoint: httpConfig.sseEndpoint,
|
|
2642
2644
|
sslCa: httpConfig.sslCa,
|
|
2643
2645
|
sslCert: httpConfig.sslCert,
|
|
2644
2646
|
sslKey: httpConfig.sslKey,
|
|
@@ -3421,6 +3423,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
3421
3423
|
(statelessArg === "" ? true : parseBooleanSetting(statelessArg, "--stateless")) ?? parseBooleanSetting(envStateless, "FASTMCP_STATELESS") ?? false;
|
|
3422
3424
|
const cors = overrides?.httpStream?.cors;
|
|
3423
3425
|
const eventStore = overrides?.httpStream?.eventStore;
|
|
3426
|
+
const sseEndpoint = overrides?.httpStream?.sseEndpoint;
|
|
3424
3427
|
const sslCa = overrides?.httpStream?.sslCa;
|
|
3425
3428
|
const sslCert = overrides?.httpStream?.sslCert;
|
|
3426
3429
|
const sslKey = overrides?.httpStream?.sslKey;
|
|
@@ -3433,6 +3436,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
3433
3436
|
eventStore,
|
|
3434
3437
|
host,
|
|
3435
3438
|
port,
|
|
3439
|
+
sseEndpoint,
|
|
3436
3440
|
sslCa,
|
|
3437
3441
|
sslCert,
|
|
3438
3442
|
sslKey,
|
|
@@ -3543,4 +3547,4 @@ export {
|
|
|
3543
3547
|
FastMCPSession,
|
|
3544
3548
|
FastMCP
|
|
3545
3549
|
};
|
|
3546
|
-
//# sourceMappingURL=chunk-
|
|
3550
|
+
//# sourceMappingURL=chunk-LUGELV2V.js.map
|