fastmcp 4.22.4 → 4.22.6
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 +4 -2
- 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-XPKMA7DH.js → chunk-ISYL7EKR.js} +5 -2
- package/dist/{chunk-XPKMA7DH.js.map → chunk-ISYL7EKR.js.map} +1 -1
- package/dist/{chunk-TFX7BV4K.js → chunk-OAM6AYJY.js} +28 -10
- package/dist/chunk-OAM6AYJY.js.map +1 -0
- package/dist/{chunk-V37MCHBL.cjs → chunk-QJIFKZYZ.cjs} +31 -13
- package/dist/chunk-QJIFKZYZ.cjs.map +1 -0
- package/dist/{chunk-YOBCXNFP.cjs → chunk-YLLBANV4.cjs} +5 -2
- package/dist/chunk-YLLBANV4.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 +29 -17
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.js +15 -3
- package/dist/openapi/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-TFX7BV4K.js.map +0 -1
- package/dist/chunk-V37MCHBL.cjs.map +0 -1
- package/dist/chunk-YOBCXNFP.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -518,10 +518,10 @@ You can also enable stateless mode using CLI arguments or environment variables:
|
|
|
518
518
|
|
|
519
519
|
```bash
|
|
520
520
|
# Via CLI argument
|
|
521
|
-
npx
|
|
521
|
+
npx tsx src/server.ts --transport http-stream --port 8080 --stateless true
|
|
522
522
|
|
|
523
523
|
# Via environment variable
|
|
524
|
-
FASTMCP_STATELESS=true npx
|
|
524
|
+
FASTMCP_TRANSPORT=httpStream FASTMCP_STATELESS=true npx tsx src/server.ts
|
|
525
525
|
```
|
|
526
526
|
|
|
527
527
|
The `/ready` health check endpoint will indicate when the server is running in stateless mode:
|
|
@@ -1653,6 +1653,8 @@ server.addResourceTemplate({
|
|
|
1653
1653
|
|
|
1654
1654
|
Like plain resources, `load` also receives `auth` and `context` as its second and third arguments (see [Resources](#resources)).
|
|
1655
1655
|
|
|
1656
|
+
A `{name}` expression matches within one path segment, as in RFC 6570, so `file:///logs/a/b.log` does not match the template above. Use `{+name}` for a value that spans segments, e.g. `file:///{+path}`. Values arrive percent-decoded (`file:///logs/..%2Fsecret.log` gives `name: "../secret"`), so validate them before using them as paths.
|
|
1657
|
+
|
|
1656
1658
|
#### Resource template argument auto-completion
|
|
1657
1659
|
|
|
1658
1660
|
Provide `complete` functions for resource template arguments to enable automatic completion:
|
package/dist/FastMCP.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkQJIFKZYZcjs = require('./chunk-QJIFKZYZ.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ var _chunkV37MCHBLcjs = require('./chunk-V37MCHBL.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkYLLBANV4cjs = require('./chunk-YLLBANV4.cjs');
|
|
28
28
|
require('./chunk-O22SYZMC.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
@@ -50,5 +50,5 @@ require('./chunk-O22SYZMC.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
exports.AuthProvider =
|
|
53
|
+
exports.AuthProvider = _chunkYLLBANV4cjs.AuthProvider; exports.AzureProvider = _chunkYLLBANV4cjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkQJIFKZYZcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkQJIFKZYZcjs.FastMCP; exports.FastMCPError = _chunkQJIFKZYZcjs.FastMCPError; exports.FastMCPSession = _chunkQJIFKZYZcjs.FastMCPSession; exports.GitHubProvider = _chunkYLLBANV4cjs.GitHubProvider; exports.GoogleProvider = _chunkYLLBANV4cjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkQJIFKZYZcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunkYLLBANV4cjs.OAuthProvider; exports.ServerState = _chunkQJIFKZYZcjs.ServerState; exports.SessionError = _chunkQJIFKZYZcjs.SessionError; exports.UnexpectedStateError = _chunkQJIFKZYZcjs.UnexpectedStateError; exports.UserError = _chunkQJIFKZYZcjs.UserError; exports.audioContent = _chunkQJIFKZYZcjs.audioContent; exports.getAuthSession = _chunkYLLBANV4cjs.getAuthSession; exports.imageContent = _chunkQJIFKZYZcjs.imageContent; exports.jsonSchemaAdapter = _chunkQJIFKZYZcjs.jsonSchemaAdapter; exports.requireAll = _chunkYLLBANV4cjs.requireAll; exports.requireAny = _chunkYLLBANV4cjs.requireAny; exports.requireAuth = _chunkYLLBANV4cjs.requireAuth; exports.requireRole = _chunkYLLBANV4cjs.requireRole; exports.requireScopes = _chunkYLLBANV4cjs.requireScopes;
|
|
54
54
|
//# sourceMappingURL=FastMCP.cjs.map
|
package/dist/FastMCP.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
audioContent,
|
|
12
12
|
imageContent,
|
|
13
13
|
jsonSchemaAdapter
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OAM6AYJY.js";
|
|
15
15
|
import {
|
|
16
16
|
AuthProvider,
|
|
17
17
|
AzureProvider,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
requireAuth,
|
|
25
25
|
requireRole,
|
|
26
26
|
requireScopes
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ISYL7EKR.js";
|
|
28
28
|
import "./chunk-UMDUIBFW.js";
|
|
29
29
|
export {
|
|
30
30
|
AuthProvider,
|
package/dist/auth/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkYLLBANV4cjs = require('../chunk-YLLBANV4.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -51,5 +51,5 @@ var _chunkYOBCXNFPcjs = require('../chunk-YOBCXNFP.cjs');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
exports.AuthProvider =
|
|
54
|
+
exports.AuthProvider = _chunkYLLBANV4cjs.AuthProvider; exports.AzureProvider = _chunkYLLBANV4cjs.AzureProvider; exports.ConsentManager = _chunkYLLBANV4cjs.ConsentManager; exports.DEFAULT_ACCESS_TOKEN_TTL = _chunkYLLBANV4cjs.DEFAULT_ACCESS_TOKEN_TTL; exports.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH = _chunkYLLBANV4cjs.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH; exports.DEFAULT_AUTHORIZATION_CODE_TTL = _chunkYLLBANV4cjs.DEFAULT_AUTHORIZATION_CODE_TTL; exports.DEFAULT_REFRESH_TOKEN_TTL = _chunkYLLBANV4cjs.DEFAULT_REFRESH_TOKEN_TTL; exports.DEFAULT_TRANSACTION_TTL = _chunkYLLBANV4cjs.DEFAULT_TRANSACTION_TTL; exports.DiskStore = _chunkYLLBANV4cjs.DiskStore; exports.EncryptedTokenStorage = _chunkYLLBANV4cjs.EncryptedTokenStorage; exports.GitHubProvider = _chunkYLLBANV4cjs.GitHubProvider; exports.GoogleProvider = _chunkYLLBANV4cjs.GoogleProvider; exports.JWKSVerifier = _chunkYLLBANV4cjs.JWKSVerifier; exports.JWTIssuer = _chunkYLLBANV4cjs.JWTIssuer; exports.MemoryTokenStorage = _chunkYLLBANV4cjs.MemoryTokenStorage; exports.OAuthProvider = _chunkYLLBANV4cjs.OAuthProvider; exports.OAuthProxy = _chunkYLLBANV4cjs.OAuthProxy; exports.OAuthProxyError = _chunkYLLBANV4cjs.OAuthProxyError; exports.PKCEUtils = _chunkYLLBANV4cjs.PKCEUtils; exports.getAuthSession = _chunkYLLBANV4cjs.getAuthSession; exports.requireAll = _chunkYLLBANV4cjs.requireAll; exports.requireAny = _chunkYLLBANV4cjs.requireAny; exports.requireAuth = _chunkYLLBANV4cjs.requireAuth; exports.requireRole = _chunkYLLBANV4cjs.requireRole; exports.requireScopes = _chunkYLLBANV4cjs.requireScopes;
|
|
55
55
|
//# sourceMappingURL=index.cjs.map
|
package/dist/auth/index.js
CHANGED
|
@@ -2876,12 +2876,15 @@ var DiskStore = class {
|
|
|
2876
2876
|
expiresAt,
|
|
2877
2877
|
value
|
|
2878
2878
|
};
|
|
2879
|
+
const tempPath = `${filePath}.${randomUUID()}.tmp`;
|
|
2879
2880
|
try {
|
|
2880
|
-
await writeFile(
|
|
2881
|
+
await writeFile(tempPath, JSON.stringify(entry, null, 2), {
|
|
2881
2882
|
encoding: "utf-8",
|
|
2882
2883
|
mode: 384
|
|
2883
2884
|
});
|
|
2885
|
+
await rename(tempPath, filePath);
|
|
2884
2886
|
} catch (error) {
|
|
2887
|
+
await rm(tempPath, { force: true });
|
|
2885
2888
|
console.error(`Failed to save key ${key}:`, error);
|
|
2886
2889
|
throw error;
|
|
2887
2890
|
}
|
|
@@ -3119,4 +3122,4 @@ export {
|
|
|
3119
3122
|
DiskStore,
|
|
3120
3123
|
JWKSVerifier
|
|
3121
3124
|
};
|
|
3122
|
-
//# sourceMappingURL=chunk-
|
|
3125
|
+
//# sourceMappingURL=chunk-ISYL7EKR.js.map
|