diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index b8162b2f6..91cb7a0a5 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
-custom: ['https://bit.ly/2op1mu5'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+custom: ['https://www.paypal.com/pool/9avinmEbbb?sr=wccr'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 000000000..ed4cf5653
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,44 @@
+name: build
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os:
+ - ubuntu-latest
+ - windows-latest
+ - macos-latest
+ runs-on: ${{matrix.os}}
+ steps:
+ - uses: actions/checkout@v1
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: '8.0.x'
+ - name: Set env
+ run: |
+ echo "DOTNET_CLI_TELEMETRY_OPTOUT=1" >> $GITHUB_ENV
+ echo "DOTNET_hostBuilder:reloadConfigOnChange=false" >> $GITHUB_ENV
+ - name: Install required workloads
+ run: |
+ dotnet workload install aspire --source https://aka.ms/dotnet8/nuget/index.json --source https://api.nuget.org/v3/index.json
+ - name: Clean
+ run: |
+ dotnet clean ./BotSharp.sln --configuration Release
+ dotnet nuget locals all --clear
+ - name: Build
+ run: dotnet build ./BotSharp.sln -c Release
+ - name: Test
+ run: |
+ cd ./tests/UnitTest
+ dotnet test --logger "console;verbosity=detailed"
+ cd ../BotSharp.Plugin.SemanticKernel.UnitTests
+ dotnet test --logger "console;verbosity=detailed"
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 4f9359c78..126bcaff9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -293,4 +293,5 @@ logs
wwwroot
appsettings.Production.json
*.csproj.user
-env/
\ No newline at end of file
+env/
+FodyWeavers.*
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 000000000..7894fed44
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "aspire.enableSettingsFileCreationPromptOnStartup": false
+}
\ No newline at end of file
diff --git a/BotSharp.sln b/BotSharp.sln
index b04cd1c71..af8507972 100644
--- a/BotSharp.sln
+++ b/BotSharp.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.6.33712.159
+# Visual Studio Version 18
+VisualStudioVersion = 18.0.11217.181
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{E29DC6C4-5E57-48C5-BCB0-6B8F84782749}"
EndProject
@@ -29,14 +29,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.WeChat", "s
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "tests\UnitTest\UnitTest.csproj", "{0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.MetaAI", "src\Plugins\BotSharp.Plugin.MetaAI\BotSharp.Plugin.MetaAI.csproj", "{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VectorStores", "VectorStores", "{53E7CD86-0D19-40D9-A0FA-AB4613837E89}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.Qdrant", "src\Plugins\BotSharp.Plugin.Qdrant\BotSharp.Plugin.Qdrant.csproj", "{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.Chroma", "src\Plugins\BotSharp.Plugin.Chroma\BotSharp.Plugin.Chroma.csproj", "{0C097984-6C10-4F7E-A57D-95C5C9974697}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visions", "Visions", "{B797EC3E-B5B9-4047-A6C8-6D330B7C6763}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.PaddleSharp", "src\Plugins\BotSharp.Plugin.PaddleSharp\BotSharp.Plugin.PaddleSharp.csproj", "{0308FBFD-57EB-4709-9AE4-A80D516AD84D}"
@@ -65,6 +65,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.GoogleAI",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.SemanticKernel", "src\Plugins\BotSharp.Plugin.SemanticKernel\BotSharp.Plugin.SemanticKernel.csproj", "{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.MicrosoftExtensionsAI", "src\Plugins\BotSharp.Plugin.MicrosoftExtensionsAI\BotSharp.Plugin.MicrosoftExtensionsAI.csproj", "{72CA059E-6AAA-406C-A1EB-A2243E652F5F}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.SemanticKernel.UnitTests", "tests\BotSharp.Plugin.SemanticKernel.UnitTests\BotSharp.Plugin.SemanticKernel.UnitTests.csproj", "{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.Twilio", "src\Plugins\BotSharp.Plugin.Twilio\BotSharp.Plugin.Twilio.csproj", "{E627F1E3-BE03-443A-83A2-86A855A278EB}"
@@ -83,256 +85,946 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.SqlDriver",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.Dashboard", "src\Plugins\BotSharp.Plugin.Dashboard\BotSharp.Plugin.Dashboard.csproj", "{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.SparkDesk", "src\Plugins\BotSharp.Plugin.SparkDesk\BotSharp.Plugin.SparkDesk.csproj", "{289E25C8-63F1-4D52-9909-207724DB40CB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.SparkDesk", "src\Plugins\BotSharp.Plugin.SparkDesk\BotSharp.Plugin.SparkDesk.csproj", "{289E25C8-63F1-4D52-9909-207724DB40CB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.MetaGLM", "src\Plugins\BotSharp.Plugin.MetaGLM\BotSharp.Plugin.MetaGLM.csproj", "{CCF745F2-0C95-4ED0-983B-507C528B39EA}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.AnthropicAI", "src\Plugins\BotSharp.Plugin.AnthropicAI\BotSharp.Plugin.AnthropicAI.csproj", "{806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.ServiceDefaults", "src\BotSharp.ServiceDefaults\BotSharp.ServiceDefaults.csproj", "{6406DC61-0F30-42E8-A1DB-B38CDF454273}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.AppHost", "src\BotSharp.AppHost\BotSharp.AppHost.csproj", "{E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.OpenAI", "src\Plugins\BotSharp.Plugin.OpenAI\BotSharp.Plugin.OpenAI.csproj", "{6507D336-3A4D-41D4-81C0-2B900173A5FE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.EmailHandler", "src\Plugins\BotSharp.Plugin.EmailHandler\BotSharp.Plugin.EmailHandler.csproj", "{A72B3BEB-E14B-4917-BE44-97EAE4E122D2}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.FileHandler", "src\Plugins\BotSharp.Plugin.FileHandler\BotSharp.Plugin.FileHandler.csproj", "{D6A99D4F-6248-419E-8A43-B38ADEBABA2C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.Planner", "src\Plugins\BotSharp.Plugin.Planner\BotSharp.Plugin.Planner.csproj", "{54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FileStorages", "FileStorages", "{38B37C0D-1930-4D47-BCBF-E358EC1096B1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.TencentCos", "src\Plugins\BotSharp.Plugin.TencentCos\BotSharp.Plugin.TencentCos.csproj", "{BF029B0A-768B-43A1-8D91-E70B95505716}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Interpreters", "Interpreters", "{C4C59872-3C8A-450D-83D5-2BE402D610D5}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.PythonInterpreter", "src\Plugins\BotSharp.Plugin.PythonInterpreter\BotSharp.Plugin.PythonInterpreter.csproj", "{05E6E405-5021-406E-8A5E-0A7CEC881F6D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Graph", "Graph", "{97A0B191-64D7-4F8A-BFE8-1BFCC5E247E1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.Graph", "src\Plugins\BotSharp.Plugin.Graph\BotSharp.Plugin.Graph.csproj", "{EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.AudioHandler", "src\Plugins\BotSharp.Plugin.AudioHandler\BotSharp.Plugin.AudioHandler.csproj", "{F57F4862-F8D4-44A1-AC12-5C131B5C9785}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Core.SideCar", "src\Infrastructure\BotSharp.Core.SideCar\BotSharp.Core.SideCar.csproj", "{6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.VertexAI", "src\Plugins\BotSharp.Plugin.LangChain\BotSharp.Plugin.VertexAI.csproj", "{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Core.Crontab", "src\Infrastructure\BotSharp.Core.Crontab\BotSharp.Core.Crontab.csproj", "{F812BAAE-5A7D-4DF7-8E71-70696B51C61F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Core.Rules", "src\Infrastructure\BotSharp.Core.Rules\BotSharp.Core.Rules.csproj", "{AFD64412-4D6A-452E-82A2-79E5D8842E29}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.DeepSeekAI", "src\Plugins\BotSharp.Plugin.DeepSeekAI\BotSharp.Plugin.DeepSeekAI.csproj", "{AF329442-B48E-4B48-A18A-1C869D1BA6F5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.LiteLLM", "src\Plugins\BotSharp.Plugin.LiteLLM\BotSharp.Plugin.LiteLLM.csproj", "{0016D0D4-BE65-4626-8C38-3464A7906F10}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.Daoxe", "src\Plugins\BotSharp.Plugin.Daoxe\BotSharp.Plugin.Daoxe.csproj", "{0B3ADBC7-230C-458E-84D9-BF232394665E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.MiniMaxAI", "src\Plugins\BotSharp.Plugin.MiniMaxAI\BotSharp.Plugin.MiniMaxAI.csproj", "{D92C1A49-3F64-4D0C-91C0-B14EA47D2503}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Core.Realtime", "src\Infrastructure\BotSharp.Core.Realtime\BotSharp.Core.Realtime.csproj", "{781F1465-365C-0F22-1775-25025DAFA4C7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Test.ComputerUse", "tests\BotSharp.Test.ComputerUse\BotSharp.Test.ComputerUse.csproj", "{C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.OsDriver", "src\Plugins\BotSharp.Plugin.OsDriver\BotSharp.Plugin.OsDriver.csproj", "{B268E2F0-060F-8466-7D81-ABA4D735CA59}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Abstraction.ComputerUse", "src\Infrastructure\BotSharp.Abstraction.ComputerUse\BotSharp.Abstraction.ComputerUse.csproj", "{970BE341-9AC8-99A5-6572-E703C1E02FCB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Test.BrowserUse", "tests\BotSharp.Test.BrowserUse\BotSharp.Test.BrowserUse.csproj", "{7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.LLM.Tests", "tests\BotSharp.LLM.Tests\BotSharp.LLM.Tests.csproj", "{7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Test.RealtimeVoice", "tests\BotSharp.Test.RealtimeVoice\BotSharp.Test.RealtimeVoice.csproj", "{B067B126-88CD-4282-BEEF-7369B64423EF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.ChartHandler", "src\Plugins\BotSharp.Plugin.ChartHandler\BotSharp.Plugin.ChartHandler.csproj", "{0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.ExcelHandler", "src\Plugins\BotSharp.Plugin.ExcelHandler\BotSharp.Plugin.ExcelHandler.csproj", "{FC63C875-E880-D8BB-B8B5-978AB7B62983}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.ImageHandler", "src\Plugins\BotSharp.Plugin.ImageHandler\BotSharp.Plugin.ImageHandler.csproj", "{242F2D93-FCCE-4982-8075-F3052ECCA92C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.FuzzySharp", "src\Plugins\BotSharp.Plugin.FuzzySharp\BotSharp.Plugin.FuzzySharp.csproj", "{E7C243B9-E751-B3B4-8F16-95C76CA90D31}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.MMPEmbedding", "src\Plugins\BotSharp.Plugin.MMPEmbedding\BotSharp.Plugin.MMPEmbedding.csproj", "{394B858B-9C26-B977-A2DA-8CC7BE5914CB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.Membase", "src\Plugins\BotSharp.Plugin.Membase\BotSharp.Plugin.Membase.csproj", "{13223C71-9EAC-9835-28ED-5A4833E6F915}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Core.A2A", "src\Infrastructure\BotSharp.Core.A2A\BotSharp.Core.A2A.csproj", "{E8D01281-D52A-BFF4-33DB-E35D91754272}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.MultiTenancy", "src\Plugins\BotSharp.Plugin.MultiTenancy\BotSharp.Plugin.MultiTenancy.csproj", "{562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{58D3A2C3-F96F-5E57-2C6B-ECE59D6A18FC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.MicrosoftTeams", "src\Plugins\BotSharp.Plugin.MicrosoftTeams\BotSharp.Plugin.MicrosoftTeams.csproj", "{19FA8311-69D1-4729-AE9B-D10979C099EC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Core.UnitTests", "tests\BotSharp.Core.UnitTests\BotSharp.Core.UnitTests.csproj", "{3585AE68-43CE-B724-72C1-579D9FFE1D6E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.AgentTesting", "src\Plugins\BotSharp.Plugin.AgentTesting\BotSharp.Plugin.AgentTesting.csproj", "{57CE6EAE-8957-435A-8A14-5A693EA8B520}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.FloxiAI", "src\Plugins\BotSharp.Plugin.FloxiAI\BotSharp.Plugin.FloxiAI.csproj", "{D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|x64.ActiveCfg = Debug|Any CPU
{197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|x64.Build.0 = Debug|Any CPU
+ {197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|x86.Build.0 = Debug|Any CPU
{197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|Any CPU.Build.0 = Release|Any CPU
{197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|x64.ActiveCfg = Release|Any CPU
{197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|x64.Build.0 = Release|Any CPU
+ {197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|x86.ActiveCfg = Release|Any CPU
+ {197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|x86.Build.0 = Release|Any CPU
{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|x64.ActiveCfg = Debug|x64
{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|x64.Build.0 = Debug|x64
+ {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|x86.Build.0 = Debug|Any CPU
{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|Any CPU.Build.0 = Release|Any CPU
{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|x64.ActiveCfg = Release|x64
{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|x64.Build.0 = Release|x64
+ {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|x86.ActiveCfg = Release|Any CPU
+ {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|x86.Build.0 = Release|Any CPU
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|x64.ActiveCfg = Debug|Any CPU
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|x64.Build.0 = Debug|Any CPU
+ {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|x86.Build.0 = Debug|Any CPU
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|Any CPU.Build.0 = Release|Any CPU
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|x64.ActiveCfg = Release|Any CPU
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|x64.Build.0 = Release|Any CPU
+ {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|x86.ActiveCfg = Release|Any CPU
+ {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|x86.Build.0 = Release|Any CPU
{3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Debug|x64.ActiveCfg = Debug|Any CPU
{3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Debug|x64.Build.0 = Debug|Any CPU
+ {3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Debug|x86.Build.0 = Debug|Any CPU
{3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Release|Any CPU.Build.0 = Release|Any CPU
{3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Release|x64.ActiveCfg = Release|Any CPU
{3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Release|x64.Build.0 = Release|Any CPU
+ {3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Release|x86.ActiveCfg = Release|Any CPU
+ {3EAB9CF3-0F47-4BFB-8BAC-8ADFF24AD899}.Release|x86.Build.0 = Release|Any CPU
{57806BAF-7736-425A-B499-13A2A2DF1E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57806BAF-7736-425A-B499-13A2A2DF1E63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57806BAF-7736-425A-B499-13A2A2DF1E63}.Debug|x64.ActiveCfg = Debug|Any CPU
{57806BAF-7736-425A-B499-13A2A2DF1E63}.Debug|x64.Build.0 = Debug|Any CPU
+ {57806BAF-7736-425A-B499-13A2A2DF1E63}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {57806BAF-7736-425A-B499-13A2A2DF1E63}.Debug|x86.Build.0 = Debug|Any CPU
{57806BAF-7736-425A-B499-13A2A2DF1E63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57806BAF-7736-425A-B499-13A2A2DF1E63}.Release|Any CPU.Build.0 = Release|Any CPU
{57806BAF-7736-425A-B499-13A2A2DF1E63}.Release|x64.ActiveCfg = Release|Any CPU
{57806BAF-7736-425A-B499-13A2A2DF1E63}.Release|x64.Build.0 = Release|Any CPU
+ {57806BAF-7736-425A-B499-13A2A2DF1E63}.Release|x86.ActiveCfg = Release|Any CPU
+ {57806BAF-7736-425A-B499-13A2A2DF1E63}.Release|x86.Build.0 = Release|Any CPU
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Debug|x64.ActiveCfg = Debug|Any CPU
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Debug|x64.Build.0 = Debug|Any CPU
+ {68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Debug|x86.Build.0 = Debug|Any CPU
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Release|Any CPU.Build.0 = Release|Any CPU
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Release|x64.ActiveCfg = Release|Any CPU
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Release|x64.Build.0 = Release|Any CPU
+ {68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Release|x86.ActiveCfg = Release|Any CPU
+ {68C7C9E9-496B-4004-A1F8-75FFB8C06C76}.Release|x86.Build.0 = Release|Any CPU
{2323A7A3-E938-488D-A57E-638638054BC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2323A7A3-E938-488D-A57E-638638054BC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2323A7A3-E938-488D-A57E-638638054BC4}.Debug|x64.ActiveCfg = Debug|Any CPU
{2323A7A3-E938-488D-A57E-638638054BC4}.Debug|x64.Build.0 = Debug|Any CPU
+ {2323A7A3-E938-488D-A57E-638638054BC4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2323A7A3-E938-488D-A57E-638638054BC4}.Debug|x86.Build.0 = Debug|Any CPU
{2323A7A3-E938-488D-A57E-638638054BC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2323A7A3-E938-488D-A57E-638638054BC4}.Release|Any CPU.Build.0 = Release|Any CPU
{2323A7A3-E938-488D-A57E-638638054BC4}.Release|x64.ActiveCfg = Release|Any CPU
{2323A7A3-E938-488D-A57E-638638054BC4}.Release|x64.Build.0 = Release|Any CPU
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}.Debug|x64.ActiveCfg = Debug|Any CPU
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}.Debug|x64.Build.0 = Debug|Any CPU
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}.Release|Any CPU.Build.0 = Release|Any CPU
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}.Release|x64.ActiveCfg = Release|Any CPU
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6}.Release|x64.Build.0 = Release|Any CPU
+ {2323A7A3-E938-488D-A57E-638638054BC4}.Release|x86.ActiveCfg = Release|Any CPU
+ {2323A7A3-E938-488D-A57E-638638054BC4}.Release|x86.Build.0 = Release|Any CPU
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Debug|x64.ActiveCfg = Debug|Any CPU
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Debug|x64.Build.0 = Debug|Any CPU
+ {6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Debug|x86.Build.0 = Debug|Any CPU
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Release|Any CPU.Build.0 = Release|Any CPU
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Release|x64.ActiveCfg = Release|Any CPU
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Release|x64.Build.0 = Release|Any CPU
+ {6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Release|x86.ActiveCfg = Release|Any CPU
+ {6D8D18A9-86D7-455E-81EC-9682C30AB7E7}.Release|x86.Build.0 = Release|Any CPU
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Debug|x64.ActiveCfg = Debug|Any CPU
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Debug|x64.Build.0 = Debug|Any CPU
+ {FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Debug|x86.Build.0 = Debug|Any CPU
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Release|Any CPU.Build.0 = Release|Any CPU
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Release|x64.ActiveCfg = Release|Any CPU
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Release|x64.Build.0 = Release|Any CPU
+ {FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Release|x86.ActiveCfg = Release|Any CPU
+ {FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83}.Release|x86.Build.0 = Release|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Debug|x64.Build.0 = Debug|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Debug|x86.Build.0 = Debug|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Release|x64.ActiveCfg = Release|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Release|x64.Build.0 = Release|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Release|x86.ActiveCfg = Release|Any CPU
+ {0C097984-6C10-4F7E-A57D-95C5C9974697}.Release|x86.Build.0 = Release|Any CPU
{0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Debug|x64.ActiveCfg = Debug|Any CPU
{0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Debug|x64.Build.0 = Debug|Any CPU
+ {0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Debug|x86.Build.0 = Debug|Any CPU
{0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Release|Any CPU.Build.0 = Release|Any CPU
{0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Release|x64.ActiveCfg = Release|Any CPU
{0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Release|x64.Build.0 = Release|Any CPU
+ {0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Release|x86.ActiveCfg = Release|Any CPU
+ {0308FBFD-57EB-4709-9AE4-A80D516AD84D}.Release|x86.Build.0 = Release|Any CPU
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Debug|x64.ActiveCfg = Debug|Any CPU
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Debug|x64.Build.0 = Debug|Any CPU
+ {8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Debug|x86.Build.0 = Debug|Any CPU
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Release|Any CPU.Build.0 = Release|Any CPU
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Release|x64.ActiveCfg = Release|Any CPU
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Release|x64.Build.0 = Release|Any CPU
+ {8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Release|x86.ActiveCfg = Release|Any CPU
+ {8300F66D-9EB8-438A-BF0F-70DFBE07D9DE}.Release|x86.Build.0 = Release|Any CPU
{7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Debug|x64.ActiveCfg = Debug|Any CPU
{7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Debug|x64.Build.0 = Debug|Any CPU
+ {7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Debug|x86.Build.0 = Debug|Any CPU
{7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Release|Any CPU.Build.0 = Release|Any CPU
{7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Release|x64.ActiveCfg = Release|Any CPU
{7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Release|x64.Build.0 = Release|Any CPU
+ {7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Release|x86.ActiveCfg = Release|Any CPU
+ {7E63F5F8-4EA0-498B-ABFE-2BBE4D7DDBA7}.Release|x86.Build.0 = Release|Any CPU
{46B7B54F-1425-4C9D-824A-9B826855D249}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{46B7B54F-1425-4C9D-824A-9B826855D249}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46B7B54F-1425-4C9D-824A-9B826855D249}.Debug|x64.ActiveCfg = Debug|Any CPU
{46B7B54F-1425-4C9D-824A-9B826855D249}.Debug|x64.Build.0 = Debug|Any CPU
+ {46B7B54F-1425-4C9D-824A-9B826855D249}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {46B7B54F-1425-4C9D-824A-9B826855D249}.Debug|x86.Build.0 = Debug|Any CPU
{46B7B54F-1425-4C9D-824A-9B826855D249}.Release|Any CPU.ActiveCfg = Release|Any CPU
{46B7B54F-1425-4C9D-824A-9B826855D249}.Release|Any CPU.Build.0 = Release|Any CPU
{46B7B54F-1425-4C9D-824A-9B826855D249}.Release|x64.ActiveCfg = Release|Any CPU
{46B7B54F-1425-4C9D-824A-9B826855D249}.Release|x64.Build.0 = Release|Any CPU
+ {46B7B54F-1425-4C9D-824A-9B826855D249}.Release|x86.ActiveCfg = Release|Any CPU
+ {46B7B54F-1425-4C9D-824A-9B826855D249}.Release|x86.Build.0 = Release|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|x64.ActiveCfg = Debug|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|x64.Build.0 = Debug|Any CPU
+ {A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|x86.Build.0 = Debug|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|Any CPU.Build.0 = Release|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|x64.ActiveCfg = Release|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|x64.Build.0 = Release|Any CPU
+ {A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|x86.ActiveCfg = Release|Any CPU
+ {A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|x86.Build.0 = Release|Any CPU
{631D9C12-86C4-44F0-99C3-D32C0754BF37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{631D9C12-86C4-44F0-99C3-D32C0754BF37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{631D9C12-86C4-44F0-99C3-D32C0754BF37}.Debug|x64.ActiveCfg = Debug|Any CPU
{631D9C12-86C4-44F0-99C3-D32C0754BF37}.Debug|x64.Build.0 = Debug|Any CPU
+ {631D9C12-86C4-44F0-99C3-D32C0754BF37}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {631D9C12-86C4-44F0-99C3-D32C0754BF37}.Debug|x86.Build.0 = Debug|Any CPU
{631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|Any CPU.Build.0 = Release|Any CPU
{631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|x64.ActiveCfg = Release|Any CPU
{631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|x64.Build.0 = Release|Any CPU
+ {631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|x86.ActiveCfg = Release|Any CPU
+ {631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|x86.Build.0 = Release|Any CPU
{298AC787-A104-414C-B114-82BE764FBD9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{298AC787-A104-414C-B114-82BE764FBD9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{298AC787-A104-414C-B114-82BE764FBD9C}.Debug|x64.ActiveCfg = Debug|Any CPU
{298AC787-A104-414C-B114-82BE764FBD9C}.Debug|x64.Build.0 = Debug|Any CPU
+ {298AC787-A104-414C-B114-82BE764FBD9C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {298AC787-A104-414C-B114-82BE764FBD9C}.Debug|x86.Build.0 = Debug|Any CPU
{298AC787-A104-414C-B114-82BE764FBD9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{298AC787-A104-414C-B114-82BE764FBD9C}.Release|Any CPU.Build.0 = Release|Any CPU
{298AC787-A104-414C-B114-82BE764FBD9C}.Release|x64.ActiveCfg = Release|Any CPU
{298AC787-A104-414C-B114-82BE764FBD9C}.Release|x64.Build.0 = Release|Any CPU
+ {298AC787-A104-414C-B114-82BE764FBD9C}.Release|x86.ActiveCfg = Release|Any CPU
+ {298AC787-A104-414C-B114-82BE764FBD9C}.Release|x86.Build.0 = Release|Any CPU
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|x64.ActiveCfg = Debug|Any CPU
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|x64.Build.0 = Debug|Any CPU
+ {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|x86.Build.0 = Debug|Any CPU
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|Any CPU.Build.0 = Release|Any CPU
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|x64.ActiveCfg = Release|Any CPU
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|x64.Build.0 = Release|Any CPU
+ {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|x86.ActiveCfg = Release|Any CPU
+ {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|x86.Build.0 = Release|Any CPU
{8BC29F8A-78D6-422C-B522-10687ADC38ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8BC29F8A-78D6-422C-B522-10687ADC38ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BC29F8A-78D6-422C-B522-10687ADC38ED}.Debug|x64.ActiveCfg = Debug|Any CPU
{8BC29F8A-78D6-422C-B522-10687ADC38ED}.Debug|x64.Build.0 = Debug|Any CPU
+ {8BC29F8A-78D6-422C-B522-10687ADC38ED}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8BC29F8A-78D6-422C-B522-10687ADC38ED}.Debug|x86.Build.0 = Debug|Any CPU
{8BC29F8A-78D6-422C-B522-10687ADC38ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BC29F8A-78D6-422C-B522-10687ADC38ED}.Release|Any CPU.Build.0 = Release|Any CPU
{8BC29F8A-78D6-422C-B522-10687ADC38ED}.Release|x64.ActiveCfg = Release|Any CPU
{8BC29F8A-78D6-422C-B522-10687ADC38ED}.Release|x64.Build.0 = Release|Any CPU
+ {8BC29F8A-78D6-422C-B522-10687ADC38ED}.Release|x86.ActiveCfg = Release|Any CPU
+ {8BC29F8A-78D6-422C-B522-10687ADC38ED}.Release|x86.Build.0 = Release|Any CPU
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Debug|x64.ActiveCfg = Debug|Any CPU
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Debug|x64.Build.0 = Debug|Any CPU
+ {73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Debug|x86.Build.0 = Debug|Any CPU
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Release|Any CPU.Build.0 = Release|Any CPU
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Release|x64.ActiveCfg = Release|Any CPU
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Release|x64.Build.0 = Release|Any CPU
+ {73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Release|x86.ActiveCfg = Release|Any CPU
+ {73EE2CD0-3B27-4F02-A67B-762CBDD740D0}.Release|x86.Build.0 = Release|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Debug|x64.Build.0 = Debug|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Debug|x86.Build.0 = Debug|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Release|x64.ActiveCfg = Release|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Release|x64.Build.0 = Release|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Release|x86.ActiveCfg = Release|Any CPU
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F}.Release|x86.Build.0 = Release|Any CPU
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Debug|x64.ActiveCfg = Debug|Any CPU
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Debug|x64.Build.0 = Debug|Any CPU
+ {BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Debug|x86.Build.0 = Debug|Any CPU
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|Any CPU.Build.0 = Release|Any CPU
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|x64.ActiveCfg = Release|Any CPU
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|x64.Build.0 = Release|Any CPU
+ {BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|x86.ActiveCfg = Release|Any CPU
+ {BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|x86.Build.0 = Release|Any CPU
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|x64.ActiveCfg = Debug|Any CPU
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|x64.Build.0 = Debug|Any CPU
+ {E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|x86.Build.0 = Debug|Any CPU
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|Any CPU.Build.0 = Release|Any CPU
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|x64.ActiveCfg = Release|Any CPU
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|x64.Build.0 = Release|Any CPU
+ {E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|x86.ActiveCfg = Release|Any CPU
+ {E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|x86.Build.0 = Release|Any CPU
{F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Debug|x64.ActiveCfg = Debug|Any CPU
{F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Debug|x64.Build.0 = Debug|Any CPU
+ {F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Debug|x86.Build.0 = Debug|Any CPU
{F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Release|Any CPU.Build.0 = Release|Any CPU
{F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Release|x64.ActiveCfg = Release|Any CPU
{F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Release|x64.Build.0 = Release|Any CPU
+ {F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Release|x86.ActiveCfg = Release|Any CPU
+ {F06B22CB-B143-4680-8FFF-35B9E50E6C47}.Release|x86.Build.0 = Release|Any CPU
{EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Debug|x64.ActiveCfg = Debug|Any CPU
{EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Debug|x64.Build.0 = Debug|Any CPU
+ {EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Debug|x86.Build.0 = Debug|Any CPU
{EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Release|Any CPU.Build.0 = Release|Any CPU
{EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Release|x64.ActiveCfg = Release|Any CPU
{EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Release|x64.Build.0 = Release|Any CPU
+ {EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Release|x86.ActiveCfg = Release|Any CPU
+ {EDCD9C20-2D9D-4098-A16E-03F97B306CB8}.Release|x86.Build.0 = Release|Any CPU
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Debug|x64.ActiveCfg = Debug|Any CPU
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Debug|x64.Build.0 = Debug|Any CPU
+ {DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Debug|x86.Build.0 = Debug|Any CPU
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Release|Any CPU.Build.0 = Release|Any CPU
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Release|x64.ActiveCfg = Release|Any CPU
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Release|x64.Build.0 = Release|Any CPU
+ {DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Release|x86.ActiveCfg = Release|Any CPU
+ {DCA18996-4D3A-4E98-BCD0-1FB77C59253E}.Release|x86.Build.0 = Release|Any CPU
{5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Debug|x64.ActiveCfg = Debug|Any CPU
{5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Debug|x64.Build.0 = Debug|Any CPU
+ {5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Debug|x86.Build.0 = Debug|Any CPU
{5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Release|Any CPU.Build.0 = Release|Any CPU
{5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Release|x64.ActiveCfg = Release|Any CPU
{5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Release|x64.Build.0 = Release|Any CPU
+ {5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Release|x86.ActiveCfg = Release|Any CPU
+ {5CA3335E-E6AD-46FD-B277-29BBC3A16500}.Release|x86.Build.0 = Release|Any CPU
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Debug|x64.ActiveCfg = Debug|Any CPU
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Debug|x64.Build.0 = Debug|Any CPU
+ {32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Debug|x86.Build.0 = Debug|Any CPU
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|Any CPU.Build.0 = Release|Any CPU
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|x64.ActiveCfg = Release|Any CPU
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|x64.Build.0 = Release|Any CPU
+ {32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|x86.ActiveCfg = Release|Any CPU
+ {32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|x86.Build.0 = Release|Any CPU
{D775DB67-A4B4-44E5-9144-522689590057}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D775DB67-A4B4-44E5-9144-522689590057}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D775DB67-A4B4-44E5-9144-522689590057}.Debug|x64.ActiveCfg = Debug|Any CPU
{D775DB67-A4B4-44E5-9144-522689590057}.Debug|x64.Build.0 = Debug|Any CPU
+ {D775DB67-A4B4-44E5-9144-522689590057}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D775DB67-A4B4-44E5-9144-522689590057}.Debug|x86.Build.0 = Debug|Any CPU
{D775DB67-A4B4-44E5-9144-522689590057}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D775DB67-A4B4-44E5-9144-522689590057}.Release|Any CPU.Build.0 = Release|Any CPU
{D775DB67-A4B4-44E5-9144-522689590057}.Release|x64.ActiveCfg = Release|Any CPU
{D775DB67-A4B4-44E5-9144-522689590057}.Release|x64.Build.0 = Release|Any CPU
+ {D775DB67-A4B4-44E5-9144-522689590057}.Release|x86.ActiveCfg = Release|Any CPU
+ {D775DB67-A4B4-44E5-9144-522689590057}.Release|x86.Build.0 = Release|Any CPU
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Debug|x64.ActiveCfg = Debug|Any CPU
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Debug|x64.Build.0 = Debug|Any CPU
+ {267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Debug|x86.Build.0 = Debug|Any CPU
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Release|Any CPU.Build.0 = Release|Any CPU
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Release|x64.ActiveCfg = Release|Any CPU
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Release|x64.Build.0 = Release|Any CPU
+ {267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Release|x86.ActiveCfg = Release|Any CPU
+ {267998C1-55C2-4ADC-8361-2CDFA5EA6D6C}.Release|x86.Build.0 = Release|Any CPU
{289E25C8-63F1-4D52-9909-207724DB40CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{289E25C8-63F1-4D52-9909-207724DB40CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{289E25C8-63F1-4D52-9909-207724DB40CB}.Debug|x64.ActiveCfg = Debug|Any CPU
{289E25C8-63F1-4D52-9909-207724DB40CB}.Debug|x64.Build.0 = Debug|Any CPU
+ {289E25C8-63F1-4D52-9909-207724DB40CB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {289E25C8-63F1-4D52-9909-207724DB40CB}.Debug|x86.Build.0 = Debug|Any CPU
{289E25C8-63F1-4D52-9909-207724DB40CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{289E25C8-63F1-4D52-9909-207724DB40CB}.Release|Any CPU.Build.0 = Release|Any CPU
{289E25C8-63F1-4D52-9909-207724DB40CB}.Release|x64.ActiveCfg = Release|Any CPU
{289E25C8-63F1-4D52-9909-207724DB40CB}.Release|x64.Build.0 = Release|Any CPU
+ {289E25C8-63F1-4D52-9909-207724DB40CB}.Release|x86.ActiveCfg = Release|Any CPU
+ {289E25C8-63F1-4D52-9909-207724DB40CB}.Release|x86.Build.0 = Release|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Debug|x64.Build.0 = Debug|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Debug|x86.Build.0 = Debug|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Release|x64.ActiveCfg = Release|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Release|x64.Build.0 = Release|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Release|x86.ActiveCfg = Release|Any CPU
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA}.Release|x86.Build.0 = Release|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Debug|x64.Build.0 = Debug|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Debug|x86.Build.0 = Debug|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Release|x64.ActiveCfg = Release|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Release|x64.Build.0 = Release|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Release|x86.ActiveCfg = Release|Any CPU
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C}.Release|x86.Build.0 = Release|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Debug|x64.Build.0 = Debug|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Debug|x86.Build.0 = Debug|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Release|x64.ActiveCfg = Release|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Release|x64.Build.0 = Release|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Release|x86.ActiveCfg = Release|Any CPU
+ {6406DC61-0F30-42E8-A1DB-B38CDF454273}.Release|x86.Build.0 = Release|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Debug|x64.Build.0 = Debug|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Debug|x86.Build.0 = Debug|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Release|x64.ActiveCfg = Release|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Release|x64.Build.0 = Release|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Release|x86.ActiveCfg = Release|Any CPU
+ {E04FBBEF-744E-4EF3-B634-42AD9F8B68B1}.Release|x86.Build.0 = Release|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Debug|x64.Build.0 = Debug|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Debug|x86.Build.0 = Debug|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Release|x64.ActiveCfg = Release|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Release|x64.Build.0 = Release|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Release|x86.ActiveCfg = Release|Any CPU
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE}.Release|x86.Build.0 = Release|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Debug|x64.Build.0 = Debug|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Debug|x86.Build.0 = Debug|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Release|x64.ActiveCfg = Release|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Release|x64.Build.0 = Release|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Release|x86.ActiveCfg = Release|Any CPU
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2}.Release|x86.Build.0 = Release|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Debug|x64.Build.0 = Debug|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Debug|x86.Build.0 = Debug|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Release|x64.ActiveCfg = Release|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Release|x64.Build.0 = Release|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Release|x86.ActiveCfg = Release|Any CPU
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C}.Release|x86.Build.0 = Release|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Debug|x64.Build.0 = Debug|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Debug|x86.Build.0 = Debug|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Release|x64.ActiveCfg = Release|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Release|x64.Build.0 = Release|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Release|x86.ActiveCfg = Release|Any CPU
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4}.Release|x86.Build.0 = Release|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Debug|x64.Build.0 = Debug|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Debug|x86.Build.0 = Debug|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Release|x64.ActiveCfg = Release|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Release|x64.Build.0 = Release|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Release|x86.ActiveCfg = Release|Any CPU
+ {BF029B0A-768B-43A1-8D91-E70B95505716}.Release|x86.Build.0 = Release|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Debug|x64.Build.0 = Debug|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Debug|x86.Build.0 = Debug|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Release|x64.ActiveCfg = Release|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Release|x64.Build.0 = Release|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Release|x86.ActiveCfg = Release|Any CPU
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D}.Release|x86.Build.0 = Release|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Debug|x64.Build.0 = Debug|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Debug|x86.Build.0 = Debug|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Release|x64.ActiveCfg = Release|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Release|x64.Build.0 = Release|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Release|x86.ActiveCfg = Release|Any CPU
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D}.Release|x86.Build.0 = Release|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Debug|x64.Build.0 = Debug|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Debug|x86.Build.0 = Debug|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Release|x64.ActiveCfg = Release|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Release|x64.Build.0 = Release|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Release|x86.ActiveCfg = Release|Any CPU
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785}.Release|x86.Build.0 = Release|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Debug|x64.Build.0 = Debug|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Debug|x86.Build.0 = Debug|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|x64.ActiveCfg = Release|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|x64.Build.0 = Release|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|x86.ActiveCfg = Release|Any CPU
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|x86.Build.0 = Release|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|x64.Build.0 = Debug|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|x86.Build.0 = Debug|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|x64.ActiveCfg = Release|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|x64.Build.0 = Release|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|x86.ActiveCfg = Release|Any CPU
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|x86.Build.0 = Release|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Debug|x64.Build.0 = Debug|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Debug|x86.Build.0 = Debug|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Release|x64.ActiveCfg = Release|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Release|x64.Build.0 = Release|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Release|x86.ActiveCfg = Release|Any CPU
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F}.Release|x86.Build.0 = Release|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Debug|x64.Build.0 = Debug|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Debug|x86.Build.0 = Debug|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Release|x64.ActiveCfg = Release|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Release|x64.Build.0 = Release|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Release|x86.ActiveCfg = Release|Any CPU
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29}.Release|x86.Build.0 = Release|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Debug|x64.Build.0 = Debug|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Debug|x86.Build.0 = Debug|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Release|x64.ActiveCfg = Release|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Release|x64.Build.0 = Release|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Release|x86.ActiveCfg = Release|Any CPU
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5}.Release|x86.Build.0 = Release|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Debug|x64.Build.0 = Debug|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Debug|x86.Build.0 = Debug|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Release|x64.ActiveCfg = Release|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Release|x64.Build.0 = Release|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Release|x86.ActiveCfg = Release|Any CPU
+ {0016D0D4-BE65-4626-8C38-3464A7906F10}.Release|x86.Build.0 = Release|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Debug|x64.Build.0 = Debug|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Debug|x86.Build.0 = Debug|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Release|x64.ActiveCfg = Release|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Release|x64.Build.0 = Release|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Release|x86.ActiveCfg = Release|Any CPU
+ {0B3ADBC7-230C-458E-84D9-BF232394665E}.Release|x86.Build.0 = Release|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Debug|x64.Build.0 = Debug|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Debug|x86.Build.0 = Debug|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Release|x64.ActiveCfg = Release|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Release|x64.Build.0 = Release|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Release|x86.ActiveCfg = Release|Any CPU
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503}.Release|x86.Build.0 = Release|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Debug|x64.Build.0 = Debug|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Debug|x86.Build.0 = Debug|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Release|x64.ActiveCfg = Release|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Release|x64.Build.0 = Release|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Release|x86.ActiveCfg = Release|Any CPU
+ {781F1465-365C-0F22-1775-25025DAFA4C7}.Release|x86.Build.0 = Release|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Debug|x64.Build.0 = Debug|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Debug|x86.Build.0 = Debug|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Release|x64.ActiveCfg = Release|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Release|x64.Build.0 = Release|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Release|x86.ActiveCfg = Release|Any CPU
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D}.Release|x86.Build.0 = Release|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Debug|x64.Build.0 = Debug|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Debug|x86.Build.0 = Debug|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Release|x64.ActiveCfg = Release|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Release|x64.Build.0 = Release|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Release|x86.ActiveCfg = Release|Any CPU
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59}.Release|x86.Build.0 = Release|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Debug|x64.Build.0 = Debug|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Debug|x86.Build.0 = Debug|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Release|x64.ActiveCfg = Release|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Release|x64.Build.0 = Release|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Release|x86.ActiveCfg = Release|Any CPU
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB}.Release|x86.Build.0 = Release|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Debug|x64.Build.0 = Debug|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Debug|x86.Build.0 = Debug|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Release|x64.ActiveCfg = Release|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Release|x64.Build.0 = Release|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Release|x86.ActiveCfg = Release|Any CPU
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094}.Release|x86.Build.0 = Release|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Debug|x64.Build.0 = Debug|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Debug|x86.Build.0 = Debug|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Release|x64.ActiveCfg = Release|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Release|x64.Build.0 = Release|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Release|x86.ActiveCfg = Release|Any CPU
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E}.Release|x86.Build.0 = Release|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Debug|x64.Build.0 = Debug|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Debug|x86.Build.0 = Debug|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Release|x64.ActiveCfg = Release|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Release|x64.Build.0 = Release|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Release|x86.ActiveCfg = Release|Any CPU
+ {B067B126-88CD-4282-BEEF-7369B64423EF}.Release|x86.Build.0 = Release|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Debug|x64.Build.0 = Debug|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Debug|x86.Build.0 = Debug|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Release|x64.ActiveCfg = Release|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Release|x64.Build.0 = Release|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Release|x86.ActiveCfg = Release|Any CPU
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702}.Release|x86.Build.0 = Release|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Debug|x64.Build.0 = Debug|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Debug|x86.Build.0 = Debug|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Release|x64.ActiveCfg = Release|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Release|x64.Build.0 = Release|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Release|x86.ActiveCfg = Release|Any CPU
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983}.Release|x86.Build.0 = Release|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Debug|x64.Build.0 = Debug|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Debug|x86.Build.0 = Debug|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Release|x64.ActiveCfg = Release|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Release|x64.Build.0 = Release|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Release|x86.ActiveCfg = Release|Any CPU
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C}.Release|x86.Build.0 = Release|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Debug|x64.Build.0 = Debug|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Debug|x86.Build.0 = Debug|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Release|x64.ActiveCfg = Release|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Release|x64.Build.0 = Release|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Release|x86.ActiveCfg = Release|Any CPU
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31}.Release|x86.Build.0 = Release|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Debug|x64.Build.0 = Debug|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Debug|x86.Build.0 = Debug|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Release|x64.ActiveCfg = Release|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Release|x64.Build.0 = Release|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Release|x86.ActiveCfg = Release|Any CPU
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB}.Release|x86.Build.0 = Release|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Debug|x64.Build.0 = Debug|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Debug|x86.Build.0 = Debug|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Release|Any CPU.Build.0 = Release|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Release|x64.ActiveCfg = Release|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Release|x64.Build.0 = Release|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Release|x86.ActiveCfg = Release|Any CPU
+ {13223C71-9EAC-9835-28ED-5A4833E6F915}.Release|x86.Build.0 = Release|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Debug|x64.Build.0 = Debug|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Debug|x86.Build.0 = Debug|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Release|x64.ActiveCfg = Release|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Release|x64.Build.0 = Release|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Release|x86.ActiveCfg = Release|Any CPU
+ {E8D01281-D52A-BFF4-33DB-E35D91754272}.Release|x86.Build.0 = Release|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Debug|x64.Build.0 = Debug|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Debug|x86.Build.0 = Debug|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Release|Any CPU.Build.0 = Release|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Release|x64.ActiveCfg = Release|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Release|x64.Build.0 = Release|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Release|x86.ActiveCfg = Release|Any CPU
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76}.Release|x86.Build.0 = Release|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Debug|x64.Build.0 = Debug|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Debug|x86.Build.0 = Debug|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Release|x64.ActiveCfg = Release|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Release|x64.Build.0 = Release|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Release|x86.ActiveCfg = Release|Any CPU
+ {19FA8311-69D1-4729-AE9B-D10979C099EC}.Release|x86.Build.0 = Release|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Debug|x64.Build.0 = Debug|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Debug|x86.Build.0 = Debug|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Release|x64.ActiveCfg = Release|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Release|x64.Build.0 = Release|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Release|x86.ActiveCfg = Release|Any CPU
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E}.Release|x86.Build.0 = Release|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Debug|x64.Build.0 = Debug|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Debug|x86.Build.0 = Debug|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Release|Any CPU.Build.0 = Release|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Release|x64.ActiveCfg = Release|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Release|x64.Build.0 = Release|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Release|x86.ActiveCfg = Release|Any CPU
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520}.Release|x86.Build.0 = Release|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Debug|x64.Build.0 = Debug|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Debug|x86.Build.0 = Debug|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Release|x64.ActiveCfg = Release|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Release|x64.Build.0 = Release|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Release|x86.ActiveCfg = Release|Any CPU
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -347,10 +1039,10 @@ Global
{57806BAF-7736-425A-B499-13A2A2DF1E63} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
{68C7C9E9-496B-4004-A1F8-75FFB8C06C76} = {42226933-0A0D-48E8-85EC-AFE773A1F841}
{2323A7A3-E938-488D-A57E-638638054BC4} = {64264688-0F5C-4AB0-8F2B-B59B717CCE00}
- {0B6E1D7F-ABDE-47F6-8B2D-4483C2CFF2D6} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
{6D8D18A9-86D7-455E-81EC-9682C30AB7E7} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
{53E7CD86-0D19-40D9-A0FA-AB4613837E89} = {2635EC9B-2E5F-4313-AC21-0B847F31F36C}
{FE2E6CC1-EB80-4518-B3A3-CB373EDA6A83} = {53E7CD86-0D19-40D9-A0FA-AB4613837E89}
+ {0C097984-6C10-4F7E-A57D-95C5C9974697} = {53E7CD86-0D19-40D9-A0FA-AB4613837E89}
{B797EC3E-B5B9-4047-A6C8-6D330B7C6763} = {2635EC9B-2E5F-4313-AC21-0B847F31F36C}
{0308FBFD-57EB-4709-9AE4-A80D516AD84D} = {B797EC3E-B5B9-4047-A6C8-6D330B7C6763}
{8300F66D-9EB8-438A-BF0F-70DFBE07D9DE} = {64264688-0F5C-4AB0-8F2B-B59B717CCE00}
@@ -365,6 +1057,7 @@ Global
{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C} = {5CD330E1-9E5A-4112-8346-6E31CA98EF78}
{8BC29F8A-78D6-422C-B522-10687ADC38ED} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {72CA059E-6AAA-406C-A1EB-A2243E652F5F} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
{E627F1E3-BE03-443A-83A2-86A855A278EB} = {64264688-0F5C-4AB0-8F2B-B59B717CCE00}
{F06B22CB-B143-4680-8FFF-35B9E50E6C47} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
@@ -375,6 +1068,47 @@ Global
{D775DB67-A4B4-44E5-9144-522689590057} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
{267998C1-55C2-4ADC-8361-2CDFA5EA6D6C} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
{289E25C8-63F1-4D52-9909-207724DB40CB} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {CCF745F2-0C95-4ED0-983B-507C528B39EA} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {806A0B0E-FEFF-420E-B5B2-C9FCBF890A8C} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {6507D336-3A4D-41D4-81C0-2B900173A5FE} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {A72B3BEB-E14B-4917-BE44-97EAE4E122D2} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {D6A99D4F-6248-419E-8A43-B38ADEBABA2C} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {54E83C6F-54EE-4ADC-8D72-93C009CC4FB4} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {38B37C0D-1930-4D47-BCBF-E358EC1096B1} = {2635EC9B-2E5F-4313-AC21-0B847F31F36C}
+ {BF029B0A-768B-43A1-8D91-E70B95505716} = {38B37C0D-1930-4D47-BCBF-E358EC1096B1}
+ {C4C59872-3C8A-450D-83D5-2BE402D610D5} = {2635EC9B-2E5F-4313-AC21-0B847F31F36C}
+ {05E6E405-5021-406E-8A5E-0A7CEC881F6D} = {C4C59872-3C8A-450D-83D5-2BE402D610D5}
+ {97A0B191-64D7-4F8A-BFE8-1BFCC5E247E1} = {2635EC9B-2E5F-4313-AC21-0B847F31F36C}
+ {EBFE97DA-D0BA-48BA-8B5D-083B60348D1D} = {97A0B191-64D7-4F8A-BFE8-1BFCC5E247E1}
+ {F57F4862-F8D4-44A1-AC12-5C131B5C9785} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
+ {7DA2DCD0-551B-432E-AA5C-22DDD3ED459B} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {F812BAAE-5A7D-4DF7-8E71-70696B51C61F} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
+ {AFD64412-4D6A-452E-82A2-79E5D8842E29} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
+ {AF329442-B48E-4B48-A18A-1C869D1BA6F5} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {0016D0D4-BE65-4626-8C38-3464A7906F10} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {0B3ADBC7-230C-458E-84D9-BF232394665E} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {D92C1A49-3F64-4D0C-91C0-B14EA47D2503} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
+ {781F1465-365C-0F22-1775-25025DAFA4C7} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
+ {C19D9AC1-97DD-8E65-E8DB-D295A095AA2D} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
+ {B268E2F0-060F-8466-7D81-ABA4D735CA59} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {970BE341-9AC8-99A5-6572-E703C1E02FCB} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
+ {7D0DB012-9798-4BB9-B15B-A5B0B7B3B094} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
+ {7C0C7D13-D161-4AB0-9C29-83A0F1FF990E} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
+ {B067B126-88CD-4282-BEEF-7369B64423EF} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
+ {0428DEAA-E4FE-4259-A6D8-6EDD1A9D0702} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {FC63C875-E880-D8BB-B8B5-978AB7B62983} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {242F2D93-FCCE-4982-8075-F3052ECCA92C} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {E7C243B9-E751-B3B4-8F16-95C76CA90D31} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {394B858B-9C26-B977-A2DA-8CC7BE5914CB} = {4F346DCE-087F-4368-AF88-EE9C720D0E69}
+ {13223C71-9EAC-9835-28ED-5A4833E6F915} = {53E7CD86-0D19-40D9-A0FA-AB4613837E89}
+ {E8D01281-D52A-BFF4-33DB-E35D91754272} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
+ {562DD0C6-DAC8-02CC-C1DD-D43DF186CE76} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
+ {58D3A2C3-F96F-5E57-2C6B-ECE59D6A18FC} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
+ {19FA8311-69D1-4729-AE9B-D10979C099EC} = {58D3A2C3-F96F-5E57-2C6B-ECE59D6A18FC}
+ {3585AE68-43CE-B724-72C1-579D9FFE1D6E} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
+ {57CE6EAE-8957-435A-8A14-5A693EA8B520} = {58D3A2C3-F96F-5E57-2C6B-ECE59D6A18FC}
+ {D87D99CE-8B5B-4FAF-8649-39B9BEEAC955} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A9969D89-C98B-40A5-A12B-FC87E55B3A19}
diff --git a/Directory.Build.props b/Directory.Build.props
index 99a8ba4cf..d93cb20fb 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,9 +1,9 @@
net8.0
- 10.0
- 1.3.1
- false
+ 12.0
+ 5.2.0
+ truefalse
\ No newline at end of file
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 000000000..0f0253710
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,199 @@
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IFunctionExecutor.cs b/IFunctionExecutor.cs
new file mode 100644
index 000000000..a3380e70a
--- /dev/null
+++ b/IFunctionExecutor.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BotSharp.Core.Routing
+{
+ public interface IFunctionExecutor
+ {
+ public Task Execute(RoleDialogModel message);
+
+ public Task GetIndication(RoleDialogModel message);
+ }
+}
diff --git a/PizzaBot.sln b/PizzaBot.sln
index 94158a930..25d34c3dd 100644
--- a/PizzaBot.sln
+++ b/PizzaBot.sln
@@ -9,6 +9,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{32FAFFFE
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.PizzaBot", "tests\BotSharp.Plugin.PizzaBot\BotSharp.Plugin.PizzaBot.csproj", "{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.ServiceDefaults", "src\BotSharp.ServiceDefaults\BotSharp.ServiceDefaults.csproj", "{3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -33,6 +35,14 @@ Global
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|Any CPU.Build.0 = Release|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|x64.ActiveCfg = Release|Any CPU
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|x64.Build.0 = Release|Any CPU
+ {3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}.Debug|x64.Build.0 = Debug|Any CPU
+ {3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}.Release|x64.ActiveCfg = Release|Any CPU
+ {3EC01DC7-07F5-48FF-8A6F-9F79D5D38300}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/README.md b/README.md
index 2c072c09c..973c55e96 100644
--- a/README.md
+++ b/README.md
@@ -5,30 +5,31 @@
[](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=sN9VVMwbWjs5L0ATpizKKxOcZdEPMrp8&authKey=RLDw41bLTrEyEgZZi%2FzT4pYk%2BwmEFgFcrhs8ZbkiVY7a4JFckzJefaYNW6Lk4yPX&noverify=0&group_code=985366726)
[](https://raw.githubusercontent.com/Oceania2018/BotSharp/master/LICENSE)
[](https://www.nuget.org/packages/BotSharp.Core)
-[](https://ci.appveyor.com/project/Haiping-Chen/botsharp)
+[](https://github.com/SciSharp/BotSharp/actions/workflows/build.yml)
[](https://botsharp.readthedocs.io/en/latest/?badge=latest)
*"Conversation as a platform (CaaP) is the future, so it's perfect that we're already offering the whole toolkits to our .NET developers using the BotSharp AI BOT Platform Builder to build a CaaP. It opens up as much learning power as possible for your own robots and precisely control every step of the AI processing pipeline."*
**BotSharp** is an open source machine learning framework for AI Bot platform builder. This project involves natural language understanding, computer vision and audio processing technologies, and aims to promote the development and application of intelligent robot assistants in information systems. Out-of-the-box machine learning algorithms allow ordinary programmers to develop artificial intelligence applications faster and easier.
-It's written in C# running on .Net Core that is full cross-platform framework, the plug-in and pipeline flow execution design is adopted to completely decouple the plug-ins. C# is a enterprise grade programming language which is widely used to code business logic in information management related system. More friendly to corporate developers. BotSharp adopts machine learning algrithm in C# directly. That will facilitate the feature of the typed language C#, and be more easier when refactoring code in system scope.
+It's written in C# running on .Net Core that is full cross-platform framework, the plug-in and pipeline flow execution design is adopted to completely decouple the plug-ins. C# is a enterprise grade programming language which is widely used to code business logic in information management related system. More friendly to corporate developers. BotSharp adopts machine learning algorithm in C# directly. That will facilitate the feature of the typed language C#, and be more easier when refactoring code in system scope.
-**BotSharp** is in accordance with components principle strictly, decouples every part that is needed in the platform builder. So you can choose different UI/UX, or pick up a different LLM providers. They are all modulized based on unified interfaces. **BotSharp** provides an advanced Agent abstraction layer to efficiently manage complex application scenarios in enterprises, allowing enterprise developers to efficiently integrate AI into business systems.
+**BotSharp** is in accordance with components principle strictly, decouples every part that is needed in the platform builder. So you can choose different UI/UX, or pick up a different LLM providers. They are all modularized based on unified interfaces. **BotSharp** provides an advanced Agent abstraction layer to efficiently manage complex application scenarios in enterprises, allowing enterprise developers to efficiently integrate AI into business systems.

### Some Features
* Built-in multi-agents and conversation with state management.
-* Support multiple LLM Planning approaches to handle different tasks.
-* Built-in RAG related interfaces, Memeory based vector searching.
-* Support multiple AI platforms (ChatGPT 3.5 / 4.0, PaLM 2, LLaMA 2, HuggingFace).
+* Support multiple LLM Planning approaches to handle different tasks from simple to complex.
+* Built-in RAG related interfaces, Memory based vector searching.
+* Support multiple AI platforms (ChatGPT 3.5/ 4o/ o1, Gemini 2, LLaMA 3, Claude Sonnet 3.5,DeepSeek V3, HuggingFace).
* Allow multiple agents with different responsibilities cooperate to complete complex tasks.
* Build, test, evaluate and audit your LLM agent in one place.
* Build-in `BotSharp UI` written in [SvelteKit](https://kit.svelte.dev/).
* Abstract standard Rich Content data structure. Integrate with popular message channels like Facebook Messenger, Slack and Telegram.
* Provide RESTful Open API and WebSocket real-time communication.
+* Built-in MCP Integration: Visual management of MCP, enabling large model calls to Tools. Supports mainstream services like mcp.so
### Quick Started
1. Run backend service
@@ -74,14 +75,20 @@ The core module is mainly composed of abstraction and framework function impleme
### Plugins
-BotSharp uses component design, the kernel is kept to a minimum, and business functions are implemented by external components. The modular design also allows contributors to better participate. Below are the bulit-in plugins:
+BotSharp uses component design, the kernel is kept to a minimum, and business functions are implemented by external components. The modular design also allows contributors to better participate. Below are the built-in plugins:
#### Data Storages
- BotSharp.Core.Repository
- BotSharp.Plugin.MongoStorage
+- [BotSharp.Plugin.LiteDBStorage](https://github.com/GreenShadeZhang/BotSharp/tree/dev_litedb/src/Plugins/BotSharp.Plugin.LiteDBStorage)
+- BotSharp.Plugin.TencentCos
#### LLMs
+- BotSharp.Plugin.Planner
- BotSharp.Plugin.AzureOpenAI
+- BotSharp.Plugin.OpenAI
+- BotSharp.Plugin.AnthropicAI
+- BotSharp.Plugin.DeepSeekAI
- BotSharp.Plugin.GoogleAI
- BotSharp.Plugin.MetaAI
- BotSharp.Plugin.HuggingFace
@@ -107,16 +114,89 @@ BotSharp uses component design, the kernel is kept to a minimum, and business fu
#### Tools
- BotSharp.Plugin.Dashboard
- BotSharp.Plugin.RoutingSpeeder
+- BotSharp.Plugin.AudioHandler
+- BotSharp.Plugin.ChartHandler
+- BotSharp.Plugin.EmailHandler
+- BotSharp.Plugin.ExcelHandler
+- BotSharp.Plugin.FileHandler
+- BotSharp.Plugin.ImageHandler
+- BotSharp.Plugin.HttpHandler
+- BotSharp.Plugin.SqlDriver
- BotSharp.Plugin.WebDriver
-- BotSharp.Plugin.PizzaBot
+- BotSharp.Plugin.PythonInterpreter
#### UIs
- BotSharp.Plugin.ChatbotUI
+### Roadmap
+- [ ] A2A
+- [x] MCP
+- [x] Realtime
+- [ ] Computer Use
+- [ ] Browser Use
+- [x] Database Assistant
+- [x] Code Interpreter
+- [x] Conversation Management
+- [x] Multi-Agent Routing
+- [x] Knowledge Base
+
+
+### FAQ
+
+#### General Questions
+
+**What is BotSharp?**
+BotSharp is an open-source .NET machine learning framework for building AI Bot platforms. It provides out-of-the-box components for natural language understanding, computer vision, and audio processing, enabling enterprise developers to integrate AI into business systems efficiently.
+
+**What .NET versions are supported?**
+BotSharp runs on .NET Core, which is fully cross-platform. It supports .NET 6+ and works on Windows, Linux, and macOS.
+
+**Is BotSharp free to use?**
+Yes, BotSharp is licensed under Apache 2.0, allowing free use in both personal and commercial projects.
+
+#### LLM Provider Configuration
+
+**Which LLM providers are supported?**
+BotSharp supports multiple AI platforms including ChatGPT (3.5/4o/o1), Gemini 2, LLaMA 3, Claude Sonnet 3.5, DeepSeek V3, HuggingFace, and more through its modular plugin system.
+
+**How do I configure a custom LLM provider?**
+Create a plugin that implements the LLM provider interface, or use one of the built-in plugins like `BotSharp.Plugin.OpenAI` or `BotSharp.Plugin.AnthropicAI`. Configure the API keys in your `appsettings.json`.
+
+#### Agent Development
+
+**How do I create a custom agent?**
+Define an agent profile with its responsibilities, then implement the required hooks and plugins. BotSharp's advanced Agent abstraction layer handles the complex orchestration automatically.
+
+**Can multiple agents cooperate on a task?**
+Yes, BotSharp supports multi-agent scenarios where agents with different responsibilities can cooperate to complete complex tasks. The routing and planning system handles agent coordination.
+
+#### MCP Integration
+
+**What is MCP and how does BotSharp support it?**
+MCP (Model Context Protocol) enables large model calls to external tools. BotSharp has built-in MCP integration with visual management capabilities, supporting mainstream services like mcp.so.
+
+#### Deployment
+
+**How do I deploy BotSharp in production?**
+Run the backend service using `dotnet run` and deploy it behind a reverse proxy (Nginx/IIS). The Admin UI (built with SvelteKit) can be deployed separately. See the [documentation](https://botsharp.readthedocs.io) for detailed deployment guides.
+
+**Can I use BotSharp without the UI?**
+Yes, BotSharp provides RESTful Open API and WebSocket real-time communication. You can integrate it directly with your own frontend or messaging channels.
+
+#### Troubleshooting
+
+**BotSharp fails to start with dependency errors**
+Ensure you have .NET 6+ SDK installed and all NuGet packages are restored. Run `dotnet restore` before `dotnet run`.
+
+**LLM calls are timing out**
+Check your API key configuration in `appsettings.json`, verify network connectivity to the LLM provider, and ensure the model name is correct.
+
### Documents
Read the docs: https://botsharp.readthedocs.io?wt.mc_id=AI-MVP-5005183
+New documentation website: https://botsharp.verdure-hiro.cn
+
If you feel that this project is helpful to you, please Star the project, we would be very grateful.
Member project of [SciSharp STACK](https://github.com/SciSharp) which is the .NET based ecosystem of open-source software for mathematics, science, and engineering.
diff --git a/dockerfiles/appsettings.json b/dockerfiles/appsettings.json
index ff53ffb4c..d330e2f37 100644
--- a/dockerfiles/appsettings.json
+++ b/dockerfiles/appsettings.json
@@ -129,7 +129,7 @@
},
"HuggingFace": {
- "Endpoint": "https://api-inference.huggingface.co",
+ "Endpoint": "https://router.huggingface.co/hf-inference",
"Model": "tiiuae/falcon-180B-chat",
"Token": ""
},
diff --git a/docs/architecture/agent-utility.md b/docs/architecture/agent-utility.md
new file mode 100644
index 000000000..b65dea8c0
--- /dev/null
+++ b/docs/architecture/agent-utility.md
@@ -0,0 +1,459 @@
+# Agent Utility
+
+## Introduction
+This document aims to introduce the agent utility concept and provide an instruction on adding custom agent utilities in AI project “BotSharp”. We will start by explaining the mechanism of agent utility in [Section 2](#agent-utility). Then, we illustrate the custom agent utility setup and integration in [Section 3](#agent-utility-setup) and [Section 4](#agent-utility-integration), respectively. A use case will be demonstrated in [Section 5](#use-case-demo). We wrap up the document with a short summary.
+
+## Agent Utility
+The agent utility is a unique feature that can be integrated into agent to enhance its capability. Its core principle is that it can dynamically and seamlessly add extra prompts and add task-oriented functions (or tools) during conversation, without disrupting the agent’s primary purpose. In other words, the agent utility can perform extra tasks based on the context of conversation. Typical examples of agent utility include reading images/pdf, generating image, and sending http requests. [Fig 2.1.1](#agent-utility-example) demonstrates an example of these utilities. In this example, “Chatbot” is a simple agent to answer user questions, and the utilities extend its capability to explain image content, generate requested image, and send a specific http request.
+
+
+
+
+
+
+## Agent Utility Setup
+In this section, we outline the steps to set up a custom agent utility. We start with the basic code structure and then add essential utility data, such as prompts and functions. The utility hooks are used to incorporate the utility into the agent. Finally, we give a brief overview of the utility implementation.
+
+### Basic Code Structure
+The basic code structure of a typical agent utility includes prompt/function data, hooks, and function implementation. We can add specific utility prompts and functions in different projects. Note that the agent **“6745151e-6d46-4a02-8de4-1c4f21c7da95”** is considered as a dedicated utility assistant, and every prompt and function can be optionally used as a utility. [Fig 3.1.1](#agent-utility-code-structure) presents the structure of prompt, function, hooks, and implementation of an http utility.
+
+
+
+
+
+
+### Utility Data
+For a typical agent utility, it is essential to add at least one prompt and one function. The utility name is formatted as **“[plugin name].[utility name]”**, such as “http.http-handler”. The prompt is added under the “templates” folder and its recommended name is **“util-[plugin name]-[function name].fn.liquid”**, while the function is added under the “functions” folder and its recommended name is **“util-[plugin name]-[function name].json”**. Once we compile the project, we can find the aggregated utility assistant folder at location: **“\BotSharp\src\WebStarter\bin\Debug\net8.0\data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95”**.
+
+### Utility Hooks
+The utility hooks are used to connect the agent utility to the agent system. The code snippet below demonstrates an implementation of the http utility hook, where we define the utility name, prompts and functions. Note that each utility can be used across different agents.
+
+```csharp
+public class HttpHandlerPlugin : IBotSharpPlugin
+{
+ public string Id => "2c1eb1c4-16e5-4c65-8ee4-032324c26b81";
+ public string Name => "HTTP Handler";
+ public string Description => "Empower agent to handle HTTP request in RESTful API or GraphQL";
+ public string IconUrl => "https://lirp.cdn-website.com/6f8d6d8a/dms3rep/multi/opt/API_Icon-640w.png";
+ public string[] AgentIds => new[] { "87c458fc-ec5f-40ae-8ed6-05dda8a07523" };
+
+ public void RegisterDI(IServiceCollection services, IConfiguration config)
+ {
+ services.AddScoped(provider =>
+ {
+ var settingService = provider.GetRequiredService();
+ return settingService.Bind("HttpHandler");
+ });
+
+ services.AddScoped();
+ }
+}
+```
+
+The agent hook is used to append the utility prompt and function during the conversation. **Note that the utility data is only allowed to be included in the context of conversation**. The utility mechanism is implemented in the **“OnAgentUtilityLoaded”** hook, and it is invoked when we load any agent.
+
+```csharp
+public async Task LoadAgent(string id)
+{
+ if (string.IsNullOrEmpty(id) || id == Guid.Empty.ToString())
+ {
+ return null;
+ }
+
+ var hooks = _services.GetServices();
+
+ // Before agent is loaded.
+ foreach (var hook in hooks)
+ {
+ if (!string.IsNullOrEmpty(hook.SelfId) && hook.SelfId != id)
+ {
+ continue;
+ }
+
+ hook.OnAgentLoading(ref id);
+ }
+
+ var agent = await GetAgent(id);
+ if (agent == null)
+ {
+ return null;
+ }
+
+ await InheritAgent(agent);
+ OverrideInstructionByChannel(agent);
+ AddOrUpdateParameters(agent);
+
+ // Populate state into dictionary
+ agent.TemplateDict = new Dictionary();
+ PopulateState(agent.TemplateDict);
+
+ // After agent is loaded
+ foreach (var hook in hooks)
+ {
+ if (!string.IsNullOrEmpty(hook.SelfId) && hook.SelfId != id)
+ {
+ continue;
+ }
+
+ hook.SetAget(agent);
+
+ if (!string.IsNullOrEmpty(agent.Instruction))
+ {
+ hook.OnInstructionLoaded(agent.Instruction, agent.TemplateDict);
+ }
+
+ if (agent.Functions != null)
+ {
+ hook.OnFunctionsLoaded(agent.Functions);
+ }
+
+ if (agent.Samples != null)
+ {
+ hook.OnSamplesLoaded(agent.Samples);
+ }
+
+ hook.OnAgentUtilityLoaded(agent);
+ hook.OnAgentLoaded(agent);
+ }
+
+ _logger.LogInformation($"Loaded agent {agent}.");
+
+ return agent;
+}
+```
+
+### Utility Function Implementation
+Here we introduce a simple utility function implementation. The actual content depends on what task you want this utility to fulfill. The code snippet below illustrates the implementation of the “handle http request” function. Note that the property “Name” must be consistent with the function added in the utility data. The “Indication” is an optional property whose content will be displayed in the chat while the user is waiting for the assistant response.
+
+```csharp
+public class HandleHttpRequestFn : IFunctionCallback
+{
+ public string Name => "util-http-handle_http_request";
+ public string Indication => "Handling http request";
+
+ private readonly IServiceProvider _services;
+ private readonly ILogger _logger;
+ private readonly IHttpClientFactory _httpClientFactory;
+ private readonly IHttpContextAccessor _context;
+ private readonly BotSharpOptions _options;
+
+ public HandleHttpRequestFn(IServiceProvider services,
+ ILogger logger,
+ IHttpClientFactory httpClientFactory,
+ IHttpContextAccessor context,
+ BotSharpOptions options)
+ {
+ _services = services;
+ _logger = logger;
+ _httpClientFactory = httpClientFactory;
+ _context = context;
+ _options = options;
+ }
+
+ public async Task Execute(RoleDialogModel message)
+ {
+ var args = JsonSerializer.Deserialize(message.FunctionArgs, _options.JsonSerializerOptions);
+ var url = args?.RequestUrl;
+ var method = args?.HttpMethod;
+ var content = args?.RequestContent;
+
+ try
+ {
+ var response = await SendHttpRequest(url, method, content);
+ var responseContent = await HandleHttpResponse(response);
+ message.Content = responseContent;
+ return true;
+ }
+ catch (Exception ex)
+ {
+ var msg = $"Fail when sending http request. Url: {url}, method: {method}, content: {content}";
+ _logger.LogWarning($"{msg}\n(Error: {ex.Message})");
+ message.Content = msg;
+ return false;
+ }
+ }
+
+ private async Task SendHttpRequest(string? url, string? method, string? content)
+ {
+ if (string.IsNullOrEmpty(url)) return null;
+
+ using var client = _httpClientFactory.CreateClient();
+ AddRequestHeaders(client);
+
+ var (uri, request) = BuildHttpRequest(url, method, content);
+ var response = await client.SendAsync(request);
+ if (response == null || !response.IsSuccessStatusCode)
+ {
+ _logger.LogWarning($"Response status code: {response?.StatusCode}");
+ }
+
+ return response;
+ }
+
+ private void AddRequestHeaders(HttpClient client)
+ {
+ client.DefaultRequestHeaders.Add("Authorization", $"{_context.HttpContext.Request.Headers["Authorization"]}");
+
+ var settings = _services.GetRequiredService();
+ var origin = !string.IsNullOrEmpty(settings.Origin) ? settings.Origin : $"{_context.HttpContext.Request.Headers["Origin"]}";
+ if (!string.IsNullOrEmpty(origin))
+ {
+ client.DefaultRequestHeaders.Add("Origin", origin);
+ }
+ }
+
+ private (Uri, HttpRequestMessage) BuildHttpRequest(string url, string? method, string? content)
+ {
+ var httpMethod = GetHttpMethod(method);
+ StringContent httpContent;
+
+ var requestUrl = url;
+ if (httpMethod == HttpMethod.Get)
+ {
+ httpContent = BuildHttpContent("{}");
+ requestUrl = BuildQuery(url, content);
+ }
+ else
+ {
+ httpContent = BuildHttpContent(content);
+ }
+
+ if (!Uri.TryCreate(requestUrl, UriKind.Absolute, out var uri))
+ {
+ var settings = _services.GetRequiredService();
+ var baseUri = new Uri(settings.BaseAddress);
+ uri = new Uri(baseUri, requestUrl);
+ }
+
+ return (uri, new HttpRequestMessage
+ {
+ RequestUri = uri,
+ Method = httpMethod,
+ Content = httpContent
+ });
+ }
+
+ private HttpMethod GetHttpMethod(string? method)
+ {
+ var localMethod = method?.Trim()?.ToUpper();
+ HttpMethod matchMethod;
+
+ switch (localMethod)
+ {
+ case "GET":
+ matchMethod = HttpMethod.Get;
+ break;
+ case "DELETE":
+ matchMethod = HttpMethod.Delete;
+ break;
+ case "PUT":
+ matchMethod = HttpMethod.Put;
+ break;
+ case "Patch":
+ matchMethod = HttpMethod.Patch;
+ break;
+ default:
+ matchMethod = HttpMethod.Post;
+ break;
+ }
+ return matchMethod;
+ }
+
+ private StringContent BuildHttpContent(string? content)
+ {
+ var str = string.Empty;
+ try
+ {
+ var json = JsonSerializer.Deserialize(content ?? "{}", _options.JsonSerializerOptions);
+ str = JsonSerializer.Serialize(json, _options.JsonSerializerOptions);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogWarning($"Error when build http content: {content}\n(Error: {ex.Message})");
+ }
+
+ return new StringContent(str, Encoding.UTF8, MediaTypeNames.Application.Json);
+ }
+
+ private string BuildQuery(string url, string? content)
+ {
+ if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(content)) return url;
+
+ try
+ {
+ var queries = new List();
+ var json = JsonSerializer.Deserialize(content, _options.JsonSerializerOptions);
+ var root = json.RootElement;
+ foreach (var prop in root.EnumerateObject())
+ {
+ var name = prop.Name.Trim();
+ var value = prop.Value.ToString().Trim();
+ if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(value))
+ {
+ continue;
+ }
+
+ queries.Add($"{name}={value}");
+ }
+
+ if (!queries.IsNullOrEmpty())
+ {
+ url += $"?{string.Join('&', queries)}";
+ }
+ return url;
+ }
+ catch (Exception ex)
+ {
+ _logger.LogWarning($"Error when building url query. Url: {url}, Content: {content}\n(Error: {ex.Message})");
+ return url;
+ }
+ }
+
+ private async Task HandleHttpResponse(HttpResponseMessage? response)
+ {
+ if (response == null) return string.Empty;
+
+ return await response.Content.ReadAsStringAsync();
+ }
+}
+```
+
+### Utility Inheritance
+Here we introduce a new feature: utility inheritance. As we are using the routing-based multi-agent architecture, different agents may come into the call stack while we are handling user requests. With the utility inheritance, the agent can not only use the utilities added to itself but also inherit the utilities from the entry agent, which is the first agent that comes into the call stack, such as a router agent. [Fig 3.5.1](#routing-architecture) illustrates a typical example of routing-based multi-agent architecture, where “Pizza Bot” is the router and "Order Inquery", "Ordering", "Payment" are task agents. When the user starts chatting, “Pizza Bot” first comes into the call stack, with "Order Inquery", "Ordering", or "Payment" joining next depending on what the user actually requests. For example, if we allow "Order Inquery" to inherit utilities, all the utilities from itself as well as “Pizza Bot” will be invoked once the "Order Inquery" agent is in action.
+
+
+
+
+
+
+### Agent Setup
+Here we introduce the agent setup with utilities and inheritance. As we introduced in [Section 3.3](#utility-hooks), each utility of an agent is structured with utility name, functions, and prompts. [Fig 3.6.1](#router-utility-ui) and [Fig 3.6.2](#task-agent-utility-ui) presents the utility configuration and utility inheritance of “Pizza Bot” and “Order Inquery”, respectively. As is displayed, we can apply the utility configuration and inheritance via agent files or agent detail ui. Note that we can uncheck the box to disable a utility ([Fig 3.6.2](#router-utility-ui)).
+
+```json
+{
+ "id": "8970b1e5-d260-4e2c-90b1-f1415a257c18",
+ "name": "Pizza Bot",
+ "description": "AI assistant that can help customer place pizza order.",
+ "type": "routing",
+ "inheritAgentId": "01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a",
+ "createdDateTime": "2023-08-18T10:39:32.2349685Z",
+ "updatedDateTime": "2023-08-18T14:39:32.2349686Z",
+ "iconUrl": "https://cdn-icons-png.flaticon.com/512/6978/6978255.png",
+ "disabled": false,
+ "isPublic": true,
+ "profiles": [ "pizza" ],
+ "utilities": [
+ {
+ "name": "http.http-handler",
+ "functions": [
+ { "name": "util-http-handle_http_request" }
+ ],
+ "templates": [
+ { "name": "util-http-handle_http_request.fn" }
+ ]
+ }
+ ],
+ "routingRules": [
+ {
+ "type": "reasoner",
+ "field": "NaiveReasoner"
+ }
+ ]
+}
+```
+
+
+
+
+
+
+
+
+
+
+```json
+{
+ "name": "Order Inquiry",
+ "description": "Check the order status like payment, delivery or baking.",
+ "createdDateTime": "2023-08-18T14:39:32.2349685Z",
+ "updatedDateTime": "2023-08-18T14:39:32.2349686Z",
+ "id": "b284db86-e9c2-4c25-a59e-4649797dd130",
+ "disabled": false,
+ "isPublic": true,
+ "mergeUtility": true,
+ "profiles": [ "pizza" ]
+}
+```
+
+
+
+
+
+
+
+
+## Agent Utility Integration
+In this section, we outline the steps to integrate a custom agent utility, including registering plugin, registering assembly, and adding project reference.
+
+The code snippet below presents the “Http Handler Plugin” in the “BotSharp.Plugin.HttpHandler”, where we can register the hooks and other essential settings. Note that there is no need to register the function here, since it is automatically registered on the application level.
+
+```csharp
+public class HttpHandlerPlugin : IBotSharpPlugin
+{
+ public string Id => "2c1eb1c4-16e5-4c65-8ee4-032324c26b81";
+ public string Name => "HTTP Handler";
+ public string Description => "Empower agent to handle HTTP request in RESTful API or GraphQL";
+ public string IconUrl => "https://lirp.cdn-website.com/6f8d6d8a/dms3rep/multi/opt/API_Icon-640w.png";
+ public string[] AgentIds => new[] { "87c458fc-ec5f-40ae-8ed6-05dda8a07523" };
+
+ public void RegisterDI(IServiceCollection services, IConfiguration config)
+ {
+ services.AddScoped(provider =>
+ {
+ var settingService = provider.GetRequiredService();
+ return settingService.Bind("HttpHandler");
+ });
+
+ services.AddScoped();
+ }
+}
+```
+
+[Fig 4.1.1](#register-assembly) demonstrates the utility assembly registration in “appsettings.json”. It is important to note that we are required to add the project reference to the Startup project, e.g., WebStarter. Moreover, we are required to add any new custom agent utility in the “Plugin” folder instead of the “BotSharp” folder.
+
+
+
+
+
+
+
+## Use Case Demo
+In this section, we demonstrate an http utility. After we set up and integrate the custom agent utility in backend, we can start the BotSharp-UI and go to any specific agent. [Fig 5.1.1](#add-utility) shows an example of the “Chatbot” agent, where we can add any registered utilities in the highlight section.
+
+
+
+
+
+
+Once we add the utility, we can initialize a conversation by clicking the bot icon at the top left corner. [Fig 5.1.2](#chat-window-demo) shows the conversation window, where we can find the number of utilities at the left panel. We can also click the agent name to go back to the agent page.
+
+
+
+
+
+
+Here we use dummy rest APIs (source: https://dummy.restapiexample.com/) for the demo purpose. [Fig 5.1.3](#dummy-http) displays the various http requests sent in the conversation with “Chatbot”. We can see that the “Http Handler” utility has successfully extends the agent to send http request and receive response.
+
+
+
+
+
+
+## Summary
+In this document, we introduce the agent utility concept and provide a step-by-step instruction on adding custom agent utilities in AI project “BotSharp”.
+
+The agent utility is designed for enhancing the agent capability to perform dedicated tasks, such as sending http request, reading images, and generating images, by adding extra prompts and functions.
+
+The agent utility setup and integration are explained step by step in [Section 3](#agent-utility-setup) and [Section 4](#agent-utility-integration), respectively.
+
+We end up the document by demonstrating the Http utility, where we prove the utility can handle various http requests in the chat with agents.
diff --git a/docs/architecture/assets/agent-utility/add-utility.png b/docs/architecture/assets/agent-utility/add-utility.png
new file mode 100644
index 000000000..cda3472d6
Binary files /dev/null and b/docs/architecture/assets/agent-utility/add-utility.png differ
diff --git a/docs/architecture/assets/agent-utility/agent-utility-code-structure.png b/docs/architecture/assets/agent-utility/agent-utility-code-structure.png
new file mode 100644
index 000000000..8b2c4458f
Binary files /dev/null and b/docs/architecture/assets/agent-utility/agent-utility-code-structure.png differ
diff --git a/docs/architecture/assets/agent-utility/agent-utility-example.png b/docs/architecture/assets/agent-utility/agent-utility-example.png
new file mode 100644
index 000000000..81d1a7d49
Binary files /dev/null and b/docs/architecture/assets/agent-utility/agent-utility-example.png differ
diff --git a/docs/architecture/assets/agent-utility/chat-window-demo.png b/docs/architecture/assets/agent-utility/chat-window-demo.png
new file mode 100644
index 000000000..e31c6953a
Binary files /dev/null and b/docs/architecture/assets/agent-utility/chat-window-demo.png differ
diff --git a/docs/architecture/assets/agent-utility/dummy-http.png b/docs/architecture/assets/agent-utility/dummy-http.png
new file mode 100644
index 000000000..d5ca8df7a
Binary files /dev/null and b/docs/architecture/assets/agent-utility/dummy-http.png differ
diff --git a/docs/architecture/assets/agent-utility/register-assembly.png b/docs/architecture/assets/agent-utility/register-assembly.png
new file mode 100644
index 000000000..7c5a478e9
Binary files /dev/null and b/docs/architecture/assets/agent-utility/register-assembly.png differ
diff --git a/docs/architecture/assets/agent-utility/router-utility-ui.png b/docs/architecture/assets/agent-utility/router-utility-ui.png
new file mode 100644
index 000000000..5e3f887c0
Binary files /dev/null and b/docs/architecture/assets/agent-utility/router-utility-ui.png differ
diff --git a/docs/architecture/assets/agent-utility/routing-arch.png b/docs/architecture/assets/agent-utility/routing-arch.png
new file mode 100644
index 000000000..6485c3bba
Binary files /dev/null and b/docs/architecture/assets/agent-utility/routing-arch.png differ
diff --git a/docs/architecture/assets/agent-utility/task-agent-utility-ui.png b/docs/architecture/assets/agent-utility/task-agent-utility-ui.png
new file mode 100644
index 000000000..9838673f6
Binary files /dev/null and b/docs/architecture/assets/agent-utility/task-agent-utility-ui.png differ
diff --git a/docs/index.rst b/docs/index.rst
index b7c8b78ef..e1dfd40ce 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -96,6 +96,13 @@ The main documentation for the site is organized into the following sections:
llm/few-shot-learning
llm/provider
+.. toctree::
+ :maxdepth: 2
+ :caption: MCP
+
+ mcp/parallel-search
+ mcp/sem
+
.. _llamasharp:
.. toctree::
@@ -115,6 +122,7 @@ The main documentation for the site is organized into the following sections:
architecture/plugin
architecture/hooks
architecture/routing
+ architecture/agent-utility
architecture/logging
architecture/data-persistence
diff --git a/docs/mcp/parallel-search.json b/docs/mcp/parallel-search.json
new file mode 100644
index 000000000..852cea472
--- /dev/null
+++ b/docs/mcp/parallel-search.json
@@ -0,0 +1,24 @@
+{
+ "MCP": {
+ "Enabled": true,
+ "McpClientOptions": {
+ "ClientInfo": {
+ "Name": "BotSharp",
+ "Version": "5.2.0"
+ }
+ },
+ "McpServerConfigs": [
+ {
+ "Id": "parallel-search",
+ "Name": "Parallel Search",
+ "Enabled": true,
+ "HttpConfig": {
+ "EndPoint": "https://search.parallel.ai/mcp",
+ "AdditionalHeaders": {
+ "User-Agent": "BotSharp/5.2.0"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/docs/mcp/parallel-search.md b/docs/mcp/parallel-search.md
new file mode 100644
index 000000000..5a0744fa0
--- /dev/null
+++ b/docs/mcp/parallel-search.md
@@ -0,0 +1,57 @@
+# Parallel Search MCP
+
+BotSharp can use the free, keyless [Parallel Search MCP](https://docs.parallel.ai/integrations/mcp/search-mcp) service for web search and page extraction. This example uses the existing HTTP MCP integration. It does not require a Parallel API key or a new plugin.
+
+## Configure a server
+
+The [example configuration](parallel-search.json) uses BotSharp's `MCP` section, `HttpConfig`, and the Streamable HTTP endpoint `https://search.parallel.ai/mcp`. Add its server object to `MCP.McpServerConfigs` in your host's configuration. Keep any existing server entries and client settings. The example's `User-Agent` identifies the caller as BotSharp; update its version when using another BotSharp release.
+
+For a host that registers MCP directly, load your configuration and call:
+
+```csharp
+services.AddBotSharpMCP(configuration);
+```
+
+WebStarter already calls `AddBotSharpMCP` in `Program.cs`. Keep `MCP.Enabled` and this server's `Enabled` set to `true` to use it. Setting the server's `Enabled` to `false` prevents connections to that server. The repository's WebStarter configuration and existing provider selections are unchanged by this example.
+
+## Select tools for an agent
+
+Use the MCP server list in BotSharp's UI to select **Parallel Search**, then enable `web_search` and `web_fetch` for the agent. The server list discovers the tools through `IMcpService.GetServerConfigsAsync()`. The corresponding agent `mcp_tools` entry is:
+
+```json
+{
+ "name": "Parallel Search",
+ "server_id": "parallel-search",
+ "disabled": false,
+ "functions": [
+ { "name": "web_search" },
+ { "name": "web_fetch" }
+ ]
+}
+```
+
+BotSharp's MCP agent hook adds the selected tools to the agent's secondary functions during a conversation. Its executor factory routes calls to `McpToolExecutor`, which returns the server's text content to the conversation.
+
+Ask the agent to find Microsoft's official introduction to .NET and explain what .NET is using that source. `web_search` takes an `objective` and a `search_queries` array. Its excerpts can often answer the question directly. Use `web_fetch`, with a `urls` array and optional `objective`, when a specific page or exact wording is needed. Both tools also support a shared `session_id` for the conversation. Your agent still needs its existing LLM configuration; keyless search does not supply an LLM.
+
+## Run the example validation
+
+With the .NET 8 SDK, from the repository root:
+
+```sh
+dotnet test tests/BotSharp.Core.UnitTests/BotSharp.Core.UnitTests.csproj \
+ --filter FullyQualifiedName~ParallelSearchExampleTests \
+ --logger "console;verbosity=detailed"
+```
+
+By default this runs a local HTTP fixture with no external requests. To use the public service explicitly, on a POSIX shell:
+
+```sh
+BOTSHARP_PARALLEL_LIVE=1 dotnet test tests/BotSharp.Core.UnitTests/BotSharp.Core.UnitTests.csproj \
+ --filter FullyQualifiedName~ParallelSearchExampleTests \
+ --logger "console;verbosity=detailed"
+```
+
+For PowerShell, set `$env:BOTSHARP_PARALLEL_LIVE = "1"` before the same test command, then remove it with `Remove-Item Env:BOTSHARP_PARALLEL_LIVE` when done. Live validation requires network access and is subject to the service's availability and usage limits.
+
+The test loads the example JSON through `AddBotSharpMCP`, discovers tools through `IMcpService`, loads them through the agent hook, and invokes search and fetch through the executor factory. It prints the returned source content and checks that discovery and tool calls identify BotSharp without authentication headers. It uses test conversation state and no LLM, saved settings, environment configuration provider, or credential store. It also checks that disabling the agent's MCP entry removes the tools and disabling the server prevents a connection.
diff --git a/docs/mcp/sem.json b/docs/mcp/sem.json
new file mode 100644
index 000000000..96d875c05
--- /dev/null
+++ b/docs/mcp/sem.json
@@ -0,0 +1,19 @@
+{
+ "MCP": {
+ "Enabled": true,
+ "McpServerConfigs": [
+ {
+ "Id": "sem",
+ "Name": "Sem local code",
+ "Enabled": true,
+ "StdioConfig": {
+ "Command": "sem",
+ "Arguments": ["mcp"],
+ "EnvironmentVariables": {
+ "SEM_REPO": "/absolute/path/to/checkout"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/docs/mcp/sem.md b/docs/mcp/sem.md
new file mode 100644
index 000000000..6ba7c2336
--- /dev/null
+++ b/docs/mcp/sem.md
@@ -0,0 +1,59 @@
+# Local code lookup with Sem
+
+BotSharp's stdio MCP integration can start [Sem](https://github.com/Ataraxy-Labs/sem)
+to look up source code in a local checkout. This optional configuration does not
+change WebStarter defaults or require another BotSharp plugin.
+
+## Configure the server
+
+Install Sem on the machine or container running BotSharp (`sem --version`;
+tested with 0.27.0). Add the server object from [sem.json](sem.json) to your
+existing `MCP.McpServerConfigs` array, preserving other servers and settings.
+Replace `SEM_REPO` with an absolute checkout path visible to that process.
+If `sem` is not on the host's `PATH`, use its absolute executable path in
+`StdioConfig.Command`. Keep `MCP.Enabled` and the server's `Enabled` set to `true`.
+
+WebStarter already registers `AddBotSharpMCP(configuration)`. Hosts that register
+services themselves need the same call.
+
+## Select code lookup tools
+
+In the MCP server list, select **Sem local code** and enable `sem_find` and
+`sem_grep` for the agent. The equivalent agent `mcp_tools` entry is:
+
+```json
+{
+ "name": "Sem local code",
+ "server_id": "sem",
+ "disabled": false,
+ "functions": [{ "name": "sem_find" }, { "name": "sem_grep" }]
+}
+```
+
+Ask the agent to find a known symbol in the selected checkout. For example,
+`sem_find` accepts `{"query":"parse_config","mode":"context","token_budget":1200}`.
+BotSharp routes selected functions through its existing MCP executor. The agent
+still uses its configured LLM; Sem does not supply a model or model credentials.
+
+Sem may write a local index. `SEM_REPO` is a repository selector, not an access
+control boundary. Run only against trusted checkouts under an appropriately
+restricted OS account. The full server also exposes validation tools that can
+execute commands, so retain the explicit tool selection. Source returned by
+tools will be sent to the agent's configured model.
+
+Disable the server with `Enabled: false`, or remove this server entry and the
+agent's corresponding `mcp_tools` entry. No existing provider settings need to
+change.
+
+## Validate the example
+
+From the repository root with the .NET 8 SDK:
+
+```sh
+dotnet test tests/BotSharp.Core.UnitTests/BotSharp.Core.UnitTests.csproj --filter FullyQualifiedName~SemExampleTests
+```
+
+The configuration test does not launch Sem. To also exercise discovery and
+`sem_find` through BotSharp's client manager, set `BOTSHARP_SEM_TEST_REPO` to an
+absolute disposable checkout containing a `parse_config` symbol before running
+the same command. The live test is opt-in; it requires Sem on `PATH` but no LLM.
diff --git a/docs/quick-start/assets/NuGet-Local-Whisper.png b/docs/quick-start/assets/NuGet-Local-Whisper.png
new file mode 100644
index 000000000..f811d115c
Binary files /dev/null and b/docs/quick-start/assets/NuGet-Local-Whisper.png differ
diff --git a/docs/quick-start/assets/Result-Local-Whisper.png b/docs/quick-start/assets/Result-Local-Whisper.png
new file mode 100644
index 000000000..225e3463c
Binary files /dev/null and b/docs/quick-start/assets/Result-Local-Whisper.png differ
diff --git a/docs/quick-start/assets/Steps-Local-Whisper.png b/docs/quick-start/assets/Steps-Local-Whisper.png
new file mode 100644
index 000000000..eee14de28
Binary files /dev/null and b/docs/quick-start/assets/Steps-Local-Whisper.png differ
diff --git a/docs/utilities/local-whisper.md b/docs/utilities/local-whisper.md
new file mode 100644
index 000000000..276faf682
--- /dev/null
+++ b/docs/utilities/local-whisper.md
@@ -0,0 +1,48 @@
+# Local Whisper
+
+### Introduction
+
+Whisper, an advanced automatic speech recognition (ASR) system developed by OpenAI, represents a significant leap forward in speech technology. This system was trained on an enormous dataset comprising 680,000 hours of supervised data, which includes a wide range of languages and tasks, all sourced from the web. The diversity and scale of this dataset play a crucial role in enhancing Whisper's ability to accurately recognize and transcribe speech. As a result, it exhibits improved robustness in dealing with various accents, background noise, and complex technical language, making it a versatile and reliable tool for a broad spectrum of applications.
+
+### Get started with Local Whisper
+To begin using the local Whisper model, the Whisper.net library must be added as a dependency. This can be achieved through:
+- NuGet Manager
+
+ 
+- Package Manager Console
+```powershell
+Install-Package Whisper.net
+Install-Package Whisper.net.Runtime
+```
+- Add a package reference in your csproj
+```
+
+
+```
+
+The following Whisper model types would be available through the use of plug-ins:
+
+- Tiny
+- TinyEn
+- Base
+- BaseEn
+- Small
+- SmallEn
+- Medium
+- MediumEn
+- LargeV1
+- LargeV2
+- LargeV3
+
+The `NativeWhisperProvider` is designed to process all input audio files using the local Whisper model. Users have the ability to set the file path for audio files, with current support for mp3 and wav formats only. By default, the TinyEn model type is used for transcribing audio into text, but this can be customized based on the user's requirements. This flexibility allows BotSharp to efficiently handle various transcription needs, ensuring accurate and reliable text outputs from audio inputs.
+
+Once program starts, you can upload your audio file in the ChatUI.
+
+
+
+The transcript will be displayed in the response.
+
+
+
+### Response Time
+When using a CPU locally, the response time is impressively fast. For instance, it can transcribe a 10-minute audio clip into text in approximately 30 seconds. For shorter audio files, ranging from 3 to 5 minutes in duration, the transcription response is around a few seconds or even quicker.
\ No newline at end of file
diff --git a/src/BotSharp.AppHost/BotSharp.AppHost.csproj b/src/BotSharp.AppHost/BotSharp.AppHost.csproj
new file mode 100644
index 000000000..8142e57f7
--- /dev/null
+++ b/src/BotSharp.AppHost/BotSharp.AppHost.csproj
@@ -0,0 +1,24 @@
+
+
+
+
+ Exe
+ $(TargetFramework)
+ $(LangVersion)
+ enable
+ enable
+ true
+ e4bd9862-7edd-45f0-9a89-b8e3b3339c71
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/BotSharp.AppHost/Program.cs b/src/BotSharp.AppHost/Program.cs
new file mode 100644
index 000000000..9c371bf4b
--- /dev/null
+++ b/src/BotSharp.AppHost/Program.cs
@@ -0,0 +1,13 @@
+var builder = DistributedApplication.CreateBuilder(args);
+
+var apiService = builder.AddProject("apiservice")
+ .WithExternalHttpEndpoints();
+
+builder.AddNpmApp("BotSharpUI", "../../../BotSharp-UI")
+ .WithReference(apiService)
+ .WithHttpEndpoint(env: "PORT")
+ .WithExternalHttpEndpoints()
+ .PublishAsDockerFile();
+
+builder.Build().Run();
+
diff --git a/src/BotSharp.AppHost/Properties/launchSettings.json b/src/BotSharp.AppHost/Properties/launchSettings.json
new file mode 100644
index 000000000..c315179c6
--- /dev/null
+++ b/src/BotSharp.AppHost/Properties/launchSettings.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "https://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "https://localhost:17248;http://localhost:15140",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_ENVIRONMENT": "Development",
+ "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21247",
+ "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22140"
+ }
+ },
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "http://localhost:15140",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_ENVIRONMENT": "Development",
+ "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19185",
+ "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20069"
+ }
+ }
+ }
+}
diff --git a/src/BotSharp.AppHost/appsettings.Development.json b/src/BotSharp.AppHost/appsettings.Development.json
new file mode 100644
index 000000000..0c208ae91
--- /dev/null
+++ b/src/BotSharp.AppHost/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/src/BotSharp.AppHost/appsettings.json b/src/BotSharp.AppHost/appsettings.json
new file mode 100644
index 000000000..31c092aa4
--- /dev/null
+++ b/src/BotSharp.AppHost/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning",
+ "Aspire.Hosting.Dcp": "Warning"
+ }
+ }
+}
diff --git a/src/BotSharp.ServiceDefaults/BotSharp.ServiceDefaults.csproj b/src/BotSharp.ServiceDefaults/BotSharp.ServiceDefaults.csproj
new file mode 100644
index 000000000..78ccdc056
--- /dev/null
+++ b/src/BotSharp.ServiceDefaults/BotSharp.ServiceDefaults.csproj
@@ -0,0 +1,26 @@
+
+
+
+ $(TargetFramework)
+ $(LangVersion)
+ enable
+ enable
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/BotSharp.ServiceDefaults/Extensions.cs b/src/BotSharp.ServiceDefaults/Extensions.cs
new file mode 100644
index 000000000..bfc0bb687
--- /dev/null
+++ b/src/BotSharp.ServiceDefaults/Extensions.cs
@@ -0,0 +1,151 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Diagnostics.HealthChecks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Diagnostics.HealthChecks;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.ServiceDiscovery;
+using OpenTelemetry;
+using OpenTelemetry.Logs;
+using OpenTelemetry.Metrics;
+using OpenTelemetry.Trace;
+using Serilog;
+
+namespace Microsoft.Extensions.Hosting
+{
+ // Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry.
+ // This project should be referenced by each service project in your solution.
+ // To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults
+ public static class Extensions
+ {
+ public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBuilder builder)
+ {
+ builder.ConfigureOpenTelemetry();
+
+ builder.AddDefaultHealthChecks();
+
+ builder.Services.AddServiceDiscovery();
+
+ builder.Services.ConfigureHttpClientDefaults(http =>
+ {
+ // Turn on resilience by default
+ http.AddStandardResilienceHandler();
+
+ // Turn on service discovery by default
+ http.AddServiceDiscovery();
+ });
+
+ // Uncomment the following to restrict the allowed schemes for service discovery.
+ // builder.Services.Configure(options =>
+ // {
+ // options.AllowedSchemes = ["https"];
+ // });
+
+ return builder;
+ }
+
+ public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicationBuilder builder)
+ {
+ builder.Logging.AddOpenTelemetry(logging =>
+ { // Use Serilog
+ Log.Logger = new LoggerConfiguration()
+ // 对请求路径为 / heathz和 / metrics不进行日志记录
+ .Filter.ByExcluding(
+ e => e.Properties.TryGetValue("RequestPath", out var value) && (value.ToString().StartsWith("\"/metrics\"") || value.ToString().StartsWith("\"/healthz\""))
+ )
+#if DEBUG
+ .MinimumLevel.Information()
+#else
+ .MinimumLevel.Warning()
+#endif
+ .WriteTo.Console()
+ .WriteTo.File("logs/log-.txt",
+ shared: true,
+ rollingInterval: RollingInterval.Day)
+ //.WriteTo.OpenTelemetry(options =>
+ //{
+ // options.Endpoint = builder.Configuration["OpenTelemetry:Endpoint"];
+ // options.ResourceAttributes = new Dictionary
+ // {
+ // ["service.name"] = builder.Configuration["OpenTelemetry:ServiceName"],
+ // ["index"] = 10,
+ // ["flag"] = true,
+ // ["value"] = 3.14
+ // };
+ //})
+ .CreateLogger();
+
+ logging.IncludeFormattedMessage = true;
+ logging.IncludeScopes = true;
+ });
+
+ builder.Services.AddOpenTelemetry()
+ .WithMetrics(metrics =>
+ {
+ metrics.AddAspNetCoreInstrumentation()
+ .AddHttpClientInstrumentation()
+ .AddRuntimeInstrumentation();
+ })
+ .WithTracing(tracing =>
+ {
+ tracing.AddAspNetCoreInstrumentation()
+ // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package)
+ //.AddGrpcClientInstrumentation()
+ .AddHttpClientInstrumentation();
+ });
+
+ builder.AddOpenTelemetryExporters();
+
+ return builder;
+ }
+
+ private static IHostApplicationBuilder AddOpenTelemetryExporters(this IHostApplicationBuilder builder)
+ {
+ var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]);
+
+ if (useOtlpExporter)
+ {
+ builder.Services.Configure(logging => logging.AddOtlpExporter());
+ builder.Services.ConfigureOpenTelemetryMeterProvider(metrics => metrics.AddOtlpExporter());
+ builder.Services.ConfigureOpenTelemetryTracerProvider(tracing => tracing.AddOtlpExporter());
+
+ }
+
+ // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package)
+ //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"]))
+ //{
+ // builder.Services.AddOpenTelemetry()
+ // .UseAzureMonitor();
+ //}
+
+ return builder;
+ }
+
+ public static IHostApplicationBuilder AddDefaultHealthChecks(this IHostApplicationBuilder builder)
+ {
+ builder.Services.AddHealthChecks()
+ // Add a default liveness check to ensure app is responsive
+ .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]);
+
+ return builder;
+ }
+
+ public static WebApplication MapDefaultEndpoints(this WebApplication app)
+ {
+ // Adding health checks endpoints to applications in non-development environments has security implications.
+ // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments.
+ if (app.Environment.IsDevelopment())
+ {
+ // All health checks must pass for app to be considered ready to accept traffic after starting
+ app.MapHealthChecks("/health");
+
+ // Only health checks tagged with the "live" tag must pass for app to be considered alive
+ app.MapHealthChecks("/alive", new HealthCheckOptions
+ {
+ Predicate = r => r.Tags.Contains("live")
+ });
+ }
+
+ return app;
+ }
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction.ComputerUse/BotSharp.Abstraction.ComputerUse.csproj b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/BotSharp.Abstraction.ComputerUse.csproj
new file mode 100644
index 000000000..7632b664f
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/BotSharp.Abstraction.ComputerUse.csproj
@@ -0,0 +1,28 @@
+
+
+
+ $(TargetFramework)
+ enable
+ $(LangVersion)
+ $(BotSharpVersion)
+ Icon.png
+ $(GeneratePackageOnBuild)
+ $(SolutionDir)packages
+
+
+
+
+ \
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Infrastructure/BotSharp.Abstraction.ComputerUse/MLTasks/IComputerUse.cs b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/MLTasks/IComputerUse.cs
new file mode 100644
index 000000000..fcaa8b776
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/MLTasks/IComputerUse.cs
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ Copyright 2025 Written by Haiping Chen. All Rights Reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+******************************************************************************/
+
+using System.Threading.Tasks;
+
+namespace BotSharp.Abstraction.ComputerUse.MLTasks;
+
+///
+/// Interface for computer use
+///
+public interface IComputerUse
+{
+ ///
+ /// Capture screen of the specified display
+ ///
+ ///
+ ///
+ Task CaptureScreen(ComputerUseArgs args);
+
+ Task MouseMove(ComputerUseArgs args);
+
+ Task MouseClick(ComputerUseArgs args);
+
+ Task InputText(ComputerUseArgs args);
+
+ Task KeyPress(ComputerUseArgs args);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction.ComputerUse/MLTasks/IScreenshot.cs b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/MLTasks/IScreenshot.cs
new file mode 100644
index 000000000..0460f5236
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/MLTasks/IScreenshot.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.ComputerUse.MLTasks;
+
+public interface IScreenshot
+{
+ (int x, int y) GetScreenSize(int screenIndex);
+ byte[] CaptureScreen(int displayId);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Models/ComputerUseArgs.cs b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Models/ComputerUseArgs.cs
new file mode 100644
index 000000000..8d5812c7d
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Models/ComputerUseArgs.cs
@@ -0,0 +1,14 @@
+namespace BotSharp.Abstraction.ComputerUse.Models;
+
+public class ComputerUseArgs
+{
+ ///
+ /// Number of multi-screens
+ ///
+ public int DisplayId { get; set; }
+ public int X { get; set; }
+ public int Y { get; set; }
+ public string Text { get; set; } = string.Empty;
+ public MouseButton MouseButton { get; set; }
+ public KeyCode KeyCode { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Models/ComputerUseOutput.cs b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Models/ComputerUseOutput.cs
new file mode 100644
index 000000000..ba5c3935b
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Models/ComputerUseOutput.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.ComputerUse.Models;
+
+public class ComputerUseOutput
+{
+ ///
+ /// Base64 encoded image
+ ///
+ public string? Screenshot { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Using.cs b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Using.cs
new file mode 100644
index 000000000..a0da56f02
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction.ComputerUse/Using.cs
@@ -0,0 +1,4 @@
+global using System.Threading.Tasks;
+global using BotSharp.Abstraction.ComputerUse.Models;
+
+global using SharpHook.Native;
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/AgentHookBase.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/AgentHookBase.cs
index 808f78211..5ee9dfd46 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/AgentHookBase.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/AgentHookBase.cs
@@ -5,7 +5,10 @@ namespace BotSharp.Abstraction.Agents;
public abstract class AgentHookBase : IAgentHook
{
- public virtual string SelfId => throw new NotImplementedException("Please set SelfId as agent id!");
+ public abstract string SelfId { get; }
+
+ public virtual bool IsMatch(string agentId)
+ => string.IsNullOrEmpty(SelfId) || SelfId == agentId;
protected Agent _agent;
public Agent Agent => _agent;
@@ -19,37 +22,50 @@ public AgentHookBase(IServiceProvider services, AgentSettings settings)
_settings = settings;
}
- public void SetAget(Agent agent)
+ public void SetAgent(Agent agent)
{
_agent = agent;
}
- public virtual bool OnAgentLoading(ref string id)
+ public virtual Task OnAgentLoading(string id)
{
- return true;
+ return Task.FromResult(id);
}
- public virtual bool OnInstructionLoaded(string template, Dictionary dict)
+ public virtual Task OnInstructionLoaded(string template, IDictionary dict)
{
dict["current_date"] = $"{DateTime.Now:MMM dd, yyyy}";
dict["current_time"] = $"{DateTime.Now:hh:mm tt}";
dict["current_weekday"] = $"{DateTime.Now:dddd}";
- return true;
+ dict["current_utc_datetime"] = $"{DateTime.UtcNow}";
+
+ return Task.FromResult(true);
}
- public virtual bool OnFunctionsLoaded(List functions)
+ public virtual Task OnFunctionsLoaded(List functions)
{
_agent.Functions = functions;
- return true;
+ return Task.FromResult(true);
}
- public virtual bool OnSamplesLoaded(List samples)
+ public virtual Task OnSamplesLoaded(List samples)
{
_agent.Samples = samples;
- return true;
+ return Task.FromResult(true);
+ }
+
+ public virtual Task OnAgentLoaded(Agent agent)
+ {
+ return Task.CompletedTask;
+ }
+
+ public virtual Task OnAgentUtilityLoaded(Agent agent)
+ {
+ return Task.CompletedTask;
}
- public virtual void OnAgentLoaded(Agent agent)
+ public virtual Task OnAgentMcpToolLoaded(Agent agent)
{
+ return Task.CompletedTask;
}
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Constants/LlmConstant.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Constants/LlmConstant.cs
new file mode 100644
index 000000000..e45c8b153
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Constants/LlmConstant.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Agents.Constants;
+
+public static class LlmConstant
+{
+ public const int DEFAULT_MAX_OUTPUT_TOKEN = 1024;
+ public const string DEFAULT_REASONING_EFFORT_LEVEL = "low";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentCodeScriptType.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentCodeScriptType.cs
new file mode 100644
index 000000000..4bf5f262c
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentCodeScriptType.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Agents.Enums;
+
+public static class AgentCodeScriptType
+{
+ public const string Src = "src";
+ public const string Test = "test";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentField.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentField.cs
index 61cb0f4dc..914f08c3b 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentField.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentField.cs
@@ -8,15 +8,23 @@ public enum AgentField
IsPublic,
Disabled,
Type,
+ RoutingMode,
+ FuncVisMode,
InheritAgentId,
- Profiles,
+ Profile,
+ Label,
RoutingRule,
Instruction,
Function,
Template,
Response,
Sample,
- LlmConfig
+ LlmConfig,
+ Utility,
+ McpTool,
+ KnowledgeBase,
+ Rule,
+ MaxMessageCount
}
public enum AgentTaskField
@@ -26,5 +34,5 @@ public enum AgentTaskField
Description,
Enabled,
Content,
- DirectAgentId
+ Status
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentFuncVisMode.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentFuncVisMode.cs
new file mode 100644
index 000000000..713237837
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentFuncVisMode.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Agents.Enums;
+
+public static class AgentFuncVisMode
+{
+ public const string Manual = "manual";
+ public const string Auto = "auto";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentRole.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentRole.cs
index f9547d5a7..2975e44f1 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentRole.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentRole.cs
@@ -1,9 +1,10 @@
namespace BotSharp.Abstraction.Agents.Enums;
-public class AgentRole
+public static class AgentRole
{
public const string System = "system";
public const string Assistant = "assistant";
public const string User = "user";
public const string Function = "function";
+ public const string Model = "model";
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentType.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentType.cs
index 176894070..9f79ef333 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentType.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentType.cs
@@ -1,13 +1,18 @@
namespace BotSharp.Abstraction.Agents.Enums;
-public class AgentType
+public static class AgentType
{
///
- /// Routing Agent
+ /// Routing agent
///
public const string Routing = "routing";
- public const string Evaluating = "evaluating";
+ ///
+ /// Planning agent
+ ///
+ public const string Planning = "planning";
+
+ public const string Evaluating = "evaluation";
///
/// Routable task agent with capability of interaction with external environment
@@ -18,5 +23,10 @@ public class AgentType
/// Agent that cannot use external tools
///
public const string Static = "static";
+
+ ///
+ /// A2A remote agent for Microsoft Agent Framework integration
+ ///
+ public const string A2ARemote = "a2a-remote";
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/BuiltInAgentId.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/BuiltInAgentId.cs
new file mode 100644
index 000000000..367fd08bd
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Enums/BuiltInAgentId.cs
@@ -0,0 +1,64 @@
+namespace BotSharp.Abstraction.Agents.Enums;
+
+public static class BuiltInAgentId
+{
+ ///
+ /// A routing agent can be used as a base router.
+ ///
+ public const string AIAssistant = "01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a";
+
+ ///
+ /// A demo agent used for open domain chatting
+ ///
+ public const string Chatbot = "01e2fc5c-2c89-4ec7-8470-7688608b496c";
+
+ ///
+ /// Human customer service
+ ///
+ public const string HumanSupport = "01dcc3e5-0af7-49e6-ad7a-a760bd12dc4b";
+
+ ///
+ /// Used as a container to host the shared tools/ utilities built in different plugins.
+ ///
+ public const string UtilityAssistant = "6745151e-6d46-4a02-8de4-1c4f21c7da95";
+
+ ///
+ /// Used when router can't route to any existing task agent
+ ///
+ public const string Fallback = "01fcc3e5-0af7-49e6-ad7a-a760bd12dc4d";
+
+ ///
+ /// Used by knowledgebase plugin to acquire domain knowledge
+ ///
+ public const string Learner = "01acc3e5-0af7-49e6-ad7a-a760bd12dc40";
+
+ ///
+ /// SQL statement generation
+ ///
+ public const string SqlDriver = "beda4c12-e1ec-4b4b-b328-3df4a6687c4f";
+
+ ///
+ /// Programming source code generation
+ ///
+ public const string CodeDriver = "c0ded7d9-3f9d-4ef6-b7ce-56a892dcef62";
+
+ ///
+ /// Evaluate prompt and conversation
+ ///
+ public const string Evaluator = "dfd9b46d-d00c-40af-8a75-3fbdc2b89869";
+
+ ///
+ /// Translates user-defined natural language rules into programmatic code
+ ///
+ public const string RulesInterpreter = "201e49a2-40b3-4ccd-b8cc-2476565a1b40";
+
+ ///
+ /// Generate code script
+ ///
+ public const string AIProgrammer = "c2a2faf6-b8b5-47fe-807b-f4714cf25dd4";
+
+ ///
+ /// Handle files
+ ///
+ public const string FileAssistant = "f1e09a73-9efe-46ce-ba02-b3aaf96d97e0";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentHook.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentHook.cs
index 99cdadca3..9e6fbab7f 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentHook.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentHook.cs
@@ -1,34 +1,35 @@
using BotSharp.Abstraction.Functions.Models;
+using BotSharp.Abstraction.Hooks;
namespace BotSharp.Abstraction.Agents;
-public interface IAgentHook
+public interface IAgentHook : IHookBase
{
- ///
- /// Agent Id
- ///
- string SelfId { get; }
Agent Agent { get; }
- void SetAget(Agent agent);
+ void SetAgent(Agent agent);
///
/// Triggered when agent is loading.
- /// Return different agent for redirection purpose.
+ /// Return different agent id for redirection purpose.
///
/// Agent Id
- ///
- bool OnAgentLoading(ref string id);
+ /// New agent id if redirection is needed, null otherwise
+ Task OnAgentLoading(string id);
+
+ Task OnInstructionLoaded(string template, IDictionary dict);
+
+ Task OnFunctionsLoaded(List functions);
- bool OnInstructionLoaded(string template, Dictionary dict);
+ Task OnSamplesLoaded(List samples);
- bool OnFunctionsLoaded(List functions);
+ Task OnAgentUtilityLoaded(Agent agent);
- bool OnSamplesLoaded(List samples);
+ Task OnAgentMcpToolLoaded(Agent agent);
///
/// Triggered when agent is loaded completely.
///
///
///
- void OnAgentLoaded(Agent agent);
+ Task OnAgentLoaded(Agent agent);
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentService.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentService.cs
index 5ab249b87..48c07fd9d 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentService.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentService.cs
@@ -1,4 +1,8 @@
+using BotSharp.Abstraction.Agents.Options;
+using BotSharp.Abstraction.Coding.Models;
+using BotSharp.Abstraction.Coding.Options;
using BotSharp.Abstraction.Functions.Models;
+using BotSharp.Abstraction.Instructs.Enums;
using BotSharp.Abstraction.Plugins.Models;
using BotSharp.Abstraction.Repositories.Filters;
@@ -10,23 +14,43 @@ namespace BotSharp.Abstraction.Agents;
public interface IAgentService
{
Task CreateAgent(Agent agent);
- Task RefreshAgents();
+ Task RefreshAgents(IEnumerable? agentIds = null);
+
+ ///
+ /// Agents in the file repository that can migrate
+ ///
+ Task> GetFileAgents() => Task.FromResult>([]);
Task> GetAgents(AgentFilter filter);
+ Task> GetAgentOptions(List? agentIds = null, bool byName = false);
+ Task> GetAgentUtilityOptions();
///
/// Load agent configurations and trigger hooks
///
///
///
- Task LoadAgent(string id);
+ Task LoadAgent(string id, bool loadUtility = true);
- string RenderedInstruction(Agent agent);
+ ///
+ /// Inherit from an agent
+ ///
+ ///
+ ///
+ Task InheritAgent(Agent agent);
- string RenderedTemplate(Agent agent, string templateName);
+ string RenderInstruction(Agent agent, IDictionary? renderData = null);
- bool RenderFunction(Agent agent, FunctionDef def);
+ string RenderTemplate(Agent agent, string templateName, IDictionary? renderData = null);
+
+ bool RenderFunction(Agent agent, FunctionDef def, IDictionary? renderData = null);
+
+ FunctionParametersDef? RenderFunctionProperty(Agent agent, FunctionDef def, IDictionary? renderData = null);
+
+ (string, IEnumerable) PrepareInstructionAndFunctions(Agent agent, IDictionary? renderData = null, StringComparer? comparer = null);
+
+ bool RenderVisibility(string? visibilityExpression, IDictionary dict);
+ IDictionary CollectRenderData(Agent agent);
- FunctionParametersDef? RenderFunctionProperty(Agent agent, FunctionDef def);
///
/// Get agent detail without trigger any hook.
@@ -34,12 +58,37 @@ public interface IAgentService
///
/// Original agent information
Task GetAgent(string id);
-
- Task DeleteAgent(string id);
+ Task GetAgentTemplateDetail(string agentId, string templateName);
+
+ Task DeleteAgent(string id, AgentDeleteOptions? options = null);
Task UpdateAgent(Agent agent, AgentField updateField);
- Task UpdateAgentFromFile(string id);
+
+ ///
+ /// Path existing templates of agent, cannot create new or delete templates
+ ///
+ ///
+ ///
+ Task PatchAgentTemplate(Agent agent);
string GetDataDir();
string GetAgentDataDir(string agentId);
- PluginDef GetPlugin(string agentId);
+ Task> GetUserAgents(string userId);
+
+ Task GetPlugin(string agentId);
+
+ Task> GetAgentCodeScripts(string agentId, AgentCodeScriptFilter? filter = null)
+ => Task.FromResult(new List());
+
+ Task GetAgentCodeScript(string agentId, string scriptName, string scriptType = AgentCodeScriptType.Src)
+ => Task.FromResult((AgentCodeScript?)null);
+
+ Task UpdateAgentCodeScripts(string agentId, List codeScripts, AgentCodeScriptUpdateOptions? options = null)
+ => Task.FromResult(false);
+
+ Task DeleteAgentCodeScripts(string agentId, List? codeScripts = null)
+ => Task.FromResult(false);
+
+ Task GenerateCodeScript(string agentId, string text, CodeGenHandleOptions? options = null)
+ => Task.FromResult(new CodeGenerationResult());
+ ResponseFormatType GetTemplateResponseFormat(Agent agent, string templateName);
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentUtilityHook.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentUtilityHook.cs
new file mode 100644
index 000000000..603ec64e5
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/IAgentUtilityHook.cs
@@ -0,0 +1,6 @@
+namespace BotSharp.Abstraction.Agents;
+
+public interface IAgentUtilityHook
+{
+ void AddUtilities(List utilities);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/IInstructionResolver.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/IInstructionResolver.cs
new file mode 100644
index 000000000..ed8c3949e
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/IInstructionResolver.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Agents;
+
+public interface IInstructionResolver
+{
+ string Provider { get; }
+
+ Task ResolveAsync(Agent agent, string instruction, IEnumerable
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- public AgentLlmConfig LlmConfig { get; set; }
- = new AgentLlmConfig();
+ public AgentLlmConfig LlmConfig { get; set; } = new();
///
/// Instruction
@@ -30,33 +45,35 @@ public class Agent
[JsonIgnore]
public string? Instruction { get; set; }
+ ///
+ /// Channel instructions
+ ///
+ [JsonIgnore]
+ public List ChannelInstructions { get; set; } = new();
+
///
/// Templates
///
[JsonIgnore]
- public List Templates { get; set; }
- = new List();
+ public List Templates { get; set; } = new();
///
/// Agent tasks
///
[JsonIgnore]
- public List Tasks { get; set; }
- = new List();
+ public List Tasks { get; set; } = new();
///
/// Samples
///
[JsonIgnore]
- public List Samples { get; set; }
- = new List();
+ public List Samples { get; set; } = new();
///
/// Functions
///
[JsonIgnore]
- public List Functions { get; set; }
- = new List();
+ public List Functions { get; set; } = new();
///
/// Responses
@@ -76,7 +93,7 @@ public class Agent
public PluginDef Plugin { get; set; }
[JsonIgnore]
- public bool Installed => Plugin.Enabled;
+ public bool Installed => Plugin?.Enabled == true;
///
/// Default is True, user will enable this by installing appropriate plugin.
@@ -87,28 +104,73 @@ public class Agent
///
/// Profile by channel
///
- public List Profiles { get; set; }
- = new List();
+ public List Profiles { get; set; } = new();
+
+ ///
+ /// Agent labels
+ ///
+ public List Labels { get; set; } = new();
+
+ ///
+ /// Merge Utility from entry agent
+ ///
+ public bool MergeUtility { get; set; }
+
+ ///
+ /// Agent Utility
+ ///
+ public List Utilities { get; set; } = new();
+
+ ///
+ /// Agent MCP Tools
+ ///
+ public List McpTools { get; set; } = new();
+
+ ///
+ /// Agent rules
+ ///
+ public List Rules { get; set; } = new();
+
+ ///
+ /// Agent knowledge bases
+ ///
+ public List KnowledgeBases { get; set; } = [];
///
/// Inherit from agent
///
public string? InheritAgentId { get; set; }
- public List RoutingRules { get; set; }
- = new List();
+ ///
+ /// Maximum message count when load conversation
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public int? MaxMessageCount { get; set; }
+
+ public List RoutingRules { get; set; } = new();
///
/// For rendering deferral
///
[JsonIgnore]
- public Dictionary TemplateDict { get; set; }
- = new Dictionary();
+ public Dictionary TemplateDict { get; set; } = new();
+
+ [JsonIgnore]
+ public List SecondaryFunctions { get; set; } = [];
+
+ [JsonIgnore]
+ public List SecondaryInstructions { get; set; } = [];
public override string ToString()
=> $"{Name} {Id}";
+ ///
+ /// Copies every member, including the ones leaves out. Lists and nested objects
+ /// are still shared with the source: replace any of them before changing it.
+ ///
+ public Agent ShallowCopy() => (Agent)MemberwiseClone();
+
public static Agent Clone(Agent agent)
{
return new Agent
@@ -117,16 +179,26 @@ public static Agent Clone(Agent agent)
Name = agent.Name,
Description = agent.Description,
Type = agent.Type,
+ Mode = agent.Mode,
Instruction = agent.Instruction,
+ ChannelInstructions = agent.ChannelInstructions,
Functions = agent.Functions,
Responses = agent.Responses,
Samples = agent.Samples,
+ Templates = agent.Templates,
+ Utilities = agent.Utilities,
+ McpTools = agent.McpTools,
Knowledges = agent.Knowledges,
IsPublic = agent.IsPublic,
Disabled = agent.Disabled,
+ MergeUtility = agent.MergeUtility,
+ MaxMessageCount = agent.MaxMessageCount,
Profiles = agent.Profiles,
+ Labels = agent.Labels,
RoutingRules = agent.RoutingRules,
+ Rules = agent.Rules,
LlmConfig = agent.LlmConfig,
+ KnowledgeBases = agent.KnowledgeBases,
CreatedDateTime = agent.CreatedDateTime,
UpdatedDateTime = agent.UpdatedDateTime,
};
@@ -138,33 +210,51 @@ public Agent SetInstruction(string instruction)
return this;
}
+ public Agent SetChannelInstructions(List instructions)
+ {
+ ChannelInstructions = instructions ?? [];
+ return this;
+ }
+
public Agent SetTemplates(List templates)
{
- Templates = templates ?? new List();
+ Templates = templates ?? [];
return this;
}
public Agent SetTasks(List tasks)
{
- Tasks = tasks ?? new List();
+ Tasks = tasks ?? [];
return this;
}
public Agent SetFunctions(List functions)
{
- Functions = functions ?? new List();
+ Functions = functions ?? [];
return this;
}
public Agent SetSamples(List samples)
{
- Samples = samples ?? new List();
+ Samples = samples ?? [];
+ return this;
+ }
+
+ public Agent SetUtilities(List utilities)
+ {
+ Utilities = utilities ?? [];
+ return this;
+ }
+
+ public Agent SetKnowledgeBases(List knowledgeBases)
+ {
+ knowledgeBases = knowledgeBases ?? [];
return this;
}
public Agent SetResponses(List responses)
{
- Responses = responses ?? new List(); ;
+ Responses = responses ?? [];
return this;
}
@@ -198,21 +288,56 @@ public Agent SetDisabled(bool disabled)
return this;
}
- public Agent SetAgentType(string type)
+ public Agent SetMergeUtility(bool merge)
+ {
+ MergeUtility = merge;
+ return this;
+ }
+
+ public Agent SetType(string type)
{
Type = type;
return this;
}
+ ///
+ /// Set agent routing mode: lazy or eager
+ ///
+ ///
+ ///
+ public Agent SetRoutingMode(string? mode)
+ {
+ Mode = mode;
+ return this;
+ }
+
+ public Agent SetFuncVisMode(string? visMode)
+ {
+ FuncVisMode = visMode;
+ return this;
+ }
+
public Agent SetProfiles(List profiles)
{
- Profiles = profiles ?? new List();
+ Profiles = profiles ?? [];
+ return this;
+ }
+
+ public Agent SetLabels(List labels)
+ {
+ Labels = labels ?? [];
return this;
}
public Agent SetRoutingRules(List rules)
{
- RoutingRules = rules ?? new List();
+ RoutingRules = rules ?? [];
+ return this;
+ }
+
+ public Agent SetRules(List rules)
+ {
+ Rules = rules ?? [];
return this;
}
@@ -221,4 +346,10 @@ public Agent SetLlmConfig(AgentLlmConfig? llmConfig)
LlmConfig = llmConfig;
return this;
}
+
+ public Agent SetMcpTools(List? mcps)
+ {
+ McpTools = mcps ?? [];
+ return this;
+ }
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentCodeScript.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentCodeScript.cs
new file mode 100644
index 000000000..aa673e32b
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentCodeScript.cs
@@ -0,0 +1,37 @@
+namespace BotSharp.Abstraction.Agents.Models;
+
+public class AgentCodeScript : AgentCodeScriptBase
+{
+ public string Id { get; set; }
+ public string AgentId { get; set; } = null!;
+
+ public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
+ public DateTime UpdatedTime { get; set; } = DateTime.UtcNow;
+
+ public AgentCodeScript() : base()
+ {
+ }
+
+ public override string ToString()
+ {
+ return base.ToString();
+ }
+}
+
+public class AgentCodeScriptBase
+{
+ public string Name { get; set; } = null!;
+ public string Content { get; set; } = null!;
+
+ ///
+ /// Code script type: src, test
+ ///
+ public string ScriptType { get; set; } = null!;
+
+ public string CodePath => $"{ScriptType}/{Name}";
+
+ public override string ToString()
+ {
+ return $"{CodePath}";
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentKnowledgeBase.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentKnowledgeBase.cs
new file mode 100644
index 000000000..29b7c2c2c
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentKnowledgeBase.cs
@@ -0,0 +1,31 @@
+namespace BotSharp.Abstraction.Agents.Models;
+
+public class AgentKnowledgeBase
+{
+ public string Name { get; set; }
+ public string Type { get; set; }
+ public bool Disabled { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public decimal? Confidence { get; set; }
+
+ public AgentKnowledgeBase()
+ {
+
+ }
+
+ public AgentKnowledgeBase(
+ string name, string type,
+ bool enabled, decimal? confidence = null)
+ {
+ Name = name;
+ Type = type;
+ Disabled = enabled;
+ Confidence = confidence;
+ }
+
+ public override string ToString()
+ {
+ return Name ?? string.Empty;
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentLlmConfig.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentLlmConfig.cs
index 8025c2b86..4684b4b90 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentLlmConfig.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentLlmConfig.cs
@@ -2,6 +2,17 @@ namespace BotSharp.Abstraction.Agents.Models;
public class AgentLlmConfig
{
+ public AgentLlmConfig() { }
+
+ public AgentLlmConfig(AgentTemplateLlmConfig templateLlmConfig)
+ {
+ Provider = templateLlmConfig?.Provider;
+ Model = templateLlmConfig?.Model;
+ MaxOutputTokens = templateLlmConfig?.MaxOutputTokens;
+ ReasoningEffortLevel = templateLlmConfig?.ReasoningEffortLevel;
+ ResponseFormat = templateLlmConfig?.ResponseFormat;
+ }
+
///
/// Is inherited from default Agent Settings
///
@@ -22,6 +33,77 @@ public class AgentLlmConfig
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Model { get; set; }
+ ///
+ /// Max recursion depth
+ ///
[JsonPropertyName("max_recursion_depth")]
public int MaxRecursionDepth { get; set; } = 3;
+
+ ///
+ /// Max output token
+ ///
+ [JsonPropertyName("max_output_tokens")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public int? MaxOutputTokens { get; set; }
+
+ ///
+ /// Reasoning effort level
+ ///
+ [JsonPropertyName("reasoning_effort_level")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? ReasoningEffortLevel { get; set; }
+
+ ///
+ /// Response format: json, xml, markdown, yaml, etc.
+ ///
+ [JsonPropertyName("response_format")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? ResponseFormat { get; set; }
+
+ ///
+ /// Image composition config
+ ///
+ [JsonPropertyName("image_composition")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public LlmImageCompositionConfig? ImageComposition { get; set; }
+
+ ///
+ /// Audio transcription config
+ ///
+ [JsonPropertyName("audio_transcription")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public LlmAudioTranscriptionConfig? AudioTranscription { get; set; }
+
+ ///
+ /// Realtime config
+ ///
+ [JsonPropertyName("realtime")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public LlmRealtimeConfig? Realtime { get; set; }
+
+ ///
+ /// Live config, kept apart from because the two are different kinds
+ /// of voice session: a live model runs the conversation itself and delegates the thinking to
+ /// a backend model, so its provider and model are not interchangeable with a realtime one.
+ /// Setting this is what makes a conversation a live session.
+ ///
+ [JsonPropertyName("live")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public LlmLiveConfig? Live { get; set; }
}
+
+public class LlmImageCompositionConfig : LlmProviderModel
+{
+}
+
+public class LlmAudioTranscriptionConfig : LlmProviderModel
+{
+}
+
+public class LlmRealtimeConfig : LlmConfigBase
+{
+}
+
+public class LlmLiveConfig : LlmConfigBase
+{
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentRule.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentRule.cs
new file mode 100644
index 000000000..3a5f35428
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentRule.cs
@@ -0,0 +1,36 @@
+namespace BotSharp.Abstraction.Agents.Models;
+
+public class AgentRule
+{
+ [JsonPropertyName("trigger_name")]
+ public string TriggerName { get; set; } = string.Empty;
+
+ [JsonPropertyName("disabled")]
+ public bool Disabled { get; set; }
+
+ ///
+ /// Message sent to agent
+ ///
+ [JsonPropertyName("message")]
+ public string? Message { get; set; }
+
+ [JsonPropertyName("criteria_config")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public RuleCriteriaConfig? CriteriaConfig { get; set; }
+}
+
+public class RuleCriteriaConfig
+{
+ ///
+ /// Criteria mode: llm, python script, etc.
+ /// Takes precedence over the mode carried on the trigger options.
+ ///
+ [JsonPropertyName("mode")]
+ public string? Mode { get; set; }
+
+ ///
+ /// Criteria text
+ ///
+ [JsonPropertyName("criteria")]
+ public string? Criteria { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentTemplate.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentTemplate.cs
index 9591934ff..5315adf44 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentTemplate.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentTemplate.cs
@@ -1,13 +1,11 @@
namespace BotSharp.Abstraction.Agents.Models;
-public class AgentTemplate
+public class AgentTemplate : AgentTemplateConfig
{
- public string Name { get; set; }
- public string Content { get; set; }
+ public string Content { get; set; } = string.Empty;
public AgentTemplate()
{
-
}
public AgentTemplate(string name, string content)
@@ -21,3 +19,16 @@ public override string ToString()
return Name;
}
}
+
+public class AgentTemplateConfig
+{
+ public string Name { get; set; }
+
+ [JsonPropertyName("llm_config")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public AgentTemplateLlmConfig? LlmConfig { get; set; }
+}
+
+public class AgentTemplateLlmConfig : LlmConfigBase
+{
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentUtility.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentUtility.cs
new file mode 100644
index 000000000..3dc5247d4
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentUtility.cs
@@ -0,0 +1,42 @@
+namespace BotSharp.Abstraction.Agents.Models;
+
+public class AgentUtility
+{
+ public string Category { get; set; }
+ public string Name { get; set; }
+ public bool Disabled { get; set; }
+
+ [JsonPropertyName("visibility_expression")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? VisibilityExpression { get; set; }
+
+ public IEnumerable Items { get; set; } = [];
+
+ public AgentUtility()
+ {
+
+ }
+
+ public override string ToString()
+ {
+ return $"{Category}-{Name}";
+ }
+}
+
+public class UtilityItem
+{
+ [JsonPropertyName("function_name")]
+ public string FunctionName { get; set; } = null!;
+
+ [JsonPropertyName("template_name")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? TemplateName { get; set; }
+
+ [JsonPropertyName("visibility_expression")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? VisibilityExpression { get; set; }
+
+ [JsonPropertyName("description")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? Description { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/ChannelInstruction.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/ChannelInstruction.cs
new file mode 100644
index 000000000..d4ff6c1fa
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/ChannelInstruction.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Agents.Models;
+
+public class ChannelInstruction
+{
+ public string Channel { get; set; }
+ public string Instruction { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/MCPTool.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/MCPTool.cs
new file mode 100644
index 000000000..ee8e52d41
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/MCPTool.cs
@@ -0,0 +1,49 @@
+namespace BotSharp.Abstraction.Agents.Models;
+
+public class McpTool
+{
+ [JsonPropertyName("name")]
+ public string Name { get; set; }
+
+ [JsonPropertyName("server_id")]
+ public string ServerId { get; set; }
+
+ [JsonPropertyName("disabled")]
+ public bool Disabled { get; set; }
+
+ [JsonPropertyName("functions")]
+ public IEnumerable Functions { get; set; } = [];
+
+ public McpTool()
+ {
+
+ }
+
+ public McpTool(
+ string name,
+ string serverId,
+ bool disabled = false,
+ IEnumerable? functions = null)
+ {
+ Name = name;
+ ServerId = serverId;
+ Disabled = disabled;
+ Functions = functions ?? [];
+ }
+
+ public override string ToString()
+ {
+ return ServerId;
+ }
+}
+
+
+public class McpFunction
+{
+ public string Name { get; set; }
+
+ public McpFunction(string name)
+ {
+ Name = name;
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/UserAgent.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/UserAgent.cs
index b6eab94db..a130f9b2d 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/Models/UserAgent.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Models/UserAgent.cs
@@ -1,11 +1,27 @@
+using BotSharp.Abstraction.Users.Models;
+
namespace BotSharp.Abstraction.Agents.Models;
public class UserAgent
{
+ [JsonPropertyName("id")]
public string Id { get; set; } = string.Empty;
+
+ [JsonPropertyName("user_id")]
public string UserId { get; set; } = string.Empty;
- public string AgentId { get; set; } = string.Empty;
- public bool Editable { get; set; }
+
+ [JsonPropertyName("agent_id")]
+ public string AgentId { get; set; }
+
+ [JsonPropertyName("actions")]
+ public IEnumerable Actions { get; set; } = [];
+
+ [JsonIgnore]
+ public Agent? Agent { get; set; }
+
+ [JsonPropertyName("updated_time")]
public DateTime UpdatedTime { get; set; } = DateTime.UtcNow;
+
+ [JsonPropertyName("created_time")]
public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Options/AgentCodeScriptUpdateOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Options/AgentCodeScriptUpdateOptions.cs
new file mode 100644
index 000000000..153694e9d
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Options/AgentCodeScriptUpdateOptions.cs
@@ -0,0 +1,9 @@
+using BotSharp.Abstraction.Repositories.Options;
+
+namespace BotSharp.Abstraction.Agents.Options;
+
+public class AgentCodeScriptUpdateOptions : AgentCodeScriptDbUpdateOptions
+{
+ [JsonPropertyName("delete_if_not_included")]
+ public bool DeleteIfNotIncluded { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Options/AgentDeleteOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Options/AgentDeleteOptions.cs
new file mode 100644
index 000000000..5df6737c7
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Options/AgentDeleteOptions.cs
@@ -0,0 +1,14 @@
+namespace BotSharp.Abstraction.Agents.Options;
+
+public class AgentDeleteOptions
+{
+ [JsonPropertyName("delete_role_agents")]
+ public bool DeleteRoleAgents { get; set; }
+
+ [JsonPropertyName("delete_user_agents")]
+ public bool DeleteUserAgents { get; set; }
+
+ [JsonPropertyName("to_delete_code_scripts")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public List? ToDeleteCodeScripts { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Agents/Settings/AgentSettings.cs b/src/Infrastructure/BotSharp.Abstraction/Agents/Settings/AgentSettings.cs
index e95f72bc7..f6d4835ec 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Agents/Settings/AgentSettings.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Agents/Settings/AgentSettings.cs
@@ -2,13 +2,13 @@ namespace BotSharp.Abstraction.Agents.Settings;
public class AgentSettings
{
- public string DataDir { get; set; } = string.Empty;
+ public string DataDir { get; set; } = "agents";
public string TemplateFormat { get; set; } = "liquid";
public string HostAgentId { get; set; } = string.Empty;
+ public bool EnableTranslator { get; set; } = false;
///
/// This is the default LLM config for agent
///
- public AgentLlmConfig LlmConfig { get; set; }
- = new AgentLlmConfig();
+ public AgentLlmConfig LlmConfig { get; set; } = new();
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj b/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj
index 65424adb4..37f1f2520 100644
--- a/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj
+++ b/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj
@@ -1,7 +1,7 @@
-
+
- netstandard2.1
+ $(TargetFramework)enable$(LangVersion)$(BotSharpVersion)
@@ -10,6 +10,12 @@
$(SolutionDir)packages
+
+
+
+
+
+
True
@@ -18,15 +24,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Enums/BroswerActionEnum.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Enums/BroswerActionEnum.cs
index 6dd0fb632..4efa14480 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Enums/BroswerActionEnum.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Enums/BroswerActionEnum.cs
@@ -4,4 +4,10 @@ public enum BroswerActionEnum
{
Click = 1,
InputText = 2,
+ Typing = 3,
+ Hover = 4,
+ Scroll = 5,
+ DragAndDrop = 6,
+ DropDown = 7,
+ FileUpload = 8
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs
index 850833cd2..eebf7bfe2 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs
@@ -4,13 +4,15 @@ namespace BotSharp.Abstraction.Browsing;
public interface IWebBrowser
{
- Task LaunchBrowser(string contextId, string? url, bool openIfNotExist = true);
- Task ScreenshotAsync(string contextId, string path);
- Task ScrollPageAsync(BrowserActionParams actionParams);
+ void SetServiceProvider (IServiceProvider services);
+ Task LaunchBrowser(MessageInfo message, BrowserActionArgs args);
+ Task ScreenshotAsync(MessageInfo message, string path);
+ Task ScrollPage(MessageInfo message, PageActionArgs args);
Task ActionOnElement(MessageInfo message, ElementLocatingArgs location, ElementActionArgs action);
Task LocateElement(MessageInfo message, ElementLocatingArgs location);
Task DoAction(MessageInfo message, ElementActionArgs action, BrowserActionResult result);
+ Task PressKey(MessageInfo message, string key);
Task InputUserText(BrowserActionParams actionParams);
Task InputUserPassword(BrowserActionParams actionParams);
@@ -19,11 +21,14 @@ public interface IWebBrowser
Task ChangeListValue(BrowserActionParams actionParams);
Task CheckRadioButton(BrowserActionParams actionParams);
Task ChangeCheckbox(BrowserActionParams actionParams);
- Task GoToPage(string contextId, string url, bool openNewTab = false);
+ Task GoToPage(MessageInfo message, PageActionArgs args);
Task ExtractData(BrowserActionParams actionParams);
Task EvaluateScript(string contextId, string script);
Task CloseBrowser(string contextId);
- Task CloseCurrentPage(string contextId);
- Task SendHttpRequest(string contextId, HttpRequestParams actionParams);
- Task GetAttributeValue(MessageInfo message, ElementLocatingArgs location, BrowserActionResult result);
+ Task IsBrowserClosed(string contextId);
+ Task CloseCurrentPage(MessageInfo message);
+ Task SendHttpRequest(MessageInfo message, HttpRequestParams actionParams);
+ Task GetAttributeValue(MessageInfo message, ElementLocatingArgs location);
+ Task SetAttributeValue(MessageInfo message, ElementLocatingArgs location);
+ string GetCurrentUrl(MessageInfo message);
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebDriverHook.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebDriverHook.cs
new file mode 100644
index 000000000..30a58bb48
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebDriverHook.cs
@@ -0,0 +1,9 @@
+using BotSharp.Abstraction.Browsing.Models;
+
+namespace BotSharp.Abstraction.Browsing;
+
+public interface IWebDriverHook
+{
+ Task> GetUploadFiles(MessageInfo message) => Task.FromResult(new List());
+ Task OnLocateElement(MessageInfo message, string content) => Task.CompletedTask;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebPageResponseHook.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebPageResponseHook.cs
new file mode 100644
index 000000000..4e32117b0
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/IWebPageResponseHook.cs
@@ -0,0 +1,9 @@
+using BotSharp.Abstraction.Browsing.Models;
+
+namespace BotSharp.Abstraction.Browsing;
+
+public interface IWebPageResponseHook
+{
+ void OnDataFetched(MessageInfo message, WebPageResponseData response);
+ T? GetResponse(MessageInfo message, WebPageResponseFilter filter);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionArgs.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionArgs.cs
new file mode 100644
index 000000000..7987b3a5f
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionArgs.cs
@@ -0,0 +1,8 @@
+namespace BotSharp.Abstraction.Browsing.Models;
+
+public class BrowserActionArgs
+{
+ public bool Headless { get; set; }
+ public string? UserDataDir { get; set; }
+ public string? RemoteHostUrl { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionParams.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionParams.cs
index 04ba82b25..edc66781e 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionParams.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionParams.cs
@@ -1,5 +1,6 @@
namespace BotSharp.Abstraction.Browsing.Models;
+[Obsolete("This class is deprecated, use BrowserActionArgs instead.")]
public class BrowserActionParams
{
public Agent Agent { get; set; }
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionResult.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionResult.cs
index a634cccd3..e2f119723 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionResult.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionResult.cs
@@ -2,10 +2,20 @@ namespace BotSharp.Abstraction.Browsing.Models;
public class BrowserActionResult
{
+ public int ResponseStatusCode { get; set; }
public bool IsSuccess { get; set; }
public string? Message { get; set; }
public string? StackTrace { get; set; }
- public string Selector { get; set; }
- public string Body { get; set; }
+ public string? Selector { get; set; }
+ public string? Body { get; set; }
+ ///
+ /// Page open in new tab after button click
+ ///
+ public string? UrlAfterAction { get; set; }
public bool IsHighlighted { get; set; }
+
+ public override string ToString()
+ {
+ return $"{IsSuccess} - {Selector}";
+ }
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementActionArgs.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementActionArgs.cs
index dcda74369..fae31926b 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementActionArgs.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementActionArgs.cs
@@ -1,23 +1,64 @@
using BotSharp.Abstraction.Browsing.Enums;
+using System.Diagnostics;
namespace BotSharp.Abstraction.Browsing.Models;
+[DebuggerStepThrough]
public class ElementActionArgs
{
- private BroswerActionEnum _action;
- public BroswerActionEnum Action => _action;
+ [JsonPropertyName("action")]
+ [JsonConverter(typeof(JsonStringEnumConverter))]
+ public BroswerActionEnum Action { get; set; }
- private string _content;
- public string Content => _content;
+ [JsonPropertyName("content")]
+ public string? Content { get; set; }
+ [JsonPropertyName("file_urls")]
+ public string[] FileUrl { get; set; }
- public ElementActionArgs(BroswerActionEnum action)
+ public ElementPosition? Position { get; set; }
+
+ ///
+ /// Delay milliseconds before pressing key
+ ///
+ public int DelayBeforePressingKey { get; set; }
+
+ [JsonPropertyName("press_key")]
+ public string? PressKey { get; set; }
+
+ ///
+ /// Locator option
+ ///
+ public bool FirstIfMultipleFound { get; set; } = false;
+
+ ///
+ /// Wait time in seconds
+ ///
+ [JsonPropertyName("wait_time")]
+ public int WaitTime { get; set; }
+
+ ///
+ /// Add current url to the content
+ ///
+ [JsonPropertyName("show_current_url")]
+ public bool ShowCurrentUrl { get; set; } = false;
+
+ ///
+ /// Required for deserialization
+ ///
+ public ElementActionArgs()
+ {
+
+ }
+
+ public ElementActionArgs(BroswerActionEnum action, ElementPosition? position = null)
{
- _action = action;
+ Action = action;
+ Position = position;
}
public ElementActionArgs(BroswerActionEnum action, string content)
{
- _action = action;
- _content = content;
+ Action = action;
+ Content = content;
}
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementLocatingArgs.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementLocatingArgs.cs
index 6d6411d87..7d7dcc6ca 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementLocatingArgs.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementLocatingArgs.cs
@@ -1,10 +1,19 @@
+using System.Diagnostics;
+
namespace BotSharp.Abstraction.Browsing.Models;
+[DebuggerStepThrough]
public class ElementLocatingArgs
{
+ [JsonPropertyName("element_locator_desc")]
+ public string ElementLocatorDescription { get; set; } = string.Empty;
+
[JsonPropertyName("match_rule")]
public string MatchRule { get; set; } = string.Empty;
+ [JsonPropertyName("tag")]
+ public string? Tag { get; set; } = null!;
+
[JsonPropertyName("text")]
public string? Text { get; set; }
@@ -20,10 +29,19 @@ public class ElementLocatingArgs
[JsonPropertyName("selector")]
public string? Selector { get; set; }
+ public ElementPosition? Position { get; set; }
+
+ public bool Parent { get; set; }
+
public bool FailIfMultiple { get; set; }
+ [JsonPropertyName("ignore_if_not_found")]
+ public bool IgnoreIfNotFound { get; set; } = true;
///
/// Draw outline around the element
///
public bool Highlight { get; set; }
+ public string HighlightColor { get; set; } = "red";
+ [JsonPropertyName("is_read_content")]
+ public bool IsReadContent { get;set; }
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementPosition.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementPosition.cs
new file mode 100644
index 000000000..9a1ef0d34
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementPosition.cs
@@ -0,0 +1,13 @@
+namespace BotSharp.Abstraction.Browsing.Models;
+
+public class ElementPosition
+{
+ public float X { get; set; } = default!;
+
+ public float Y { get; set; } = default!;
+
+ public override string ToString()
+ {
+ return $"[{X}, {Y}]";
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/HttpRequestParams.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/HttpRequestParams.cs
index 2b8cc0525..743a12b50 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/HttpRequestParams.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/HttpRequestParams.cs
@@ -1,7 +1,9 @@
+using System.Diagnostics;
using System.Net.Http;
namespace BotSharp.Abstraction.Browsing.Models;
+[DebuggerStepThrough]
public class HttpRequestParams
{
[JsonPropertyName("url")]
@@ -18,7 +20,7 @@ public class HttpRequestParams
public HttpRequestParams(string url, HttpMethod method, string? payload = null)
{
- Method = HttpMethod.Get;
+ Method = method;
Url = url;
Payload = payload;
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/MessageInfo.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/MessageInfo.cs
index 336d255c7..3e81ad561 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/MessageInfo.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/MessageInfo.cs
@@ -1,8 +1,19 @@
+using BotSharp.Abstraction.Infrastructures;
+using System.Diagnostics;
+
namespace BotSharp.Abstraction.Browsing.Models;
-public class MessageInfo
+[DebuggerStepThrough]
+public class MessageInfo : ICacheKey
{
- public string AgentId { get; set; }
- public string ContextId { get; set; }
- public string MessageId { get; set; }
+ public string AgentId { get; set; } = null!;
+ public string UserId { get; set; } = null!;
+ public string ContextId { get; set; } = null!;
+ public string? MessageId { get; set; }
+ public string? TaskId { get; set; }
+ public string StepId { get; set; } = Guid.NewGuid().ToString();
+ public string? FunctionArgs { get; set; }
+
+ public string GetCacheKey()
+ => $"{nameof(MessageInfo)}";
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs
new file mode 100644
index 000000000..c28a6cda9
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs
@@ -0,0 +1,55 @@
+using BotSharp.Abstraction.Browsing.Enums;
+using System.Diagnostics;
+
+namespace BotSharp.Abstraction.Browsing.Models;
+
+[DebuggerStepThrough]
+public class PageActionArgs
+{
+ public BroswerActionEnum Action { get; set; }
+
+ public string? Content { get; set; }
+ public string Direction { get; set; } = "down";
+
+ public string Url { get; set; } = null!;
+
+ ///
+ /// This value has to be set to true if you want to get the page XHR/ Fetch responses
+ ///
+ [JsonPropertyName("open_new_tab")]
+ public bool OpenNewTab { get; set; } = true;
+ [JsonPropertyName("open_blank_page")]
+ public bool OpenBlankPage { get; set; } = true;
+ [JsonPropertyName("enable_response_callback")]
+ public bool EnableResponseCallback { get; set; } = false;
+
+ ///
+ /// Exclude urls for XHR/ Fetch responses
+ ///
+ public string[]? ExcludeResponseUrls { get; set; }
+
+ ///
+ /// Only include urls for XHR/ Fetch responses
+ ///
+ public string[]? IncludeResponseUrls { get; set; }
+
+ public List? Selectors { get; set; }
+
+ ///
+ /// If set to true, the response will be stored in memory
+ ///
+ public bool ResponseInMemory { get; set; } = false;
+ public List? ResponseContainer { get; set; }
+
+ public bool WaitForNetworkIdle { get; set; } = true;
+ public float? Timeout { get; set; }
+
+ ///
+ /// Wait time in seconds after page is opened
+ ///
+ public int WaitTime { get; set; }
+
+ public bool ReadInnerHTMLAsBody { get; set; } = false;
+ [JsonPropertyName("keep_browser_open")]
+ public bool KeepBrowserOpen { get; set; } = false;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/WebPageResponseData.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/WebPageResponseData.cs
new file mode 100644
index 000000000..cb3e6c4fd
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/WebPageResponseData.cs
@@ -0,0 +1,26 @@
+namespace BotSharp.Abstraction.Browsing.Models;
+
+public class WebPageResponseData
+{
+ public string Url { get; set; } = null!;
+ public string PostData { get; set; } = null!;
+ public string ResponseData { get; set; } = null!;
+ public bool ResponseInMemory { get; set; }
+ public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
+ public string Method { get; set; }
+ public List Cookies { get; set; }
+ public int ResponseCode { get; set; }
+
+ public override string ToString()
+ {
+ return $"{Url} {ResponseData.Length}";
+ }
+}
+public class WebPageCookieData
+{
+ public string Name { get; set; } = null!;
+ public string Value { get; set; } = null!;
+ public string Domain { get; set; } = null!;
+ public string Path { get; set; } = null!;
+ public float Expires { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/WebPageResponseFilter.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/WebPageResponseFilter.cs
new file mode 100644
index 000000000..00b78cc47
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/WebPageResponseFilter.cs
@@ -0,0 +1,22 @@
+using System.Diagnostics;
+
+namespace BotSharp.Abstraction.Browsing.Models;
+
+[DebuggerStepThrough]
+public class WebPageResponseFilter
+{
+ public string Url { get; set; } = null!;
+ public string[]? QueryParameters { get; set; }
+
+ public string[]? PostData { get; set; }
+
+ ///
+ /// contains, starts, ends, equals
+ ///
+ public string UrlMatchPattern { get; set; } = "contains";
+
+ ///
+ /// Handle Content-Type: text/x-component
+ ///
+ public Func? PartSearch { get; set; } = null;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Settings/IWebElementLocator.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Settings/IWebElementLocator.cs
new file mode 100644
index 000000000..2b46f01fc
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Settings/IWebElementLocator.cs
@@ -0,0 +1,8 @@
+using BotSharp.Abstraction.Browsing.Models;
+
+namespace BotSharp.Abstraction.Browsing.Settings;
+
+public interface IWebElementLocator
+{
+ Task DetectElementCoordinates(IWebBrowser browser, string contextId, string elementDescription);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Settings/WebBrowsingSettings.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Settings/WebBrowsingSettings.cs
new file mode 100644
index 000000000..aa983ad6e
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Settings/WebBrowsingSettings.cs
@@ -0,0 +1,13 @@
+namespace BotSharp.Abstraction.Browsing.Settings;
+
+public class WebBrowsingSettings
+{
+ public string Driver { get; set; } = "Playwright";
+ public bool Headless { get; set; }
+ // Default timeout in milliseconds
+ public float DefaultTimeout { get; set; } = 30000;
+ public float DefaultNavigationTimeout { get; set; } = 30000;
+ public bool IsEnableScreenshot { get; set; }
+ // Default wait time in seconds after page is opened
+ public int DefaultWaitTime { get; set; } = 5;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Chart/IChartProcessor.cs b/src/Infrastructure/BotSharp.Abstraction/Chart/IChartProcessor.cs
new file mode 100644
index 000000000..7f8cfd4d8
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Chart/IChartProcessor.cs
@@ -0,0 +1,12 @@
+using BotSharp.Abstraction.Chart.Models;
+using BotSharp.Abstraction.Chart.Options;
+
+namespace BotSharp.Abstraction.Chart;
+
+public interface IChartProcessor
+{
+ public string Provider { get; }
+
+ Task GetConversationChartDataAsync(string conversationId, string messageId, ChartDataOptions? options = null)
+ => throw new NotImplementedException();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Chart/Models/ChartDataResult.cs b/src/Infrastructure/BotSharp.Abstraction/Chart/Models/ChartDataResult.cs
new file mode 100644
index 000000000..28292d5ae
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Chart/Models/ChartDataResult.cs
@@ -0,0 +1,6 @@
+namespace BotSharp.Abstraction.Chart.Models;
+
+public class ChartDataResult
+{
+ public object Data { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Chart/Options/ChartCodeOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Chart/Options/ChartCodeOptions.cs
new file mode 100644
index 000000000..6827d1803
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Chart/Options/ChartCodeOptions.cs
@@ -0,0 +1,25 @@
+namespace BotSharp.Abstraction.Chart.Options;
+
+public class ChartCodeOptions
+{
+ public string? AgentId { get; set; }
+ public string? TemplateName { get; set; }
+ public string Text { get; set; } = string.Empty;
+
+ ///
+ /// Conversation state that can be used to fetch chart data
+ ///
+ public string? TargetStateName { get; set; }
+
+ public ChartLlmOptions? Llm { get; set; }
+ public List>? States { get; set; }
+
+}
+
+public class ChartLlmOptions
+{
+ public string? Provider { get; set; }
+ public string? Model { get; set; }
+ public int? MaxOutputTokens { get; set; }
+ public string? ReasoningEffortLevel { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Chart/Options/ChartDataOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Chart/Options/ChartDataOptions.cs
new file mode 100644
index 000000000..f037c930a
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Chart/Options/ChartDataOptions.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Chart.Options;
+
+public class ChartDataOptions
+{
+ ///
+ /// Conversation state that can be used to fetch chart data
+ ///
+ public string? TargetStateName { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Contexts/CodeExecutionContext.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Contexts/CodeExecutionContext.cs
new file mode 100644
index 000000000..8442eae45
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Contexts/CodeExecutionContext.cs
@@ -0,0 +1,8 @@
+namespace BotSharp.Abstraction.Coding.Contexts;
+
+public class CodeExecutionContext
+{
+ public AgentCodeScript CodeScript { get; set; }
+ public List Arguments { get; set; } = [];
+ public string? InvokeFrom { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Enums/BuiltInCodeProcessor.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Enums/BuiltInCodeProcessor.cs
new file mode 100644
index 000000000..cdbf76a99
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Enums/BuiltInCodeProcessor.cs
@@ -0,0 +1,6 @@
+namespace BotSharp.Abstraction.Coding.Enums;
+
+public static class BuiltInCodeProcessor
+{
+ public const string PyInterpreter = "botsharp-py-interpreter";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/ICodeProcessor.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/ICodeProcessor.cs
new file mode 100644
index 000000000..bd34eb257
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/ICodeProcessor.cs
@@ -0,0 +1,32 @@
+using BotSharp.Abstraction.Coding.Models;
+using BotSharp.Abstraction.Coding.Options;
+using BotSharp.Abstraction.Coding.Responses;
+using System.Threading;
+
+namespace BotSharp.Abstraction.Coding;
+
+public interface ICodeProcessor
+{
+ string Provider { get; }
+
+ ///
+ /// Run code script
+ ///
+ /// The code script to run
+ /// Code script execution options
+ /// The cancellation token
+ ///
+ ///
+ CodeInterpretResponse Run(string codeScript, CodeInterpretOptions? options = null, CancellationToken cancellationToken = default)
+ => throw new NotImplementedException();
+
+ ///
+ /// Generate code script
+ ///
+ /// User requirement to generate code script
+ /// Code script generation options
+ ///
+ ///
+ Task GenerateCodeScriptAsync(string text, CodeGenerationOptions? options = null)
+ => throw new NotImplementedException();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Models/CodeExecutionResponseModel.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Models/CodeExecutionResponseModel.cs
new file mode 100644
index 000000000..7045f1ac9
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Models/CodeExecutionResponseModel.cs
@@ -0,0 +1,12 @@
+using BotSharp.Abstraction.Coding.Responses;
+
+namespace BotSharp.Abstraction.Coding.Models;
+
+public class CodeExecutionResponseModel
+{
+ public string CodeProcessor { get; set; } = default!;
+ public AgentCodeScript CodeScript { get; set; }
+ public IDictionary? Arguments { get; set; }
+ public string Text { get; set; } = default!;
+ public CodeInterpretResponse? ExecutionResult { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Models/CodeGenerationResult.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Models/CodeGenerationResult.cs
new file mode 100644
index 000000000..83544f985
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Models/CodeGenerationResult.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Coding.Models;
+
+public class CodeGenerationResult : ResponseBase
+{
+ public string Content { get; set; }
+ public string Language { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeGenHandleOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeGenHandleOptions.cs
new file mode 100644
index 000000000..963cb8a15
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeGenHandleOptions.cs
@@ -0,0 +1,28 @@
+namespace BotSharp.Abstraction.Coding.Options;
+
+public class CodeGenHandleOptions : CodeGenerationOptions
+{
+ ///
+ /// Code processor provider
+ ///
+ [JsonPropertyName("processor")]
+ public string? Processor { get; set; }
+
+ ///
+ /// Whether to save the generated code script to db
+ ///
+ [JsonPropertyName("save_to_db")]
+ public bool SaveToDb { get; set; }
+
+ ///
+ /// Code script name (e.g., demo.py)
+ ///
+ [JsonPropertyName("script_name")]
+ public string? ScriptName { get; set; }
+
+ ///
+ /// Code script type (i.e., src, test)
+ ///
+ [JsonPropertyName("script_type")]
+ public string? ScriptType { get; set; } = AgentCodeScriptType.Src;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeGenerationOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeGenerationOptions.cs
new file mode 100644
index 000000000..2cc77b35a
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeGenerationOptions.cs
@@ -0,0 +1,31 @@
+namespace BotSharp.Abstraction.Coding.Options;
+
+public class CodeGenerationOptions
+{
+ ///
+ /// Agent id to get instruction
+ ///
+ [JsonPropertyName("agent_id")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? AgentId { get; set; }
+
+ ///
+ /// Template (prompt) name
+ ///
+ [JsonPropertyName("template_name")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? TemplateName { get; set; }
+
+ ///
+ /// Programming language
+ ///
+ [JsonPropertyName("programming_language")]
+ public string? ProgrammingLanguage { get; set; }
+
+ ///
+ /// Data that can be used to fill in the prompt
+ ///
+ [JsonPropertyName("data")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public Dictionary? Data { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeInterpretOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeInterpretOptions.cs
new file mode 100644
index 000000000..7152c46ef
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Options/CodeInterpretOptions.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Coding.Options;
+
+public class CodeInterpretOptions
+{
+ public string? ScriptName { get; set; }
+ public IEnumerable? Arguments { get; set; }
+ public bool UseLock { get; set; }
+ public bool UseProcess { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Responses/CodeInterpretResponse.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Responses/CodeInterpretResponse.cs
new file mode 100644
index 000000000..8d41f9853
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Responses/CodeInterpretResponse.cs
@@ -0,0 +1,11 @@
+namespace BotSharp.Abstraction.Coding.Responses;
+
+public class CodeInterpretResponse : ResponseBase
+{
+ public string Result { get; set; } = string.Empty;
+
+ public override string ToString()
+ {
+ return Result.IfNullOrEmptyAs(ErrorMsg.IfNullOrEmptyAs($"Success: {Success}"))!;
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Settings/CodingSettings.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Settings/CodingSettings.cs
new file mode 100644
index 000000000..49747798e
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Settings/CodingSettings.cs
@@ -0,0 +1,22 @@
+namespace BotSharp.Abstraction.Coding.Settings;
+
+public class CodingSettings
+{
+ public CodeScriptGenerationSettings? CodeGeneration { get; set; }
+
+ public CodeScriptExecutionSettings? CodeExecution { get; set; }
+}
+
+public class CodeScriptGenerationSettings : LlmConfigBase
+{
+ public string? Processor { get; set; }
+ public int? MessageLimit { get; set; }
+}
+
+public class CodeScriptExecutionSettings
+{
+ public string? Processor { get; set; }
+ public bool UseLock { get; set; }
+ public bool UseProcess { get; set; }
+ public int TimeoutSeconds { get; set; } = 3;
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Coding/Utils/CodingUtil.cs b/src/Infrastructure/BotSharp.Abstraction/Coding/Utils/CodingUtil.cs
new file mode 100644
index 000000000..57420d4d4
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Coding/Utils/CodingUtil.cs
@@ -0,0 +1,21 @@
+namespace BotSharp.Abstraction.Coding.Utils;
+
+public static class CodingUtil
+{
+ ///
+ /// Get code execution config => (useLock, useProcess, timeout seconds)
+ ///
+ ///
+ ///
+ ///
+ public static (bool, bool, int) GetCodeExecutionConfig(CodingSettings settings, int defaultTimeoutSeconds = 3)
+ {
+ var codeExecution = settings.CodeExecution;
+
+ var useLock = codeExecution?.UseLock ?? false;
+ var useProcess = codeExecution?.UseProcess ?? false;
+ var timeoutSeconds = codeExecution?.TimeoutSeconds > 0 ? codeExecution.TimeoutSeconds : defaultTimeoutSeconds;
+
+ return (useLock, useProcess, timeoutSeconds);
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/ConversationHookBase.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/ConversationHookBase.cs
index 06a971745..e0ca87753 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/ConversationHookBase.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/ConversationHookBase.cs
@@ -1,31 +1,37 @@
+using BotSharp.Abstraction.Repositories.Filters;
+
namespace BotSharp.Abstraction.Conversations;
public abstract class ConversationHookBase : IConversationHook
{
- protected Agent _agent;
- public Agent Agent => _agent;
+ public abstract string SelfId { get; }
+
+ public virtual bool IsMatch(string agentId)
+ => string.IsNullOrEmpty(SelfId) || SelfId == agentId;
+
+ public Agent Agent { get; private set; }
- protected Conversation _conversation;
- public Conversation Conversation => _conversation;
+ public Conversation Conversation { get; private set; }
- protected List _dialogs;
- public List Dialogs => _dialogs;
+ public List Dialogs { get; private set; }
- protected int _priority = 0;
- public int Priority => _priority;
+ public int Priority { get; protected set; } = 0;
public IConversationHook SetAgent(Agent agent)
{
- _agent = agent;
+ Agent = agent;
return this;
}
public IConversationHook SetConversation(Conversation conversation)
{
- _conversation = conversation;
+ Conversation = conversation;
return this;
}
+ public virtual Task GetConversationIntent()
+ => Task.FromResult(string.Empty);
+
public virtual Task OnStateLoaded(ConversationState state)
=> Task.CompletedTask;
@@ -37,10 +43,16 @@ public virtual Task OnDialogRecordLoaded(RoleDialogModel dialog)
public virtual Task OnDialogsLoaded(List dialogs)
{
- _dialogs = dialogs;
+ Dialogs = dialogs;
return Task.CompletedTask;
}
+ public virtual Task OnConversationsListing(ConversationFilter filter)
+ => Task.FromResult(string.Empty);
+
+ public virtual Task OnConversationCreating(Conversation conversation)
+ => Task.CompletedTask;
+
public virtual Task OnConversationEnding(RoleDialogModel message)
=> Task.CompletedTask;
@@ -53,10 +65,10 @@ public virtual Task OnTaskCompleted(RoleDialogModel message)
public virtual Task OnHumanInterventionNeeded(RoleDialogModel message)
=> Task.CompletedTask;
- public virtual Task OnFunctionExecuting(RoleDialogModel message)
+ public virtual Task OnFunctionExecuting(RoleDialogModel message, InvokeFunctionOptions? options = null)
=> Task.CompletedTask;
- public virtual Task OnFunctionExecuted(RoleDialogModel message)
+ public virtual Task OnFunctionExecuted(RoleDialogModel message, InvokeFunctionOptions? options = null)
=> Task.CompletedTask;
public virtual Task OnMessageReceived(RoleDialogModel message)
@@ -79,4 +91,7 @@ public virtual Task OnMessageDeleted(string conversationId, string messageId)
public virtual Task OnBreakpointUpdated(string conversationId, bool resetStates)
=> Task.CompletedTask;
+
+ public virtual Task OnNotificationGenerated(RoleDialogModel message)
+ => Task.CompletedTask;
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/ConversationStateServiceExtensions.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/ConversationStateServiceExtensions.cs
new file mode 100644
index 000000000..b3d47d9af
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/ConversationStateServiceExtensions.cs
@@ -0,0 +1,96 @@
+using BotSharp.Abstraction.Conversations.Enums;
+using BotSharp.Abstraction.Options;
+using Newtonsoft.Json;
+using System.Globalization;
+
+namespace BotSharp.Abstraction.Conversations;
+
+public static class ConversationStateServiceExtensions
+{
+ public static bool Equal(this IConversationStateService states, string name, string value)
+ {
+ return states.GetState(name) == value;
+ }
+
+ public static bool NotEqual(this IConversationStateService states, string name, string value)
+ {
+ return !states.Equal(name, value);
+ }
+
+ public static bool IsTrue(this IConversationStateService states, string name)
+ {
+ var value = states.GetState(name, "false");
+ return bool.TryParse(value, out var result) ? result : false;
+ }
+
+ public static bool IsFalse(this IConversationStateService states, string name)
+ {
+ return !states.IsTrue(name);
+ }
+
+ public static bool IsNullOrEmpty(this IConversationStateService states, string name)
+ {
+ return string.IsNullOrEmpty(states.GetState(name));
+ }
+
+ public static bool IsNotNullOrEmpty(this IConversationStateService states, string name)
+ {
+ return !IsNullOrEmpty(states, name);
+ }
+
+ ///
+ /// Get a state value and convert it to the target type.
+ /// Primitive/decimal/string/DateTime/enum are parsed with invariant culture, other types are deserialized from json.
+ ///
+ public static T GetState(this IConversationStateService states, string name, T defaultValue = default!, bool useNewtonsoftJson = true)
+ {
+ try
+ {
+ var targetType = Nullable.GetUnderlyingType(typeof(T)) ?? typeof(T);
+ var isBasicType = targetType.IsPrimitive || targetType == typeof(decimal) || targetType == typeof(string);
+ var value = states.GetState(name, isBasicType ? defaultValue?.ToString() ?? "" : "");
+ if (string.IsNullOrEmpty(value)) return defaultValue;
+
+ if (isBasicType)
+ {
+ return (T)Convert.ChangeType(value, targetType, CultureInfo.InvariantCulture);
+ }
+ else if (targetType == typeof(DateTime))
+ {
+ return (T)(object)DateTime.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind);
+ }
+ else if (targetType.IsEnum)
+ {
+ return (T)Enum.Parse(targetType, value, ignoreCase: true);
+ }
+ else
+ {
+ var result = useNewtonsoftJson
+ ? JsonConvert.DeserializeObject(value)
+ : System.Text.Json.JsonSerializer.Deserialize(value, BotSharpOptions.defaultJsonOptions);
+ return result is null ? defaultValue : result;
+ }
+ }
+ catch
+ {
+ // fall back to the default value when the state cannot be converted
+ }
+
+ return defaultValue;
+ }
+
+ public static bool IsPhoneChannel(this IConversationStateService states)
+ {
+ return states.GetState(StateConst.CHANNEL) == ConversationChannel.Phone;
+ }
+
+ public static bool IsEmailChannel(this IConversationStateService states)
+ {
+ return states.GetState(StateConst.CHANNEL) == ConversationChannel.Email;
+ }
+
+ public static bool IsOpenAPIChannel(this IConversationStateService states)
+ {
+ return states.GetState(StateConst.CHANNEL) == ConversationChannel.OpenAPI;
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Dtos/ChatResponseDto.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Dtos/ChatResponseDto.cs
new file mode 100644
index 000000000..ddeed555e
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Dtos/ChatResponseDto.cs
@@ -0,0 +1,59 @@
+using BotSharp.Abstraction.Functions.Models;
+using BotSharp.Abstraction.Instructs.Models;
+using BotSharp.Abstraction.Messaging;
+using BotSharp.Abstraction.Messaging.Models.RichContent;
+using BotSharp.Abstraction.Users.Dtos;
+
+namespace BotSharp.Abstraction.Conversations.Dtos;
+
+public class ChatResponseDto : InstructResult
+{
+ [JsonPropertyName("conversation_id")]
+ public string ConversationId { get; set; } = string.Empty;
+
+ public UserDto Sender { get; set; } = new UserDto();
+
+ public string? Function { get; set; }
+
+ ///
+ /// Planner instruction
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public FunctionCallFromLlm? Instruction { get; set; }
+
+ ///
+ /// Rich message for UI rendering
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("rich_content")]
+ public RichContent? RichContent { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("payload")]
+ public string? Payload { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("indication")]
+ public string? Indication { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("message_label")]
+ public string? MessageLabel { get; set; }
+
+ [JsonPropertyName("has_message_files")]
+ public bool HasMessageFiles { get; set; }
+
+ [JsonPropertyName("is_streaming")]
+ public bool IsStreaming { get; set; }
+
+ [JsonPropertyName("thought")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public Dictionary? Thought { get; set; }
+
+ [JsonPropertyName("meta_data")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public Dictionary? MetaData { get; set; }
+
+ [JsonPropertyName("created_at")]
+ public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
+}
diff --git a/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Conversations/ConversationViewModel.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Dtos/ConversationDto.cs
similarity index 57%
rename from src/Infrastructure/BotSharp.OpenAPI/ViewModels/Conversations/ConversationViewModel.cs
rename to src/Infrastructure/BotSharp.Abstraction/Conversations/Dtos/ConversationDto.cs
index c50ecc88c..d30b43099 100644
--- a/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Conversations/ConversationViewModel.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Dtos/ConversationDto.cs
@@ -1,8 +1,9 @@
-using System.Text.Json.Serialization;
+using BotSharp.Abstraction.Conversations.Enums;
+using BotSharp.Abstraction.Users.Dtos;
-namespace BotSharp.OpenAPI.ViewModels.Conversations;
+namespace BotSharp.Abstraction.Conversations.Dtos;
-public class ConversationViewModel
+public class ConversationDto
{
public string Id { get; set; }
@@ -12,11 +13,13 @@ public class ConversationViewModel
[JsonPropertyName("agent_name")]
public string AgentName { get; set; }
+ [JsonPropertyName("title")]
public string Title { get; set; } = string.Empty;
- public UserViewModel User { get; set; } = new UserViewModel();
+ [JsonPropertyName("title_alias")]
+ public string TitleAlias { get; set; } = string.Empty;
- public string Event { get; set; }
+ public UserDto User { get; set; } = new UserDto();
public string Channel { get; set; } = ConversationChannel.OpenAPI;
@@ -27,27 +30,33 @@ public class ConversationViewModel
public string? TaskId { get; set; }
public string Status { get; set; }
- public Dictionary States { get; set; }
+ public Dictionary States { get; set; } = [];
+
+ public List Tags { get; set; } = new();
[JsonPropertyName("updated_time")]
public DateTime UpdatedTime { get; set; } = DateTime.UtcNow;
+
[JsonPropertyName("created_time")]
public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
- public static ConversationViewModel FromSession(Conversation sess)
+ public static ConversationDto FromSession(Conversation sess)
{
- return new ConversationViewModel
+ return new ConversationDto
{
Id = sess.Id,
- User = new UserViewModel
- {
- Id = sess.UserId
+ User = new UserDto
+ {
+ Id = sess.UserId
},
AgentId = sess.AgentId,
Title = sess.Title,
+ TitleAlias = sess.TitleAlias,
Channel = sess.Channel,
Status = sess.Status,
TaskId = sess.TaskId,
+ Tags = sess.Tags ?? [],
+ States = sess.States ?? [],
CreatedTime = sess.CreatedTime,
UpdatedTime = sess.UpdatedTime
};
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ChatEvent.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ChatEvent.cs
new file mode 100644
index 000000000..b81cf3fda
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ChatEvent.cs
@@ -0,0 +1,23 @@
+namespace BotSharp.Abstraction.Conversations.Enums;
+
+public static class ChatEvent
+{
+ public const string OnConversationInitFromClient = nameof(OnConversationInitFromClient);
+ public const string OnMessageReceivedFromClient = nameof(OnMessageReceivedFromClient);
+ public const string OnMessageReceivedFromAssistant = nameof(OnMessageReceivedFromAssistant);
+ public const string OnIntermediateMessageReceivedFromAssistant = nameof(OnIntermediateMessageReceivedFromAssistant);
+
+ public const string OnMessageDeleted = nameof(OnMessageDeleted);
+ public const string OnNotificationGenerated = nameof(OnNotificationGenerated);
+ public const string OnIndicationReceived = nameof(OnIndicationReceived);
+
+ public const string OnConversationContentLogGenerated = nameof(OnConversationContentLogGenerated);
+ public const string OnConversateStateLogGenerated = nameof(OnConversateStateLogGenerated);
+ public const string OnAgentQueueChanged = nameof(OnAgentQueueChanged);
+ public const string OnStateChangeGenerated = nameof(OnStateChangeGenerated);
+
+ public const string BeforeReceiveLlmStreamMessage = nameof(BeforeReceiveLlmStreamMessage);
+ public const string OnReceiveLlmStreamMessage = nameof(OnReceiveLlmStreamMessage);
+ public const string AfterReceiveLlmStreamMessage = nameof(AfterReceiveLlmStreamMessage);
+ public const string OnSenderActionGenerated = nameof(OnSenderActionGenerated);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ConversationChannel.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ConversationChannel.cs
index ecf84e3f7..462813d6e 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ConversationChannel.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ConversationChannel.cs
@@ -1,9 +1,15 @@
namespace BotSharp.Abstraction.Conversations.Enums;
-public class ConversationChannel
+public static class ConversationChannel
{
public const string WebChat = "webchat";
public const string OpenAPI = "openapi";
public const string Phone = "phone";
+ public const string SMS = "sms";
public const string Messenger = "messenger";
+ public const string Teams = "teams";
+ public const string WeChat = "wechat";
+ public const string Email = "email";
+ public const string Crontab = "crontab";
+ public const string Database = "database";
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ConversationStatus.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ConversationStatus.cs
index dc8a53b4b..b82e094b2 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ConversationStatus.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/ConversationStatus.cs
@@ -1,6 +1,6 @@
namespace BotSharp.Abstraction.Conversations.Enums;
-public class ConversationStatus
+public static class ConversationStatus
{
public const string Open = "open";
public const string Closed = "closed";
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/MessageTypeName.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/MessageTypeName.cs
new file mode 100644
index 000000000..736ba8738
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/MessageTypeName.cs
@@ -0,0 +1,16 @@
+namespace BotSharp.Abstraction.Conversations.Enums;
+
+public static class MessageTypeName
+{
+ public const string Plain = "plain";
+ public const string FunctionCall = "function";
+ public const string Audio = "audio";
+ public const string Error = "error";
+
+ ///
+ /// A message that belongs to the conversation record but not to the conversation as the user
+ /// sees it -- what an agent said to itself on the way to an answer. Stored like any other
+ /// message and left out of later turns; skipped when the dialog is rendered.
+ ///
+ public const string Internal = "internal";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/StateDataType.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/StateDataType.cs
index 20d635f47..9f80a9e8c 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/StateDataType.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/StateDataType.cs
@@ -1,6 +1,6 @@
namespace BotSharp.Abstraction.Conversations.Enums;
-public class StateDataType
+public static class StateDataType
{
public const string String = "string";
public const string Boolean = "boolean";
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/StateSource.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/StateSource.cs
index 31f32e162..cff798025 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/StateSource.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Enums/StateSource.cs
@@ -1,6 +1,6 @@
namespace BotSharp.Abstraction.Conversations.Enums;
-public class StateSource
+public static class StateSource
{
public const string External = "external";
public const string Application = "application";
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationAttachmentService.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationAttachmentService.cs
deleted file mode 100644
index feec3fab2..000000000
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationAttachmentService.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace BotSharp.Abstraction.Conversations;
-
-public interface IConversationAttachmentService
-{
- string GetDirectory(string conversationId);
-}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationCancellationService.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationCancellationService.cs
new file mode 100644
index 000000000..6456a065f
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationCancellationService.cs
@@ -0,0 +1,33 @@
+using System.Threading;
+
+namespace BotSharp.Abstraction.Conversations;
+
+///
+/// Service to manage cancellation tokens for streaming chat completions.
+/// Allows stopping an active streaming response by conversation ID.
+///
+public interface IConversationCancellationService
+{
+ ///
+ /// Register a new cancellation token source for the given conversation.
+ /// Returns the CancellationToken to be used in streaming loops.
+ ///
+ CancellationToken RegisterConversation(string conversationId);
+
+ ///
+ /// Cancel an active streaming operation for the given conversation.
+ ///
+ /// True if the conversation was found and cancelled, false otherwise.
+ bool CancelStreaming(string conversationId);
+
+ ///
+ /// Remove the cancellation token source for the given conversation.
+ /// Should be called when streaming completes (either normally or via cancellation).
+ ///
+ void UnregisterConversation(string conversationId);
+
+ ///
+ /// Get the cancellation token for the given conversation if one is registered.
+ ///
+ CancellationToken GetToken(string conversationId);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationHook.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationHook.cs
index 9ed47c615..6ad36d0c4 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationHook.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationHook.cs
@@ -1,8 +1,9 @@
-using BotSharp.Abstraction.Functions.Models;
+using BotSharp.Abstraction.Hooks;
+using BotSharp.Abstraction.Repositories.Filters;
namespace BotSharp.Abstraction.Conversations;
-public interface IConversationHook
+public interface IConversationHook : IHookBase
{
int Priority { get; }
Agent Agent { get; }
@@ -12,6 +13,27 @@ public interface IConversationHook
Conversation Conversation { get; }
IConversationHook SetConversation(Conversation conversation);
+ ///
+ /// Get the predifined intent for the conversation.
+ /// It will send to the conversation context to help LLM to understand the user's intent.
+ ///
+ ///
+ Task GetConversationIntent();
+
+ ///
+ /// Triggered when listing conversations.
+ ///
+ ///
+ ///
+ Task OnConversationsListing(ConversationFilter filter);
+
+ ///
+ /// Triggered when a new conversation is creating.
+ ///
+ ///
+ ///
+ Task OnConversationCreating(Conversation conversation);
+
///
/// Triggered when user connects with agent first time.
/// This hook is the good timing to show welcome infomation.
@@ -52,33 +74,20 @@ public interface IConversationHook
/// Triggered before LLM calls function.
///
///
+ ///
///
- Task OnFunctionExecuting(RoleDialogModel message);
+ Task OnFunctionExecuting(RoleDialogModel message, InvokeFunctionOptions? options = null);
///
/// Triggered when the function calling completed.
///
///
+ ///
///
- Task OnFunctionExecuted(RoleDialogModel message);
+ Task OnFunctionExecuted(RoleDialogModel message, InvokeFunctionOptions? options = null);
Task OnResponseGenerated(RoleDialogModel message);
- ///
- /// LLM detected user requested a new task different from previous topic.
- ///
- ///
- ///
- Task OnNewTaskDetected(RoleDialogModel message, string reason);
-
- ///
- /// LLM detected the current task is completed.
- /// It's useful for the situation of multiple tasks in the same conversation.
- ///
- ///
- ///
- Task OnTaskCompleted(RoleDialogModel message);
-
///
/// LLM detected the whole conversation is going to be end.
///
@@ -107,4 +116,11 @@ public interface IConversationHook
///
///
Task OnBreakpointUpdated(string conversationId, bool resetStates);
+
+ ///
+ /// Generate a notification
+ ///
+ ///
+ ///
+ Task OnNotificationGenerated(RoleDialogModel message);
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs
index d0a95ef89..aec49b9a0 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs
@@ -1,4 +1,3 @@
-using BotSharp.Abstraction.Loggers.Models;
using BotSharp.Abstraction.Repositories.Filters;
namespace BotSharp.Abstraction.Conversations;
@@ -8,34 +7,40 @@ public interface IConversationService
IConversationStateService States { get; }
string ConversationId { get; }
Task NewConversation(Conversation conversation);
- void SetConversationId(string conversationId, List states);
- Task GetConversation(string id);
+ Task SetConversationId(string conversationId, List states, bool isReadOnly = false);
+ Task GetConversation(string id, bool isLoadStates = false);
Task> GetConversations(ConversationFilter filter);
- Task UpdateConversationTitle(string id, string title);
+ Task UpdateConversationTitle(string id, string title);
+ Task UpdateConversationTitleAlias(string id, string titleAlias);
+ Task UpdateConversationTags(string conversationId, List toAddTags, List toDeleteTags);
+ Task UpdateConversationMessage(string conversationId, UpdateMessageRequest request);
Task> GetLastConversations();
- Task> GetIdleConversations(int batchSize, int messageLimit, int bufferHours);
+ Task> GetIdleConversations(int batchSize, int messageLimit, int bufferHours, IEnumerable excludeAgentIds);
Task DeleteConversations(IEnumerable ids);
- Task TruncateConversation(string conversationId, string messageId);
- Task> GetConversationContentLogs(string conversationId);
- Task> GetConversationStateLogs(string conversationId);
+
+ ///
+ /// Truncate conversation
+ ///
+ /// Target conversation id
+ /// Target message id to delete
+ /// If not null, delete messages while input a new message; otherwise delete messages only
+ ///
+ Task TruncateConversation(string conversationId, string messageId, string? newMessageId = null);
///
/// Send message to LLM
///
///
- ///
+ ///
+ ///
/// Received the response from AI Agent
- /// This delegate is useful when you want to report progress on UI
- /// This delegate is useful when you want to report progress on UI
///
Task SendMessage(string agentId,
- RoleDialogModel lastDalog,
+ RoleDialogModel message,
PostbackMessageModel? replyMessage,
- Func onResponseReceived,
- Func onFunctionExecuting,
- Func onFunctionExecuted);
+ Func onResponseReceived);
- List GetDialogHistory(int lastCount = 50, bool fromBreakpoint = true);
+ Task> GetDialogHistory(int lastCount = 100, bool fromBreakpoint = true, IEnumerable? includeMessageTypes = null, ConversationDialogFilter? filter = null);
Task CleanHistory(string agentId);
///
@@ -43,6 +48,17 @@ Task SendMessage(string agentId,
///
/// Whether to reset all states
/// Append user init words
+ ///
///
- Task UpdateBreakpoint(bool resetStates = false, string? reason = null);
+ Task UpdateBreakpoint(bool resetStates = false, string? reason = null, params string[] excludedStates);
+
+ Task GetConversationSummary(ConversationSummaryModel model);
+
+ Task GetConversationRecordOrCreateNew(string agentId);
+
+ bool IsConversationMode();
+
+ Task SaveStates();
+
+ Task> GetConversationStateSearhKeys(ConversationStateKeysFilter filter);
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationStateService.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationStateService.cs
index fe3f9193b..64a96bac9 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationStateService.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationStateService.cs
@@ -6,10 +6,10 @@ namespace BotSharp.Abstraction.Conversations;
///
/// Conversation state service to track the context in the conversation lifecycle
///
-public interface IConversationStateService
+public interface IConversationStateService : IDisposable
{
string GetConversationId();
- Dictionary Load(string conversationId, bool isReadOnly = false);
+ Task> Load(string conversationId, bool isReadOnly = false);
string GetState(string name, string defaultValue = "");
bool ContainsState(string name);
Dictionary GetStates();
@@ -17,6 +17,10 @@ IConversationStateService SetState(string name, T value, bool isNeedVersion =
int activeRounds = -1, string valueType = StateDataType.String, string source = StateSource.User, bool readOnly = false);
void SaveStateByArgs(JsonDocument args);
bool RemoveState(string name);
- void CleanStates();
- void Save();
+ void CleanStates(params string[] excludedStates);
+ Task Save();
+
+ ConversationState GetCurrentState();
+ void SetCurrentState(ConversationState state);
+ void ResetCurrentState();
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationStorage.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationStorage.cs
index 5f7066d2a..0e734fe84 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationStorage.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationStorage.cs
@@ -1,8 +1,10 @@
+using BotSharp.Abstraction.Repositories.Filters;
+
namespace BotSharp.Abstraction.Conversations;
public interface IConversationStorage
{
- void InitStorage(string conversationId);
- void Append(string conversationId, RoleDialogModel dialog);
- List GetDialogs(string conversationId);
+ Task Append(string conversationId, RoleDialogModel dialog);
+ Task Append(string conversationId, IEnumerable dialogs);
+ Task> GetDialogs(string conversationId, ConversationDialogFilter? filter = null);
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/IIndicationLocalizer.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/IIndicationLocalizer.cs
new file mode 100644
index 000000000..ae5f0ac11
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/IIndicationLocalizer.cs
@@ -0,0 +1,14 @@
+namespace BotSharp.Abstraction.Conversations;
+
+///
+/// Puts an indication into the conversation's language before it is pushed. Indications skip
+/// TranslationResponseHook -- they go out ahead of the function, where an LLM translation would
+/// hold up the very line meant to say "working on it" -- so the host supplies fixed wording instead.
+/// Optional: with none registered, indications go out as the function wrote them.
+///
+public interface IIndicationLocalizer
+{
+ /// The conversation's StateConst.LANGUAGE, e.g. LanguageType.CHINESE.
+ /// The wording for , or unchanged when there is none.
+ string Localize(string indication, string language);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/ISyntheticConversationProbe.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/ISyntheticConversationProbe.cs
new file mode 100644
index 000000000..aef6aae64
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/ISyntheticConversationProbe.cs
@@ -0,0 +1,39 @@
+using BotSharp.Abstraction.Agents.Models;
+
+namespace BotSharp.Abstraction.Conversations;
+
+///
+/// Reports whether a conversation is synthetic -- driven by an automated harness rather than by a
+/// person -- so that guards aimed at human overuse can stand aside for it.
+///
+/// This exists because per-user volume limits count the wrong thing for a test harness. A regression
+/// suite legitimately opens one conversation per case per model, at machine speed, and does it under
+/// whatever identity the background worker happens to have. Measured as human behaviour that looks
+/// like abuse, and the limit then fails every test with a message about conversation quotas -- which
+/// says nothing about the agent under test and is indistinguishable, in a report, from the agent
+/// having regressed.
+///
+/// Deliberately a query rather than a flag on the message: a flag would have to be threaded through
+/// every call that creates or continues a conversation, and anything that forgot would silently be
+/// treated as human traffic. Asking by conversation id keeps the answer in one place.
+///
+/// Implementations must be cheap and side-effect free -- this is called on the message path -- and
+/// must answer false for anything they do not recognise. Several may be registered; a conversation is
+/// synthetic if any of them claims it. None being registered is the normal case, and then nothing is
+/// exempt.
+///
+public interface ISyntheticConversationProbe
+{
+ ///
+ /// True when this conversation is being driven by a harness. Must not throw, and must not treat
+ /// an unknown or blank id as synthetic: getting this wrong in that direction exempts real user
+ /// traffic from the very limits it is meant to be held to.
+ ///
+ bool IsSynthetic(string conversationId);
+
+ ///
+ /// The provider/model the harness forces every chat completion in this conversation onto, or null
+ /// to leave it alone. Applied by CompletionProvider.GetChatCompletion.
+ ///
+ AgentLlmConfig? GetModelOverride(string conversationId) => null;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/ITokenStatistics.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/ITokenStatistics.cs
index 3355e6d32..2473ce928 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/ITokenStatistics.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/ITokenStatistics.cs
@@ -2,11 +2,11 @@ namespace BotSharp.Abstraction.Conversations;
public interface ITokenStatistics
{
- int Total { get; }
+ long Total { get; }
float AccumulatedCost { get; }
float Cost { get; }
void StartTimer();
void StopTimer();
- void AddToken(TokenStatsModel stats);
+ Task AddToken(TokenStatsModel stats, RoleDialogModel message);
void PrintStatistics();
}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ChatAnnotation.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ChatAnnotation.cs
new file mode 100644
index 000000000..061e75a34
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ChatAnnotation.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Conversations.Models;
+
+public class ChatAnnotation
+{
+ public string Title { get; set; }
+ public string Url { get; set; }
+ public int StartIndex { get; set; }
+ public int EndIndex { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/Conversation.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/Conversation.cs
index 530f425d6..488862bd6 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/Conversation.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/Conversation.cs
@@ -13,53 +13,124 @@ public class Conversation
///
public string? TaskId { get; set; }
public string Title { get; set; } = string.Empty;
+ public string TitleAlias { get; set; } = string.Empty;
[JsonIgnore]
- public List Dialogs { get; set; } = new List();
+ public List Dialogs { get; set; } = [];
[JsonIgnore]
- public Dictionary States { get; set; } = new Dictionary();
+ public Dictionary States { get; set; } = [];
public string Status { get; set; } = ConversationStatus.Open;
public string Channel { get; set; } = ConversationChannel.OpenAPI;
+ ///
+ /// Channel id, like phone number, email address, etc.
+ ///
+ public string ChannelId { get; set; } = default!;
+
public int DialogCount { get; set; }
+ public List Tags { get; set; } = [];
+
public DateTime UpdatedTime { get; set; } = DateTime.UtcNow;
public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
}
public class DialogElement
{
- public DialogMetaData MetaData { get; set; }
- public string Content { get; set; }
+ [JsonPropertyName("meta_data")]
+ public DialogMetaData MetaData { get; set; } = new();
+
+ [JsonPropertyName("content")]
+ public string Content { get; set; } = default!;
+
+ [JsonPropertyName("secondary_content")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? SecondaryContent { get; set; }
+
+ [JsonPropertyName("rich_content")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? RichContent { get; set; }
+ [JsonPropertyName("secondary_rich_content")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? SecondaryRichContent { get; set; }
+
+ [JsonPropertyName("payload")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? Payload { get; set; }
+
public DialogElement()
{
}
- public DialogElement(DialogMetaData meta, string content, string? richContent = null)
+ public DialogElement(DialogMetaData meta, string content, string? richContent = null,
+ string? secondaryContent = null, string? secondaryRichContent = null, string? payload = null)
{
MetaData = meta;
Content = content;
RichContent = richContent;
+ SecondaryContent = secondaryContent;
+ SecondaryRichContent = secondaryRichContent;
+ Payload = payload;
}
public override string ToString()
{
- return $"{MetaData.Role}: {Content} [{MetaData.CreateTime}]";
+ return $"{MetaData.Role}: {Content} [{MetaData?.CreatedTime}]";
}
}
public class DialogMetaData
{
- public string Role { get; set; }
- public string AgentId { get; set; }
- public string MessageId { get; set; }
+ [JsonPropertyName("role")]
+ public string Role { get; set; } = default!;
+
+ [JsonPropertyName("agent_id")]
+ public string AgentId { get; set; } = default!;
+
+ [JsonPropertyName("message_id")]
+ public string MessageId { get; set; } = default!;
+
+ [JsonPropertyName("message_type")]
+ public string MessageType { get; set; } = default!;
+
+ [JsonPropertyName("message_label")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? MessageLabel { get; set; }
+
+ [JsonPropertyName("function_name")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? FunctionName { get; set; }
+
+ [JsonPropertyName("function_args")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FunctionArgs { get; set; }
+
+ [JsonPropertyName("tool_call_id")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? ToolCallId { get; set; }
+
+ [JsonPropertyName("thought")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public Dictionary? Thought { get; set; }
+
+ [JsonPropertyName("meta_data")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public Dictionary? MetaData { get; set; }
+
+ [JsonPropertyName("sender_id")]
public string? SenderId { get; set; }
- public DateTime CreateTime { get; set; }
-}
+
+ ///
+ /// When true, message is persisted but omitted from default LLM dialog history and routing conversation text.
+ ///
+ [JsonPropertyName("exclude_from_context")]
+ public bool ExcludeFromContext { get; set; }
+
+ [JsonPropertyName("create_at")]
+ public DateTime CreatedTime { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationContext.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationContext.cs
new file mode 100644
index 000000000..2fc4dee64
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationContext.cs
@@ -0,0 +1,11 @@
+namespace BotSharp.Abstraction.Conversations.Models;
+
+public class ConversationContext
+{
+ public ConversationState State { get; set; }
+ public List Dialogs { get; set; } = new();
+ public List RoutingDialogs { get; set; } = new();
+ public List Breakpoints { get; set; } = new();
+ public int RecursiveCounter { get; set; }
+ public Stack RoutingStack { get; set; } = new();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationFile.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationFile.cs
new file mode 100644
index 000000000..4e55d9350
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationFile.cs
@@ -0,0 +1,17 @@
+namespace BotSharp.Abstraction.Conversations.Models;
+
+public class ConversationFile
+{
+ [JsonPropertyName("conversation_id")]
+ public string ConversationId { get; set; }
+
+ [JsonPropertyName("thumbnail")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? Thumbnail { get; set; }
+
+ [JsonPropertyName("created_time")]
+ public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
+
+ [JsonPropertyName("updated_time")]
+ public DateTime UpdatedTime { get; set; } = DateTime.UtcNow;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationSenderActionModel.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationSenderActionModel.cs
index a153472c4..502cca4c2 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationSenderActionModel.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationSenderActionModel.cs
@@ -1,11 +1,13 @@
-using BotSharp.Abstraction.Messaging.Enums;
-
namespace BotSharp.Abstraction.Conversations.Models;
public class ConversationSenderActionModel
{
[JsonPropertyName("conversation_id")]
public string ConversationId { get; set; }
+
[JsonPropertyName("sender_action")]
public SenderActionEnum SenderAction { get; set; }
+
+ [JsonPropertyName("indication")]
+ public string? Indication { get; set; }
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationState.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationState.cs
index b56187b58..8382cdf2d 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationState.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationState.cs
@@ -1,6 +1,8 @@
+using System.Collections.Concurrent;
+
namespace BotSharp.Abstraction.Conversations.Models;
-public class ConversationState : Dictionary
+public class ConversationState : ConcurrentDictionary
{
public ConversationState()
{
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/IncomingMessageModel.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/IncomingMessageModel.cs
index 2176c7fae..430c44ad1 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/IncomingMessageModel.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/IncomingMessageModel.cs
@@ -5,6 +5,9 @@ public class IncomingMessageModel : MessageConfig
public string Text { get; set; } = string.Empty;
public virtual string Channel { get; set; } = string.Empty;
+ [JsonPropertyName("input_message_id")]
+ public string? InputMessageId { get; set; }
+
///
/// Postback message
///
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/RoleDialogModel.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/RoleDialogModel.cs
index dea858817..6b3a14614 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/RoleDialogModel.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/RoleDialogModel.cs
@@ -1,9 +1,12 @@
+using BotSharp.Abstraction.Conversations.Enums;
using BotSharp.Abstraction.Functions.Models;
using BotSharp.Abstraction.Messaging;
using BotSharp.Abstraction.Messaging.Models.RichContent;
+using System.Diagnostics;
namespace BotSharp.Abstraction.Conversations.Models;
+[DebuggerStepThrough]
public class RoleDialogModel : ITrackableMessage
{
///
@@ -11,6 +14,21 @@ public class RoleDialogModel : ITrackableMessage
///
public string MessageId { get; set; }
+ ///
+ /// The message type
+ ///
+ public string MessageType { get; set; } = MessageTypeName.Plain;
+
+ ///
+ /// When true, message is stored but omitted from default LLM history and routing [CONVERSATION] (orthogonal to ).
+ ///
+ public bool ExcludeFromContext { get; set; }
+
+ ///
+ /// The message label
+ ///
+ public string? MessageLabel { get; set; }
+
///
/// user, system, assistant, function
///
@@ -26,6 +44,20 @@ public class RoleDialogModel : ITrackableMessage
public string Content { get; set; }
+ public string? SecondaryContent { get; set; }
+
+ ///
+ /// Postback of previous round payload
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("payload")]
+ public string? Payload { get; set; }
+
+ ///
+ /// Indicator message used to provide UI feedback for function execution
+ ///
+ public string? Indication { get; set; }
+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string CurrentAgentId { get; set; }
@@ -41,12 +73,44 @@ public class RoleDialogModel : ITrackableMessage
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? FunctionArgs { get; set; }
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? ToolCallId { get; set; }
+
+ ///
+ /// Every tool call this reply asked for, in the order the model produced them, or null when
+ /// it asked for none.
+ ///
+ ///
+ /// , and beside
+ /// this are the first entry, so a caller that can only run one call keeps working unchanged;
+ /// a caller that can run several reads this instead. The one difference is name repair: the
+ /// single field carries the normalized name it always has, while entries here keep the name
+ /// the model actually sent.
+ ///
+ /// Deliberately not copied by : this describes one model reply, and a
+ /// message derived from that reply -- a tool result, an assistant answer -- is not it.
+ ///
+ ///
+ public List? ToolCalls { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public Dictionary? Thought { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public Dictionary? MetaData { get; set; }
+
+ ///
+ /// Set this flag is in OnFunctionExecuting, if true, it won't be executed by InvokeFunction.
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.Always)]
+ public bool Handled { get; set; } = false;
+
///
/// Function execution structured data, this data won't pass to LLM.
/// It's ideal to render in rich content in UI.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- public object Data { get; set; }
+ public object? Data { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public string ImageUrl { get; set; }
@@ -57,6 +121,12 @@ public class RoleDialogModel : ITrackableMessage
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public RichContent? RichContent { get; set; }
+ ///
+ /// Rich content for secondary language
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public RichContent? SecondaryRichContent { get; set; }
+
///
/// Stop conversation completion
///
@@ -65,7 +135,54 @@ public class RoleDialogModel : ITrackableMessage
public FunctionCallFromLlm Instruction { get; set; }
- private RoleDialogModel()
+ ///
+ /// Files to be used in conversation
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public List? Files { get; set; }
+
+ ///
+ /// The images generated by AI
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("generated_images")]
+ public List? GeneratedImages { get; set; }
+
+ ///
+ /// The web annotations generated by AI
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("annotations")]
+ public List? Annotations { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.Always)]
+ public string RenderedInstruction { get; set; } = string.Empty;
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.Always)]
+ public bool IsStreaming { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.Always)]
+ public bool IsFromUser => Role == AgentRole.User;
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.Always)]
+ public bool IsFromAssistant => Role == AgentRole.Assistant || Role == AgentRole.Model;
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.Always)]
+ public string LlmContent
+ {
+ get
+ {
+ var text = Content;
+ if (Role == AgentRole.User)
+ {
+ text = !string.IsNullOrWhiteSpace(Payload) ? Payload : Content;
+ }
+
+ return text;
+ }
+ }
+
+ public RoleDialogModel()
{
}
@@ -74,13 +191,14 @@ public RoleDialogModel(string role, string text)
Role = role;
Content = text;
MessageId = Guid.NewGuid().ToString();
+ MessageType = MessageTypeName.Plain;
}
public override string ToString()
{
if (Role == AgentRole.Function)
{
- return $"{Role}: {FunctionName}({FunctionArgs}) => {Content}";
+ return $"{Role}: {Content} <= {FunctionName}({FunctionArgs})";
}
else
{
@@ -96,13 +214,31 @@ public static RoleDialogModel From(RoleDialogModel source,
{
CurrentAgentId = source.CurrentAgentId,
MessageId = source.MessageId,
- FunctionArgs = source.FunctionArgs,
+ MessageType = source.MessageType,
+ ExcludeFromContext = source.ExcludeFromContext,
+ MessageLabel = source.MessageLabel,
+ ToolCallId = source.ToolCallId,
FunctionName = source.FunctionName,
+ FunctionArgs = source.FunctionArgs,
+ Indication = source.Indication,
PostbackFunctionName = source.PostbackFunctionName,
RichContent = source.RichContent,
+ Payload = source.Payload,
StopCompletion = source.StopCompletion,
Instruction = source.Instruction,
- Data = source.Data
+ Data = source.Data,
+ IsStreaming = source.IsStreaming,
+ Annotations = source.Annotations,
+ Thought = source.Thought != null ? new(source.Thought) : null,
+ MetaData = source.MetaData != null ? new(source.MetaData) : null
};
}
-}
+
+ public void ClearMessage()
+ {
+ this.Payload = null;
+ this.RichContent = null;
+ this.SecondaryContent = null;
+ this.SecondaryRichContent = null;
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TokenStatsModel.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TokenStatsModel.cs
index 233888074..236c3b18c 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TokenStatsModel.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TokenStatsModel.cs
@@ -5,7 +5,35 @@ public class TokenStatsModel
public string Provider { get; set; }
public string Model { get; set; }
public string Prompt { get; set; }
- public int PromptCount { get; set; }
- public int CompletionCount { get; set; }
- public AgentLlmConfig LlmConfig { get; set; }
+ public string? ServiceTier { get; set; }
+
+ #region Text token
+ public long TextInputTokens { get; set; }
+ public long CachedTextInputTokens { get; set; }
+ public long CachedTextInputWriteTokens { get; set; }
+ public long TextOutputTokens { get; set; }
+ #endregion
+
+ #region Audio token
+ public int AudioInputTokens { get; set; }
+ public int CachedAudioInputTokens { get; set; }
+ public int AudioOutputTokens { get; set; }
+ #endregion
+
+ #region Image token
+ public long ImageInputTokens { get; set; }
+ public long CachedImageInputTokens { get; set; }
+ public long ImageOutputTokens { get; set; }
+ #endregion
+
+ #region Image
+ public int ImageGenerationCount { get; set; }
+ public float ImageGenerationUnitCost { get; set; }
+ #endregion
+
+ public long TotalTextInputTokens => TextInputTokens + CachedTextInputTokens + CachedTextInputWriteTokens;
+ public long TotalInputTokens => TotalTextInputTokens
+ + AudioInputTokens + CachedAudioInputTokens
+ + ImageInputTokens + CachedImageInputTokens;
+ public long TotalOutputTokens => TextOutputTokens + AudioOutputTokens + ImageOutputTokens;
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TruncateMessageRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TruncateMessageRequest.cs
index 088697cdb..a08a5770f 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TruncateMessageRequest.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TruncateMessageRequest.cs
@@ -2,5 +2,6 @@ namespace BotSharp.Abstraction.Conversations.Models;
public class TruncateMessageRequest
{
- public string? TruncateMessageId { get; set; }
+ [JsonPropertyName("is_new_message")]
+ public bool isNewMessage { get; set; }
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/UpdateMessageRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/UpdateMessageRequest.cs
new file mode 100644
index 000000000..4c51b114f
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Models/UpdateMessageRequest.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Conversations.Models;
+
+public class UpdateMessageRequest
+{
+ public DialogElement Message { get; set; } = null!;
+ public int InnerIndex { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Settings/ConversationSetting.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Settings/ConversationSetting.cs
index bbf5b9b1e..b656af2b2 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Settings/ConversationSetting.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Settings/ConversationSetting.cs
@@ -2,7 +2,7 @@ namespace BotSharp.Abstraction.Conversations.Settings;
public class ConversationSetting
{
- public string DataDir { get; set; }
+ public string DataDir { get; set; } = "conversations";
public string ChatCompletion { get; set; }
public bool EnableKnowledgeBase { get; set; }
public bool ShowVerboseLog { get; set; }
@@ -11,8 +11,26 @@ public class ConversationSetting
public bool EnableExecutionLog { get; set; }
public bool EnableContentLog { get; set; }
public bool EnableStateLog { get; set; }
- public CleanConversationSetting CleanSetting { get; set; } = new CleanConversationSetting();
- public RateLimitSetting RateLimit { get; set; } = new RateLimitSetting();
+ public bool EnableTranslationMemory { get; set; }
+ public CleanConversationSetting CleanSetting { get; set; } = new();
+ public ToolResultTrimSetting ToolResultTrim { get; set; } = new();
+ public RateLimitSetting RateLimit { get; set; } = new();
+ public FileSelectSetting? FileSelect { get; set; }
+}
+
+///
+/// Caps what an older turn's tool result costs in the prompt. The turn that ran the tool always
+/// sees it whole; only what history replays is shortened.
+///
+public class ToolResultTrimSetting
+{
+ public bool Enable { get; set; } = true;
+
+ /// How many of the most recent turns keep their tool results verbatim.
+ public int KeepTurns { get; set; } = 2;
+
+ /// A result longer than this, and older than , is shortened.
+ public int MaxLength { get; set; } = 500;
}
public class CleanConversationSetting
@@ -21,5 +39,12 @@ public class CleanConversationSetting
public int BatchSize { get; set; }
public int MessageLimit { get; set; }
public int BufferHours { get; set; }
+ public int LogRetentionDays { get; set; }
+ public int LogBatchSize { get; set; } = 2000;
+ public IEnumerable ExcludeAgentIds { get; set; } = new List();
+}
+public class FileSelectSetting : LlmConfigBase
+{
+ public int? MessageLimit { get; set; }
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/Settings/RateLimitSetting.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/Settings/RateLimitSetting.cs
index 0c9a7436d..510cbe8d9 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/Settings/RateLimitSetting.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/Settings/RateLimitSetting.cs
@@ -3,6 +3,6 @@ namespace BotSharp.Abstraction.Conversations.Settings;
public class RateLimitSetting
{
public int MaxConversationPerDay { get; set; } = 100;
- public int MaxInputLengthPerRequest { get; set; } = 256;
+ public int MaxInputLengthPerRequest { get; set; } = 1024;
public int MinTimeSecondsBetweenMessages { get; set; } = 2;
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabHook.cs b/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabHook.cs
new file mode 100644
index 000000000..33c64c8c5
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabHook.cs
@@ -0,0 +1,24 @@
+using BotSharp.Abstraction.Hooks;
+
+namespace BotSharp.Abstraction.Crontab;
+
+public interface ICrontabHook : IHookBase
+{
+ string[]? Triggers
+ => null;
+
+ ///
+ /// Establishes the identity for the cron event; invoked synchronously for all hooks before any OnCronTriggered runs, so the identity flows down into the execution phase.
+ ///
+ ///
+ void OnAuthenticate(CrontabItem item) { }
+
+ Task OnCronTriggered(CrontabItem item)
+ => Task.CompletedTask;
+
+ Task OnTaskExecuting(CrontabItem item)
+ => Task.CompletedTask;
+
+ Task OnTaskExecuted(CrontabItem item)
+ => Task.CompletedTask;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabService.cs b/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabService.cs
new file mode 100644
index 000000000..025685f96
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabService.cs
@@ -0,0 +1,8 @@
+namespace BotSharp.Abstraction.Crontab;
+
+public interface ICrontabService
+{
+ Task> GetCrontable();
+ Task ScheduledTimeArrived(CrontabItem item);
+ Task ExecuteTimeArrivedItemWithReentryProtection(CrontabItem item);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabSource.cs b/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabSource.cs
new file mode 100644
index 000000000..d294a233a
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Crontab/ICrontabSource.cs
@@ -0,0 +1,14 @@
+namespace BotSharp.Abstraction.Crontab;
+
+///
+/// Provide a cron source for the crontab service.
+///
+public interface ICrontabSource
+{
+ ///
+ /// Set to true if the cron is real-time like Change Data Capture (CDC).
+ ///
+ bool IsRealTime => false;
+
+ CrontabItem GetCrontabItem();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/CrontabItem.cs b/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/CrontabItem.cs
new file mode 100644
index 000000000..71bc20985
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/CrontabItem.cs
@@ -0,0 +1,49 @@
+namespace BotSharp.Abstraction.Crontab.Models;
+
+public class CrontabItem : ScheduleTaskArgs
+{
+ [JsonPropertyName("user_id")]
+ public string UserId { get; set; } = null!;
+
+ [JsonPropertyName("agent_id")]
+ public string AgentId { get; set; } = null!;
+
+ [JsonPropertyName("conversation_id")]
+ public string ConversationId { get; set; } = null!;
+
+ [JsonPropertyName("execution_result")]
+ public string ExecutionResult { get; set; } = null!;
+
+ [JsonPropertyName("execution_count")]
+ public int ExecutionCount { get; set; }
+
+ [JsonPropertyName("max_execution_count")]
+ public int MaxExecutionCount { get; set; }
+
+ [JsonPropertyName("expire_seconds")]
+ public int ExpireSeconds { get; set; } = 60;
+
+ [JsonPropertyName("last_execution_time")]
+ public DateTime? LastExecutionTime { get; set; }
+
+ [JsonPropertyName("created_time")]
+ public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
+
+ [JsonPropertyName("trigger_type")]
+ public CronTabItemTriggerType TriggerType { get; set; } = CronTabItemTriggerType.BackgroundWatcher;
+
+ [JsonPropertyName("reentry_protection")]
+ public bool ReentryProtection { get; set; }
+
+ public override string ToString()
+ {
+ return $"{Title}: {Description} [AgentId: {AgentId}, UserId: {UserId}]";
+ }
+}
+
+public enum CronTabItemTriggerType
+{
+ BackgroundWatcher,
+ OpenAPI,
+ MessageQueue
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/CrontabItemFilter.cs b/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/CrontabItemFilter.cs
new file mode 100644
index 000000000..7a949dc23
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/CrontabItemFilter.cs
@@ -0,0 +1,23 @@
+namespace BotSharp.Abstraction.Crontab.Models;
+
+public class CrontabItemFilter : Pagination
+{
+ [JsonPropertyName("user_ids")]
+ public IEnumerable? UserIds { get; set; }
+
+ [JsonPropertyName("agent_ids")]
+ public IEnumerable? AgentIds { get; set; }
+
+ [JsonPropertyName("conversation_ids")]
+ public IEnumerable? ConversationIds { get; set; }
+
+ public CrontabItemFilter()
+ {
+
+ }
+
+ public static CrontabItemFilter Empty()
+ {
+ return new CrontabItemFilter();
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/ScheduleTaskArgs.cs b/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/ScheduleTaskArgs.cs
new file mode 100644
index 000000000..af28374a2
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/ScheduleTaskArgs.cs
@@ -0,0 +1,31 @@
+namespace BotSharp.Abstraction.Crontab.Models;
+
+public class ScheduleTaskArgs
+{
+ [JsonPropertyName("cron_expression")]
+ public string Cron { get; set; } = null!;
+
+ [JsonPropertyName("less_than_60_seconds")]
+ public bool LessThan60Seconds { get; set; } = false;
+
+ [JsonPropertyName("title")]
+ public string Title { get; set; } = null!;
+
+ [JsonPropertyName("description")]
+ public string Description { get; set; } = null!;
+
+ [JsonPropertyName("to_do_list")]
+ public ScheduleTaskItemArgs[] Tasks { get; set; } = [];
+}
+
+public class ScheduleTaskItemArgs
+{
+ [JsonPropertyName("topic")]
+ public string Topic { get; set; } = null!;
+
+ [JsonPropertyName("script")]
+ public string Script { get; set; } = null!;
+
+ [JsonPropertyName("language")]
+ public string Language { get; set; } = null!;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/TaskWaitArgs.cs b/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/TaskWaitArgs.cs
new file mode 100644
index 000000000..9eb728542
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/TaskWaitArgs.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BotSharp.Abstraction.Crontab.Models;
+
+public class TaskWaitArgs
+{
+
+ [JsonPropertyName("delay_time")]
+ public int DelayTime { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Crontab/Settings/CrontabSettings.cs b/src/Infrastructure/BotSharp.Abstraction/Crontab/Settings/CrontabSettings.cs
new file mode 100644
index 000000000..d820aa6bd
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Crontab/Settings/CrontabSettings.cs
@@ -0,0 +1,19 @@
+namespace BotSharp.Abstraction.Crontab.Settings;
+
+public class CrontabSettings
+{
+ public CrontabBaseSetting EventSubscriber { get; set; } = new();
+ public CrontabBaseSetting Watcher { get; set; } = new();
+ public string LockName { get; set; } = "CrontabWatcher:locker";
+ public DebugSetting Debug { get; set; } = new();
+}
+
+public class CrontabBaseSetting
+{
+ public bool Enabled { get; set; } = true;
+}
+
+public class DebugSetting
+{
+ public string AllowRuleTrigger { get; set; } = "";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Entity/IEntityAnalyzer.cs b/src/Infrastructure/BotSharp.Abstraction/Entity/IEntityAnalyzer.cs
new file mode 100644
index 000000000..ca6a8680c
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Entity/IEntityAnalyzer.cs
@@ -0,0 +1,11 @@
+using BotSharp.Abstraction.Entity.Models;
+using BotSharp.Abstraction.Entity.Responses;
+
+namespace BotSharp.Abstraction.Entity;
+
+public interface IEntityAnalyzer
+{
+ string Provider { get; }
+
+ Task AnalyzeAsync(string text, EntityAnalysisOptions? options = null);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Entity/IEntityDataLoader.cs b/src/Infrastructure/BotSharp.Abstraction/Entity/IEntityDataLoader.cs
new file mode 100644
index 000000000..8e81aeb7a
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Entity/IEntityDataLoader.cs
@@ -0,0 +1,34 @@
+using BotSharp.Abstraction.Entity.Models;
+
+namespace BotSharp.Abstraction.Entity;
+
+public interface IEntityDataLoader
+{
+ string Provider { get; }
+
+ ///
+ /// Load vocabulary data => return mapping: [data source] = a list of vocabularies
+ ///
+ ///
+ Task>> LoadVocabularyAsync();
+
+ ///
+ /// Load synonym data => return mapping: [word/phrase] = (data source, canonical form)
+ ///
+ ///
+ Task> LoadSynonymMappingAsync();
+
+ ///
+ /// Context-aware vocabulary load. Default implementation delegates to the
+ /// parameterless version for loaders that don't need runtime parameters.
+ ///
+ Task>> LoadVocabularyAsync(EntityDataLoadContext ctx)
+ => LoadVocabularyAsync();
+
+ ///
+ /// Context-aware synonym load. Default implementation delegates to the
+ /// parameterless version for loaders that don't need runtime parameters.
+ ///
+ Task> LoadSynonymMappingAsync(EntityDataLoadContext ctx)
+ => LoadSynonymMappingAsync();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityAnalysisOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityAnalysisOptions.cs
new file mode 100644
index 000000000..155bd8cb0
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityAnalysisOptions.cs
@@ -0,0 +1,40 @@
+namespace BotSharp.Abstraction.Entity.Models;
+
+public class EntityAnalysisOptions
+{
+ ///
+ /// Token data providers
+ ///
+ [JsonPropertyName("data_providers")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public IEnumerable? DataProviders { get; set; }
+
+ ///
+ /// Free-form parameters forwarded to implementations.
+ /// Each loader documents the keys it recognizes (e.g. "graphId" for graph-backed loaders).
+ ///
+ [JsonPropertyName("loader_parameters")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public IDictionary? LoaderParameters { get; set; }
+
+ ///
+ /// Maximum n-gram size
+ ///
+ [JsonPropertyName("max_ngram")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public int? MaxNgram { get; set; }
+
+ ///
+ /// Cutoff score: from 0 to 1
+ ///
+ [JsonPropertyName("cutoff")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public double? Cutoff { get; set; }
+
+ ///
+ /// Top k
+ ///
+ [JsonPropertyName("top_k")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public int? TopK { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityAnalysisResult.cs b/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityAnalysisResult.cs
new file mode 100644
index 000000000..c760456ca
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityAnalysisResult.cs
@@ -0,0 +1,12 @@
+namespace BotSharp.Abstraction.Entity.Models;
+
+public class EntityAnalysisResult
+{
+ public string Token { get; set; } = string.Empty;
+
+ [JsonPropertyName("canonical_text")]
+ public string? CanonicalText { get; set; }
+
+ [JsonPropertyName("data")]
+ public IDictionary Data { get; set; } = new Dictionary();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityDataLoadContext.cs b/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityDataLoadContext.cs
new file mode 100644
index 000000000..d9ee699c7
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Entity/Models/EntityDataLoadContext.cs
@@ -0,0 +1,16 @@
+namespace BotSharp.Abstraction.Entity.Models;
+
+///
+/// Loader-facing context carrying free-form parameters from the caller
+/// (e.g. via ).
+/// Each implementation defines which keys it
+/// recognizes (document them on the concrete loader's XML doc).
+///
+public class EntityDataLoadContext
+{
+ ///
+ /// Case-insensitive key/value bag (e.g. "graphId", "tenantId").
+ ///
+ public IDictionary Parameters { get; init; }
+ = new Dictionary(StringComparer.OrdinalIgnoreCase);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Entity/Responses/EntityAnalysisResponse.cs b/src/Infrastructure/BotSharp.Abstraction/Entity/Responses/EntityAnalysisResponse.cs
new file mode 100644
index 000000000..143e24f64
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Entity/Responses/EntityAnalysisResponse.cs
@@ -0,0 +1,8 @@
+using BotSharp.Abstraction.Entity.Models;
+
+namespace BotSharp.Abstraction.Entity.Responses;
+
+public class EntityAnalysisResponse : ResponseBase
+{
+ public List Results { get; set; } = [];
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/EvaluationRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/EvaluationRequest.cs
index a133cb8c1..fc18728e2 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/EvaluationRequest.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/EvaluationRequest.cs
@@ -1,6 +1,59 @@
+using BotSharp.Abstraction.Processors.Models;
+
namespace BotSharp.Abstraction.Evaluations.Models;
-public class EvaluationRequest
+public class EvaluationRequest : LlmBaseRequest
{
- public string AgentId { get; set; }
+ [JsonPropertyName("agent_id")]
+ public new string AgentId { get; set; }
+
+ [JsonPropertyName("states")]
+ public IEnumerable States { get; set; } = [];
+
+ [JsonPropertyName("chat")]
+ public ChatEvaluationRequest Chat { get; set; } = new ChatEvaluationRequest();
+
+ [JsonPropertyName("metric")]
+ public MetricEvaluationRequest Metric { get; set; } = new MetricEvaluationRequest();
+}
+
+
+public class ChatEvaluationRequest
+{
+ [JsonPropertyName("duplicate_limit")]
+ public int DuplicateLimit { get; set; } = 2;
+
+ [JsonPropertyName("max_rounds")]
+ public int MaxRounds { get; set; } = 20;
+
+
+ [JsonPropertyName("additional_instruction")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? AdditionalInstruction { get; set; }
+
+ [JsonPropertyName("stop_criteria")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? StopCriteria { get; set; }
+
+ public ChatEvaluationRequest()
+ {
+
+ }
}
+
+
+public class MetricEvaluationRequest
+{
+ [JsonPropertyName("additional_instruction")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? AdditionalInstruction { get; set; }
+
+ [JsonPropertyName("metrics")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public IEnumerable? Metrics { get; set; } = [];
+
+ public MetricEvaluationRequest()
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/EvaluationResult.cs b/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/EvaluationResult.cs
index 2a1817ab4..6a3e383cc 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/EvaluationResult.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/EvaluationResult.cs
@@ -5,4 +5,6 @@ public class EvaluationResult
public List Dialogs { get; set; }
public string TaskInstruction { get; set; }
public string SystemPrompt { get; set; }
+ public string GeneratedConversationId { get; set; }
+ public string? MetricResult { get; set; }
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/SimulationResult.cs b/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/SimulationResult.cs
new file mode 100644
index 000000000..06d3f2890
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Evaluations/Models/SimulationResult.cs
@@ -0,0 +1,13 @@
+namespace BotSharp.Abstraction.Evaluations.Models;
+
+public class SimulationResult
+{
+ [JsonPropertyName("generated_message")]
+ public string GeneratedMessage { get; set; }
+
+ [JsonPropertyName("stop_conversation")]
+ public bool Stop { get; set; }
+
+ [JsonPropertyName("reason")]
+ public string? Reason { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Constants/FileConstants.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Constants/FileConstants.cs
new file mode 100644
index 000000000..dab5bc817
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Constants/FileConstants.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Files.Constants;
+
+public class FileConstants
+{
+ public static readonly IEnumerable AudioExtensions = new List
+ {
+ ".mp3", ".wav", ".flac", ".aac", ".ogg", ".wma"
+ };
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Contexts/FileSelectContext.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Contexts/FileSelectContext.cs
new file mode 100644
index 000000000..0ec5cd71a
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Contexts/FileSelectContext.cs
@@ -0,0 +1,19 @@
+namespace BotSharp.Abstraction.Files.Contexts;
+
+public class FileSelectContext
+{
+ [JsonPropertyName("selected_files")]
+ public List? SelectedFiles { get; set; }
+}
+
+public class FileSelectItem
+{
+ [JsonPropertyName("message_id")]
+ public string MessageId { get; set; }
+
+ [JsonPropertyName("file_index")]
+ public string FileIndex { get; set; }
+
+ [JsonPropertyName("file_source")]
+ public string FileSource { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Converters/IImageConverter.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Converters/IImageConverter.cs
new file mode 100644
index 000000000..e217cb521
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Converters/IImageConverter.cs
@@ -0,0 +1,26 @@
+using BotSharp.Abstraction.Files.Options;
+
+namespace BotSharp.Abstraction.Files.Converters;
+
+public interface IImageConverter
+{
+ public string Provider { get; }
+
+ ///
+ /// Convert pdf pages to images, and return a list of image file paths
+ ///
+ /// Pdf file location
+ /// Image folder location
+ ///
+ ///
+ Task> ConvertPdfToImages(string pdfLocation, string imageFolderLocation) => throw new NotImplementedException();
+
+ ///
+ /// Convert an image to PNG with RGBA
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task ConvertImage(BinaryData binary, ImageConvertOptions? options = null) => throw new NotImplementedException();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Enums/FileSource.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Enums/FileSource.cs
new file mode 100644
index 000000000..cde8c79f6
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Enums/FileSource.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Files.Enums;
+
+public static class FileSource
+{
+ public const string User = "user";
+ public const string Bot = "bot";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Enums/FileStorageEnum.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Enums/FileStorageEnum.cs
new file mode 100644
index 000000000..4d2962f9e
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Enums/FileStorageEnum.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Repositories.Enums;
+
+public static class FileStorageEnum
+{
+ public const string LocalFileStorage = nameof(LocalFileStorage);
+ public const string AmazonS3Storage = nameof(AmazonS3Storage);
+ public const string AzureBlobStorage = nameof(AzureBlobStorage);
+ public const string TencentCosStorage = nameof(TencentCosStorage);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/FileCoreSettings.cs b/src/Infrastructure/BotSharp.Abstraction/Files/FileCoreSettings.cs
new file mode 100644
index 000000000..1d66c80a7
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/FileCoreSettings.cs
@@ -0,0 +1,9 @@
+using BotSharp.Abstraction.Repositories.Enums;
+
+namespace BotSharp.Abstraction.Files;
+
+public class FileCoreSettings
+{
+ public string Storage { get; set; } = FileStorageEnum.LocalFileStorage;
+ public SettingBase? ImageConverter { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/IFileInstructService.cs b/src/Infrastructure/BotSharp.Abstraction/Files/IFileInstructService.cs
new file mode 100644
index 000000000..bf72b86e6
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/IFileInstructService.cs
@@ -0,0 +1,34 @@
+using BotSharp.Abstraction.Files.Options;
+using BotSharp.Abstraction.Instructs.Options;
+
+namespace BotSharp.Abstraction.Files;
+
+public interface IFileInstructService
+{
+ #region Image
+ Task ReadImages(string text, IEnumerable images, InstructOptions? options = null);
+ Task GenerateImage(string text, InstructOptions? options = null);
+ Task VaryImage(InstructFileModel image, InstructOptions? options = null);
+ Task EditImage(string text, InstructFileModel image, InstructOptions? options = null);
+ Task EditImage(string text, InstructFileModel image, InstructFileModel mask, InstructOptions? options = null);
+ Task ComposeImages(string text, InstructFileModel[] images, InstructOptions? options = null);
+ #endregion
+
+ #region Pdf
+ ///
+ /// Take screenshots of pdf pages and get response from llm
+ ///
+ ///
+ /// Pdf files
+ ///
+ Task ReadPdf(string text, List files, InstructOptions? options = null);
+ #endregion
+
+ #region Audio
+ Task SpeechToText(InstructFileModel audio, string? text = null, InstructOptions? options = null);
+ #endregion
+
+ #region Select file
+ Task> SelectMessageFiles(string conversationId, SelectFileOptions options);
+ #endregion
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/IFileStorageService.cs b/src/Infrastructure/BotSharp.Abstraction/Files/IFileStorageService.cs
new file mode 100644
index 000000000..7f785d188
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/IFileStorageService.cs
@@ -0,0 +1,70 @@
+using BotSharp.Abstraction.Files.Options;
+using System.IO;
+
+namespace BotSharp.Abstraction.Files;
+
+public interface IFileStorageService
+{
+ #region Common
+ string GetDirectory(string conversationId);
+ IEnumerable GetFiles(string relativePath, string? searchQuery = null);
+ BinaryData GetFileBytes(string fileStorageUrl);
+ bool SaveFileStreamToPath(string filePath, Stream stream);
+ bool SaveFileBytesToPath(string filePath, BinaryData binary);
+ string GetParentDir(string dir, int level = 1);
+ bool ExistDirectory(string? dir);
+ void CreateDirectory(string dir);
+ void DeleteDirectory(string dir);
+ string BuildDirectory(params string[] segments);
+ #endregion
+
+ #region Conversation
+ ///
+ /// Get the message file screenshots for pdf
+ ///
+ ///
+ ///
+ ///
+ Task> GetMessageFileScreenshotsAsync(string conversationId, IEnumerable messageIds, MessageFileScreenshotOptions options);
+
+ ///
+ /// Get the files that have been uploaded in the chat. No screenshot images are included.
+ ///
+ ///
+ ///
+ ///
+ ///
+ IEnumerable GetMessageFiles(string conversationId, IEnumerable messageIds, MessageFileOptions? options = null);
+ string GetMessageFile(string conversationId, string messageId, string source, string index, string fileName);
+ bool SaveMessageFiles(string conversationId, string messageId, string source, List files);
+
+ ///
+ /// Delete files under messages
+ ///
+ /// Conversation Id
+ /// Files in these messages will be deleted
+ /// The starting message to delete
+ /// If not null, delete messages while input a new message; otherwise, delete messages only
+ ///
+ bool DeleteMessageFiles(string conversationId, IEnumerable messageIds, string targetMessageId, string? newMessageId = null);
+ bool DeleteConversationFiles(IEnumerable conversationIds);
+ #endregion
+
+
+ #region User
+ Task GetUserAvatar();
+ Task SaveUserAvatar(FileDataModel file);
+ #endregion
+
+ #region Speech
+ bool SaveSpeechFile(string conversationId, string fileName, BinaryData data);
+ BinaryData GetSpeechFile(string conversationId, string fileName);
+ #endregion
+
+ #region Knowledge
+ bool SaveKnowledgeBaseFile(string collectionName, string knowledgebaseProvider, Guid fileId, string fileName, BinaryData fileData);
+ bool DeleteKnowledgeFile(string collectionName, string knowledgebaseProvider, Guid? fileId = null);
+ string GetKnowledgeBaseFileUrl(string collectionName, string knowledgebaseProvider, Guid fileId, string fileName);
+ BinaryData GetKnowledgeBaseFileBinaryData(string collectionName, string knowledgebaseProvider, Guid fileId, string fileName);
+ #endregion
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/BotSharpFile.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/BotSharpFile.cs
new file mode 100644
index 000000000..ee377bafd
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/BotSharpFile.cs
@@ -0,0 +1,15 @@
+namespace BotSharp.Abstraction.Files.Models;
+
+public class BotSharpFile : FileInformation
+{
+ ///
+ /// File data => format: "data:image/png;base64,aaaaaaaa"
+ ///
+ [JsonPropertyName("file_data")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileData { get; set; } = string.Empty;
+
+ [JsonPropertyName("file_index")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileIndex { get; set; } = string.Empty;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/ExternalFileModel.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/ExternalFileModel.cs
new file mode 100644
index 000000000..23250dc68
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/ExternalFileModel.cs
@@ -0,0 +1,21 @@
+using BotSharp.Abstraction.Knowledges.Enums;
+
+namespace BotSharp.Abstraction.Files.Models;
+
+public class ExternalFileModel : FileDataModel
+{
+ [JsonPropertyName("file_url")]
+ public string? FileUrl { get; set; }
+
+ ///
+ /// File data => format: "data:image/png;base64,aaaaaaaa"
+ ///
+ [JsonPropertyName("file_data")]
+ public new string? FileData { get; set; }
+
+ ///
+ /// The file source, e.g., api, user upload, external web, etc.
+ ///
+ [JsonPropertyName("file_source")]
+ public string FileSource { get; set; } = KnowledgeDocSource.Api;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileBase.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileBase.cs
new file mode 100644
index 000000000..f952e7f90
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileBase.cs
@@ -0,0 +1,18 @@
+namespace BotSharp.Abstraction.Files.Models;
+
+public class FileBase
+{
+ ///
+ /// File name without extension
+ ///
+ [JsonPropertyName("file_name")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileName { get; set; } = string.Empty;
+
+ ///
+ /// File data, e.g., "data:image/png;base64,aaaaaaaa"
+ ///
+ [JsonPropertyName("file_data")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileData { get; set; } = string.Empty;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileBinaryDataModel.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileBinaryDataModel.cs
new file mode 100644
index 000000000..d2d3ee920
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileBinaryDataModel.cs
@@ -0,0 +1,8 @@
+namespace BotSharp.Abstraction.Files.Models;
+
+public class FileBinaryDataModel
+{
+ public string FileName { get; set; }
+ public string ContentType { get; set; }
+ public BinaryData FileBinaryData { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileDataModel.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileDataModel.cs
new file mode 100644
index 000000000..d2a2e1f0d
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileDataModel.cs
@@ -0,0 +1,16 @@
+namespace BotSharp.Abstraction.Files.Models;
+
+public class FileDataModel : FileBase
+{
+ ///
+ /// File name with extension
+ ///
+ [JsonPropertyName("file_name")]
+ public new string FileName { get; set; } = string.Empty;
+
+ ///
+ /// File data => format: "data:image/png;base64,aaaaaaaa"
+ ///
+ [JsonPropertyName("file_data")]
+ public new string FileData { get; set; } = string.Empty;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileInformation.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileInformation.cs
new file mode 100644
index 000000000..ede9fffd0
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/FileInformation.cs
@@ -0,0 +1,48 @@
+namespace BotSharp.Abstraction.Files.Models;
+
+public class FileInformation
+{
+ ///
+ /// External file url for display
+ ///
+ [JsonPropertyName("file_url")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileUrl { get; set; } = string.Empty;
+
+ ///
+ /// Internal file storage url
+ ///
+ [JsonPropertyName("file_storage_url")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileStorageUrl { get; set; } = string.Empty;
+
+ ///
+ /// File content type
+ ///
+ [JsonPropertyName("content_type")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? ContentType { get; set; } = string.Empty;
+
+ ///
+ /// File name without extension
+ ///
+ [JsonPropertyName("file_name")]
+ public string FileName { get; set; } = string.Empty;
+
+ ///
+ /// File extension without dot
+ ///
+ [JsonPropertyName("file_extension")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileExtension { get; set; } = string.Empty;
+
+ ///
+ /// External file url for download
+ ///
+ [JsonPropertyName("file_download_url")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileDownloadUrl { get; set; } = string.Empty;
+
+
+ public string FileFullName => $"{FileName}.{FileExtension}";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/ImageGeneration.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/ImageGeneration.cs
new file mode 100644
index 000000000..4bcc0a05a
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/ImageGeneration.cs
@@ -0,0 +1,13 @@
+namespace BotSharp.Abstraction.Files.Models;
+
+public class ImageGeneration
+{
+ [JsonPropertyName("image_url")]
+ public string? ImageUrl { get; set; }
+
+ [JsonPropertyName("image_data")]
+ public string? ImageData { get; set; }
+
+ [JsonPropertyName("description")]
+ public string Description { get; set; } = string.Empty;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/InstructFileModel.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/InstructFileModel.cs
new file mode 100644
index 000000000..e6e572563
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/InstructFileModel.cs
@@ -0,0 +1,38 @@
+namespace BotSharp.Abstraction.Files.Models;
+
+public class InstructFileModel : FileBase
+{
+ ///
+ /// File extension
+ ///
+ [JsonPropertyName("file_extension")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileExtension { get; set; } = string.Empty;
+
+ ///
+ /// File url
+ ///
+ [JsonPropertyName("file_url")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? FileUrl { get; set; } = string.Empty;
+
+ ///
+ /// File url
+ ///
+ [JsonPropertyName("content_type")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? ContentType { get; set; }
+
+ public override string ToString()
+ {
+ if (!string.IsNullOrEmpty(FileUrl))
+ {
+ return FileUrl;
+ }
+ else if (!string.IsNullOrEmpty(FileData))
+ {
+ return FileData.SubstringMax(50);
+ }
+ return string.Empty;
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Models/MessageFileModel.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Models/MessageFileModel.cs
new file mode 100644
index 000000000..32f431912
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Models/MessageFileModel.cs
@@ -0,0 +1,23 @@
+namespace BotSharp.Abstraction.Files.Models;
+
+public class MessageFileModel : FileInformation
+{
+ [JsonPropertyName("message_id")]
+ public string MessageId { get; set; }
+
+ [JsonPropertyName("file_source")]
+ public string FileSource { get; set; } = Enums.FileSource.User;
+
+ [JsonPropertyName("file_index")]
+ public string FileIndex { get; set; } = string.Empty;
+
+ public MessageFileModel()
+ {
+
+ }
+
+ public override string ToString()
+ {
+ return $"File name: {FileName}, File extension: {FileExtension}, Content type: {ContentType}, Source: {FileSource}";
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Options/FileHandleOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Options/FileHandleOptions.cs
new file mode 100644
index 000000000..60b3ffc34
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Options/FileHandleOptions.cs
@@ -0,0 +1,29 @@
+namespace BotSharp.Abstraction.Files.Options;
+
+public class FileHandleOptions : LlmConfigBase
+{
+ ///
+ /// Instruction
+ ///
+ public string? Instruction { get; set; }
+
+ ///
+ /// Message from user
+ ///
+ public string? UserMessage { get; set; }
+
+ ///
+ /// Template name in Agent
+ ///
+ public string? TemplateName { get; set; }
+
+ ///
+ /// The upstream where the file llm is invoked
+ ///
+ public string? InvokeFrom { get; set; }
+
+ ///
+ /// Data that is used to render instruction
+ ///
+ public Dictionary? Data { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Options/ImageConvertOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Options/ImageConvertOptions.cs
new file mode 100644
index 000000000..f2b9dc2b6
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Options/ImageConvertOptions.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Files.Options;
+
+public class ImageConvertOptions
+{
+ public string ImageType { get; set; } = "png";
+ public string ColorType { get; set; } = "rgba";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Options/MessageFileOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Options/MessageFileOptions.cs
new file mode 100644
index 000000000..a13e94fe9
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Options/MessageFileOptions.cs
@@ -0,0 +1,20 @@
+namespace BotSharp.Abstraction.Files.Options;
+
+public class MessageFileOptions
+{
+ ///
+ /// File sources: user, bot
+ ///
+ public IEnumerable? Sources { get; set; }
+
+ ///
+ /// File content types
+ ///
+ public IEnumerable? ContentTypes { get; set; }
+}
+
+
+public class MessageFileScreenshotOptions : MessageFileOptions
+{
+ public string ImageConvertProvider { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Options/SelectFileOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Options/SelectFileOptions.cs
new file mode 100644
index 000000000..2c769cb8d
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Options/SelectFileOptions.cs
@@ -0,0 +1,49 @@
+namespace BotSharp.Abstraction.Files.Options;
+
+public class SelectFileOptions : LlmConfigBase
+{
+ ///
+ /// Agent id
+ ///
+ public string? AgentId { get; set; }
+
+ ///
+ /// Template (prompt) name
+ ///
+ public string? TemplateName { get; set; }
+
+ ///
+ /// User description to select files
+ ///
+ public string? Description { get; set; }
+
+ ///
+ /// Whether include bot generated files
+ ///
+ public bool IsIncludeBotFiles { get; set; }
+
+ ///
+ /// Conversation breakpoint
+ ///
+ public bool FromBreakpoint { get; set; }
+
+ ///
+ /// The maximum number of messages
+ ///
+ public int? MessageLimit { get; set; }
+
+ ///
+ /// Whehter attach files to messages
+ ///
+ public bool IsAttachFiles { get; set; }
+
+ ///
+ /// File content types. If null, all types of files will be retrived
+ ///
+ public IEnumerable? ContentTypes { get; set; }
+
+ ///
+ /// Data that can be used to fill in the prompt
+ ///
+ public Dictionary? Data { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Proccessors/IFileProcessor.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Proccessors/IFileProcessor.cs
new file mode 100644
index 000000000..19ab437c9
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Proccessors/IFileProcessor.cs
@@ -0,0 +1,12 @@
+using BotSharp.Abstraction.Files.Options;
+using BotSharp.Abstraction.Files.Responses;
+
+namespace BotSharp.Abstraction.Files.Proccessors;
+
+public interface IFileProcessor
+{
+ public string Provider { get; }
+
+ Task HandleFilesAsync(Agent agent, string text, IEnumerable files, FileHandleOptions? options = null)
+ => throw new NotImplementedException();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Responses/FileHandleResponse.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Responses/FileHandleResponse.cs
new file mode 100644
index 000000000..67de6eb7d
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Responses/FileHandleResponse.cs
@@ -0,0 +1,6 @@
+namespace BotSharp.Abstraction.Files.Responses;
+
+public class FileHandleResponse : ResponseBase
+{
+ public string Result { get; set; } = string.Empty;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Files/Utilities/FileUtility.cs b/src/Infrastructure/BotSharp.Abstraction/Files/Utilities/FileUtility.cs
new file mode 100644
index 000000000..74811d611
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Files/Utilities/FileUtility.cs
@@ -0,0 +1,106 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.StaticFiles;
+using System.IO;
+
+namespace BotSharp.Abstraction.Files.Utilities;
+
+public static class FileUtility
+{
+ ///
+ /// Get file bytes and content type from data, e.g., "data:image/png;base64,aaaaaaaaa"
+ ///
+ ///
+ ///
+ public static (string?, BinaryData) GetFileInfoFromData(string data)
+ {
+ if (string.IsNullOrEmpty(data))
+ {
+ return (null, BinaryData.Empty);
+ }
+
+ if (!data.StartsWith("data:"))
+ {
+ return (null, BinaryData.FromBytes(Convert.FromBase64String(data)));
+ }
+
+ var typeStartIdx = data.IndexOf(':');
+ var typeEndIdx = data.IndexOf(';');
+ var contentType = data.Substring(typeStartIdx + 1, typeEndIdx - typeStartIdx - 1);
+
+ var base64startIdx = data.IndexOf(',');
+ var base64Str = data.Substring(base64startIdx + 1);
+
+ return (contentType, BinaryData.FromBytes(Convert.FromBase64String(base64Str)));
+ }
+
+ public static string BuildFileDataFromFile(string fileName, BinaryData binary)
+ {
+ var contentType = GetFileContentType(fileName);
+ var base64 = Convert.ToBase64String(binary.ToArray());
+ return $"data:{contentType};base64,{base64}";
+ }
+
+ public static string BuildFileDataFromFile(IFormFile file)
+ {
+ using var stream = new MemoryStream();
+ file.CopyTo(stream);
+ stream.Position = 0;
+ var contentType = GetFileContentType(file.FileName);
+ var base64 = Convert.ToBase64String(stream.ToArray());
+ stream.Close();
+
+ return $"data:{contentType};base64,{base64}";
+ }
+
+ public static BinaryData BuildBinaryDataFromFile(IFormFile file)
+ {
+ using var stream = new MemoryStream();
+ file.CopyTo(stream);
+ stream.Position = 0;
+ var binary = BinaryData.FromStream(stream);
+ stream.Close();
+
+ return binary;
+ }
+
+ public static string GetFileContentType(string fileName)
+ {
+ if (string.IsNullOrEmpty(fileName))
+ {
+ return string.Empty;
+ }
+
+ // For URLs (e.g. signed S3/CloudFront URLs with query strings), extract the path portion
+ // so that FileExtensionContentTypeProvider can correctly resolve the extension.
+ if (Uri.TryCreate(fileName, UriKind.Absolute, out var uri)
+ && (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps))
+ {
+ fileName = uri.AbsolutePath;
+ }
+
+ string contentType;
+ var provider = new FileExtensionContentTypeProvider();
+ if (!provider.TryGetContentType(fileName, out contentType))
+ {
+ contentType = string.Empty;
+ }
+
+ return contentType;
+ }
+
+ public static List GetMimeFileTypes(IEnumerable fileTypes)
+ {
+ var provider = new FileExtensionContentTypeProvider();
+ var mimeTypes = provider.Mappings.Where(x => fileTypes.Any(type => x.Value.Contains(type))).Select(x => x.Key).ToList();
+
+ return mimeTypes;
+ }
+
+ public static List GetContentFileTypes(IEnumerable mimeTypes)
+ {
+ var provider = new FileExtensionContentTypeProvider();
+ var mappings = provider.Mappings.Where(x => mimeTypes.Any(type => x.Key.Contains(type))).Select(x => x.Value).ToList();
+
+ return mappings;
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Functions/IFunctionCallback.cs b/src/Infrastructure/BotSharp.Abstraction/Functions/IFunctionCallback.cs
index 3973cb9d8..2019a0577 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Functions/IFunctionCallback.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Functions/IFunctionCallback.cs
@@ -2,6 +2,15 @@ namespace BotSharp.Abstraction.Functions;
public interface IFunctionCallback
{
+ string Provider => "Botsharp";
string Name { get; }
+
+ ///
+ /// Indicator message used to provide UI feedback for function execution
+ ///
+ string Indication => string.Empty;
+
+ Task GetIndication(RoleDialogModel message) => Task.FromResult(message.Indication ?? Indication);
+
Task Execute(RoleDialogModel message);
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallFromLlm.cs b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallFromLlm.cs
index 661a14373..0bb248f48 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallFromLlm.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallFromLlm.cs
@@ -36,13 +36,6 @@ public override string ToString()
{
var route = string.IsNullOrEmpty(AgentName) ? "" : $"";
- if (string.IsNullOrEmpty(Response))
- {
- return $"[{Function} {route} {JsonSerializer.Serialize(Arguments)}]: {Question}";
- }
- else
- {
- return $"[{Function} {route} {JsonSerializer.Serialize(Arguments)}]: {Question} => {Response}";
- }
+ return $"[{Function} {route} {JsonSerializer.Serialize(Arguments)}]: {Question}";
}
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallingResponse.cs b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallingResponse.cs
index d5bd5979e..d437d4254 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallingResponse.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallingResponse.cs
@@ -13,7 +13,7 @@ public class FunctionCallingResponse
[JsonPropertyName("content")]
public string? Content { get; set; }
- [JsonPropertyName("function_name")]
+ [JsonPropertyName("function")]
public string? FunctionName { get; set; }
[JsonPropertyName("args")]
diff --git a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionDef.cs b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionDef.cs
index 8458adf6a..2160e372c 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionDef.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionDef.cs
@@ -2,16 +2,32 @@ namespace BotSharp.Abstraction.Functions.Models;
public class FunctionDef
{
- public string Name { get; set; }
- public string Description { get; set; }
+ [JsonPropertyName("type")]
+ public string Type { get; set; } = "function";
+
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = null!;
+
+ [JsonPropertyName("description")]
+ public string Description { get; set; } = null!;
+
+ [JsonPropertyName("channels")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public List? Channels { get; set; }
[JsonPropertyName("visibility_expression")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? VisibilityExpression { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Impact { get; set; }
- public FunctionParametersDef Parameters { get; set; } = new FunctionParametersDef();
+ [JsonPropertyName("parameters")]
+ public FunctionParametersDef? Parameters { get; set; } = new FunctionParametersDef();
+
+ [JsonPropertyName("output")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? Output { get; set; }
public override string ToString()
{
diff --git a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionParametersDef.cs b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionParametersDef.cs
index 975a17d63..12c313fdd 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionParametersDef.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionParametersDef.cs
@@ -19,6 +19,11 @@ public class FunctionParametersDef
[JsonPropertyName("required")]
public List Required { get; set; } = new List();
+ public override string ToString()
+ {
+ return $"{{\"type\":\"{Type}\", \"properties\":{JsonSerializer.Serialize(Properties)}, \"required\":[{string.Join(",", Required.Select(x => "\"" + x + "\""))}]}}";
+ }
+
public FunctionParametersDef()
{
diff --git a/src/Infrastructure/BotSharp.Abstraction/Functions/Models/LlmToolCall.cs b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/LlmToolCall.cs
new file mode 100644
index 000000000..a5850ae13
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Functions/Models/LlmToolCall.cs
@@ -0,0 +1,42 @@
+namespace BotSharp.Abstraction.Functions.Models;
+
+///
+/// One tool call in a model's reply.
+///
+///
+/// A reply can carry several: models routinely ask for independent lookups at once, and every
+/// provider here used to keep only the first. See for
+/// how the whole set is carried and how it relates to the single-call fields beside it.
+///
+public class LlmToolCall
+{
+ ///
+ /// The provider's id for this call. It is what a tool result has to be sent back under, so
+ /// results cannot be matched to calls without it.
+ ///
+ public string? Id { get; set; }
+
+ ///
+ /// The name exactly as the model produced it, with no normalization applied -- a remote MCP
+ /// tool may legitimately have a name that name repair would rewrite.
+ ///
+ public string? FunctionName { get; set; }
+
+ ///
+ /// Raw JSON arguments. The model does not always produce valid JSON, so parse defensively.
+ ///
+ public string? FunctionArgs { get; set; }
+
+ public LlmToolCall()
+ {
+ }
+
+ public LlmToolCall(string? id, string? functionName, string? functionArgs)
+ {
+ Id = id;
+ FunctionName = functionName;
+ FunctionArgs = functionArgs;
+ }
+
+ public override string ToString() => $"{FunctionName}({FunctionArgs}) [{Id}]";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/FlowGraph.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/FlowGraph.cs
new file mode 100644
index 000000000..cd4523e72
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/FlowGraph.cs
@@ -0,0 +1,289 @@
+using BotSharp.Abstraction.Graph.Models;
+
+namespace BotSharp.Abstraction.Rules;
+
+public class FlowGraph
+{
+ private string _id = Guid.NewGuid().ToString();
+ private List _nodes = [];
+ private List _edges = [];
+
+ public FlowGraph()
+ {
+ _id = Guid.NewGuid().ToString();
+ _nodes = [];
+ _edges = [];
+ }
+
+ public static FlowGraph Init()
+ {
+ return new FlowGraph();
+ }
+
+ public FlowNode? GetRootNode(string? name = null)
+ {
+ if (!string.IsNullOrEmpty(name))
+ {
+ return _nodes.FirstOrDefault(x => x.Name.IsEqualTo(name));
+ }
+
+ return _nodes.FirstOrDefault(x => x.Type.IsEqualTo("root") || x.Type.IsEqualTo("start"));
+ }
+
+ public (FlowNode? Node, IEnumerable IncomingEdges, IEnumerable OutgoingEdges) GetNode(string id)
+ {
+ var node = _nodes.FirstOrDefault(x => x.Id.IsEqualTo(id));
+ if (node == null)
+ {
+ return (null, [], []);
+ }
+
+ var incomingEdges = _edges
+ .Where(e => e.To != null && e.To.Id.IsEqualTo(id))
+ .OrderByDescending(x => x.Weight)
+ .ToList();
+ var outgoingEdges = _edges
+ .Where(e => e.From != null && e.From.Id.IsEqualTo(id))
+ .OrderByDescending(x => x.Weight)
+ .ToList();
+
+ return (node, incomingEdges, outgoingEdges);
+ }
+
+ public string GetGraphId()
+ {
+ return _id;
+ }
+
+ public IEnumerable GetNodes(Func? filter = null)
+ {
+ return filter == null ? [.. _nodes] : [.. _nodes.Where(filter)];
+ }
+
+ public IEnumerable GetEdges(Func? filter = null)
+ {
+ return filter == null ? [.. _edges] : [.. _edges.Where(filter)];
+ }
+
+ public void SetGraphId(string id)
+ {
+ _id = id;
+ }
+
+ public void SetNodes(IEnumerable nodes)
+ {
+ _nodes = [.. nodes?.ToList() ?? []];
+ }
+
+ public void SetEdges(IEnumerable edges)
+ {
+ _edges = [.. edges?.ToList() ?? []];
+ }
+
+ public void AddNode(FlowNode node)
+ {
+ var found = _nodes.Exists(x => x.Id.IsEqualTo(node.Id));
+ if (!found)
+ {
+ _nodes.Add(node);
+ }
+ }
+
+ public void AddEdge(FlowNode from, FlowNode to, EdgeItemPayload payload)
+ {
+ var sourceFound = _nodes.Exists(x => x.Id.IsEqualTo(from.Id));
+ var targetFound = _nodes.Exists(x => x.Id.IsEqualTo(to.Id));
+ var edgeFound = _edges.Exists(x => x.Id.IsEqualTo(payload.Id));
+
+ if (!sourceFound)
+ {
+ _nodes.Add(from);
+ }
+
+ if (!targetFound)
+ {
+ _nodes.Add(to);
+ }
+
+ if (!edgeFound)
+ {
+ _edges.Add(new FlowEdge(from, to)
+ {
+ Id = payload.Id,
+ Name = payload.Name,
+ Type = payload.Type,
+ Labels = [.. payload.Labels ?? []],
+ Weight = payload.Weight,
+ Alias = payload.Alias,
+ Description = payload.Description,
+ Config = new(payload.Config ?? [])
+ });
+ }
+ }
+
+ public IEnumerable<(FlowNode, FlowEdge)> GetParentNodes(FlowNode node, bool ascending = false)
+ {
+ var filtered = _edges.Where(e => e.To != null && e.To.Id.IsEqualTo(node.Id));
+ var ordered = ascending
+ ? filtered.OrderBy(e => e.Weight)
+ : filtered.OrderByDescending(e => e.Weight);
+
+ return ordered.Select(e => (e.From, e)).ToList();
+ }
+
+ public IEnumerable<(FlowNode, FlowEdge)> GetChildrenNodes(FlowNode node, bool ascending = false)
+ {
+ var filtered = _edges.Where(e => e.From != null && e.From.Id.IsEqualTo(node.Id));
+ var ordered = ascending
+ ? filtered.OrderBy(e => e.Weight)
+ : filtered.OrderByDescending(e => e.Weight);
+
+ return ordered.Select(e => (e.To, e)).ToList();
+ }
+
+ public FlowGraphInfo GetGraphInfo()
+ {
+ return new()
+ {
+ GraphId = _id,
+ Nodes = [.. _nodes?.ToList() ?? []],
+ Edges = [.. _edges?.ToList() ?? []]
+ };
+ }
+
+ public void Clear()
+ {
+ _nodes = [];
+ _edges = [];
+ }
+
+ public static FlowGraph FromGraphInfo(FlowGraphInfo graphInfo)
+ {
+ var graph = new FlowGraph();
+ graph.SetGraphId(graphInfo.GraphId.IfNullOrEmptyAs(Guid.NewGuid().ToString())!);
+ graph.SetNodes(graphInfo.Nodes);
+ graph.SetEdges(graphInfo.Edges);
+ return graph;
+ }
+
+ public override string ToString()
+ {
+ return $"Graph ({_id}) => Nodes: {_nodes.Count}, Edges: {_edges.Count}";
+ }
+}
+
+public class FlowNode : GraphItem
+{
+ ///
+ /// Node type: root, criteria, action, etc.
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public override string Type { get; set; } = "action";
+
+ ///
+ /// Input schema loaded from node config. Overrides the code-defined schema on IRuleFlowUnit.
+ ///
+ [JsonPropertyName("input_schema")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public FlowUnitSchema? InputSchema { get; set; }
+
+ ///
+ /// Output schema loaded from node config. Overrides the code-defined schema on IRuleFlowUnit.
+ ///
+ [JsonPropertyName("output_schema")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public FlowUnitSchema? OutputSchema { get; set; }
+
+ public override string ToString()
+ {
+ return $"Node ({Id}): {Name} ({Type} => {Description})";
+ }
+}
+
+public class FlowEdge : GraphItem
+{
+ ///
+ /// Edge type: is_next, etc.
+ ///
+ public override string Type { get; set; } = "next";
+
+ public FlowNode From { get; set; }
+ public FlowNode To { get; set; }
+
+ public FlowEdge() : base()
+ {
+
+ }
+
+ public FlowEdge(FlowNode from, FlowNode to) : base()
+ {
+ Id = Guid.NewGuid().ToString();
+ From = from;
+ To = to;
+ }
+
+ public override string ToString()
+ {
+ return $"Edge ({Id}): {Name} ({Type} => {Description}), Connects from Node ({From?.Name}) to Node ({To?.Name})";
+ }
+}
+
+public class GraphItem
+{
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public virtual string Id { get; set; } = Guid.NewGuid().ToString();
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public virtual string Name { get; set; } = null!;
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public virtual string Type { get; set; } = null!;
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public virtual IEnumerable Labels { get; set; } = [];
+ public virtual double Weight { get; set; } = 1.0;
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public virtual string? Description { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public virtual Dictionary Config { get; set; } = [];
+
+ private string? _alias;
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public virtual string Alias
+ {
+ get => string.IsNullOrEmpty(_alias) ? Name : _alias;
+ set => _alias = value;
+ }
+}
+
+public class NodeItem : GraphItem
+{
+
+}
+
+public class EdgeItem : GraphItem
+{
+
+}
+
+public class NodeItemPayload : GraphItem
+{
+
+}
+
+public class EdgeItemPayload : GraphItem
+{
+
+}
+
+public class FlowGraphInfo
+{
+ [JsonPropertyName("graph_id")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string GraphId { get; set; }
+ public IEnumerable Nodes { get; set; } = [];
+ public IEnumerable Edges { get; set; } = [];
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/IGraphDb.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/IGraphDb.cs
new file mode 100644
index 000000000..3c3dcbf78
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/IGraphDb.cs
@@ -0,0 +1,41 @@
+using BotSharp.Abstraction.Graph.Models;
+using BotSharp.Abstraction.Graph.Options;
+using BotSharp.Abstraction.Graph.Requests;
+
+namespace BotSharp.Abstraction.Graph;
+
+public interface IGraphDb
+{
+ public string Provider { get; }
+
+ Task ExecuteQueryAsync(string query, GraphQueryExecuteOptions? options = null)
+ => throw new NotImplementedException();
+
+ #region Node
+ Task GetNodeAsync(string graphId, string nodeId)
+ => throw new NotImplementedException();
+
+ Task CreateNodeAsync(string graphId, GraphNodeCreationRequest request)
+ => throw new NotImplementedException();
+
+ Task MergeNodeAsync(string graphId, string nodeId, GraphNodeUpdateRequest request)
+ => throw new NotImplementedException();
+
+ Task DeleteNodeAsync(string graphId, string nodeId)
+ => throw new NotImplementedException();
+ #endregion
+
+ #region Edge
+ Task GetEdgeAsync(string graphId, string edgeId)
+ => throw new NotImplementedException();
+
+ Task CreateEdgeAsync(string graphId, GraphEdgeCreationRequest request)
+ => throw new NotImplementedException();
+
+ Task UpdateEdgeAsync(string graphId, string edgeId, GraphEdgeUpdateRequest request)
+ => throw new NotImplementedException();
+
+ Task DeleteEdgeAsync(string graphId, string edgeId)
+ => throw new NotImplementedException();
+ #endregion
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Models/FlowUnitSchema.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/FlowUnitSchema.cs
new file mode 100644
index 000000000..797ba8bfc
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/FlowUnitSchema.cs
@@ -0,0 +1,56 @@
+namespace BotSharp.Abstraction.Graph.Models;
+
+///
+/// Describes the input or output contract of a rule flow unit (action or condition).
+/// Follows a JSON Schema-like structure with "properties" and "required" fields.
+///
+public class FlowUnitSchema
+{
+ ///
+ /// Property definitions keyed by parameter name.
+ ///
+ [JsonPropertyName("properties")]
+ public Dictionary Properties { get; set; } = [];
+
+ ///
+ /// List of required property names.
+ ///
+ [JsonPropertyName("required")]
+ public List Required { get; set; } = [];
+
+ public FlowUnitSchema() { }
+
+ public FlowUnitSchema(
+ Dictionary properties,
+ List? required = null)
+ {
+ Properties = properties;
+ Required = required ?? [];
+ }
+}
+
+///
+/// Describes a single property in a FlowUnitSchema.
+///
+public class FlowUnitSchemaProperty
+{
+ ///
+ /// JSON type: "string", "number", "boolean", "object", "array"
+ ///
+ [JsonPropertyName("type")]
+ public string Type { get; set; } = "string";
+
+ ///
+ /// A brief explanation of the property's purpose.
+ ///
+ [JsonPropertyName("description")]
+ public string? Description { get; set; }
+
+ public FlowUnitSchemaProperty() { }
+
+ public FlowUnitSchemaProperty(string type, string? description = null)
+ {
+ Type = type;
+ Description = description;
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphEdgeModel.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphEdgeModel.cs
new file mode 100644
index 000000000..65858e954
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphEdgeModel.cs
@@ -0,0 +1,15 @@
+namespace BotSharp.Abstraction.Graph.Models;
+
+public class GraphEdgeModel
+{
+ public string Id { get; set; } = string.Empty;
+ public string SourceNodeId { get; set; } = string.Empty;
+ public string TargetNodeId { get; set; } = string.Empty;
+ public string Type { get; set; } = string.Empty;
+ public object? Properties { get; set; }
+ public string? Direction { get; set; }
+ public bool? Directed { get; set; }
+ public float? Weight { get; set; }
+ public DateTime? CreatedAt { get; set; }
+ public DateTime? UpdatedAt { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphInstance.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphInstance.cs
new file mode 100644
index 000000000..479d30037
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphInstance.cs
@@ -0,0 +1,19 @@
+namespace BotSharp.Abstraction.Graph.Models;
+
+public class GraphInstance
+{
+ ///
+ /// Graph id
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// Graph name
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// Graph description
+ ///
+ public string Description { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphNodeModel.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphNodeModel.cs
new file mode 100644
index 000000000..ad18ee4d7
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphNodeModel.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Graph.Models;
+
+public class GraphNodeModel
+{
+ public string Id { get; set; } = string.Empty;
+ public List Labels { get; set; } = new();
+ public object Properties { get; set; } = new();
+ public DateTime? Time { get; set; } = DateTime.UtcNow;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphQueryResult.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphQueryResult.cs
new file mode 100644
index 000000000..cf840b1a7
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphQueryResult.cs
@@ -0,0 +1,8 @@
+namespace BotSharp.Abstraction.Graph.Models;
+
+public class GraphQueryResult
+{
+ public string Result { get; set; } = string.Empty;
+ public string[] Keys { get; set; } = [];
+ public Dictionary[] Values { get; set; } = [];
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Options/GraphQueryOptions.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Options/GraphQueryOptions.cs
new file mode 100644
index 000000000..d54f97ed9
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Options/GraphQueryOptions.cs
@@ -0,0 +1,28 @@
+using System.Threading;
+
+namespace BotSharp.Abstraction.Graph.Options;
+
+public class GraphQueryOptions : GraphQueryExecuteOptions
+{
+ public string Provider { get; set; }
+}
+
+public class GraphQueryExecuteOptions
+{
+ public string? GraphId { get; set; }
+ public Dictionary? Arguments { get; set; }
+ public string? Method { get; set; }
+
+ ///
+ /// Upper bound for the whole query, retries included. Null keeps the provider's own timeout.
+ /// Set it when the caller is itself waited on with a deadline, so the query gives up before the caller does.
+ /// A provider's own HTTP timeout may still end a single attempt sooner.
+ ///
+ public TimeSpan? Timeout { get; set; }
+
+ ///
+ /// Cancels the query, retries included, e.g. when the request that needs the result is aborted.
+ ///
+ [JsonIgnore]
+ public CancellationToken CancellationToken { get; set; }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeCreationRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeCreationRequest.cs
new file mode 100644
index 000000000..abbda387d
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeCreationRequest.cs
@@ -0,0 +1,12 @@
+namespace BotSharp.Abstraction.Graph.Requests;
+
+public class GraphEdgeCreationRequest
+{
+ public string? Id { get; set; }
+ public string SourceNodeId { get; set; } = null!;
+ public string TargetNodeId { get; set; } = null!;
+ public string Type { get; set; } = null!;
+ public bool Directed { get; set; } = true;
+ public float? Weight { get; set; } = 1.0f;
+ public Dictionary? Properties { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeUpdateRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeUpdateRequest.cs
new file mode 100644
index 000000000..090205f5e
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeUpdateRequest.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Graph.Requests;
+
+public class GraphEdgeUpdateRequest
+{
+ public string Id { get; set; } = null!;
+ public Dictionary? Properties { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeCreationRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeCreationRequest.cs
new file mode 100644
index 000000000..b292426b7
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeCreationRequest.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Graph.Requests;
+
+public class GraphNodeCreationRequest
+{
+ public string? Id { get; set; }
+ public string[]? Labels { get; set; }
+ public Dictionary? Properties { get; set; }
+ public DateTime? Time { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeUpdateRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeUpdateRequest.cs
new file mode 100644
index 000000000..4b76bcbc2
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeUpdateRequest.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Graph.Requests;
+
+public class GraphNodeUpdateRequest
+{
+ public string Id { get; set; } = null!;
+ public string[]? Labels { get; set; }
+ public Dictionary? Properties { get; set; }
+ public DateTime? Time { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Utils/GraphBuilder.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Utils/GraphBuilder.cs
new file mode 100644
index 000000000..7628eca72
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Utils/GraphBuilder.cs
@@ -0,0 +1,141 @@
+using BotSharp.Abstraction.Graph.Models;
+using BotSharp.Abstraction.Rules;
+using System.Text.Json;
+using System.Text.RegularExpressions;
+
+namespace BotSharp.Abstraction.Graph.Utils;
+
+public static class GraphBuilder
+{
+ public static FlowGraph Build(GraphQueryResult result, IDictionary? data = null)
+ {
+ var graph = FlowGraph.Init();
+ if (result.Values.IsNullOrEmpty())
+ {
+ return graph;
+ }
+
+ foreach (var item in result.Values)
+ {
+ // Try to deserialize nodes and edge from the dictionary
+ if (!item.TryGetValue("sourceNode", out var sourceNodeElement) ||
+ !item.TryGetValue("targetNode", out var targetNodeElement) ||
+ !item.TryGetValue("edge", out var edgeElement))
+ {
+ continue;
+ }
+
+ // Parse source node
+ var sourceNodeId = sourceNodeElement.TryGetProperty("id", out var sId) ? sId.GetString() : null;
+ var sourceNodeLabels = sourceNodeElement.TryGetProperty("labels", out var sLabels)
+ ? sLabels.EnumerateArray().Select(x => x.GetString() ?? "").ToList()
+ : [];
+ var sourceNodeProps = sourceNodeElement.TryGetProperty("properties", out var sProps)
+ ? sProps
+ : default;
+
+ // Parse target node
+ var targetNodeId = targetNodeElement.TryGetProperty("id", out var tId) ? tId.GetString() : null;
+ var targetNodeLabels = targetNodeElement.TryGetProperty("labels", out var tLabels)
+ ? tLabels.EnumerateArray().Select(x => x.GetString() ?? "").ToList()
+ : [];
+ var targetNodeProps = targetNodeElement.TryGetProperty("properties", out var tProps)
+ ? tProps
+ : default;
+
+ // Parse edge
+ var edgeId = edgeElement.TryGetProperty("id", out var eId) ? eId.GetString() : null;
+ var edgeProps = edgeElement.TryGetProperty("properties", out var eProps)
+ ? eProps
+ : default;
+
+ // Create source node
+ var sourceNode = new FlowNode()
+ {
+ Id = sourceNodeId ?? Guid.NewGuid().ToString(),
+ Labels = sourceNodeLabels,
+ Name = GetGraphItemAttribute(sourceNodeProps, key: "name", data: data),
+ Type = GetGraphItemAttribute(sourceNodeProps, key: "type", data: data),
+ Description = GetGraphItemAttribute(sourceNodeProps, key: "description", data: data),
+ Config = GetConfig(sourceNodeProps, data)
+ };
+
+ // Create target node
+ var targetNode = new FlowNode()
+ {
+ Id = targetNodeId ?? Guid.NewGuid().ToString(),
+ Labels = targetNodeLabels,
+ Name = GetGraphItemAttribute(targetNodeProps, key: "name", data: data),
+ Type = GetGraphItemAttribute(targetNodeProps, key: "type", data: data),
+ Description = GetGraphItemAttribute(targetNodeProps, key: "description", data: data),
+ Config = GetConfig(targetNodeProps, data)
+ };
+
+ // Create edge payload
+ var edgePayload = new EdgeItemPayload()
+ {
+ Id = edgeId ?? Guid.NewGuid().ToString(),
+ Name = GetGraphItemAttribute(edgeProps, key: "name", data: data),
+ Type = GetGraphItemAttribute(edgeProps, key: "type", defaultValue: "NEXT", data: data),
+ Description = GetGraphItemAttribute(edgeProps, key: "description", data: data),
+ Config = GetConfig(edgeProps, data)
+ };
+
+ // Add edge to graph
+ graph.AddEdge(sourceNode, targetNode, edgePayload);
+ }
+
+ return graph;
+ }
+
+ private static string GetGraphItemAttribute(JsonElement? properties, string key, string defaultValue = null, IDictionary? data = null)
+ {
+ if (properties == null || properties.Value.ValueKind == JsonValueKind.Undefined)
+ {
+ return defaultValue;
+ }
+
+ if (properties.Value.TryGetProperty(key, out var name) && name.ValueKind == JsonValueKind.String)
+ {
+ return ReplacePlaceholders(name.GetString(), data) ?? defaultValue;
+ }
+
+ return defaultValue;
+ }
+
+ private static Dictionary GetConfig(JsonElement? properties, IDictionary? data = null)
+ {
+ var config = new Dictionary();
+
+ if (properties == null || properties.Value.ValueKind == JsonValueKind.Undefined)
+ {
+ return config;
+ }
+
+ // Convert all properties to config dictionary
+ foreach (var prop in properties.Value.EnumerateObject())
+ {
+ config[prop.Name] = ReplacePlaceholders(prop.Value.ConvertToString(), data);
+ }
+
+ return config;
+ }
+
+ private static readonly Regex PlaceholderRegex = new(@"\{\{(\w+)\}\}", RegexOptions.Compiled);
+
+ private static string? ReplacePlaceholders(string? value, IDictionary? data)
+ {
+ if (data == null || string.IsNullOrEmpty(value) || !value.Contains("{{"))
+ {
+ return value;
+ }
+
+ return PlaceholderRegex.Replace(value, match =>
+ {
+ var key = match.Groups[1].Value;
+ return data.TryGetValue(key, out var replacement) && replacement != null
+ ? replacement
+ : match.Value;
+ });
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Hooks/HookProvider.cs b/src/Infrastructure/BotSharp.Abstraction/Hooks/HookProvider.cs
new file mode 100644
index 000000000..6d713952f
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Hooks/HookProvider.cs
@@ -0,0 +1,19 @@
+using BotSharp.Abstraction.Conversations;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace BotSharp.Abstraction.Hooks;
+
+public static class HookProvider
+{
+ public static List GetHooks(this IServiceProvider services, string agentId) where T : IHookBase
+ {
+ var hooks = services.GetServices().Where(p => p.IsMatch(agentId));
+ return hooks.ToList();
+ }
+
+ public static List GetHooksOrderByPriority(this IServiceProvider services, string agentId) where T: IConversationHook
+ {
+ var hooks = services.GetServices().Where(p => p.IsMatch(agentId));
+ return hooks.OrderBy(p => p.Priority).ToList();
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Hooks/IHookBase.cs b/src/Infrastructure/BotSharp.Abstraction/Hooks/IHookBase.cs
new file mode 100644
index 000000000..5e510ea5e
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Hooks/IHookBase.cs
@@ -0,0 +1,10 @@
+namespace BotSharp.Abstraction.Hooks;
+
+public interface IHookBase
+{
+ ///
+ /// Agent Id
+ ///
+ string SelfId => string.Empty;
+ bool IsMatch(string agentId) => string.IsNullOrEmpty(SelfId) || SelfId == agentId;
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Http/IHttpRequestHook.cs b/src/Infrastructure/BotSharp.Abstraction/Http/IHttpRequestHook.cs
new file mode 100644
index 000000000..49073e0d0
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Http/IHttpRequestHook.cs
@@ -0,0 +1,8 @@
+using System.Net.Http.Headers;
+
+namespace BotSharp.Abstraction.Http;
+
+public interface IHttpRequestHook
+{
+ Task OnAddHttpHeaders(HttpHeaders headers, Uri uri);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Attributes/BotSharpAuthAttribute.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Attributes/BotSharpAuthAttribute.cs
new file mode 100644
index 000000000..46f28d6c3
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Attributes/BotSharpAuthAttribute.cs
@@ -0,0 +1,32 @@
+using BotSharp.Abstraction.Users;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Filters;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace BotSharp.Abstraction.Infrastructures.Attributes;
+
+///
+/// BotSharp authorization: check whether the request user is admin or root role.
+///
+[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
+public class BotSharpAuthAttribute : Attribute, IAsyncAuthorizationFilter
+{
+ public BotSharpAuthAttribute()
+ {
+
+ }
+
+ public async Task OnAuthorizationAsync(AuthorizationFilterContext context)
+ {
+ var services = context.HttpContext.RequestServices;
+
+ var userIdentity = services.GetRequiredService();
+ var userService = services.GetRequiredService();
+
+ var (isAdmin, user) = await userService.IsAdminUser(userIdentity.Id);
+ if (!isAdmin || user == null)
+ {
+ context.Result = new UnauthorizedResult();
+ }
+ }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/AudioStateConst.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/AudioStateConst.cs
new file mode 100644
index 000000000..6933c0e98
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/AudioStateConst.cs
@@ -0,0 +1,12 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+///
+/// Conversation states for speech-to-text and text-to-speech requests.
+///
+public static class AudioStateConst
+{
+ public const string AUDIO_TEMPERATURE = "audio_temperature";
+ public const string AUDIO_RESPONSE_FORMAT = "audio_response_format";
+ public const string AUDIO_GRANULARITY = "audio_granularity";
+ public const string SPEECH_GENERATE_SPEED = "speech_generate_speed";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/CacheType.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/CacheType.cs
new file mode 100644
index 000000000..970089723
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/CacheType.cs
@@ -0,0 +1,7 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+public enum CacheType
+{
+ MemoryCache = 1,
+ RedisCache = 2
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/DataStateConst.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/DataStateConst.cs
new file mode 100644
index 000000000..4f8f0edca
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/DataStateConst.cs
@@ -0,0 +1,12 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+///
+/// Conversation states shared by the data analytics plugins (Planner, SqlDriver, ExcelHandler).
+///
+public static class DataStateConst
+{
+ public const string DICTIONARY_ITEMS = "dictionary_items";
+ public const string TABLE_DDLS = "table_ddls";
+ public const string TMP_TABLE = "tmp_table";
+ public const string DATA_IMPORT_RESULT = "data_import_result";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/EventPriority.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/EventPriority.cs
new file mode 100644
index 000000000..75c4402db
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/EventPriority.cs
@@ -0,0 +1,8 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+public enum EventPriority
+{
+ Low = 1,
+ Medium = 2,
+ High = 3
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/ImageStateConst.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/ImageStateConst.cs
new file mode 100644
index 000000000..cb9e198c4
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/ImageStateConst.cs
@@ -0,0 +1,14 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+///
+/// Conversation states for image generation, edit and variation requests.
+///
+public static class ImageStateConst
+{
+ public const string IMAGE_COUNT = "image_count";
+ public const string IMAGE_SIZE = "image_size";
+ public const string IMAGE_QUALITY = "image_quality";
+ public const string IMAGE_STYLE = "image_style";
+ public const string IMAGE_BACKGROUND = "image_background";
+ public const string IMAGE_RESPONSE_FORMAT = "image_response_format";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/InstructStateConst.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/InstructStateConst.cs
new file mode 100644
index 000000000..3c0b4999d
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/InstructStateConst.cs
@@ -0,0 +1,15 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+///
+/// Conversation states carrying the input of an instruct mode request.
+///
+public static class InstructStateConst
+{
+ public const string INSTRUCTION = "instruction";
+ public const string INPUT_TEXT = "input_text";
+ public const string TEMPLATE_NAME = "template_name";
+ public const string CODE_OPTIONS = "code_options";
+ public const string FILE_OPTIONS = "file_options";
+ public const string FILE_COUNT = "file_count";
+ public const string FILE_URLS = "file_urls";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/LanguageType.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/LanguageType.cs
new file mode 100644
index 000000000..9c5dd827a
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/LanguageType.cs
@@ -0,0 +1,9 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+public static class LanguageType
+{
+ public const string UNKNOWN = "Unknown";
+ public const string ENGLISH = "English";
+ public const string SPANISH = "Spanish";
+ public const string CHINESE = "Chinese";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/LlmStateConst.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/LlmStateConst.cs
new file mode 100644
index 000000000..6b9e439a6
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/LlmStateConst.cs
@@ -0,0 +1,22 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+///
+/// Conversation states that tune how the LLM completion request is built.
+///
+public static class LlmStateConst
+{
+ public const string PROVIDER = "provider";
+ public const string MODEL = "model";
+ public const string MODEL_ID = "model_id";
+ public const string TEMPERATURE = "temperature";
+ public const string MAX_TOKENS = "max_tokens";
+ public const string SAMPLING_FACTOR = "sampling_factor";
+ public const string RESPONSE_FORMAT = "response_format";
+ public const string TOOL_CHOICE = "tool_choice";
+ public const string REASONING_EFFORT_LEVEL = "reasoning_effort_level";
+ public const string THINKING_TYPE = "thinking_type";
+ public const string BUDGET_TOKENS = "budget_tokens";
+ public const string USE_INTERLEAVED_THINKING = "use_interleaved_thinking";
+ public const string SERVICE_TIER = "service_tier";
+ public const string CHAT_IMAGE_DETAIL_LEVEL = "chat_image_detail_level";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/StateConst.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/StateConst.cs
index 8b7fc37cc..2789ea59e 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/StateConst.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/StateConst.cs
@@ -1,10 +1,31 @@
namespace BotSharp.Abstraction.Infrastructures.Enums;
-public class StateConst
+public static class StateConst
{
public const string EXPECTED_ACTION_AGENT = "expected_next_action_agent";
public const string EXPECTED_GOAL_AGENT = "expected_user_goal_agent";
public const string NEXT_ACTION_AGENT = "next_action_agent";
public const string NEXT_ACTION_REASON = "next_action_reason";
public const string USER_GOAL_AGENT = "user_goal_agent";
+ public const string AGENT_REDIRECTION_REASON = "agent_redirection_reason";
+ // lazy or eager
+ public const string ROUTING_MODE = "routing_mode";
+ public const string LAZY_ROUTING_AGENT_ID = "lazy_routing_agent_id";
+
+ public const string LANGUAGE = "language";
+ public const string CHANNEL = "channel";
+
+ ///
+ /// Set from the incoming request: whether the caller wants the reply streamed back as it is generated.
+ ///
+ public const string USE_STREAM_MESSAGE = "use_stream_message";
+
+ ///
+ /// Overrides ToolResultTrimSetting.KeepTurns for the conversation.
+ ///
+ public const string TOOL_RESULT_KEEP_TURNS = "tool_result_keep_turns";
+
+ public const string SUB_CONVERSATION_ID = "sub_conversation_id";
+ public const string ORIGIN_CONVERSATION_ID = "origin_conversation_id";
+ public const string WEB_DRIVER_TASK_ID = "web_driver_task_id";
}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/TokenStateConst.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/TokenStateConst.cs
new file mode 100644
index 000000000..80e36f71e
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/TokenStateConst.cs
@@ -0,0 +1,11 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+///
+/// Conversation states accumulating token usage and cost of the current conversation.
+///
+public static class TokenStateConst
+{
+ public const string PROMPT_TOTAL = "prompt_total";
+ public const string COMPLETION_TOTAL = "completion_total";
+ public const string LLM_TOTAL_COST = "llm_total_cost";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/WebSearchStateConst.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/WebSearchStateConst.cs
new file mode 100644
index 000000000..ba6952ed9
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/WebSearchStateConst.cs
@@ -0,0 +1,14 @@
+namespace BotSharp.Abstraction.Infrastructures.Enums;
+
+///
+/// Conversation states for web search enabled completions.
+///
+public static class WebSearchStateConst
+{
+ public const string ENABLE_WEB_SEARCH = "enable_web_search";
+ public const string ENABLE_WEB_SEARCH_PREVIEW = "enable_web_search_preview";
+ public const string WEB_SEARCH_CONTEXT_SIZE = "web_search_context_size";
+ public const string WEB_SEARCH_USER_LOCATION = "web_search_user_location";
+ public const string WEB_SEARCH_LLM_PROVIDER = "web_search_llm_provider";
+ public const string WEB_SEARCH_LLM_MODEL = "web_search_llm_model";
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Events/IEventPublisher.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Events/IEventPublisher.cs
new file mode 100644
index 000000000..58b18cba1
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Events/IEventPublisher.cs
@@ -0,0 +1,20 @@
+namespace BotSharp.Abstraction.Infrastructures.Events;
+
+public interface IEventPublisher
+{
+ ///
+ /// Boardcast message to all subscribers
+ ///
+ ///
+ ///
+ ///
+ Task BroadcastAsync(string channel, string message);
+
+ Task PublishAsync(string channel, string message, EventPriority? priority = null);
+
+ Task ReDispatchAsync(string channel, int count = 10, string order = "asc");
+
+ Task ReDispatchPendingAsync(string channel, string group, int count = 10);
+
+ Task RemoveAsync(string channel, int count = 10);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Events/IEventSubscriber.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Events/IEventSubscriber.cs
new file mode 100644
index 000000000..465644add
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/Events/IEventSubscriber.cs
@@ -0,0 +1,12 @@
+using System.Threading;
+
+namespace BotSharp.Abstraction.Infrastructures.Events;
+
+public interface IEventSubscriber
+{
+ Task SubscribeAsync(string channel, Func received);
+
+ Task SubscribeAsync(string channel, string group, int? port, bool priorityEnabled,
+ Func received,
+ CancellationToken? stoppingToken = null);
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/HookEmitOption.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/HookEmitOption.cs
new file mode 100644
index 000000000..45d8845be
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/HookEmitOption.cs
@@ -0,0 +1,11 @@
+namespace BotSharp.Abstraction.Infrastructures;
+
+public class HookEmitOption
+{
+ public bool OnlyOnce { get; set; }
+
+ ///
+ /// Optional predicate to determine if the hook action should be executed for a specific hook instance.
+ ///
+ public Func? ShouldExecute { get; set; }
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/ICacheKey.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/ICacheKey.cs
new file mode 100644
index 000000000..87c3bc69f
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/ICacheKey.cs
@@ -0,0 +1,6 @@
+namespace BotSharp.Abstraction.Infrastructures;
+
+public interface ICacheKey
+{
+ string GetCacheKey();
+}
diff --git a/src/Infrastructure/BotSharp.Abstraction/Infrastructures/ICacheService.cs b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/ICacheService.cs
new file mode 100644
index 000000000..af510da34
--- /dev/null
+++ b/src/Infrastructure/BotSharp.Abstraction/Infrastructures/ICacheService.cs
@@ -0,0 +1,10 @@
+namespace BotSharp.Abstraction.Infrastructures;
+
+public interface ICacheService
+{
+ Task GetAsync(string key);
+ Task