Skip to content

Commit 5d00eed

Browse files
Fully stabilize now-stable protocol properties (modelcontextprotocol#1686)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 8e7f28c commit 5d00eed

4 files changed

Lines changed: 4 additions & 162 deletions

File tree

src/ModelContextProtocol.Core/Protocol/ClientCapabilities.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.ComponentModel;
21
using System.Text.Json.Serialization;
32
using ModelContextProtocol.Client;
43
using ModelContextProtocol.Server;
@@ -83,15 +82,6 @@ public sealed class ClientCapabilities
8382
/// interoperability. Clients advertise extension support via this field during the initialization handshake.
8483
/// </para>
8584
/// </remarks>
86-
[JsonIgnore]
87-
public IDictionary<string, object>? Extensions
88-
{
89-
get => ExtensionsCore;
90-
set => ExtensionsCore = value;
91-
}
92-
93-
// See ExperimentalInternalPropertyTests.cs before modifying this property.
94-
[JsonInclude]
9585
[JsonPropertyName("extensions")]
96-
internal IDictionary<string, object>? ExtensionsCore { get; set; }
86+
public IDictionary<string, object>? Extensions { get; set; }
9787
}

src/ModelContextProtocol.Core/Protocol/RequestParams.cs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,8 @@ private protected RequestParams()
3535
/// the value is the client's response to that input request.
3636
/// </para>
3737
/// </remarks>
38-
[JsonIgnore]
39-
public IDictionary<string, InputResponse>? InputResponses
40-
{
41-
get => InputResponsesCore;
42-
set => InputResponsesCore = value;
43-
}
44-
45-
// See ExperimentalInternalPropertyTests.cs before modifying this property.
46-
[JsonInclude]
4738
[JsonPropertyName("inputResponses")]
48-
internal IDictionary<string, InputResponse>? InputResponsesCore { get; set; }
39+
public IDictionary<string, InputResponse>? InputResponses { get; set; }
4940

5041
/// <summary>
5142
/// Gets or sets opaque request state echoed back from a previous <see cref="InputRequiredResult"/>.
@@ -57,17 +48,8 @@ public IDictionary<string, InputResponse>? InputResponses
5748
/// exact value without modification.
5849
/// </para>
5950
/// </remarks>
60-
[JsonIgnore]
61-
public string? RequestState
62-
{
63-
get => RequestStateCore;
64-
set => RequestStateCore = value;
65-
}
66-
67-
// See ExperimentalInternalPropertyTests.cs before modifying this property.
68-
[JsonInclude]
6951
[JsonPropertyName("requestState")]
70-
internal string? RequestStateCore { get; set; }
52+
public string? RequestState { get; set; }
7153

7254
/// <summary>
7355
/// Gets the opaque token that will be attached to any subsequent progress notifications.

src/ModelContextProtocol.Core/Protocol/ServerCapabilities.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.ComponentModel;
21
using System.Text.Json.Serialization;
32
using ModelContextProtocol.Server;
43

@@ -81,15 +80,6 @@ public sealed class ServerCapabilities
8180
/// interoperability. Servers advertise extension support via this field during the initialization handshake.
8281
/// </para>
8382
/// </remarks>
84-
[JsonIgnore]
85-
public IDictionary<string, object>? Extensions
86-
{
87-
get => ExtensionsCore;
88-
set => ExtensionsCore = value;
89-
}
90-
91-
// See ExperimentalInternalPropertyTests.cs before modifying this property.
92-
[JsonInclude]
9383
[JsonPropertyName("extensions")]
94-
internal IDictionary<string, object>? ExtensionsCore { get; set; }
84+
public IDictionary<string, object>? Extensions { get; set; }
9585
}

tests/ModelContextProtocol.Tests/ExperimentalPropertySerializationTests.cs

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)