Update protocol version
* This fixes #378 * In types.ts - set LATEST_PROTOCOL_VERSION to "2025-03-26" - add "2025-03-26" to SUPPORTED_PROTOCOL_VERSIONS * In auth.test.ts - in test "returns metadata when discovery succeeds" - expect "MCP-Protocol-Version" to be "2025-03-26"
This commit is contained in:
parent
1317767645
commit
3a9a6c944b
2 changed files with 15 additions and 14 deletions
|
|
@ -39,7 +39,7 @@ describe("OAuth Authorization", () => {
|
|||
const [url, options] = calls[0];
|
||||
expect(url.toString()).toBe("https://auth.example.com/.well-known/oauth-authorization-server");
|
||||
expect(options.headers).toEqual({
|
||||
"MCP-Protocol-Version": "2024-11-05"
|
||||
"MCP-Protocol-Version": "2025-03-26"
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -478,4 +478,4 @@ describe("OAuth Authorization", () => {
|
|||
).rejects.toThrow("Dynamic client registration failed");
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
25
src/types.ts
25
src/types.ts
|
|
@ -1,8 +1,9 @@
|
|||
import { z, ZodTypeAny } from "zod";
|
||||
|
||||
export const LATEST_PROTOCOL_VERSION = "2024-11-05";
|
||||
export const LATEST_PROTOCOL_VERSION = "2025-03-26";
|
||||
export const SUPPORTED_PROTOCOL_VERSIONS = [
|
||||
LATEST_PROTOCOL_VERSION,
|
||||
"2024-11-05",
|
||||
"2024-10-07",
|
||||
];
|
||||
|
||||
|
|
@ -754,11 +755,11 @@ export const PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|||
/* Tools */
|
||||
/**
|
||||
* Additional properties describing a Tool to clients.
|
||||
*
|
||||
* NOTE: all properties in ToolAnnotations are **hints**.
|
||||
* They are not guaranteed to provide a faithful description of
|
||||
*
|
||||
* NOTE: all properties in ToolAnnotations are **hints**.
|
||||
* They are not guaranteed to provide a faithful description of
|
||||
* tool behavior (including descriptive properties like `title`).
|
||||
*
|
||||
*
|
||||
* Clients should never make tool use decisions based on ToolAnnotations
|
||||
* received from untrusted servers.
|
||||
*/
|
||||
|
|
@ -771,7 +772,7 @@ export const ToolAnnotationsSchema = z
|
|||
|
||||
/**
|
||||
* If true, the tool does not modify its environment.
|
||||
*
|
||||
*
|
||||
* Default: false
|
||||
*/
|
||||
readOnlyHint: z.optional(z.boolean()),
|
||||
|
|
@ -779,19 +780,19 @@ export const ToolAnnotationsSchema = z
|
|||
/**
|
||||
* If true, the tool may perform destructive updates to its environment.
|
||||
* If false, the tool performs only additive updates.
|
||||
*
|
||||
*
|
||||
* (This property is meaningful only when `readOnlyHint == false`)
|
||||
*
|
||||
*
|
||||
* Default: true
|
||||
*/
|
||||
destructiveHint: z.optional(z.boolean()),
|
||||
|
||||
/**
|
||||
* If true, calling the tool repeatedly with the same arguments
|
||||
* If true, calling the tool repeatedly with the same arguments
|
||||
* will have no additional effect on the its environment.
|
||||
*
|
||||
*
|
||||
* (This property is meaningful only when `readOnlyHint == false`)
|
||||
*
|
||||
*
|
||||
* Default: false
|
||||
*/
|
||||
idempotentHint: z.optional(z.boolean()),
|
||||
|
|
@ -801,7 +802,7 @@ export const ToolAnnotationsSchema = z
|
|||
* entities. If false, the tool's domain of interaction is closed.
|
||||
* For example, the world of a web search tool is open, whereas that
|
||||
* of a memory tool is not.
|
||||
*
|
||||
*
|
||||
* Default: true
|
||||
*/
|
||||
openWorldHint: z.optional(z.boolean()),
|
||||
|
|
|
|||
Loading…
Reference in a new issue