fastmcp 4.24.0 → 4.24.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/README.md CHANGED
@@ -783,7 +783,8 @@ WWW-Authenticate: Bearer error="insufficient_scope", scope="files:read files:wri
783
783
  `scope` lists the scopes the session already has plus the ones the tool needs,
784
784
  so the client can get a token with all of them and retry. `resource_metadata`
785
785
  is included when `oauth.enabled` is set. On stdio and other transports without
786
- HTTP, the call fails with a JSON-RPC error (code `-32001`) instead.
786
+ HTTP, the call fails with a JSON-RPC error instead: code `-32003`, with
787
+ `data.error` set to `"insufficient_scope"`.
787
788
 
788
789
  To hide the tool from sessions without the scopes, use
789
790
  `canAccess: requireScopes(...)` instead. Like `canAccess`, `scopes` is not
package/dist/FastMCP.cjs CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkJMH7WDO2cjs = require('./chunk-JMH7WDO2.cjs');
14
+ var _chunkXPGMRMMNcjs = require('./chunk-XPGMRMMN.cjs');
15
15
 
16
16
 
17
17
 
@@ -50,5 +50,5 @@ require('./chunk-6TDYSPLC.cjs');
50
50
 
51
51
 
52
52
 
53
- exports.AuthProvider = _chunkBV4PWTT6cjs.AuthProvider; exports.AzureProvider = _chunkBV4PWTT6cjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkJMH7WDO2cjs.DiscoveryDocumentCache; exports.FastMCP = _chunkJMH7WDO2cjs.FastMCP; exports.FastMCPError = _chunkJMH7WDO2cjs.FastMCPError; exports.FastMCPSession = _chunkJMH7WDO2cjs.FastMCPSession; exports.GitHubProvider = _chunkBV4PWTT6cjs.GitHubProvider; exports.GoogleProvider = _chunkBV4PWTT6cjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkJMH7WDO2cjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunkBV4PWTT6cjs.OAuthProvider; exports.ServerState = _chunkJMH7WDO2cjs.ServerState; exports.SessionError = _chunkJMH7WDO2cjs.SessionError; exports.UnexpectedStateError = _chunkJMH7WDO2cjs.UnexpectedStateError; exports.UserError = _chunkJMH7WDO2cjs.UserError; exports.audioContent = _chunkJMH7WDO2cjs.audioContent; exports.getAuthSession = _chunkBV4PWTT6cjs.getAuthSession; exports.imageContent = _chunkJMH7WDO2cjs.imageContent; exports.jsonSchemaAdapter = _chunkJMH7WDO2cjs.jsonSchemaAdapter; exports.requireAll = _chunkBV4PWTT6cjs.requireAll; exports.requireAny = _chunkBV4PWTT6cjs.requireAny; exports.requireAuth = _chunkBV4PWTT6cjs.requireAuth; exports.requireRole = _chunkBV4PWTT6cjs.requireRole; exports.requireScopes = _chunkBV4PWTT6cjs.requireScopes;
53
+ exports.AuthProvider = _chunkBV4PWTT6cjs.AuthProvider; exports.AzureProvider = _chunkBV4PWTT6cjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkXPGMRMMNcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkXPGMRMMNcjs.FastMCP; exports.FastMCPError = _chunkXPGMRMMNcjs.FastMCPError; exports.FastMCPSession = _chunkXPGMRMMNcjs.FastMCPSession; exports.GitHubProvider = _chunkBV4PWTT6cjs.GitHubProvider; exports.GoogleProvider = _chunkBV4PWTT6cjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkXPGMRMMNcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunkBV4PWTT6cjs.OAuthProvider; exports.ServerState = _chunkXPGMRMMNcjs.ServerState; exports.SessionError = _chunkXPGMRMMNcjs.SessionError; exports.UnexpectedStateError = _chunkXPGMRMMNcjs.UnexpectedStateError; exports.UserError = _chunkXPGMRMMNcjs.UserError; exports.audioContent = _chunkXPGMRMMNcjs.audioContent; exports.getAuthSession = _chunkBV4PWTT6cjs.getAuthSession; exports.imageContent = _chunkXPGMRMMNcjs.imageContent; exports.jsonSchemaAdapter = _chunkXPGMRMMNcjs.jsonSchemaAdapter; exports.requireAll = _chunkBV4PWTT6cjs.requireAll; exports.requireAny = _chunkBV4PWTT6cjs.requireAny; exports.requireAuth = _chunkBV4PWTT6cjs.requireAuth; exports.requireRole = _chunkBV4PWTT6cjs.requireRole; exports.requireScopes = _chunkBV4PWTT6cjs.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-5JRRZ7MN.js";
14
+ } from "./chunk-D2CVYAA5.js";
15
15
  import {
16
16
  AuthProvider,
17
17
  AzureProvider,
@@ -490,7 +490,7 @@ var LOGGING_LEVEL_SEVERITY = {
490
490
  notice: 2,
491
491
  warning: 3
492
492
  };
493
- var INSUFFICIENT_SCOPE_ERROR_CODE = -32001;
493
+ var INSUFFICIENT_SCOPE_ERROR_CODE = -32003;
494
494
  var SCOPE_TOKEN = /^[\x21\x23-\x5B\x5D-\x7E]+$/;
495
495
  var FastMCPSessionEventEmitterBase = EventEmitter;
496
496
  var ServerState = /* @__PURE__ */ ((ServerState2) => {
@@ -3514,4 +3514,4 @@ export {
3514
3514
  FastMCPSession,
3515
3515
  FastMCP
3516
3516
  };
3517
- //# sourceMappingURL=chunk-5JRRZ7MN.js.map
3517
+ //# sourceMappingURL=chunk-D2CVYAA5.js.map