fastmcp 4.23.8 → 4.23.10
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 +4 -4
- package/dist/FastMCP.d.cts +2 -1
- package/dist/FastMCP.d.ts +2 -1
- package/dist/FastMCP.js +3 -3
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-AJRXMUZR.cjs → chunk-4OWHPJEL.cjs} +9 -2
- package/dist/chunk-4OWHPJEL.cjs.map +1 -0
- package/dist/{chunk-T2F3RYH2.cjs → chunk-6TDYSPLC.cjs} +3 -3
- package/dist/chunk-6TDYSPLC.cjs.map +1 -0
- package/dist/{chunk-XEP3OP7Q.cjs → chunk-B77E3EDN.cjs} +164 -93
- package/dist/chunk-B77E3EDN.cjs.map +1 -0
- package/dist/{chunk-PLUAEIWE.js → chunk-EHTAPWBU.js} +118 -47
- package/dist/chunk-EHTAPWBU.js.map +1 -0
- package/dist/{chunk-UY253ACS.js → chunk-G44SPVP7.js} +9 -2
- package/dist/chunk-G44SPVP7.js.map +1 -0
- package/dist/{chunk-F76U45MT.js → chunk-OKKFL2M4.js} +3 -3
- package/dist/chunk-OKKFL2M4.js.map +1 -0
- package/dist/edge/index.cjs +8 -4
- package/dist/edge/index.cjs.map +1 -1
- package/dist/edge/index.js +6 -2
- package/dist/edge/index.js.map +1 -1
- package/dist/examples/custom-routes.cjs +4 -4
- package/dist/examples/custom-routes.js +3 -3
- package/dist/openapi/index.cjs +8 -8
- package/dist/openapi/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-AJRXMUZR.cjs.map +0 -1
- package/dist/chunk-F76U45MT.js.map +0 -1
- package/dist/chunk-PLUAEIWE.js.map +0 -1
- package/dist/chunk-T2F3RYH2.cjs.map +0 -1
- package/dist/chunk-UY253ACS.js.map +0 -1
- package/dist/chunk-XEP3OP7Q.cjs.map +0 -1
package/dist/FastMCP.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkB77E3EDNcjs = require('./chunk-B77E3EDN.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -24,8 +24,8 @@ var _chunkXEP3OP7Qcjs = require('./chunk-XEP3OP7Q.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
28
|
-
require('./chunk-
|
|
27
|
+
var _chunk4OWHPJELcjs = require('./chunk-4OWHPJEL.cjs');
|
|
28
|
+
require('./chunk-6TDYSPLC.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -50,5 +50,5 @@ require('./chunk-T2F3RYH2.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
exports.AuthProvider =
|
|
53
|
+
exports.AuthProvider = _chunk4OWHPJELcjs.AuthProvider; exports.AzureProvider = _chunk4OWHPJELcjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkB77E3EDNcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkB77E3EDNcjs.FastMCP; exports.FastMCPError = _chunkB77E3EDNcjs.FastMCPError; exports.FastMCPSession = _chunkB77E3EDNcjs.FastMCPSession; exports.GitHubProvider = _chunk4OWHPJELcjs.GitHubProvider; exports.GoogleProvider = _chunk4OWHPJELcjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkB77E3EDNcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunk4OWHPJELcjs.OAuthProvider; exports.ServerState = _chunkB77E3EDNcjs.ServerState; exports.SessionError = _chunkB77E3EDNcjs.SessionError; exports.UnexpectedStateError = _chunkB77E3EDNcjs.UnexpectedStateError; exports.UserError = _chunkB77E3EDNcjs.UserError; exports.audioContent = _chunkB77E3EDNcjs.audioContent; exports.getAuthSession = _chunk4OWHPJELcjs.getAuthSession; exports.imageContent = _chunkB77E3EDNcjs.imageContent; exports.jsonSchemaAdapter = _chunkB77E3EDNcjs.jsonSchemaAdapter; exports.requireAll = _chunk4OWHPJELcjs.requireAll; exports.requireAny = _chunk4OWHPJELcjs.requireAny; exports.requireAuth = _chunk4OWHPJELcjs.requireAuth; exports.requireRole = _chunk4OWHPJELcjs.requireRole; exports.requireScopes = _chunk4OWHPJELcjs.requireScopes;
|
|
54
54
|
//# sourceMappingURL=FastMCP.cjs.map
|
package/dist/FastMCP.d.cts
CHANGED
|
@@ -486,7 +486,8 @@ type ServerOptions<T extends FastMCPSessionAuth> = {
|
|
|
486
486
|
icons?: Icon[];
|
|
487
487
|
instructions?: string;
|
|
488
488
|
/**
|
|
489
|
-
* Custom logger instance.
|
|
489
|
+
* Custom logger instance. Defaults to console, with stdio session diagnostics
|
|
490
|
+
* written to stderr.
|
|
490
491
|
* Use this to integrate with your own logging system.
|
|
491
492
|
*/
|
|
492
493
|
logger?: Logger;
|
package/dist/FastMCP.d.ts
CHANGED
|
@@ -486,7 +486,8 @@ type ServerOptions<T extends FastMCPSessionAuth> = {
|
|
|
486
486
|
icons?: Icon[];
|
|
487
487
|
instructions?: string;
|
|
488
488
|
/**
|
|
489
|
-
* Custom logger instance.
|
|
489
|
+
* Custom logger instance. Defaults to console, with stdio session diagnostics
|
|
490
|
+
* written to stderr.
|
|
490
491
|
* Use this to integrate with your own logging system.
|
|
491
492
|
*/
|
|
492
493
|
logger?: Logger;
|
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-EHTAPWBU.js";
|
|
15
15
|
import {
|
|
16
16
|
AuthProvider,
|
|
17
17
|
AzureProvider,
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
requireAuth,
|
|
25
25
|
requireRole,
|
|
26
26
|
requireScopes
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-G44SPVP7.js";
|
|
28
|
+
import "./chunk-OKKFL2M4.js";
|
|
29
29
|
export {
|
|
30
30
|
AuthProvider,
|
|
31
31
|
AzureProvider,
|
package/dist/auth/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk4OWHPJELcjs = require('../chunk-4OWHPJEL.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -51,5 +51,5 @@ var _chunkAJRXMUZRcjs = require('../chunk-AJRXMUZR.cjs');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
exports.AuthProvider =
|
|
54
|
+
exports.AuthProvider = _chunk4OWHPJELcjs.AuthProvider; exports.AzureProvider = _chunk4OWHPJELcjs.AzureProvider; exports.ConsentManager = _chunk4OWHPJELcjs.ConsentManager; exports.DEFAULT_ACCESS_TOKEN_TTL = _chunk4OWHPJELcjs.DEFAULT_ACCESS_TOKEN_TTL; exports.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH = _chunk4OWHPJELcjs.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH; exports.DEFAULT_AUTHORIZATION_CODE_TTL = _chunk4OWHPJELcjs.DEFAULT_AUTHORIZATION_CODE_TTL; exports.DEFAULT_REFRESH_TOKEN_TTL = _chunk4OWHPJELcjs.DEFAULT_REFRESH_TOKEN_TTL; exports.DEFAULT_TRANSACTION_TTL = _chunk4OWHPJELcjs.DEFAULT_TRANSACTION_TTL; exports.DiskStore = _chunk4OWHPJELcjs.DiskStore; exports.EncryptedTokenStorage = _chunk4OWHPJELcjs.EncryptedTokenStorage; exports.GitHubProvider = _chunk4OWHPJELcjs.GitHubProvider; exports.GoogleProvider = _chunk4OWHPJELcjs.GoogleProvider; exports.JWKSVerifier = _chunk4OWHPJELcjs.JWKSVerifier; exports.JWTIssuer = _chunk4OWHPJELcjs.JWTIssuer; exports.MemoryTokenStorage = _chunk4OWHPJELcjs.MemoryTokenStorage; exports.OAuthProvider = _chunk4OWHPJELcjs.OAuthProvider; exports.OAuthProxy = _chunk4OWHPJELcjs.OAuthProxy; exports.OAuthProxyError = _chunk4OWHPJELcjs.OAuthProxyError; exports.PKCEUtils = _chunk4OWHPJELcjs.PKCEUtils; exports.getAuthSession = _chunk4OWHPJELcjs.getAuthSession; exports.requireAll = _chunk4OWHPJELcjs.requireAll; exports.requireAny = _chunk4OWHPJELcjs.requireAny; exports.requireAuth = _chunk4OWHPJELcjs.requireAuth; exports.requireRole = _chunk4OWHPJELcjs.requireRole; exports.requireScopes = _chunk4OWHPJELcjs.requireScopes;
|
|
55
55
|
//# sourceMappingURL=index.cjs.map
|
package/dist/auth/index.js
CHANGED
|
@@ -1441,6 +1441,12 @@ var OAuthProxy = (_class4 = class {
|
|
|
1441
1441
|
"code_challenge_method required when code_challenge is present"
|
|
1442
1442
|
);
|
|
1443
1443
|
}
|
|
1444
|
+
if (params.code_challenge && params.code_challenge_method !== "S256" && params.code_challenge_method !== "plain") {
|
|
1445
|
+
throw new OAuthProxyError(
|
|
1446
|
+
"invalid_request",
|
|
1447
|
+
`code_challenge_method '${params.code_challenge_method}' is not supported; use S256`
|
|
1448
|
+
);
|
|
1449
|
+
}
|
|
1444
1450
|
if (params.code_challenge_method === "plain" && !this.config.allowPlainPkce) {
|
|
1445
1451
|
throw new OAuthProxyError(
|
|
1446
1452
|
"invalid_request",
|
|
@@ -2615,9 +2621,10 @@ var AuthProvider = class {
|
|
|
2615
2621
|
* Override in subclasses to add provider-specific session data.
|
|
2616
2622
|
*/
|
|
2617
2623
|
createSession(upstreamTokens) {
|
|
2624
|
+
const issuedAt = new Date(upstreamTokens.issuedAt).getTime() || Date.now();
|
|
2618
2625
|
return {
|
|
2619
2626
|
accessToken: upstreamTokens.accessToken,
|
|
2620
|
-
expiresAt: upstreamTokens.expiresIn ? Math.floor(
|
|
2627
|
+
expiresAt: upstreamTokens.expiresIn ? Math.floor(issuedAt / 1e3) + upstreamTokens.expiresIn : void 0,
|
|
2621
2628
|
idToken: upstreamTokens.idToken,
|
|
2622
2629
|
refreshToken: upstreamTokens.refreshToken,
|
|
2623
2630
|
scopes: upstreamTokens.scope
|
|
@@ -3146,4 +3153,4 @@ Original error: ${error.message}`
|
|
|
3146
3153
|
|
|
3147
3154
|
|
|
3148
3155
|
exports.cancelResponseBody = cancelResponseBody; exports.getAuthSession = getAuthSession; exports.requireAll = requireAll; exports.requireAny = requireAny; exports.requireAuth = requireAuth; exports.requireRole = requireRole; exports.requireScopes = requireScopes; exports.DEFAULT_ACCESS_TOKEN_TTL = DEFAULT_ACCESS_TOKEN_TTL; exports.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH = DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH; exports.DEFAULT_REFRESH_TOKEN_TTL = DEFAULT_REFRESH_TOKEN_TTL; exports.DEFAULT_AUTHORIZATION_CODE_TTL = DEFAULT_AUTHORIZATION_CODE_TTL; exports.DEFAULT_TRANSACTION_TTL = DEFAULT_TRANSACTION_TTL; exports.ConsentManager = ConsentManager; exports.JWTIssuer = JWTIssuer; exports.PKCEUtils = PKCEUtils; exports.EncryptedTokenStorage = EncryptedTokenStorage; exports.MemoryTokenStorage = MemoryTokenStorage; exports.OAuthProxy = OAuthProxy; exports.OAuthProxyError = OAuthProxyError; exports.AuthProvider = AuthProvider; exports.AzureProvider = AzureProvider; exports.GitHubProvider = GitHubProvider; exports.GoogleProvider = GoogleProvider; exports.OAuthProvider = OAuthProvider; exports.DiskStore = DiskStore; exports.JWKSVerifier = JWKSVerifier;
|
|
3149
|
-
//# sourceMappingURL=chunk-
|
|
3156
|
+
//# sourceMappingURL=chunk-4OWHPJEL.cjs.map
|