CODEX_ADK/BACKEND/Codex.CQRS/CommandsModule.cs
Svrnty 229a0698a3 Initial commit: CODEX_ADK monorepo
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>
2025-10-26 23:12:32 -04:00

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;
}
}