Commit Graph
313 Commits
Author SHA1 Message Date
rUvandClaude 418691f236 fix: Make Claude Flow status commands fully functional (fixes #758, #760)
- Replace mock data with real metrics from .claude-flow/metrics/ files
- Fix MCP Server detection to properly show running status
- Make agent spawn and task creation fully functional with file persistence
- Update binary wrapper to prioritize local source over npm packages
- Bump version to 2.0.0-alpha.111

Changes:
- Created MetricsReader utility to read actual metrics files
- Updated status.js to display real system metrics, not hardcoded values
- Fixed agent.js to create real agent files in .claude-flow/agents/
- Fixed task.js to maintain actual task queue in .claude-flow/tasks/
- Modified ./claude-flow binary to use local source directly
- Broadened MCP detection pattern to catch all MCP variants

All status commands now show live, accurate data:
- Real memory usage, CPU load, and disk stats
- Actual agent counts and statuses from persisted files
- Live task queue with real queued tasks
- Correct MCP server running status
- Accurate session and performance metrics

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:12:36 +00:00
rUv b0534296e4 Update package.json to v2.0.0-alpha.110 from published npm version 2025-09-18 21:45:52 +00:00
rUv 6294ac3585 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-09-18 21:45:20 +00:00
rUv 01c00a688a 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-09-06 22:26:29 +00:00
rUv 64e147fb33 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-09-06 21:35:55 +00:00
rUv c69d3c74ad 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-09-06 20:38:06 +00:00
rUv 372cf04f1a 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 18:04:19 +00:00
rUv e3ffbf90fe 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 17:02:05 +00:00
rUv a7f6ff0fef 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 16:54:38 +00:00
rUv 2c2b638000 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 16:45:39 +00:00
rUv 428dc32394 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 16:37:22 +00:00
rUv b3328a6717 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 16:32:33 +00:00
rUv 31157708d8 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 16:25:17 +00:00
rUv 36bcd8a614 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 16:10:04 +00:00
rUv 2a7b82aae2 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 15:56:51 +00:00
rUv b6637064fb 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-26 14:28:35 +00:00
rUv efd0506ccf 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-21 18:43:31 +00:00
rUv c7ea824bb8 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-16 16:52:37 +00:00
rUv 89cf7f8b20 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-12 15:10:39 +00:00
rUv 44a7f699d2 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-06 13:33:27 +00:00
rUv d40efb7525 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-05 20:11:46 +00:00
rUv 943e50017b 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-05 19:39:29 +00:00
rUv 904ad8a918 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-05 12:59:02 +00:00
rUv 47dc66f53d 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-03 13:14:45 +00:00
rUv f45f116d5c 🔖 Checkpoint: Edit /workspaces/claude-code-flow/package.json 2025-08-03 12:41:28 +00:00
rUv 54dccfe5c0 🏁 Session end checkpoint: session-20250731-202811 2025-07-31 20:28:13 +00:00
rUv c473684ebe 🔖 Task checkpoint: {{user_prompt}} ... 2025-07-31 19:48:07 +00:00
rUv 5643f321d7 🏁 Session end checkpoint: session-20250731-143729 2025-07-31 14:37:29 +00:00
rUv 1dec74e9ac feat: Add real token usage tracking and analytics (v2.0.0-alpha.80)
- Implement real token usage tracking that integrates with Claude Code's OpenTelemetry metrics
- Add --monitoring flag to init command for easy setup
- Track actual API token consumption with cost calculations
- Support multiple data sources (OpenTelemetry, local metrics, project tracking)
- Generate detailed CSV reports with usage breakdown by agent type
- Provide smart optimization recommendations to reduce costs
- Update all version references to 2.0.0-alpha.80
- Update CLI help text to highlight monitoring features
- Add comprehensive documentation for token tracking setup

BREAKING CHANGE: Token usage analysis now shows real data instead of simulated metrics

Closes #80
2025-07-30 16:32:44 +00:00
rUv 74f3e792fa 🚀 Release: Alpha 79 - Pure Node.js Implementation
## Major Changes
- Removed Deno dependency completely (#521)
- Added Terminal Bench (TBench) integration
- Fixed headless/production mode support (#510)
- Improved stability and cross-platform compatibility

## Features
- Pure Node.js implementation
- TBench agent benchmarking support
- Enhanced error handling
- Better CI/CD compatibility

## Bug Fixes
- Fixed missing commander dependency
- Resolved GitHub CLI timeout issues (#514, #522)
- Addressed memory persistence concerns
- Improved TypeScript compilation

## Documentation
- Updated changelog with comprehensive history
- Added TBench integration guide
- Created alpha test reports
- Updated CLI help text

## Technical
- Package size: ~46.3MB
- Node.js 20+ required
- 87 MCP tools verified
- All SPARC modes functional
2025-07-30 14:07:51 +00:00
a1bcc78846 🔧 Fix Agent Type System: Dynamic Loading from .claude/agents/ (Implements PR #485)
## Key Improvements

### ✅ **Resolves Issue #482: Agent Type Not Found Errors**
- Fixed "analyst agent type not found" errors reported by users
- Replaced hardcoded agent lists with dynamic loading from .claude/agents/
- Single source of truth: .claude/agents/ directory with 64+ specialized agents

### 🔧 **Dynamic Agent Loading System**
- **NEW**: `src/agents/agent-loader.ts` - Dynamic agent discovery with caching
- **UPDATED**: `src/constants/agent-types.ts` - Now uses dynamic loading
- **ENHANCED**: MCP tools (`claude-flow-tools.ts`) - Async with dynamic agent enums
- **ADDED**: Legacy agent mapping for backward compatibility

### 📋 **Validation Results**
- ❌ `analyst` → invalid (as expected, fixes user issue)
- ❌ `coordinator` → invalid
- ❌ `architect` → invalid
- ✅ `code-analyzer` → valid (proper replacement)
- ✅ `system-architect` → valid (proper replacement)

### 🔄 **Legacy Compatibility**
```javascript
// Automatic mapping for legacy agent types
analyst → code-analyzer
coordinator → task-orchestrator
architect → system-architect
```

### 🚀 **Technical Implementation**
- **Breaking Change**: `createClaudeFlowTools()` now async
- **Performance**: 1-minute cache with ~50ms first load
- **Error Handling**: Graceful degradation for malformed agent files
- **Validation**: Type-safe dynamic agent validation

## Testing Verified

```bash
✅ Valid agent types loaded: 7
✅ analyst: valid=false, resolves to=code-analyzer
✅ coordinator: valid=false, resolves to=task-orchestrator
✅ code-analyzer: valid=true ✓
✅ system-architect: valid=true ✓
```

## Attribution

**Primary Implementation**: Based on PR #485 by @robertDouglass
**Enhancement & Integration**: Implemented with additional optimizations and testing

**Original Concept**: @robertDouglass identified the core issue and proposed dynamic loading solution
**Implementation**: Enhanced with proper error handling, caching, and async MCP integration

---

**Status**: ✅ **RESOLVES Issue #482**
**Replaces**: PR #485 (implemented directly with enhancements)
**Fixes**: "Agent type 'analyst' not found" errors for all users

Co-Authored-By: @robertDouglass <noreply@github.com>

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 23:01:59 +00:00
rUvandClaude 45a819dc3e 🚀 Alpha.78: Remove Legacy Deno Warnings & Clean SPARC Experience
## Key Improvements

### 🧹 **Removed Legacy Deno Warnings**
- Silently skip legacy slash command creation that required Deno
- No more "⚠️ Could not create Claude Code slash commands: Deno is not defined"
- Clean initialization experience without confusing error messages

### ✨ **Enhanced SPARC Integration**
- SPARC slash commands work perfectly with Node.js only
- All 17+ SPARC modes create successfully (/sparc-architect, /sparc-tdd, etc.)
- Legacy claude-flow slash commands deemed redundant since SPARC provides full functionality

### 📦 **Version Update to Alpha.78**
- Synchronized version across all files (package.json, bin scripts, help text)
- Updated help text to reflect Deno warning removal
- Clean user experience without technical debt warnings

## Technical Changes

### **Files Modified**
- `src/cli/simple-commands/init/index.js`: Silent error handling for legacy commands
- `src/cli/simple-commands/init/claude-commands/slash-commands.js`: Remove Deno warnings
- `package.json`, `bin/claude-flow*`, `src/cli/help-text.js`: Version bump to alpha.78

### **User Experience Impact**
- ✅ Clean initialization without warning messages
- ✅ All SPARC functionality works perfectly
- ✅ No Deno installation required
- ✅ Full Node.js compatibility maintained

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 22:30:24 +00:00
rUvandClaude d4636e65fe 🐛 Fix: Enhanced hooks pre-task exit with timeout protection
- Added timeout protection for ruv-swarm availability check (3s)
- Fallback to skip ruv-swarm hook if timeout occurs
- Force process exit with setTimeout to prevent hanging
- Handles npx remote execution scenarios properly

This addresses the hanging issue when running:
npx claude-flow@alpha hooks pre-task --description "task"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 21:43:51 +00:00
rUvandClaude 18e4554baa 🐛 Fix: Hooks pre-task command not exiting properly
- Added process.exit() after task completion
- Properly close SQLite database connection to prevent hanging
- Ensures clean exit for both success and error cases

Fixes hanging process issue reported when running:
npx claude-flow@alpha hooks pre-task --description "task"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 21:38:42 +00:00
a0b19d2c84 🚀 Alpha.75: Windows Compatibility Overhaul
- Comprehensive Windows CLI compatibility fixes from PR #483
- Cross-platform Node.js bin script replacing Unix shell script
- Fixed path normalization for Windows path handling
- Windows PowerShell support for installations
- Native dependencies moved to optionalDependencies
- Includes all alpha.74 fixes (SQLite & async/await)

Co-authored-by: alexx-ftw <alex@example.com>

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 19:19:32 +00:00
rUv 957b47c927 Merge branch 'main' into fix/windows-compatibility-alpha74 2025-07-28 19:17:39 +00:00
rUvandClaude 48911d6e11 🚀 Alpha.74: SQLite & Async/Await Fixes
✅ TECHNICAL FIXES
- Fixed SQLite loading in sqlite-wrapper.js - now properly loads better-sqlite3
- Fixed async/await in hive-mind sessions command - no more forEach errors
- Fixed async/await in session-manager getActiveSessionsWithProcessInfo
- Reordered SQLite loading to try CommonJS require first (more reliable)

🔧 VERSION UPDATES
- package.json: 2.0.0-alpha.74
- bin/claude-flow: 2.0.0-alpha.74
- src/cli/help-text.js: 2.0.0-alpha.74
- Updated help text to reflect alpha.74 fixes

🐛 BUGS FIXED
- 'sessions.forEach is not a function' error resolved
- SQLite not available fallback fixed - now properly uses persistent storage
- Hive-mind sessions command now displays all active sessions correctly

🎯 Key Achievement: Hive-mind persistence and reliability improvements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 18:59:08 +00:00
Alexx_FTW 00081efb94 fix(npx): Remove problematic Deno installation from postinstall script
- Removed 'node scripts/install.js &&' from postinstall script
- Keeps ARM64 native dependency rebuilding for compatibility
- Fixes npx installation failures on Windows due to Deno install restrictions
- Project works fine with Node.js compatibility layer, Deno not required

Resolves npx --yes github:alexx-ftw/claude-flow#windows-cli-path-normalization --help failure
2025-07-28 12:01:41 +01:00
Alexx_FTW 8c49977ab5 fix(windows): Replace shell script with cross-platform Node.js bin script
Replace Unix shell script (#\!/bin/sh) with Node.js script for Windows compatibility.
The shell script used Unix commands (readlink, dirname) that don't work on Windows
even with npm-generated shims.

- Create bin/claude-flow.js with cross-platform Node.js logic
- Update package.json bin to point to .js file
- Handles runtime detection (node -> tsx -> npx tsx)
- Provides fallback help when no runtime available

Fixes 'El sistema no puede encontrar la ruta especificada' definitively.
2025-07-28 01:31:41 +01:00
Alexx_FTW 0c777fce69 fix(windows): Correct bin configuration for proper npx Windows execution
Remove duplicate bin entries that caused intermittent execution failures.
NPM automatically creates platform-specific shim files (.cmd, .ps1)
from a single bin entry.

- Remove manual claude-flow.cmd file
- Keep single bin entry pointing to shell script
- Let npm handle Windows compatibility automatically

Fixes 'El sistema no puede encontrar la ruta especificada' error.
2025-07-28 01:19:14 +01:00
Alexx_FTW a6160c4c87 fix(windows): Add Windows-compatible batch file for npx execution
Creates claude-flow.cmd to handle Windows npx execution where
shell scripts cannot be executed directly. This resolves the
'El sistema no puede encontrar la ruta especificada' error.

- Add bin/claude-flow.cmd with Windows batch logic
- Update package.json to include both shell and batch executables
- Maintains cross-platform compatibility
2025-07-28 01:05:51 +01:00
Alexx_FTW c1e63196c0 feat(windows): Improve Windows compatibility for npx installation
- Add cross-platform Deno installation in install.js using PowerShell
- Move native dependencies (better-sqlite3, diskusage, node-pty) to optionalDependencies
- Add preinstall warning for Windows npm users recommending pnpm
- Enables npx installation to work on Windows environments

This addresses the root cause of npx installation failures on Windows
and provides graceful fallbacks for optional native dependencies.
2025-07-28 00:55:44 +01:00
rUvandClaude e9cf033e14 🚀 Prepare Alpha-73: Complete Agent System Integration
✨ Major Features:
- Updated init system to create all 64 agent files during initialization
- Enhanced CLAUDE.md template with complete agent documentation
- Added PreCompact hook with agent guidance to settings.json template
- Created agent-copier.js for robust agent file distribution

🔧 Init System Improvements:
- copyAgentFiles() function copies all agents from package
- createAgentDirectories() creates proper directory structure
- validateAgentSystem() ensures agent system integrity
- Works with both 'npx claude-flow@alpha init' and '--force'

📁 Files Updated:
- package.json: Version bump to alpha.73
- src/cli/simple-cli.js: Version update
- src/cli/simple-commands/init/templates/CLAUDE.md: Complete agent system docs
- src/cli/simple-commands/init/templates/settings.json: PreCompact hook
- src/cli/simple-commands/init/index.js: Agent system integration
- NEW: src/cli/simple-commands/init/agent-copier.js: Agent file distribution

🎯 NPX Distribution Ready:
- All agent files included in package via .claude/ in files array
- Remote npx execution will create complete agent system
- Both --force and normal init modes supported
- Proper validation and error handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 21:37:28 +00:00
rUv 65f7593981 commit 2025-07-22 20:37:33 +00:00
rUvandClaude 8a50210e10 fix: resolve hook quote handling causing "Unterminated quoted string" errors
- Replace complex printf/nested quotes with reliable cat < /dev/null | jq|tr|xargs pipeline
- Use 'jq -r ".field // empty"' instead of problematic '.field // ""' syntax
- Fix both init template and current settings.json files
- Update version to 2.0.0-alpha.70
- All hook types now work without shell syntax errors

Fixes #443

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 16:07:15 +00:00
rUvandClaude d3303eea1a chore: Release v2.0.0-alpha.67 - Hive Mind Enhancement & Claude Code Compatibility
- Fixed settings.json validation errors for Claude Code compatibility
- Removed unrecognized fields (checkpoints, memory, neural, github, optimization)
- Corrected hook names to match Claude Code 1.0.51+ format
- Updated version references across all files
- Created GitHub issue #440 for release tracking

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 15:27:30 +00:00
rUvandClaude 2a3ad3dc5e chore: Release v2.0.0-alpha.66
- Fixed hooks pre-command toLowerCase error when command is empty/non-string
- Added ARM64 macOS compatibility for better-sqlite3 (#378)
- Enhanced postinstall script with automatic SQLite binding rebuild
- Improved error handling and user feedback
- Updated all version references to alpha.66

Bug Fixes:
- Handle empty commands gracefully in hooks
- Add type checking before calling toLowerCase()
- Better boolean parameter parsing

Features:
- Automatic detection of Apple Silicon Macs
- SQLite binding verification and rebuild
- Graceful fallback to in-memory storage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 17:45:43 +00:00
rUvandClaude fea1a162c9 chore: Prepare alpha.65 release
- Updated version to 2.0.0-alpha.65
- Fixed database schema issue (#403)
- Updated CHANGELOG with release notes
- Fixed critical TypeScript build errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 15:39:01 +00:00
rUvandClaude cf995c96b8 fix: Update wrapper script to use @alpha tag instead of hardcoded version
- Fixed claude-flow wrapper hardcoded to alpha.27
- Now uses @alpha tag to always get latest alpha version
- Updated version to 2.0.0-alpha.64
- Updated CHANGELOG with alpha-63 and alpha-64 entries

This ensures ./claude-flow wrapper always uses the most recent alpha release

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 21:33:21 +00:00
rUvandClaude 63d391e10b 🚀 Release: Claude Flow v2.0.0-alpha.62
## 🔒 Security Fixes
- CRITICAL: Removed vulnerable pkg dependency (GHSA-22r3-9w55-cj54)
- Replaced with secure @vercel/ncc alternative
- Security score improved from 55/100 to 75/100
- All npm audit vulnerabilities resolved (0 vulnerabilities)

## 🚀 Infrastructure Improvements
- Re-enabled ALL CI/CD security gates with strict enforcement
- Fixed Jest configuration and test infrastructure
- Fixed 18 TypeScript test files with import issues
- Created comprehensive test utilities

## 🛠️ Code Quality
- Fixed 145 ESLint errors (16% reduction)
- Fixed 15 critical TypeScript errors
- Added development tooling configs

## 📚 Documentation
- Created security audit report
- Created fix summary documentation
- Created functionality review
- Updated GitHub issue #362

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 13:35:41 +00:00