diff --git a/src/MaIN.Core/Hub/AiHub.cs b/src/MaIN.Core/Hub/AiHub.cs index 34cf7c47..30200c5d 100644 --- a/src/MaIN.Core/Hub/AiHub.cs +++ b/src/MaIN.Core/Hub/AiHub.cs @@ -13,7 +13,7 @@ public static class AIHub private static IHttpClientFactory _httpClientFactory = null!; internal static void Initialize(IAIHubServices services, - MaINSettings settings, + MaINSettings settings, IHttpClientFactory httpClientFactory) { _services = services; @@ -38,7 +38,7 @@ public static void DisableLLamaLogs() { NativeLogConfig.llama_log_set((_,_) => {}); } - + public static void DisableNotificationsLogs() { INotificationService.Disable = true; diff --git a/src/MaIN.Core/Hub/Contexts/AgentContext.cs b/src/MaIN.Core/Hub/Contexts/AgentContext.cs index 2fdecb50..79341b10 100644 --- a/src/MaIN.Core/Hub/Contexts/AgentContext.cs +++ b/src/MaIN.Core/Hub/Contexts/AgentContext.cs @@ -12,7 +12,7 @@ namespace MaIN.Core.Hub.Contexts; -public class AgentContext +public sealed class AgentContext { private readonly IAgentService _agentService; private InferenceParams? _inferenceParams; diff --git a/src/MaIN.Core/Hub/Contexts/ChatContext.cs b/src/MaIN.Core/Hub/Contexts/ChatContext.cs index 3a7b6214..07a1aa3b 100644 --- a/src/MaIN.Core/Hub/Contexts/ChatContext.cs +++ b/src/MaIN.Core/Hub/Contexts/ChatContext.cs @@ -10,7 +10,7 @@ namespace MaIN.Core.Hub.Contexts; -public class ChatContext +public sealed class ChatContext { private readonly IChatService _chatService; private bool _preProcess; diff --git a/src/MaIN.Core/Hub/Contexts/FlowContext.cs b/src/MaIN.Core/Hub/Contexts/FlowContext.cs index 980bed90..4cd60c05 100644 --- a/src/MaIN.Core/Hub/Contexts/FlowContext.cs +++ b/src/MaIN.Core/Hub/Contexts/FlowContext.cs @@ -4,14 +4,12 @@ using MaIN.Domain.Entities; using MaIN.Domain.Entities.Agents; using MaIN.Domain.Entities.Agents.AgentSource; -using MaIN.Services.Dtos; -using MaIN.Services.Mappers; using MaIN.Services.Services.Abstract; using MaIN.Services.Services.Models; namespace MaIN.Core.Hub.Contexts; -public class FlowContext +public sealed class FlowContext { private readonly IAgentFlowService _flowService; private readonly IAgentService _agentService; diff --git a/src/MaIN.Core/Hub/Contexts/McpContext.cs b/src/MaIN.Core/Hub/Contexts/McpContext.cs index 3aa8507e..0f748ab7 100644 --- a/src/MaIN.Core/Hub/Contexts/McpContext.cs +++ b/src/MaIN.Core/Hub/Contexts/McpContext.cs @@ -1,14 +1,12 @@ - using MaIN.Domain.Configuration; using MaIN.Domain.Entities; using MaIN.Services.Constants; -using MaIN.Services.Services; using MaIN.Services.Services.Abstract; using MaIN.Services.Services.Models; namespace MaIN.Core.Hub.Contexts; -public class McpContext +public sealed class McpContext { private readonly IMcpService _mcpService; private Mcp? _mcpConfig; diff --git a/src/MaIN.Core/Hub/Contexts/ModelContext.cs b/src/MaIN.Core/Hub/Contexts/ModelContext.cs index f2651477..000f7af7 100644 --- a/src/MaIN.Core/Hub/Contexts/ModelContext.cs +++ b/src/MaIN.Core/Hub/Contexts/ModelContext.cs @@ -7,7 +7,7 @@ namespace MaIN.Core.Hub.Contexts; -public class ModelContext +public sealed class ModelContext { private readonly MaINSettings _settings; private readonly IHttpClientFactory _httpClientFactory; diff --git a/src/MaIN.Core/Hub/Utils/KnowledgeBuilder.cs b/src/MaIN.Core/Hub/Utils/KnowledgeBuilder.cs index c65d06f9..b2f4a45c 100644 --- a/src/MaIN.Core/Hub/Utils/KnowledgeBuilder.cs +++ b/src/MaIN.Core/Hub/Utils/KnowledgeBuilder.cs @@ -5,7 +5,7 @@ namespace MaIN.Core.Hub.Utils; -public class KnowledgeBuilder +public sealed class KnowledgeBuilder { private Agent? _agent; private KnowledgeIndex? _index; diff --git a/src/MaIN.Core/Hub/Utils/StepBuilder.cs b/src/MaIN.Core/Hub/Utils/StepBuilder.cs index 709c793a..f79eee96 100644 --- a/src/MaIN.Core/Hub/Utils/StepBuilder.cs +++ b/src/MaIN.Core/Hub/Utils/StepBuilder.cs @@ -3,7 +3,7 @@ namespace MaIN.Core.Hub.Utils; -public class StepBuilder +public sealed class StepBuilder { private readonly List Steps = new(); public static StepBuilder Instance => new(); diff --git a/src/MaIN.Core/Hub/Utils/ToolConfigurationBuilder.cs b/src/MaIN.Core/Hub/Utils/ToolConfigurationBuilder.cs index 207643c2..3c353bb6 100644 --- a/src/MaIN.Core/Hub/Utils/ToolConfigurationBuilder.cs +++ b/src/MaIN.Core/Hub/Utils/ToolConfigurationBuilder.cs @@ -3,7 +3,7 @@ namespace MaIN.Core.Hub.Utils; //TODO try to share logic of adding tool to the list across methods https://github.com/wisedev-code/MaIN.NET/pull/98#discussion_r2454997846 -public class ToolsConfigurationBuilder +public sealed class ToolsConfigurationBuilder { private readonly ToolsConfiguration _config = new() { Tools = [] }; diff --git a/src/MaIN.Core/Interfaces/IAIHubService.cs b/src/MaIN.Core/Interfaces/IAIHubService.cs index 8b6b1cfe..0afd1bda 100644 --- a/src/MaIN.Core/Interfaces/IAIHubService.cs +++ b/src/MaIN.Core/Interfaces/IAIHubService.cs @@ -1,4 +1,3 @@ -using MaIN.Services.Services; using MaIN.Services.Services.Abstract; namespace MaIN.Core.Interfaces; diff --git a/src/MaIN.Core/Services/AIHubService.cs b/src/MaIN.Core/Services/AIHubService.cs index 1189cba6..1c13358b 100644 --- a/src/MaIN.Core/Services/AIHubService.cs +++ b/src/MaIN.Core/Services/AIHubService.cs @@ -1,10 +1,9 @@ using MaIN.Core.Interfaces; -using MaIN.Services.Services; using MaIN.Services.Services.Abstract; namespace MaIN.Core.Services; -public class AIHubServices( +public sealed class AIHubServices( IChatService chatService, IAgentService agentService, IAgentFlowService flowService, @@ -14,6 +13,5 @@ public class AIHubServices( public IChatService ChatService { get; } = chatService; public IAgentService AgentService { get; } = agentService; public IAgentFlowService FlowService { get; } = flowService; - public IMcpService McpService { get; } = mcpService; } \ No newline at end of file