Rename MCPEXP002 Subclassing_* constants to Extensibility_* (#1739)
Co-authored-by: arimu1 <19286898+arimu1@users.noreply.github.com>
This commit is contained in:
parent
dfb2205cac
commit
f2ce62ced9
10 changed files with 25 additions and 24 deletions
|
|
@ -12,7 +12,7 @@ public abstract partial class McpClient : McpSession
|
|||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="McpClient"/> class.
|
||||
/// </summary>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
protected McpClient()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public sealed class JsonRpcMessageContext
|
|||
/// Streamable HTTP transports emit this value in the <c>Mcp-Name</c> header. This enables
|
||||
/// extension methods to identify the named resource targeted by a request.
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
[JsonIgnore]
|
||||
public string? RoutingName { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// <see cref="Result"/> for the immediate result or <see cref="Alternate"/> for the alternate.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
public class ResultOrAlternate<TResult> where TResult : Result
|
||||
{
|
||||
private readonly TResult? _result;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public sealed class McpRequestFilters
|
|||
/// asynchronously, filters registered after it execute as part of that asynchronous operation.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
public IList<McpRequestInvocationFilter<CallToolRequestParams, ResultOrAlternate<CallToolResult>>> CallToolWithAlternateFilters
|
||||
{
|
||||
get => field ??= [];
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace ModelContextProtocol.Server;
|
|||
/// <param name="next">The next request handler in the pipeline for this invocation.</param>
|
||||
/// <param name="cancellationToken">The cancellation token for the current request.</param>
|
||||
/// <returns>The result of the filtered request invocation.</returns>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
public delegate ValueTask<TResult> McpRequestInvocationFilter<TParams, TResult>(
|
||||
RequestContext<TParams> context,
|
||||
McpRequestHandler<TParams, TResult> next,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public abstract partial class McpServer : McpSession
|
|||
/// On the returned facade, redirected methods skip their client-capability checks,
|
||||
/// because the alternate channel is responsible for delivering the request to the client.
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
public McpServer WithOutgoingRequestInterceptor(Func<string, JsonNode?, CancellationToken, ValueTask<JsonNode?>> interceptor)
|
||||
{
|
||||
Throw.IfNull(interceptor);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public abstract partial class McpServer : McpSession
|
|||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="McpServer"/> class.
|
||||
/// </summary>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
protected McpServer()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public sealed class McpServerHandlers
|
|||
/// </para>
|
||||
/// </remarks>
|
||||
/// <exception cref="InvalidOperationException"><see cref="CallToolHandler"/> is already set.</exception>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
public McpRequestHandler<CallToolRequestParams, ResultOrAlternate<CallToolResult>>? CallToolWithAlternateHandler
|
||||
{
|
||||
get;
|
||||
|
|
|
|||
|
|
@ -217,6 +217,6 @@ public sealed class McpServerOptions
|
|||
/// Handlers registered here take precedence over built-in handlers for the same method.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
public IList<McpServerRequestHandler>? RequestHandlers { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace ModelContextProtocol.Server;
|
|||
/// <see cref="JsonNode"/> response, giving extensions full control over request/response serialization.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
public sealed class McpServerRequestHandler
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -32,7 +32,7 @@ public sealed class McpServerRequestHandler
|
|||
/// When set, Streamable HTTP servers require the request to include an <c>Mcp-Name</c>
|
||||
/// header whose decoded value matches the string value of this parameter.
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Subclassing_DiagnosticId, UrlFormat = Experimentals.Subclassing_Url)]
|
||||
[Experimental(Experimentals.Extensibility_DiagnosticId, UrlFormat = Experimentals.Extensibility_Url)]
|
||||
public string? RoutingNameParameter { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue