/**
 * Multi-AI Brainstorm Skill
 * Main entry point for collaborative AI brainstorming
 */

const { multiAIBrainstorm, BrainstormOrchestrator, AVAILABLE_AGENTS } = require('./brainstorm-orchestrator');

/**
 * Main skill function
 * @param {string} topic - The topic to brainstorm
 * @param {Object} options - Configuration options
 * @param {string[]} options.agents - Array of agent names to use (default: all)
 * @param {number} options.concurrency - Number of agents to run in parallel (default: 3)
 * @param {boolean} options.listAgents - If true, list available agents and exit
 */
async function run(topic, options = {}) {
  try {
    const results = await multiAIBrainstorm(topic, options);
    return results;
  } catch (error) {
    console.error('\n❌ Brainstorming failed:', error.message);
    throw error;
  }
}

module.exports = {
  run,
  multiAIBrainstorm,
  BrainstormOrchestrator,
  AVAILABLE_AGENTS
};
