UNPKG

@hivetechs/hive-ai

Version:

Real-time streaming AI consensus platform with HTTP+SSE MCP integration for Claude Code, VS Code, Cursor, and Windsurf - powered by OpenRouter's unified API

69 lines โ€ข 3.47 kB
#!/usr/bin/env node /** * Setup Expert Profiles - Clean System Setup * * This script: * 1. Cleans up all old-format profiles (OpenRouter ID format) * 2. Creates only the 10 expert profiles using internal IDs * 3. Sets a sensible default profile */ import { cleanupOldProfiles, enforceExpertProfilesOnly, setDefaultPipelineProfile } from '../storage/unified-database.js'; import { ExpertTemplateManager, EXPERT_TEMPLATES } from './expert-profile-templates.js'; async function setupExpertProfiles() { console.log('๐Ÿš€ Setting Up Expert Profile System'); console.log('โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\n'); try { // Step 1: Clean up old profiles console.log('๐Ÿงน Step 1: Cleaning up old-format profiles...'); const cleanedOld = await cleanupOldProfiles(); console.log(` โœ… Removed ${cleanedOld} old-format profiles\n`); // Step 2: Enforce expert profiles only console.log('๐ŸŽฏ Step 2: Enforcing expert profiles only...'); await enforceExpertProfilesOnly(); console.log(' โœ… Non-expert profiles removed\n'); // Step 3: Create all 10 expert profiles console.log('๐Ÿ‘จโ€๐Ÿ’ป Step 3: Creating expert profiles...'); const manager = new ExpertTemplateManager(); for (const template of EXPERT_TEMPLATES) { try { console.log(` ๐Ÿ“‹ Creating: ${template.name}...`); await manager.createProfileFromTemplate(template.id, `${template.name} Profile`); console.log(` โœ… Created: ${template.name} Profile`); } catch (error) { console.log(` โš ๏ธ Failed to create ${template.name}: ${error}`); console.log(` ๐Ÿ’ก This may be because models are not synced - run 'hive sync' first`); } } // Step 4: Set a good default profile console.log('\nโญ Step 4: Setting default profile...'); try { await setDefaultPipelineProfile('Startup MVP Profile'); console.log(' โœ… Set "Startup MVP Profile" as default'); } catch (error) { console.log(' โš ๏ธ Could not set default profile - will use first available'); } console.log('\n๐ŸŽ‰ Expert Profile Setup Complete!'); console.log('โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•'); console.log('โœ… Only expert profiles with internal IDs are now available'); console.log('๐Ÿ’ก Use "hive profiles list" to see available profiles'); console.log('๐Ÿš€ Use "hive profiles switch <name>" to change active profile'); } catch (error) { console.error('\nโŒ Expert profile setup failed:', error); console.error('๐Ÿ’ก Try running "hive sync" first to ensure models are available'); throw error; } } // Run if called directly if (import.meta.url === `file://${process.argv[1]}`) { setupExpertProfiles() .then(() => process.exit(0)) .catch((error) => { console.error('Setup failed:', error); process.exit(1); }); } export { setupExpertProfiles }; //# sourceMappingURL=setup-expert-profiles.js.map