Multi-agent AI laboratory with ASP.NET Core 8.0 backend and Flutter frontend. Implements CQRS architecture, OpenAPI contract-first API design. BACKEND: Agent management, conversations, executions with PostgreSQL + Ollama FRONTEND: Cross-platform UI with strict typing and Result-based error handling Co-Authored-By: Jean-Philippe Brule <jp@svrnty.io>
29 lines
1.3 KiB
C#
29 lines
1.3 KiB
C#
using Codex.CQRS.Commands;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using OpenHarbor.CQRS;
|
|
using OpenHarbor.CQRS.FluentValidation;
|
|
using PoweredSoft.Module.Abstractions;
|
|
|
|
namespace Codex.CQRS;
|
|
|
|
public class CommandsModule : IModule
|
|
{
|
|
public IServiceCollection ConfigureServices(IServiceCollection services)
|
|
{
|
|
// Agent commands
|
|
services.AddCommand<CreateAgentCommand, CreateAgentCommandHandler, CreateAgentCommandValidator>();
|
|
services.AddCommand<UpdateAgentCommand, UpdateAgentCommandHandler, UpdateAgentCommandValidator>();
|
|
services.AddCommand<DeleteAgentCommand, DeleteAgentCommandHandler, DeleteAgentCommandValidator>();
|
|
|
|
// Conversation commands
|
|
services.AddCommand<CreateConversationCommand, Guid, CreateConversationCommandHandler, CreateConversationCommandValidator>();
|
|
services.AddCommand<SendMessageCommand, SendMessageResult, SendMessageCommandHandler, SendMessageCommandValidator>();
|
|
|
|
// Agent execution commands
|
|
services.AddCommand<StartAgentExecutionCommand, Guid, StartAgentExecutionCommandHandler, StartAgentExecutionCommandValidator>();
|
|
services.AddCommand<CompleteAgentExecutionCommand, CompleteAgentExecutionCommandHandler, CompleteAgentExecutionCommandValidator>();
|
|
|
|
return services;
|
|
}
|
|
}
|