fastmcp 4.29.2 → 4.30.1
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 +3 -3
- package/dist/FastMCP.js +2 -2
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.d.cts +22 -1
- package/dist/auth/index.d.ts +22 -1
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-TN6CWWVW.cjs → chunk-4JEDH2ON.cjs} +5 -5
- package/dist/{chunk-TN6CWWVW.cjs.map → chunk-4JEDH2ON.cjs.map} +1 -1
- package/dist/{chunk-T7EFBHCA.js → chunk-5KA6SOWT.js} +2 -2
- package/dist/{chunk-XP4NENWX.cjs → chunk-CZGQ2WTQ.cjs} +81 -30
- package/dist/chunk-CZGQ2WTQ.cjs.map +1 -0
- package/dist/{chunk-PA3GWZUK.js → chunk-XPTUOWUT.js} +82 -31
- package/dist/{chunk-PA3GWZUK.js.map → chunk-XPTUOWUT.js.map} +1 -1
- package/dist/examples/custom-routes.cjs +3 -3
- package/dist/examples/custom-routes.js +2 -2
- package/dist/openapi/index.cjs +91 -22
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.d.cts +2 -0
- package/dist/openapi/index.d.ts +2 -0
- package/dist/openapi/index.js +85 -16
- package/dist/openapi/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-XP4NENWX.cjs.map +0 -1
- /package/dist/{chunk-T7EFBHCA.js.map → chunk-5KA6SOWT.js.map} +0 -0
package/dist/FastMCP.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk4JEDH2ONcjs = require('./chunk-4JEDH2ON.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ var _chunkTN6CWWVWcjs = require('./chunk-TN6CWWVW.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkCZGQ2WTQcjs = require('./chunk-CZGQ2WTQ.cjs');
|
|
28
28
|
require('./chunk-FBDPX4H2.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
@@ -50,5 +50,5 @@ require('./chunk-FBDPX4H2.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
exports.AuthProvider =
|
|
53
|
+
exports.AuthProvider = _chunkCZGQ2WTQcjs.AuthProvider; exports.AzureProvider = _chunkCZGQ2WTQcjs.AzureProvider; exports.DiscoveryDocumentCache = _chunk4JEDH2ONcjs.DiscoveryDocumentCache; exports.FastMCP = _chunk4JEDH2ONcjs.FastMCP; exports.FastMCPError = _chunk4JEDH2ONcjs.FastMCPError; exports.FastMCPSession = _chunk4JEDH2ONcjs.FastMCPSession; exports.GitHubProvider = _chunkCZGQ2WTQcjs.GitHubProvider; exports.GoogleProvider = _chunkCZGQ2WTQcjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunk4JEDH2ONcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunkCZGQ2WTQcjs.OAuthProvider; exports.ServerState = _chunk4JEDH2ONcjs.ServerState; exports.SessionError = _chunk4JEDH2ONcjs.SessionError; exports.UnexpectedStateError = _chunk4JEDH2ONcjs.UnexpectedStateError; exports.UserError = _chunk4JEDH2ONcjs.UserError; exports.audioContent = _chunk4JEDH2ONcjs.audioContent; exports.getAuthSession = _chunkCZGQ2WTQcjs.getAuthSession; exports.imageContent = _chunk4JEDH2ONcjs.imageContent; exports.jsonSchemaAdapter = _chunk4JEDH2ONcjs.jsonSchemaAdapter; exports.requireAll = _chunkCZGQ2WTQcjs.requireAll; exports.requireAny = _chunkCZGQ2WTQcjs.requireAny; exports.requireAuth = _chunkCZGQ2WTQcjs.requireAuth; exports.requireRole = _chunkCZGQ2WTQcjs.requireRole; exports.requireScopes = _chunkCZGQ2WTQcjs.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-5KA6SOWT.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-XPTUOWUT.js";
|
|
28
28
|
import "./chunk-JCKJRUCE.js";
|
|
29
29
|
export {
|
|
30
30
|
AuthProvider,
|
package/dist/auth/index.cjs
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkCZGQ2WTQcjs = require('../chunk-CZGQ2WTQ.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -53,5 +53,5 @@ var _chunkXP4NENWXcjs = require('../chunk-XP4NENWX.cjs');
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
exports.AuthProvider =
|
|
56
|
+
exports.AuthProvider = _chunkCZGQ2WTQcjs.AuthProvider; exports.AzureProvider = _chunkCZGQ2WTQcjs.AzureProvider; exports.ConsentManager = _chunkCZGQ2WTQcjs.ConsentManager; exports.DEFAULT_ACCESS_TOKEN_TTL = _chunkCZGQ2WTQcjs.DEFAULT_ACCESS_TOKEN_TTL; exports.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH = _chunkCZGQ2WTQcjs.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH; exports.DEFAULT_AUTHORIZATION_CODE_TTL = _chunkCZGQ2WTQcjs.DEFAULT_AUTHORIZATION_CODE_TTL; exports.DEFAULT_REFRESH_TOKEN_TTL = _chunkCZGQ2WTQcjs.DEFAULT_REFRESH_TOKEN_TTL; exports.DEFAULT_TRANSACTION_TTL = _chunkCZGQ2WTQcjs.DEFAULT_TRANSACTION_TTL; exports.DiskStore = _chunkCZGQ2WTQcjs.DiskStore; exports.EncryptedTokenStorage = _chunkCZGQ2WTQcjs.EncryptedTokenStorage; exports.GitHubProvider = _chunkCZGQ2WTQcjs.GitHubProvider; exports.GoogleProvider = _chunkCZGQ2WTQcjs.GoogleProvider; exports.JWKSVerifier = _chunkCZGQ2WTQcjs.JWKSVerifier; exports.JWTIssuer = _chunkCZGQ2WTQcjs.JWTIssuer; exports.MemoryTokenStorage = _chunkCZGQ2WTQcjs.MemoryTokenStorage; exports.OAuthProvider = _chunkCZGQ2WTQcjs.OAuthProvider; exports.OAuthProxy = _chunkCZGQ2WTQcjs.OAuthProxy; exports.OAuthProxyError = _chunkCZGQ2WTQcjs.OAuthProxyError; exports.PKCEUtils = _chunkCZGQ2WTQcjs.PKCEUtils; exports.TOKEN_ENDPOINT_AUTH_METHODS = _chunkCZGQ2WTQcjs.TOKEN_ENDPOINT_AUTH_METHODS; exports.getAuthSession = _chunkCZGQ2WTQcjs.getAuthSession; exports.requireAll = _chunkCZGQ2WTQcjs.requireAll; exports.requireAny = _chunkCZGQ2WTQcjs.requireAny; exports.requireAuth = _chunkCZGQ2WTQcjs.requireAuth; exports.requireRole = _chunkCZGQ2WTQcjs.requireRole; exports.requireScopes = _chunkCZGQ2WTQcjs.requireScopes;
|
|
57
57
|
//# sourceMappingURL=index.cjs.map
|
package/dist/auth/index.d.cts
CHANGED
|
@@ -129,9 +129,30 @@ declare class DiskStore implements TokenStorage {
|
|
|
129
129
|
*/
|
|
130
130
|
private ensureDirectory;
|
|
131
131
|
/**
|
|
132
|
-
* Get file path for a key
|
|
132
|
+
* Get file path for a key.
|
|
133
|
+
*
|
|
134
|
+
* The file name must not let a key escape the directory, and distinct keys
|
|
135
|
+
* must get distinct files, also on case-insensitive filesystems (the macOS
|
|
136
|
+
* and Windows defaults). Lowercase letters, digits and `-` are kept; every
|
|
137
|
+
* other UTF-8 byte, uppercase letters and `_` included, becomes `_` and two
|
|
138
|
+
* lowercase hex digits, so neither `client:a.b` and `client:a_b` nor
|
|
139
|
+
* `code:A` and `code:a` share a file. Names that would get too long for
|
|
140
|
+
* common filesystems are replaced by a SHA-256 digest, under a prefix the
|
|
141
|
+
* escaping above never produces.
|
|
133
142
|
*/
|
|
134
143
|
private getFilePath;
|
|
144
|
+
/**
|
|
145
|
+
* The paths a key's entry may be stored at: its current file, then the
|
|
146
|
+
* file name earlier versions used. The earlier scheme replaced every other
|
|
147
|
+
* character with `_`, so distinct keys could share a file; it is still read
|
|
148
|
+
* so that entries persisted before an upgrade survive it.
|
|
149
|
+
*/
|
|
150
|
+
private getFilePaths;
|
|
151
|
+
/**
|
|
152
|
+
* The file name earlier versions stored a key under, or `undefined` when
|
|
153
|
+
* that name is too long to have ever been written.
|
|
154
|
+
*/
|
|
155
|
+
private getLegacyFilePath;
|
|
135
156
|
/**
|
|
136
157
|
* Windows can temporarily deny replacing a file that is being read. Retry
|
|
137
158
|
* the atomic rename, never deleting the previous entry to make room. Five
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -129,9 +129,30 @@ declare class DiskStore implements TokenStorage {
|
|
|
129
129
|
*/
|
|
130
130
|
private ensureDirectory;
|
|
131
131
|
/**
|
|
132
|
-
* Get file path for a key
|
|
132
|
+
* Get file path for a key.
|
|
133
|
+
*
|
|
134
|
+
* The file name must not let a key escape the directory, and distinct keys
|
|
135
|
+
* must get distinct files, also on case-insensitive filesystems (the macOS
|
|
136
|
+
* and Windows defaults). Lowercase letters, digits and `-` are kept; every
|
|
137
|
+
* other UTF-8 byte, uppercase letters and `_` included, becomes `_` and two
|
|
138
|
+
* lowercase hex digits, so neither `client:a.b` and `client:a_b` nor
|
|
139
|
+
* `code:A` and `code:a` share a file. Names that would get too long for
|
|
140
|
+
* common filesystems are replaced by a SHA-256 digest, under a prefix the
|
|
141
|
+
* escaping above never produces.
|
|
133
142
|
*/
|
|
134
143
|
private getFilePath;
|
|
144
|
+
/**
|
|
145
|
+
* The paths a key's entry may be stored at: its current file, then the
|
|
146
|
+
* file name earlier versions used. The earlier scheme replaced every other
|
|
147
|
+
* character with `_`, so distinct keys could share a file; it is still read
|
|
148
|
+
* so that entries persisted before an upgrade survive it.
|
|
149
|
+
*/
|
|
150
|
+
private getFilePaths;
|
|
151
|
+
/**
|
|
152
|
+
* The file name earlier versions stored a key under, or `undefined` when
|
|
153
|
+
* that name is too long to have ever been written.
|
|
154
|
+
*/
|
|
155
|
+
private getLegacyFilePath;
|
|
135
156
|
/**
|
|
136
157
|
* Windows can temporarily deny replacing a file that is being read. Retry
|
|
137
158
|
* the atomic rename, never deleting the previous entry to make room. Five
|
package/dist/auth/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCZGQ2WTQcjs = require('./chunk-CZGQ2WTQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -141,7 +141,7 @@ var DiscoveryDocumentCache = class {
|
|
|
141
141
|
throw error;
|
|
142
142
|
}
|
|
143
143
|
if (!res.ok) {
|
|
144
|
-
await
|
|
144
|
+
await _chunkCZGQ2WTQcjs.cancelResponseBody.call(void 0, res);
|
|
145
145
|
throw new Error(
|
|
146
146
|
`Failed to fetch discovery document from ${url}: ${res.status} ${res.statusText}`
|
|
147
147
|
);
|
|
@@ -258,7 +258,7 @@ var imageContent = async (input) => {
|
|
|
258
258
|
signal: AbortSignal.timeout(timeoutMs)
|
|
259
259
|
});
|
|
260
260
|
if (!response.ok) {
|
|
261
|
-
await
|
|
261
|
+
await _chunkCZGQ2WTQcjs.cancelResponseBody.call(void 0, response);
|
|
262
262
|
throw new Error(
|
|
263
263
|
`Server responded with status: ${response.status} - ${response.statusText}`
|
|
264
264
|
);
|
|
@@ -340,7 +340,7 @@ var audioContent = async (input) => {
|
|
|
340
340
|
signal: AbortSignal.timeout(timeoutMs)
|
|
341
341
|
});
|
|
342
342
|
if (!response.ok) {
|
|
343
|
-
await
|
|
343
|
+
await _chunkCZGQ2WTQcjs.cancelResponseBody.call(void 0, response);
|
|
344
344
|
throw new Error(
|
|
345
345
|
`Server responded with status: ${response.status} - ${response.statusText}`
|
|
346
346
|
);
|
|
@@ -3699,4 +3699,4 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
3699
3699
|
|
|
3700
3700
|
|
|
3701
3701
|
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;
|
|
3702
|
-
//# sourceMappingURL=chunk-
|
|
3702
|
+
//# sourceMappingURL=chunk-4JEDH2ON.cjs.map
|