import { Module } from "@nestjs/common";
import { AgentsController } from "./agents.controller";
import { QueueModule } from "../../queue/queue.module";
import { SpawnerModule } from "../../spawner/spawner.module";
import { KillswitchModule } from "../../killswitch/killswitch.module";
import { ValkeyModule } from "../../valkey/valkey.module";
import { OrchestratorApiKeyGuard } from "../../common/guards/api-key.guard";
import { AgentEventsService } from "./agent-events.service";
import { PrismaModule } from "../../prisma/prisma.module";
import { AgentMessagesService } from "./agent-messages.service";
import { AgentControlService } from "./agent-control.service";
import { AgentTreeService } from "./agent-tree.service";
import { InternalAgentProvider } from "./internal-agent.provider";
import { AgentProviderRegistry } from "./agent-provider.registry";

@Module({
  imports: [QueueModule, SpawnerModule, KillswitchModule, ValkeyModule, PrismaModule],
  controllers: [AgentsController],
  providers: [
    OrchestratorApiKeyGuard,
    AgentEventsService,
    AgentMessagesService,
    AgentControlService,
    AgentTreeService,
    InternalAgentProvider,
    AgentProviderRegistry,
  ],
  exports: [InternalAgentProvider, AgentProviderRegistry],
})
export class AgentsModule {}
