#!/usr/bin/env node
/**
 * Simple OAuth + Brainstorm launcher
 * Usage: ./brainstorm.js "your topic here"
 */

const { oauthThenBrainstorm } = require('./oauth-then-brainstorm.js');

const topic = process.argv[2];

if (!topic) {
  console.log('\n🧠 Multi-AI Brainstorm with Qwen OAuth\n');
  console.log('Usage: node brainstorm.js "your topic here"\n');
  console.log('Example: node brainstorm.js "I want to build a collaborative code editor"\n');
  process.exit(1);
}

console.log('\n🧠 Multi-AI Brainstorm Session');
console.log('Topic: ' + topic);
console.log('Agents: All 8 specialized AI agents\n');

oauthThenBrainstorm(topic)
  .then(() => {
    console.log('\n✨ Brainstorming session complete!\n');
  })
  .catch((err) => {
    console.error('\n❌ Session failed:', err.message, '\n');
    process.exit(1);
  });
