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
14
test/mcp/protocol_deprecations_test.rb
Normal file
14
test/mcp/protocol_deprecations_test.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
module MCP
|
||||
class ProtocolDeprecationsTest < ActiveSupport::TestCase
|
||||
test "roots, sampling, and logging are deprecated in 2026-07-28 and later" do
|
||||
refute ProtocolDeprecations.deprecated_roots_sampling_logging?(nil)
|
||||
refute ProtocolDeprecations.deprecated_roots_sampling_logging?("2025-11-25")
|
||||
assert ProtocolDeprecations.deprecated_roots_sampling_logging?("2026-07-28")
|
||||
assert ProtocolDeprecations.deprecated_roots_sampling_logging?("2027-01-01")
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue