feat: deprecate roots sampling and logging
Warn when Roots, Sampling, or Logging APIs are used with MCP protocol version 2026-07-28 or newer. Add a shared protocol deprecation helper, YARD deprecation notes, and regression tests covering warnings at and after the deprecation threshold and no warnings for older or never-established protocol versions. Closes https://github.com/modelcontextprotocol/ruby-sdk/issues/390 Co-authored-by: Qlaw <noreply@qlaw.quick.shopify.io>
This commit is contained in:
parent
f4d939d349
commit
6a43d3d6fb
1 changed files with 508 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ require "securerandom"
|
|||
require_relative "../../json_rpc_handler"
|
||||
require_relative "../configuration"
|
||||
require_relative "../methods"
|
||||
require_relative "../protocol_deprecations"
|
||||
require_relative "../version"
|
||||
|
||||
module MCP
|
||||
|
|
@ -334,6 +335,8 @@ module MCP
|
|||
)
|
||||
end
|
||||
|
||||
MCP::ProtocolDeprecations.warn_for_client_capabilities(capabilities, protocol_version: negotiated_protocol_version, uplevel: 1)
|
||||
|
||||
begin
|
||||
send_request(request: {
|
||||
jsonrpc: JsonRpcHandler::Version::V2_0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue