Remove ExperimentalAttribute from official Extensions/Tasks/MRTR APIs and align MCPEXP001 usage (#1642)
This commit is contained in:
parent
e7b450efc1
commit
90c853103d
14 changed files with 9 additions and 62 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Serialization;
|
||||
using ModelContextProtocol.Client;
|
||||
using ModelContextProtocol.Server;
|
||||
|
|
@ -84,7 +83,6 @@ public sealed class ClientCapabilities
|
|||
/// interoperability. Clients advertise extension support via this field during the initialization handshake.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
|
||||
[JsonIgnore]
|
||||
public IDictionary<string, object>? Extensions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
|
@ -20,7 +19,6 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// parameters can be accessed via the typed accessor properties.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
|
||||
[JsonConverter(typeof(Converter))]
|
||||
public sealed class InputRequest
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace ModelContextProtocol.Protocol;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -54,7 +52,6 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
|
||||
public class InputRequiredException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.Protocol;
|
||||
|
|
@ -22,7 +21,6 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// This type is part of the Multi Round-Trip Requests (MRTR) mechanism defined in SEP-2322.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
|
||||
public sealed class InputRequiredResult : Result
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.Json.Serialization.Metadata;
|
||||
|
|
@ -21,7 +20,6 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// the corresponding <see cref="InputRequest.Method"/> key in the <see cref="InputRequiredResult.InputRequests"/> map.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
|
||||
[JsonConverter(typeof(Converter))]
|
||||
public sealed class InputResponse
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
|
@ -36,7 +35,6 @@ public abstract class RequestParams
|
|||
/// the value is the client's response to that input request.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
|
||||
[JsonIgnore]
|
||||
public IDictionary<string, InputResponse>? InputResponses
|
||||
{
|
||||
|
|
@ -59,7 +57,6 @@ public abstract class RequestParams
|
|||
/// exact value without modification.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
|
||||
[JsonIgnore]
|
||||
public string? RequestState
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Serialization;
|
||||
using ModelContextProtocol.Server;
|
||||
|
||||
|
|
@ -82,7 +81,6 @@ public sealed class ServerCapabilities
|
|||
/// interoperability. Servers advertise extension support via this field during the initialization handshake.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
|
||||
[JsonIgnore]
|
||||
public IDictionary<string, object>? Extensions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using ModelContextProtocol.Protocol;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace ModelContextProtocol.Server;
|
||||
|
|
@ -31,7 +30,6 @@ namespace ModelContextProtocol.Server;
|
|||
/// specification for details on the tasks extension.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
|
||||
public interface IMcpTaskStore
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using ModelContextProtocol.Protocol;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace ModelContextProtocol.Server;
|
||||
|
|
@ -20,7 +19,6 @@ namespace ModelContextProtocol.Server;
|
|||
/// implement a custom <see cref="IMcpTaskStore"/>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
|
||||
public class InMemoryMcpTaskStore : IMcpTaskStore
|
||||
{
|
||||
private readonly ConcurrentDictionary<string, McpTaskInfo> _tasks = new();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
using ModelContextProtocol.Protocol;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace ModelContextProtocol.Server;
|
||||
|
||||
/// <summary>
|
||||
/// Provides data for the <see cref="IMcpTaskStore.InputResponseReceived"/> event.
|
||||
/// </summary>
|
||||
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
|
||||
public sealed class InputResponseReceivedEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -600,7 +600,6 @@ public abstract partial class McpServer : McpSession
|
|||
/// <param name="taskId">The task ID in the store.</param>
|
||||
/// <param name="store">The task store to write input requests to.</param>
|
||||
/// <returns>An <see cref="IDisposable"/> that restores the previous context when disposed.</returns>
|
||||
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
|
||||
public IDisposable CreateMcpTaskScope(
|
||||
string taskId,
|
||||
IMcpTaskStore store)
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ public abstract partial class McpServer : McpSession
|
|||
/// the required feature) instead of throwing <see cref="Protocol.InputRequiredException"/>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
|
||||
public virtual bool IsMrtrSupported => false;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace ModelContextProtocol.Server;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -9,7 +7,6 @@ namespace ModelContextProtocol.Server;
|
|||
/// and <see cref="McpServer.RequestRootsAsync(ModelContextProtocol.Protocol.ListRootsRequestParams, CancellationToken)"/>
|
||||
/// are redirected through the task store as input requests rather than sent directly to the client.
|
||||
/// </summary>
|
||||
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
|
||||
internal sealed class McpTaskExecutionContext
|
||||
{
|
||||
internal static readonly AsyncLocal<McpTaskExecutionContext?> Current = new();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using ModelContextProtocol.Protocol;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace ModelContextProtocol.Server;
|
||||
|
|
@ -14,7 +13,6 @@ namespace ModelContextProtocol.Server;
|
|||
/// types (<see cref="CreateTaskResult"/>, <see cref="GetTaskResult"/>) when communicating with clients.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
|
||||
public sealed record McpTaskInfo(
|
||||
string TaskId,
|
||||
McpTaskStatus Status,
|
||||
|
|
|
|||
Loading…
Reference in a new issue