mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
* fix: prevent concurrent NPX cache conflicts with lock manager - Add NPX cache manager utility to serialize NPX operations - Wrap all NPX commands in withLock() to ensure exclusive access - Implement automatic retry logic with exponential backoff - Add lock timeout protection (30s) to prevent deadlocks - Create manual lock management CLI for debugging - Add comprehensive troubleshooting documentation This fix addresses the ENOTEMPTY error that occurs when multiple claude-flow instances attempt to use NPX simultaneously. The lock manager ensures only one NPX operation runs at a time, preventing cache directory rename conflicts. Fixes the issue where concurrent swarm operations fail with: npm error code ENOTEMPTY npm error syscall rename npm error ENOTEMPTY: directory not empty 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: replace complex lock manager with simple per-process cache isolation - Remove complex NPX lock manager in favor of simpler approach - Each process now gets isolated NPX cache directory - Maintains true parallel execution without serialization overhead - Add comprehensive test suites to verify fix works - Update documentation with improved solution Benefits: - No performance impact (no serialization) - Simpler implementation (50 lines vs 200+ lines) - Self-cleaning cache directories - Cross-platform compatibility - Zero lock contention Test Results: - All 6 unit tests pass - 18/18 integration tests pass with 0 ENOTEMPTY errors - Concurrent and stress tests successful 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * test: add Jest-compatible tests for NPX cache isolation - Add comprehensive unit tests for npx-isolated-cache utility - Add integration tests for init command NPX isolation - Fix duplicate function declaration in batch-init.js - All tests pass: 15/15 Jest tests + 6/6 integration tests - Verify 0 ENOTEMPTY errors in concurrent scenarios Test Coverage: - Cache isolation functionality - Environment variable handling - Cleanup mechanisms - Integration with existing code - Concurrent NPX execution safety 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: add comprehensive troubleshooting documentation for NPX cache fix - Add troubleshooting/README.md with quick diagnosis guide - Update main troubleshooting.md with NPX cache fix section - Document test verification steps and version notes - Link to detailed NPX cache conflicts guide - Mark issue as FIXED in v2.0.0-alpha.17+ Provides clear guidance for: - Identifying ENOTEMPTY errors - Understanding the fix implemented - Testing concurrent safety - Version-specific notes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: remove unused imports from batch-init.js Remove unused imports that were leftover from cleanup: - getIsolatedNpxEnv (not needed - batch-init doesn't run NPX commands) - path (removed when duplicate initializeProject function was cleaned up) The batch-init functionality only creates directories and files with Deno APIs, so NPX cache isolation is not required there. NPX isolation is only used in the main init command where create-sparc NPX command is executed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: maintain Deno environment compatibility in NPX cache isolation Ensure npx-isolated-cache works in both Deno and Node.js environments: - Use Deno.env.toObject() when available (Deno environment) - Fall back to process.env in Node.js environment - Maintains compatibility with existing Deno-based init command This preserves the original behavior where Deno.env.toObject() was used in the init command's environment setup, just with added NPX cache isolation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
📚 Claude Flow v2.0.0 Documentation
Welcome to the comprehensive documentation for Claude Flow v2.0.0 - Intelligent AI Agent Coordination Platform!
🚀 Getting Started
Quick Links
- Quick Start Guide - Get up and running in minutes
- Claude Code Integration - MCP configuration guide
- CLI Reference - Complete command reference
👑 Hive Mind System (NEW!)
Core Features
- Hive Mind Overview - Queen-led swarm intelligence
- Interactive Wizard - Easy setup walkthrough
- CLI Commands - Complete command reference
- Examples - Real-world usage patterns
📖 Core Documentation
Architecture & Configuration
- Architecture Overview - System design and components
- Neural Networks - WASM neural processing
- Memory Systems - Persistent storage and collective memory
- Swarm Coordination - Multi-agent orchestration
Enterprise Features
- Workflow Automation - CI/CD pipeline setup
- GitHub Integration - Repository management
- WebUI Guide - Browser interface
- Security Guide - Enterprise security setup
🛠️ Specialized Guides
Setup & Initialization
- Batch Initialization - Batch project setup
- Initialization Scenarios - Common setup scenarios
- Initialization Troubleshooting - Solving setup issues
- Optimized Initialization - Performance optimizations
- Template Customization - Customizing project templates
Performance & Monitoring
- Performance Comparison - Benchmarks and optimizations
- Troubleshooting - Common issues and solutions
📊 Reports & Analysis
Performance Reports
- Benchmark Analysis - Performance benchmarks
- Hive Mind Performance - Swarm optimization results
- TypeScript Validation - Code quality metrics
Development Documentation
- Directory Reorganization - Project structure improvements
- Test Consolidation - Testing strategy
- Cleanup Summary - Code maintenance
Strategy Analysis
- Hive Mind Optimization - System optimization strategies
🎮 User Guides
Essential Guides
- Coordination Guide - Multi-agent coordination
- Memory Bank Guide - Using the memory system
- Optimized Init Usage - Efficient project setup
UI & Interfaces
- Swarm Blessed UI - Terminal UI interface
- Start Command Consolidation - Command management
🔧 Development & API
API Documentation
- API Reference - Complete API documentation
- MCP Implementation - MCP server implementation
Examples & Demos
📝 Version History
v2.0.0 Highlights
- Hive Mind System: Queen-led swarm intelligence with collective memory
- 87 MCP Tools: Complete integration with Claude Code
- Neural Networks: Real WASM neural processing with training
- Performance: 2.8-4.4x speed improvements, 32.3% token reduction
- Enterprise Ready: Security, monitoring, and production features
🤝 Contributing
Want to improve the documentation? See our Contributing Guidelines for how to help!
🔍 Quick Navigation
| Category | Description | Key Files |
|---|---|---|
| Getting Started | Setup and basic usage | quick-start.md, 01-getting-started.md |
| Core Features | Main functionality | 04-agent-management.md, 05-task-coordination.md |
| Advanced | Power user features | 10-advanced-usage.md, 07-mcp-integration.md |
| Troubleshooting | Problem solving | 09-troubleshooting.md, initialization-troubleshooting.md |
| API | Developer resources | api/, cli-reference.md |
Built with ❤️ by the Claude-Flow team | Powered by Claude AI