Implement SEP-2663 Tasks Extension (#1579)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ed07fdb6f4
commit
dbb7a20176
2 changed files with 8190 additions and 11405 deletions
|
|
@ -9,12 +9,10 @@ namespace ModelContextProtocol;
|
|||
/// <param name="serverTools">The individually registered tools.</param>
|
||||
/// <param name="serverPrompts">The individually registered prompts.</param>
|
||||
/// <param name="serverResources">The individually registered resources.</param>
|
||||
/// <param name="taskStore">The optional task store registered in DI.</param>
|
||||
internal sealed class McpServerOptionsSetup(
|
||||
IEnumerable<McpServerTool> serverTools,
|
||||
IEnumerable<McpServerPrompt> serverPrompts,
|
||||
IEnumerable<McpServerResource> serverResources,
|
||||
IMcpTaskStore? taskStore = null) : IConfigureOptions<McpServerOptions>
|
||||
IEnumerable<McpServerResource> serverResources) : IConfigureOptions<McpServerOptions>
|
||||
{
|
||||
/// <summary>
|
||||
/// Configures the given McpServerOptions instance by setting server information
|
||||
|
|
@ -25,8 +23,6 @@ internal sealed class McpServerOptionsSetup(
|
|||
{
|
||||
Throw.IfNull(options);
|
||||
|
||||
options.TaskStore ??= taskStore;
|
||||
|
||||
// Collect all of the provided tools into a tools collection. If the options already has
|
||||
// a collection, add to it, otherwise create a new one. We want to maintain the identity
|
||||
// of an existing collection in case someone has provided their own derived type, wants
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<Description>.NET SDK for the Model Context Protocol (MCP) with hosting and dependency injection extensions.</Description>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<!-- Suppress the experimental tasks warning -->
|
||||
<!-- Suppress the experimental extensions warning -->
|
||||
<NoWarn>$(NoWarn);MCPEXP001</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue