/**
 * Arcadia Suite - Blackboard Agents Index
 * 
 * Exporta todos os agentes colaborativos do sistema.
 */

import { architectAgent } from "./ArchitectAgent";
import { generatorAgent } from "./GeneratorAgent";
import { validatorAgent } from "./ValidatorAgent";
import { executorAgent } from "./ExecutorAgent";
import { evolutionAgent } from "./EvolutionAgent";
import { researcherAgent } from "./ResearcherAgent";
import { runExecutor } from "./RunExecutor";

export const agents = {
  architect: architectAgent,
  generator: generatorAgent,
  validator: validatorAgent,
  executor: executorAgent,
  evolution: evolutionAgent,
  researcher: researcherAgent,
  "run-executor": runExecutor,
};

export function startAllAgents(): void {
  console.log("[Blackboard] Iniciando todos os agentes...");

  architectAgent.start();
  generatorAgent.start();
  validatorAgent.start();
  executorAgent.start();
  evolutionAgent.start();
  researcherAgent.start();
  runExecutor.start();

  console.log("[Blackboard] Todos os 7 agentes estão ativos");
}

export function stopAllAgents(): void {
  console.log("[Blackboard] Parando todos os agentes...");

  architectAgent.stop();
  generatorAgent.stop();
  validatorAgent.stop();
  executorAgent.stop();
  evolutionAgent.stop();
  researcherAgent.stop();
  runExecutor.stop();
}

export function getAgentsStatus(): Array<{ name: string; running: boolean; capabilities: string[] }> {
  return [
    architectAgent.getStatus(),
    generatorAgent.getStatus(),
    validatorAgent.getStatus(),
    executorAgent.getStatus(),
    evolutionAgent.getStatus(),
    researcherAgent.getStatus(),
    runExecutor.getStatus(),
  ];
}

export { architectAgent, generatorAgent, validatorAgent, executorAgent, evolutionAgent, researcherAgent, runExecutor };
