feat: remove ModelContextProtocol source ref
use ModelContextProtocol nuget package replace source ref
This commit is contained in:
parent
7a9d7ffc75
commit
129331d488
11
BotSharp.sln
11
BotSharp.sln
|
|
@ -133,8 +133,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Core.Realtime", "s
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.PizzaBot.MCPServer", "tests\BotSharp.PizzaBot.MCPServer\BotSharp.PizzaBot.MCPServer.csproj", "{8D2AD45F-836A-516F-DE6A-71443CEBB18A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModelContextProtocol", "..\Ai4c\mcpcsharp-sdk\src\ModelContextProtocol\ModelContextProtocol.csproj", "{13E4F06A-D4F2-49FA-E979-DE3937137579}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -551,14 +549,6 @@ Global
|
|||
{8D2AD45F-836A-516F-DE6A-71443CEBB18A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D2AD45F-836A-516F-DE6A-71443CEBB18A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8D2AD45F-836A-516F-DE6A-71443CEBB18A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -623,7 +613,6 @@ Global
|
|||
{684781D5-3DD4-6A0B-B53F-0A362CD6BB0C} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
|
||||
{781F1465-365C-0F22-1775-25025DAFA4C7} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
|
||||
{8D2AD45F-836A-516F-DE6A-71443CEBB18A} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
|
||||
{13E4F06A-D4F2-49FA-E979-DE3937137579} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A9969D89-C98B-40A5-A12B-FC87E55B3A19}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
<PackageVersion Include="MSTest.TestFramework" Version="3.1.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||
<PackageVersion Include="System.Net.ServerSentEvents" Version="10.0.0-preview.1.25080.5" />
|
||||
<PackageVersion Include="ModelContextProtocol" Version="0.1.0-preview.1.25171.12" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="BotSharp.Logger" Version="$(BotSharpVersion)" />
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ModelContextProtocol" />
|
||||
<PackageReference Include="System.Linq.AsyncEnumerable" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Ai4c\mcpcsharp-sdk\src\ModelContextProtocol\ModelContextProtocol.csproj" />
|
||||
<ProjectReference Include="..\BotSharp.Abstraction\BotSharp.Abstraction.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
using BotSharp.Abstraction.Agents.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BotSharp.Plugin.MongoStorage.Models;
|
||||
|
||||
|
|
@ -16,7 +11,6 @@ public class AgentMCPToolMongoElement
|
|||
|
||||
public bool Disabled { get; set; }
|
||||
public List<McpFunctionMongoElement> Functions { get; set; } = [];
|
||||
public List<McpTemplateMongoElement> Templates { get; set; } = [];
|
||||
|
||||
public static AgentMCPToolMongoElement ToMongoElement(MCPTool utility)
|
||||
{
|
||||
|
|
@ -51,19 +45,3 @@ public class McpFunctionMongoElement
|
|||
Name = name;
|
||||
}
|
||||
}
|
||||
|
||||
public class McpTemplateMongoElement
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public McpTemplateMongoElement()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public McpTemplateMongoElement(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public partial class MongoRepository
|
|||
UpdateAgentUtilities(agent.Id, agent.MergeUtility, agent.Utilities);
|
||||
break;
|
||||
case AgentField.McpTool:
|
||||
UpdateAgentMcps(agent.Id, agent.McpTools);
|
||||
UpdateAgentMcpTools(agent.Id, agent.McpTools);
|
||||
break;
|
||||
case AgentField.KnowledgeBase:
|
||||
UpdateAgentKnowledgeBases(agent.Id, agent.KnowledgeBases);
|
||||
|
|
@ -264,7 +264,7 @@ public partial class MongoRepository
|
|||
_dc.Agents.UpdateOne(filter, update);
|
||||
}
|
||||
|
||||
private void UpdateAgentMcps(string agentId, List<MCPTool> mcps)
|
||||
private void UpdateAgentMcpTools(string agentId, List<MCPTool> mcps)
|
||||
{
|
||||
if (mcps == null) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,8 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" />
|
||||
<PackageReference Include="ModelContextProtocol" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" />
|
||||
<PackageReference Include="Serilog.Sinks.File" />
|
||||
<PackageReference Include="System.Net.ServerSentEvents" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Ai4c\mcpcsharp-sdk\src\ModelContextProtocol\ModelContextProtocol.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in a new issue