Extract Tasks into the ModelContextProtocol.Extensions.Tasks extension package (#1693)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
This commit is contained in:
Jeff Handley 2026-07-14 15:53:58 -07:00 • committed by GitHub
commit 2ca96f548b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,8 +8,8 @@ namespace ModelContextProtocol.Protocol;
/// </summary>
public abstract class Result
{
/// <summary>Prevent external derivations.</summary>
private protected Result()
/// <summary>Initializes the base result type.</summary>
protected Result()
{
}
@ -27,11 +27,9 @@ public abstract class Result
/// </summary>
/// <remarks>
/// <para>
/// When set to <c>"complete"</c>, the result is a normal completed response.
/// When set to <c>"input_required"</c>, the result is an <see cref="InputRequiredResult"/> indicating
/// that additional input is needed before the request can be completed.
/// When set to <c>"task"</c>, the result is a <see cref="CreateTaskResult"/> indicating that the server
/// has created a long-running task in lieu of returning the result directly.
/// When absent or set to <c>"complete"</c>, the result is a normal completed response.
/// Other values discriminate alternate result subtypes so callers can choose the appropriate
/// concrete payload to deserialize.
/// </para>
/// </remarks>
/// <value>Defaults to <see langword="null"/>, which is equivalent to <c>"complete"</c>.</value>