Files
Hanzo Dev 40d8709d6e feat: Transform Hanzo AI into ultimate AI engineering toolkit
Major Updates:
- Position as unified platform for building AI-powered companies
- Add 200+ LLMs support (OpenRouter/LiteLLM compatible)
- Implement 45+ legendary programmer modes (carmack, norvig, pike, etc)
- Add browser automation via Playwright MCP integration
- Create multi-platform build system (VS Code, Cursor, Windsurf, Claude Code)
- Implement VS Code Chat Participant as @hanzo
- Update branding: "Ultimate toolkit for AI engineers"

New Features:
- Unlimited memory with vector/graph/relational search
- Browser control tool with auto-Playwright installation
- Smart LLM routing with Hanzo AI fallback
- Support for O3, O3-Pro, Claude 4, and latest models
- Team collaboration with shared context/credits

Build System:
- Unified build script for all platforms
- Versioned output files (hanzoai-1.5.4.vsix/dxt)
- NPM package for CLI installation via npx
- Platform-specific VSIX for Cursor/Windsurf

Documentation:
- Short punchy README focused on benefits
- Comprehensive HANZO_MODES.md for legendary modes
- Updated HANZO_AI.md with complete feature set
- Links to docs.hanzo.ai for full documentation
2025-07-04 22:04:15 -04:00

53 lines
2.1 KiB
JavaScript

const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
console.log('🚀 Building Hanzo MCP for Cursor IDE...\n');
// Cursor uses the same VSIX format as VS Code
// We'll build a standard VSIX that Cursor can install
const distDir = path.join(__dirname, '..', 'dist', 'cursor');
// Ensure dist directory exists
if (!fs.existsSync(distDir)) {
fs.mkdirSync(distDir, { recursive: true });
}
try {
// First compile the TypeScript
console.log('📦 Compiling TypeScript...');
execSync('node scripts/compile-main.js', { stdio: 'inherit', cwd: path.join(__dirname, '..') });
// Build MCP components
console.log('🔧 Building MCP components...');
execSync('npm run build:mcp', { stdio: 'inherit', cwd: path.join(__dirname, '..') });
// Package the extension
console.log('📦 Packaging Cursor extension...');
execSync('vsce package --no-dependencies --out dist/cursor/', { stdio: 'inherit', cwd: path.join(__dirname, '..') });
// Read package.json to get version
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
const version = packageJson.version;
// Rename the output file to include cursor in the name
const vsixFiles = fs.readdirSync(distDir).filter(f => f.endsWith('.vsix'));
if (vsixFiles.length > 0) {
const oldPath = path.join(distDir, vsixFiles[0]);
const newPath = path.join(distDir, `hanzoai-cursor-${version}.vsix`);
fs.renameSync(oldPath, newPath);
console.log(`\n✅ Successfully built Cursor extension: ${newPath}`);
console.log(`📦 File size: ${(fs.statSync(newPath).size / 1024 / 1024).toFixed(2)} MB`);
console.log('\n📥 To install in Cursor:');
console.log(' 1. Open Cursor');
console.log(' 2. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)');
console.log(' 3. Run "Extensions: Install from VSIX..."');
console.log(` 4. Select ${newPath}`);
}
} catch (error) {
console.error('❌ Build failed:', error.message);
process.exit(1);
}