Fully stabilize now-stable protocol properties (#1686)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Eirik Tsarpalis 2026-07-01 22:44:19 +03:00 • committed by GitHub
commit 5d00eedebb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 162 deletions

View file

@ -1,4 +1,3 @@
using System.ComponentModel;
using System.Text.Json.Serialization;
using ModelContextProtocol.Client;
using ModelContextProtocol.Server;
@ -83,15 +82,6 @@ public sealed class ClientCapabilities
/// interoperability. Clients advertise extension support via this field during the initialization handshake.
/// </para>
/// </remarks>
[JsonIgnore]
public IDictionary<string, object>? Extensions
{
get => ExtensionsCore;
set => ExtensionsCore = value;
}
// See ExperimentalInternalPropertyTests.cs before modifying this property.
[JsonInclude]
[JsonPropertyName("extensions")]
internal IDictionary<string, object>? ExtensionsCore { get; set; }
public IDictionary<string, object>? Extensions { get; set; }
}

View file

@ -35,17 +35,8 @@ public abstract class RequestParams
/// the value is the client's response to that input request.
/// </para>
/// </remarks>
[JsonIgnore]
public IDictionary<string, InputResponse>? InputResponses
{
get => InputResponsesCore;
set => InputResponsesCore = value;
}
// See ExperimentalInternalPropertyTests.cs before modifying this property.
[JsonInclude]
[JsonPropertyName("inputResponses")]
internal IDictionary<string, InputResponse>? InputResponsesCore { get; set; }
public IDictionary<string, InputResponse>? InputResponses { get; set; }
/// <summary>
/// Gets or sets opaque request state echoed back from a previous <see cref="InputRequiredResult"/>.
@ -57,17 +48,8 @@ public abstract class RequestParams
/// exact value without modification.
/// </para>
/// </remarks>
[JsonIgnore]
public string? RequestState
{
get => RequestStateCore;
set => RequestStateCore = value;
}
// See ExperimentalInternalPropertyTests.cs before modifying this property.
[JsonInclude]
[JsonPropertyName("requestState")]
internal string? RequestStateCore { get; set; }
public string? RequestState { get; set; }
/// <summary>
/// Gets the opaque token that will be attached to any subsequent progress notifications.

View file

@ -1,4 +1,3 @@
using System.ComponentModel;
using System.Text.Json.Serialization;
using ModelContextProtocol.Server;
@ -81,15 +80,6 @@ public sealed class ServerCapabilities
/// interoperability. Servers advertise extension support via this field during the initialization handshake.
/// </para>
/// </remarks>
[JsonIgnore]
public IDictionary<string, object>? Extensions
{
get => ExtensionsCore;
set => ExtensionsCore = value;
}
// See ExperimentalInternalPropertyTests.cs before modifying this property.
[JsonInclude]
[JsonPropertyName("extensions")]
internal IDictionary<string, object>? ExtensionsCore { get; set; }
public IDictionary<string, object>? Extensions { get; set; }
}