From 2c5c6fd11856a5007c7962c54ea4b2f9a8036247 Mon Sep 17 00:00:00 2001 From: luoqiang <2769838458@qq.com> Date: Tue, 1 Sep 2026 14:07:46 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=90=86=E9=A1=BA=20Core/Web=20?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4=EF=BC=8C=E5=B9=B6=E6=98=BE?= =?UTF-8?q?=E5=BC=8F=E5=88=97=E5=87=BA=20Core=20=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- MAF1.Core/Agents/AgentStepResult.cs | 2 +- MAF1.Core/Agents/FileCity/FileCityAgent.cs | 1 + MAF1.Core/Agents/Weather/WeatherAgent.cs | 1 + MAF1.Core/Decisions/DecisionModels.cs | 2 +- MAF1.Core/MAF1.Core.csproj | 20 +++++++++++++++++++- MAF1.Core/PluginContract/PluginStdio.cs | 2 +- MAF1.Web/MAF1.Web.csproj | 2 +- MAF1.Web/PluginHost/NodeCatalogService.cs | 2 +- MAF1.Web/Web/AgentCatalog.cs | 2 +- MAF1.Web/Web/AgentRuntime.cs | 1 + MAF1.Web/Web/ConfigurableWorkflowRunner.cs | 4 ++-- MAF1/Workflows/CityWeatherWorkflow.cs | 2 +- 12 files changed, 31 insertions(+), 10 deletions(-) diff --git a/MAF1.Core/Agents/AgentStepResult.cs b/MAF1.Core/Agents/AgentStepResult.cs index ab11c7e..190efa0 100644 --- a/MAF1.Core/Agents/AgentStepResult.cs +++ b/MAF1.Core/Agents/AgentStepResult.cs @@ -1,6 +1,6 @@ using System.Text.Json; -namespace MAF1.Agents; +namespace MAF1.Core.Agents; /// /// 一次 Agent 执行的统一结果。网页编排器和进程外插件都用这套字段,方便画布把输出接到下一节点。 diff --git a/MAF1.Core/Agents/FileCity/FileCityAgent.cs b/MAF1.Core/Agents/FileCity/FileCityAgent.cs index 5eb60ed..426f1f3 100644 --- a/MAF1.Core/Agents/FileCity/FileCityAgent.cs +++ b/MAF1.Core/Agents/FileCity/FileCityAgent.cs @@ -1,4 +1,5 @@ using System.Text.Json; +using MAF1.Core.Agents; using MAF1.Tools; using MAF1.Utils; using Microsoft.Agents.AI; diff --git a/MAF1.Core/Agents/Weather/WeatherAgent.cs b/MAF1.Core/Agents/Weather/WeatherAgent.cs index 522bc47..ad4b146 100644 --- a/MAF1.Core/Agents/Weather/WeatherAgent.cs +++ b/MAF1.Core/Agents/Weather/WeatherAgent.cs @@ -1,3 +1,4 @@ +using MAF1.Core.Agents; using MAF1.Tools; using MAF1.Utils; using Microsoft.Agents.AI; diff --git a/MAF1.Core/Decisions/DecisionModels.cs b/MAF1.Core/Decisions/DecisionModels.cs index 9ef4f7b..7fb176c 100644 --- a/MAF1.Core/Decisions/DecisionModels.cs +++ b/MAF1.Core/Decisions/DecisionModels.cs @@ -1,4 +1,4 @@ -using MAF1.Agents; +using MAF1.Core.Agents; namespace MAF1.Decisions; diff --git a/MAF1.Core/MAF1.Core.csproj b/MAF1.Core/MAF1.Core.csproj index 5ce7b94..63695f0 100644 --- a/MAF1.Core/MAF1.Core.csproj +++ b/MAF1.Core/MAF1.Core.csproj @@ -4,9 +4,27 @@ net10.0 enable enable - MAF1 + MAF1.Core + false + + + + + + + + + + + + + + + + + diff --git a/MAF1.Core/PluginContract/PluginStdio.cs b/MAF1.Core/PluginContract/PluginStdio.cs index 47ba2de..0313295 100644 --- a/MAF1.Core/PluginContract/PluginStdio.cs +++ b/MAF1.Core/PluginContract/PluginStdio.cs @@ -61,7 +61,7 @@ public static class PluginStdio /// public static IConfiguration LoadHostConfiguration() { - string contentRoot = Environment.GetEnvironmentVariable("MAF1_CONTENT_ROOT"); + string? contentRoot = Environment.GetEnvironmentVariable("MAF1_CONTENT_ROOT"); if (string.IsNullOrWhiteSpace(contentRoot) || !Directory.Exists(contentRoot)) { contentRoot = AppContext.BaseDirectory; diff --git a/MAF1.Web/MAF1.Web.csproj b/MAF1.Web/MAF1.Web.csproj index 2afc4f6..70dd1c7 100644 --- a/MAF1.Web/MAF1.Web.csproj +++ b/MAF1.Web/MAF1.Web.csproj @@ -4,7 +4,7 @@ net10.0 enable enable - MAF1 + MAF1.Web diff --git a/MAF1.Web/PluginHost/NodeCatalogService.cs b/MAF1.Web/PluginHost/NodeCatalogService.cs index e5099b5..200855d 100644 --- a/MAF1.Web/PluginHost/NodeCatalogService.cs +++ b/MAF1.Web/PluginHost/NodeCatalogService.cs @@ -1,5 +1,5 @@ using MAF1.PluginContract; -using MAF1.Web; +using MAF1.Web.Web; namespace MAF1.Plugins; diff --git a/MAF1.Web/Web/AgentCatalog.cs b/MAF1.Web/Web/AgentCatalog.cs index b3aa123..170863f 100644 --- a/MAF1.Web/Web/AgentCatalog.cs +++ b/MAF1.Web/Web/AgentCatalog.cs @@ -1,6 +1,6 @@ using MAF1.PluginContract; -namespace MAF1.Web; +namespace MAF1.Web.Web; /// 画布上一个端口的元数据,前端用来渲染圆点和检查器文案。 public sealed class PortInfo diff --git a/MAF1.Web/Web/AgentRuntime.cs b/MAF1.Web/Web/AgentRuntime.cs index da7efd0..c364a05 100644 --- a/MAF1.Web/Web/AgentRuntime.cs +++ b/MAF1.Web/Web/AgentRuntime.cs @@ -3,6 +3,7 @@ using MAF1.Agents.Weather; using MAF1.Plugins; using MAF1.Tools; using MAF1.Utils; +using MAF1.Web.Web; using Microsoft.Agents.AI; using Microsoft.Extensions.Configuration; diff --git a/MAF1.Web/Web/ConfigurableWorkflowRunner.cs b/MAF1.Web/Web/ConfigurableWorkflowRunner.cs index ec38b6d..ce0110b 100644 --- a/MAF1.Web/Web/ConfigurableWorkflowRunner.cs +++ b/MAF1.Web/Web/ConfigurableWorkflowRunner.cs @@ -1,13 +1,13 @@ using System.Text.Json; -using MAF1.Agents; using MAF1.Agents.FileCity; using MAF1.Agents.Weather; +using MAF1.Core.Agents; using MAF1.Decisions; using MAF1.PluginContract; using MAF1.Plugins; using Microsoft.Agents.AI; -namespace MAF1.Web; +namespace MAF1.Web.Web; /// /// 网页自己的图执行器(不是 Microsoft Agents AI Workflow)。 diff --git a/MAF1/Workflows/CityWeatherWorkflow.cs b/MAF1/Workflows/CityWeatherWorkflow.cs index 6bb704e..ef204b7 100644 --- a/MAF1/Workflows/CityWeatherWorkflow.cs +++ b/MAF1/Workflows/CityWeatherWorkflow.cs @@ -1,7 +1,7 @@ -using MAF1.Decisions; using Microsoft.Agents.AI; using Microsoft.Agents.AI.Workflows; using MAF1.Agents.FileCity; +using MAF1.Decisions; namespace MAF1.Workflows;