feat: deprecate roots/sampling/logging types (#923)

This commit is contained in:
Dale Seo 2026-06-25 21:11:59 -04:00 • committed by GitHub
commit d1cabb458f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 130 additions and 6 deletions

View file

@ -1,3 +1,5 @@
// Sampling/Roots/Logging are SEP-2577-deprecated; this test handler exercises them.
#![expect(deprecated)]
use std::{
future::Future,
sync::{Arc, Mutex},

View file

@ -1,5 +1,6 @@
//cargo test --test test_message_protocol --features "client server"
#![cfg(not(feature = "local"))]
#![expect(deprecated)] // exercises SEP-2577-deprecated Sampling/Roots/Logging types
mod common;
use common::handlers::{TestClientHandler, TestServer};

View file

@ -494,6 +494,7 @@
]
}
},
"deprecated": true,
"required": [
"model",
"role",
@ -1152,6 +1153,7 @@
}
}
},
"deprecated": true,
"required": [
"roots"
]
@ -1169,6 +1171,7 @@
"LoggingLevel": {
"description": "Logging levels supported by the MCP protocol",
"type": "string",
"deprecated": true,
"enum": [
"debug",
"info",
@ -1894,6 +1897,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"uri"
]
@ -1953,6 +1957,7 @@
},
"SamplingMessageContentBlock": {
"description": "Content types for sampling messages (SEP-1577).",
"deprecated": true,
"oneOf": [
{
"type": "object",
@ -2082,6 +2087,7 @@
]
}
},
"deprecated": true,
"required": [
"level"
]
@ -2357,6 +2363,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"toolUseId",
"content"
@ -2384,6 +2391,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"id",
"name",

View file

@ -494,6 +494,7 @@
]
}
},
"deprecated": true,
"required": [
"model",
"role",
@ -1152,6 +1153,7 @@
}
}
},
"deprecated": true,
"required": [
"roots"
]
@ -1169,6 +1171,7 @@
"LoggingLevel": {
"description": "Logging levels supported by the MCP protocol",
"type": "string",
"deprecated": true,
"enum": [
"debug",
"info",
@ -1894,6 +1897,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"uri"
]
@ -1953,6 +1957,7 @@
},
"SamplingMessageContentBlock": {
"description": "Content types for sampling messages (SEP-1577).",
"deprecated": true,
"oneOf": [
{
"type": "object",
@ -2082,6 +2087,7 @@
]
}
},
"deprecated": true,
"required": [
"level"
]
@ -2357,6 +2363,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"toolUseId",
"content"
@ -2384,6 +2391,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"id",
"name",

View file

@ -565,6 +565,7 @@
}
}
},
"deprecated": true,
"required": [
"messages",
"maxTokens"
@ -1577,6 +1578,7 @@
"LoggingLevel": {
"description": "Logging levels supported by the MCP protocol",
"type": "string",
"deprecated": true,
"enum": [
"debug",
"info",
@ -1623,6 +1625,7 @@
]
}
},
"deprecated": true,
"required": [
"level",
"data"
@ -1639,7 +1642,8 @@
"null"
]
}
}
},
"deprecated": true
},
"ModelPreferences": {
"description": "Preferences for model selection and behavior in sampling requests.\n\nThis allows servers to express their preferences for which model to use\nand how to balance different priorities when the client has multiple\nmodel options available.",
@ -1679,7 +1683,8 @@
],
"format": "float"
}
}
},
"deprecated": true
},
"MultiSelectEnumSchema": {
"description": "Multi-select enum options",
@ -2494,6 +2499,7 @@
]
}
},
"deprecated": true,
"required": [
"role",
"content"
@ -2501,6 +2507,7 @@
},
"SamplingMessageContentBlock": {
"description": "Content types for sampling messages (SEP-1577).",
"deprecated": true,
"oneOf": [
{
"type": "object",
@ -3379,7 +3386,8 @@
}
]
}
}
},
"deprecated": true
},
"ToolChoiceMode": {
"description": "Tool selection mode (SEP-1577).",
@ -3457,6 +3465,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"toolUseId",
"content"
@ -3484,6 +3493,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"id",
"name",

View file

@ -565,6 +565,7 @@
}
}
},
"deprecated": true,
"required": [
"messages",
"maxTokens"
@ -1577,6 +1578,7 @@
"LoggingLevel": {
"description": "Logging levels supported by the MCP protocol",
"type": "string",
"deprecated": true,
"enum": [
"debug",
"info",
@ -1623,6 +1625,7 @@
]
}
},
"deprecated": true,
"required": [
"level",
"data"
@ -1639,7 +1642,8 @@
"null"
]
}
}
},
"deprecated": true
},
"ModelPreferences": {
"description": "Preferences for model selection and behavior in sampling requests.\n\nThis allows servers to express their preferences for which model to use\nand how to balance different priorities when the client has multiple\nmodel options available.",
@ -1679,7 +1683,8 @@
],
"format": "float"
}
}
},
"deprecated": true
},
"MultiSelectEnumSchema": {
"description": "Multi-select enum options",
@ -2494,6 +2499,7 @@
]
}
},
"deprecated": true,
"required": [
"role",
"content"
@ -2501,6 +2507,7 @@
},
"SamplingMessageContentBlock": {
"description": "Content types for sampling messages (SEP-1577).",
"deprecated": true,
"oneOf": [
{
"type": "object",
@ -3379,7 +3386,8 @@
}
]
}
}
},
"deprecated": true
},
"ToolChoiceMode": {
"description": "Tool selection mode (SEP-1577).",
@ -3457,6 +3465,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"toolUseId",
"content"
@ -3484,6 +3493,7 @@
"type": "string"
}
},
"deprecated": true,
"required": [
"id",
"name",