Files
ruflo/package.json
T
lanemcandClaude e63fb66519 feat: implement non-interactive JSON output for swarm command (fixes #206) (#221)
* feat: implement non-interactive JSON output for swarm command

Resolves #206 - Add support for capturing swarm execution results in JSON format

## Implementation

### New Features
- SwarmJsonOutputAggregator class for comprehensive data collection
- CLI flags: --output-format json, --output-file, --no-interactive
- SwarmCoordinator integration with enableJsonOutput(), getJsonOutput(), saveJsonOutput()
- Real-time aggregation of agent outputs, tasks, metrics, and artifacts

### JSON Output Structure
- Complete swarm execution data (agents, tasks, results, metrics)
- Agent-specific outputs, errors, and performance metrics
- Task assignments, artifacts, and completion status
- System-wide performance and quality metrics
- Metadata including strategy, mode, and configuration

### Robust Error Handling
- Graceful handling of null/invalid agent and task IDs
- Circular reference protection in JSON serialization
- Large dataset support (150+ agents, 500+ tasks, 2MB+ output)
- File system error handling for invalid paths/permissions

### Comprehensive Testing
- 26/26 tests passed (100% success rate)
- Core functionality tests (10 tests)
- Edge case and stress tests (16 tests)
- Performance validation with large datasets
- Error handling and recovery scenarios

### Usage Examples
```bash
# JSON output to stdout
claude-flow swarm "task" --output-format json --no-interactive

# JSON output to file
claude-flow swarm "task" --output-format json --output-file results.json

# Regular interactive mode (default)
claude-flow swarm "task"
```

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

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: remove unused CommandCompleter class and setup

- Remove unused CommandCompleter class (84 lines)
- Remove unused completer setup in startNodeREPL
- Clean up commented-out completer assignment
- Simplify readline interface creation

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-12 23:30:29 -04:00

172 lines
6.3 KiB
JSON

{
"name": "claude-flow",
"version": "2.0.0-alpha.49",
"description": "Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)",
"main": "cli.mjs",
"bin": {
"claude-flow": "./bin/claude-flow"
},
"scripts": {
"dev": "tsx src/cli/main.ts",
"build": "npm run clean && npm run update-version && npm run build:esm && npm run build:cjs && npm run build:binary",
"update-version": "node scripts/update-bin-version.js",
"clean": "rm -rf dist dist-cjs",
"build:esm": "tsc",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:ts": "npm run build:esm && npm run build:cjs",
"build:binary": "pkg dist/cli/main.js --targets node20-linux-x64,node20-macos-x64,node20-win-x64 --output bin/claude-flow",
"build:simple": "npm run build:ts && pkg dist/cli/simple-cli.js --output bin/claude-flow-simple",
"typecheck": "tsc --noEmit",
"typecheck:watch": "tsc --noEmit --watch",
"dev:build": "tsc --watch",
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
"test:watch": "NODE_OPTIONS='--experimental-vm-modules' jest --watch",
"test:unit": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/unit",
"test:integration": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/integration",
"test:e2e": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/e2e",
"test:performance": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/performance",
"test:cli": "NODE_OPTIONS='--experimental-vm-modules' jest src/cli/__tests__",
"test:coverage": "NODE_OPTIONS='--experimental-vm-modules' jest --coverage",
"test:coverage:unit": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/unit --coverage",
"test:coverage:integration": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/integration --coverage",
"test:coverage:e2e": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/e2e --coverage",
"test:ci": "NODE_OPTIONS='--experimental-vm-modules' jest --ci --coverage --maxWorkers=2",
"test:debug": "NODE_OPTIONS='--experimental-vm-modules --inspect-brk' jest --runInBand --no-cache",
"test:comprehensive": "node scripts/test-comprehensive.js",
"test:comprehensive:verbose": "node scripts/test-comprehensive.js --verbose",
"test:comprehensive:full": "node scripts/test-comprehensive.js --load --docker --npx",
"test:load": "node scripts/test-comprehensive.js --load",
"test:docker": "node scripts/test-comprehensive.js --docker",
"test:npx": "node scripts/test-comprehensive.js --npx",
"test:health": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/integration/system-integration.test.ts --testNamePattern='Health'",
"test:swarm": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/e2e/swarm-coordination.test.ts",
"test:benchmark": "NODE_OPTIONS='--experimental-vm-modules' jest src/__tests__/performance/benchmark.test.ts",
"lint": "eslint src --ext .ts,.js",
"format": "prettier --write src",
"diagnostics": "node -e \"import('./dist/monitoring/diagnostics.js').then(m => m.DiagnosticManager.quickDiagnostic().then(console.log))\"",
"health-check": "node -e \"import('./dist/monitoring/health-check.js').then(m => new m.HealthCheckManager().performHealthCheck().then(console.log))\"",
"postinstall": "node scripts/install.js",
"prepublishOnly": "npm run update-version",
"publish:alpha": "npm publish --tag alpha",
"publish:major": "npm version major && npm publish",
"publish:minor": "npm version minor && npm publish",
"publish:patch": "npm version patch && npm publish",
"prepack": "echo 'Alpha release - skipping build for now'",
"postpack": "echo 'Package created successfully'",
"prepare-publish": "node scripts/prepare-publish.js"
},
"keywords": [
"claude",
"ai",
"agent",
"orchestration",
"mcp",
"workflow",
"automation",
"swarm",
"ruv-swarm",
"github",
"docker",
"enterprise",
"coordination",
"multi-agent",
"neural-networks",
"cli",
"tools",
"alpha"
],
"author": "rUv",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/ruvnet/claude-code-flow.git"
},
"bugs": {
"url": "https://github.com/ruvnet/claude-code-flow/issues"
},
"homepage": "https://github.com/ruvnet/claude-code-flow#readme",
"engines": {
"node": ">=20.0.0",
"npm": ">=9.0.0"
},
"files": [
"cli.js",
"bin/",
"dist/",
"src/",
".claude/",
"docker-test/",
"scripts/",
"README.md",
"LICENSE",
"CHANGELOG.md",
"DOCKER_TEST_REPORT.md"
],
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.4",
"@types/better-sqlite3": "^7.6.13",
"better-sqlite3": "^12.2.0",
"blessed": "^0.1.81",
"chalk": "^4.1.2",
"cli-table3": "^0.6.3",
"commander": "^11.1.0",
"cors": "^2.8.5",
"express": "^4.18.2",
"figlet": "^1.8.1",
"fs-extra": "^11.2.0",
"glob": "^11.0.3",
"gradient-string": "^3.0.0",
"helmet": "^7.1.0",
"inquirer": "^9.2.12",
"nanoid": "^5.0.4",
"node-pty": "^1.0.0",
"ora": "^7.0.1",
"p-queue": "^8.1.0",
"ruv-swarm": "^1.0.14",
"ws": "^8.18.3"
},
"devDependencies": {
"@babel/core": "^7.28.0",
"@babel/preset-env": "^7.28.0",
"@types/blessed": "^0.1.25",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/figlet": "^1.7.0",
"@types/fs-extra": "^11.0.4",
"@types/gradient-string": "^1.1.6",
"@types/inquirer": "^9.0.7",
"@types/jest": "^29.5.14",
"@types/node": "^20.19.7",
"@types/uuid": "^10.0.0",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"babel-jest": "^29.7.0",
"eslint": "^8.56.0",
"jest": "^29.7.0",
"pkg": "^5.8.1",
"prettier": "^3.1.1",
"puppeteer": "^24.11.2",
"ts-jest": "^29.4.0",
"tsx": "^4.6.2",
"typescript": "^5.3.3"
},
"pkg": {
"targets": [
"node20-linux-x64",
"node20-macos-x64",
"node20-win-x64"
],
"scripts": "dist/**/*.js",
"outputPath": "bin",
"options": [
"--experimental-specifier-resolution=node"
]
},
"type": "module",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}