@sparkleideas/ruv-swarm 1.0.18-patch.1 ā 1.0.18-patch.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ruv-swarm-clean.js +62 -62
- package/bin/ruv-swarm-memory.js +2 -2
- package/bin/ruv-swarm-secure-heartbeat.js +46 -46
- package/bin/ruv-swarm-secure.js +43 -43
- package/package.json +1 -1
- package/src/benchmark.js +4 -4
- package/src/claude-flow-enhanced.js +2 -2
- package/src/claude-integration/advanced-commands.js +7 -7
- package/src/claude-integration/core.js +4 -4
- package/src/claude-integration/docs.js +59 -59
- package/src/claude-integration/env-template.js +4 -4
- package/src/claude-integration/index.js +3 -3
- package/src/claude-integration/remote.js +1 -1
- package/src/cli-diagnostics.js +13 -13
- package/src/diagnostics.js +1 -1
- package/src/errors.js +1 -1
- package/src/github-coordinator/gh-cli-coordinator.js +1 -1
- package/src/hooks/cli.js +2 -2
- package/src/hooks/index.js +13 -13
- package/src/index-enhanced.d.ts +2 -2
- package/src/index-enhanced.js +3 -3
- package/src/logger.js +2 -2
- package/src/logging-config.js +1 -1
- package/src/mcp-tools-benchmarks.js +1 -1
- package/src/neural.js +3 -3
- package/src/performance-benchmarks.js +1 -1
- package/src/performance.js +11 -11
- package/src/persistence-pooled.js +1 -1
- package/src/persistence.js +2 -2
- package/src/security.js +1 -1
- package/src/sqlite-pool.js +1 -1
- package/src/wasm-loader.js +1 -1
package/bin/ruv-swarm-clean.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Clean, modular
|
|
3
|
+
* Clean, modular ruv-swarm CLI with Claude Code integration
|
|
4
4
|
* Uses modular architecture for better maintainability and remote execution
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -126,7 +126,7 @@ function logValidationError(error, command) {
|
|
|
126
126
|
if (error.parameter) {
|
|
127
127
|
console.log(` Parameter: ${error.parameter}`);
|
|
128
128
|
}
|
|
129
|
-
console.log(`\nš” For help with valid parameters, run:
|
|
129
|
+
console.log(`\nš” For help with valid parameters, run: ruv-swarm help`);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
let globalRuvSwarm = null;
|
|
@@ -221,7 +221,7 @@ async function handleInit(args) {
|
|
|
221
221
|
const topology = validateTopology(rawTopology);
|
|
222
222
|
const maxAgents = validateMaxAgents(rawMaxAgents);
|
|
223
223
|
|
|
224
|
-
console.log('š Initializing
|
|
224
|
+
console.log('š Initializing ruv-swarm...');
|
|
225
225
|
|
|
226
226
|
const result = await mcpTools.swarm_init({
|
|
227
227
|
topology,
|
|
@@ -250,11 +250,11 @@ async function handleInit(args) {
|
|
|
250
250
|
noBackup: noBackup,
|
|
251
251
|
interactive: !noInteractive,
|
|
252
252
|
workingDir: process.cwd(),
|
|
253
|
-
packageName: '
|
|
253
|
+
packageName: 'ruv-swarm'
|
|
254
254
|
});
|
|
255
255
|
} catch (error) {
|
|
256
256
|
console.log('ā ļø Claude integration setup had issues:', error.message);
|
|
257
|
-
console.log('š” Manual setup: claude mcp add
|
|
257
|
+
console.log('š” Manual setup: claude mcp add ruv-swarm npx ruv-swarm mcp start');
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
|
|
@@ -320,7 +320,7 @@ async function handleOrchestrate(args) {
|
|
|
320
320
|
const rawTask = args.join(' ');
|
|
321
321
|
if (!rawTask) {
|
|
322
322
|
console.log('ā No task provided');
|
|
323
|
-
console.log('Usage:
|
|
323
|
+
console.log('Usage: ruv-swarm orchestrate "task description"');
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
326
|
|
|
@@ -357,12 +357,12 @@ async function handleClaudeInvoke(args) {
|
|
|
357
357
|
|
|
358
358
|
if (!prompt.trim()) {
|
|
359
359
|
console.log('ā No prompt provided');
|
|
360
|
-
console.log('Usage:
|
|
360
|
+
console.log('Usage: ruv-swarm claude-invoke "your swarm prompt"');
|
|
361
361
|
console.log('Note: --dangerously-skip-permissions is automatically included');
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
console.log('š Invoking Claude Code with
|
|
365
|
+
console.log('š Invoking Claude Code with ruv-swarm integration...');
|
|
366
366
|
console.log('Prompt: ' + prompt.trim());
|
|
367
367
|
console.log('ā ļø Automatically using --dangerously-skip-permissions for seamless execution');
|
|
368
368
|
|
|
@@ -462,7 +462,7 @@ async function startMcpServer(args) {
|
|
|
462
462
|
try {
|
|
463
463
|
if (protocol === 'stdio') {
|
|
464
464
|
// In stdio mode, only JSON-RPC messages should go to stdout
|
|
465
|
-
logger.info('
|
|
465
|
+
logger.info('ruv-swarm MCP server starting in stdio mode', {
|
|
466
466
|
protocol,
|
|
467
467
|
sessionId,
|
|
468
468
|
nodeVersion: process.version,
|
|
@@ -619,7 +619,7 @@ async function startMcpServer(args) {
|
|
|
619
619
|
method: 'server.initialized',
|
|
620
620
|
params: {
|
|
621
621
|
serverInfo: {
|
|
622
|
-
name: '
|
|
622
|
+
name: 'ruv-swarm',
|
|
623
623
|
version: '1.0.8',
|
|
624
624
|
capabilities: {
|
|
625
625
|
tools: true,
|
|
@@ -681,7 +681,7 @@ async function getMcpStatus() {
|
|
|
681
681
|
console.log('š MCP Server Status:');
|
|
682
682
|
console.log(' Protocol: stdio (for Claude Code integration)');
|
|
683
683
|
console.log(' Status: Ready to start');
|
|
684
|
-
console.log(' Usage: npx
|
|
684
|
+
console.log(' Usage: npx ruv-swarm mcp start');
|
|
685
685
|
}
|
|
686
686
|
|
|
687
687
|
async function stopMcpServer() {
|
|
@@ -702,14 +702,14 @@ async function listMcpTools() {
|
|
|
702
702
|
console.log(' mcp__ruv-swarm__daa_workflow_create - Create DAA workflows');
|
|
703
703
|
console.log(' mcp__ruv-swarm__daa_learning_status - Get learning progress');
|
|
704
704
|
console.log(' ... and 6 more DAA tools');
|
|
705
|
-
console.log('\nFor full documentation, run:
|
|
705
|
+
console.log('\nFor full documentation, run: ruv-swarm init --claude');
|
|
706
706
|
}
|
|
707
707
|
|
|
708
708
|
function showMcpHelp() {
|
|
709
709
|
console.log(`
|
|
710
710
|
š MCP (Model Context Protocol) Commands
|
|
711
711
|
|
|
712
|
-
Usage:
|
|
712
|
+
Usage: ruv-swarm mcp <subcommand> [options]
|
|
713
713
|
|
|
714
714
|
Subcommands:
|
|
715
715
|
start [--protocol=stdio] Start MCP server (stdio for Claude Code)
|
|
@@ -719,17 +719,17 @@ Subcommands:
|
|
|
719
719
|
help Show this help message
|
|
720
720
|
|
|
721
721
|
Examples:
|
|
722
|
-
|
|
723
|
-
|
|
722
|
+
ruv-swarm mcp start # Start stdio MCP server
|
|
723
|
+
ruv-swarm mcp tools # List available tools
|
|
724
724
|
|
|
725
725
|
For Claude Code integration:
|
|
726
|
-
claude mcp add
|
|
726
|
+
claude mcp add ruv-swarm npx ruv-swarm mcp start
|
|
727
727
|
`);
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
async function configureMcp(args) {
|
|
731
731
|
console.log('š§ MCP configuration is managed through Claude Code');
|
|
732
|
-
console.log('Run:
|
|
732
|
+
console.log('Run: ruv-swarm init --claude');
|
|
733
733
|
}
|
|
734
734
|
|
|
735
735
|
async function getResourceContent(uri) {
|
|
@@ -738,10 +738,10 @@ async function getResourceContent(uri) {
|
|
|
738
738
|
contents: [{
|
|
739
739
|
uri,
|
|
740
740
|
mimeType: 'text/markdown',
|
|
741
|
-
text: `# Getting Started with
|
|
741
|
+
text: `# Getting Started with ruv-swarm
|
|
742
742
|
|
|
743
743
|
## Introduction
|
|
744
|
-
|
|
744
|
+
ruv-swarm is a powerful WASM-powered neural swarm orchestration system that enhances Claude Code's capabilities through intelligent agent coordination.
|
|
745
745
|
|
|
746
746
|
## Quick Start
|
|
747
747
|
|
|
@@ -865,7 +865,7 @@ Consider:
|
|
|
865
865
|
|
|
866
866
|
## Decentralized Autonomous Agents
|
|
867
867
|
|
|
868
|
-
DAA extends
|
|
868
|
+
DAA extends ruv-swarm with autonomous learning and adaptation capabilities.
|
|
869
869
|
|
|
870
870
|
## Key Features
|
|
871
871
|
|
|
@@ -918,7 +918,7 @@ mcp__ruv-swarm__daa_workflow_execute {
|
|
|
918
918
|
mimeType: 'text/markdown',
|
|
919
919
|
text: `# REST API Example
|
|
920
920
|
|
|
921
|
-
## Building a Complete REST API with
|
|
921
|
+
## Building a Complete REST API with ruv-swarm
|
|
922
922
|
|
|
923
923
|
### Step 1: Initialize Swarm
|
|
924
924
|
\`\`\`javascript
|
|
@@ -960,7 +960,7 @@ mcp__ruv-swarm__task_orchestrate {
|
|
|
960
960
|
|
|
961
961
|
## Complete Working Example
|
|
962
962
|
|
|
963
|
-
See the full implementation in the
|
|
963
|
+
See the full implementation in the ruv-swarm examples directory.`
|
|
964
964
|
}]
|
|
965
965
|
},
|
|
966
966
|
'swarm://examples/neural-training': {
|
|
@@ -1147,51 +1147,51 @@ For complex tasks, combine multiple cognitive patterns:
|
|
|
1147
1147
|
|
|
1148
1148
|
### pre-task
|
|
1149
1149
|
- **Purpose**: Initialize agent context before tasks
|
|
1150
|
-
- **Usage**: \`npx
|
|
1150
|
+
- **Usage**: \`npx ruv-swarm hook pre-task --description "task"\`
|
|
1151
1151
|
- **Features**: Auto-spawn agents, load context, optimize topology
|
|
1152
1152
|
|
|
1153
1153
|
### pre-edit
|
|
1154
1154
|
- **Purpose**: Prepare for file edits
|
|
1155
|
-
- **Usage**: \`npx
|
|
1155
|
+
- **Usage**: \`npx ruv-swarm hook pre-edit --file "path"\`
|
|
1156
1156
|
- **Features**: Auto-assign agents, validate permissions
|
|
1157
1157
|
|
|
1158
1158
|
### pre-search
|
|
1159
1159
|
- **Purpose**: Optimize search operations
|
|
1160
|
-
- **Usage**: \`npx
|
|
1160
|
+
- **Usage**: \`npx ruv-swarm hook pre-search --query "search"\`
|
|
1161
1161
|
- **Features**: Cache results, suggest alternatives
|
|
1162
1162
|
|
|
1163
1163
|
## Post-Operation Hooks
|
|
1164
1164
|
|
|
1165
1165
|
### post-edit
|
|
1166
1166
|
- **Purpose**: Process file after editing
|
|
1167
|
-
- **Usage**: \`npx
|
|
1167
|
+
- **Usage**: \`npx ruv-swarm hook post-edit --file "path"\`
|
|
1168
1168
|
- **Features**: Auto-format, update memory, train neural patterns
|
|
1169
1169
|
|
|
1170
1170
|
### post-task
|
|
1171
1171
|
- **Purpose**: Finalize task execution
|
|
1172
|
-
- **Usage**: \`npx
|
|
1172
|
+
- **Usage**: \`npx ruv-swarm hook post-task --task-id "id"\`
|
|
1173
1173
|
- **Features**: Analyze performance, update metrics
|
|
1174
1174
|
|
|
1175
1175
|
### notification
|
|
1176
1176
|
- **Purpose**: Share updates across swarm
|
|
1177
|
-
- **Usage**: \`npx
|
|
1177
|
+
- **Usage**: \`npx ruv-swarm hook notification --message "update"\`
|
|
1178
1178
|
- **Features**: Broadcast to agents, update memory
|
|
1179
1179
|
|
|
1180
1180
|
## Session Hooks
|
|
1181
1181
|
|
|
1182
1182
|
### session-start
|
|
1183
1183
|
- **Purpose**: Initialize session
|
|
1184
|
-
- **Usage**: \`npx
|
|
1184
|
+
- **Usage**: \`npx ruv-swarm hook session-start\`
|
|
1185
1185
|
- **Features**: Restore context, load memory
|
|
1186
1186
|
|
|
1187
1187
|
### session-end
|
|
1188
1188
|
- **Purpose**: Clean up session
|
|
1189
|
-
- **Usage**: \`npx
|
|
1189
|
+
- **Usage**: \`npx ruv-swarm hook session-end\`
|
|
1190
1190
|
- **Features**: Save state, generate summary
|
|
1191
1191
|
|
|
1192
1192
|
### session-restore
|
|
1193
1193
|
- **Purpose**: Restore previous session
|
|
1194
|
-
- **Usage**: \`npx
|
|
1194
|
+
- **Usage**: \`npx ruv-swarm hook session-restore --session-id "id"\`
|
|
1195
1195
|
- **Features**: Load memory, restore agent states`
|
|
1196
1196
|
}]
|
|
1197
1197
|
}
|
|
@@ -1235,7 +1235,7 @@ async function handleMcpRequest(request, mcpTools, logger = null) {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
},
|
|
1237
1237
|
serverInfo: {
|
|
1238
|
-
name: '
|
|
1238
|
+
name: 'ruv-swarm',
|
|
1239
1239
|
version: '1.0.8'
|
|
1240
1240
|
}
|
|
1241
1241
|
};
|
|
@@ -1502,7 +1502,7 @@ async function handleMcpRequest(request, mcpTools, logger = null) {
|
|
|
1502
1502
|
{
|
|
1503
1503
|
uri: 'swarm://docs/getting-started',
|
|
1504
1504
|
name: 'Getting Started Guide',
|
|
1505
|
-
description: 'Introduction to
|
|
1505
|
+
description: 'Introduction to ruv-swarm and basic usage',
|
|
1506
1506
|
mimeType: 'text/markdown'
|
|
1507
1507
|
},
|
|
1508
1508
|
{
|
|
@@ -1526,7 +1526,7 @@ async function handleMcpRequest(request, mcpTools, logger = null) {
|
|
|
1526
1526
|
{
|
|
1527
1527
|
uri: 'swarm://examples/rest-api',
|
|
1528
1528
|
name: 'REST API Example',
|
|
1529
|
-
description: 'Complete example of building a REST API with
|
|
1529
|
+
description: 'Complete example of building a REST API with ruv-swarm',
|
|
1530
1530
|
mimeType: 'text/markdown'
|
|
1531
1531
|
},
|
|
1532
1532
|
{
|
|
@@ -1591,7 +1591,7 @@ async function handleHook(args) {
|
|
|
1591
1591
|
const { main: hooksCLIMain } = await import('../src/hooks/cli.js');
|
|
1592
1592
|
|
|
1593
1593
|
// Pass through to hooks CLI with 'hook' already consumed
|
|
1594
|
-
process.argv = ['node', '
|
|
1594
|
+
process.argv = ['node', 'ruv-swarm', 'hook', ...args];
|
|
1595
1595
|
|
|
1596
1596
|
return hooksCLIMain();
|
|
1597
1597
|
}
|
|
@@ -1619,10 +1619,10 @@ async function handleNeural(args) {
|
|
|
1619
1619
|
neural export [options] Export neural weights
|
|
1620
1620
|
|
|
1621
1621
|
Examples:
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1622
|
+
ruv-swarm neural status
|
|
1623
|
+
ruv-swarm neural train --model attention --iterations 100
|
|
1624
|
+
ruv-swarm neural patterns --model attention
|
|
1625
|
+
ruv-swarm neural export --model all --output ./weights.json`);
|
|
1626
1626
|
break;
|
|
1627
1627
|
}
|
|
1628
1628
|
} catch (error) {
|
|
@@ -1648,9 +1648,9 @@ async function handleBenchmark(args) {
|
|
|
1648
1648
|
benchmark compare [files] Compare benchmark results
|
|
1649
1649
|
|
|
1650
1650
|
Examples:
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1651
|
+
ruv-swarm benchmark run --iterations 10
|
|
1652
|
+
ruv-swarm benchmark run --test swarm-coordination
|
|
1653
|
+
ruv-swarm benchmark compare results-1.json results-2.json`);
|
|
1654
1654
|
break;
|
|
1655
1655
|
}
|
|
1656
1656
|
} catch (error) {
|
|
@@ -1679,9 +1679,9 @@ async function handlePerformance(args) {
|
|
|
1679
1679
|
performance suggest Get optimization suggestions
|
|
1680
1680
|
|
|
1681
1681
|
Examples:
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1682
|
+
ruv-swarm performance analyze --task-id recent
|
|
1683
|
+
ruv-swarm performance optimize --target speed
|
|
1684
|
+
ruv-swarm performance suggest`);
|
|
1685
1685
|
break;
|
|
1686
1686
|
}
|
|
1687
1687
|
} catch (error) {
|
|
@@ -1697,9 +1697,9 @@ async function handleDiagnose(args) {
|
|
|
1697
1697
|
|
|
1698
1698
|
function showHelp() {
|
|
1699
1699
|
console.log(`
|
|
1700
|
-
š
|
|
1700
|
+
š ruv-swarm - Enhanced WASM-powered neural swarm orchestration
|
|
1701
1701
|
|
|
1702
|
-
Usage:
|
|
1702
|
+
Usage: ruv-swarm <command> [options]
|
|
1703
1703
|
|
|
1704
1704
|
Commands:
|
|
1705
1705
|
init [topology] [maxAgents] Initialize swarm (--claude for integration)
|
|
@@ -1723,19 +1723,19 @@ Commands:
|
|
|
1723
1723
|
help Show this help message
|
|
1724
1724
|
|
|
1725
1725
|
Examples:
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1726
|
+
ruv-swarm init mesh 5 --claude # Create CLAUDE.md (fails if exists)
|
|
1727
|
+
ruv-swarm init mesh 5 --claude --force # Overwrite CLAUDE.md (creates backup)
|
|
1728
|
+
ruv-swarm init mesh 5 --claude --merge # Merge with existing CLAUDE.md
|
|
1729
|
+
ruv-swarm init mesh 5 --claude --force --no-backup # Overwrite CLAUDE.md (no backup)
|
|
1730
|
+
ruv-swarm init mesh 5 --claude --no-interactive # Non-interactive mode
|
|
1731
|
+
ruv-swarm spawn researcher "AI Research Specialist"
|
|
1732
|
+
ruv-swarm orchestrate "Build a REST API with authentication"
|
|
1733
|
+
ruv-swarm mcp start
|
|
1734
|
+
ruv-swarm hook pre-edit --file app.js --ensure-coordination
|
|
1735
|
+
ruv-swarm claude-invoke "Create a development swarm for my project"
|
|
1736
|
+
ruv-swarm neural status
|
|
1737
|
+
ruv-swarm benchmark run --iterations 10
|
|
1738
|
+
ruv-swarm performance analyze --task-id recent
|
|
1739
1739
|
|
|
1740
1740
|
Validation Rules:
|
|
1741
1741
|
Topologies: mesh, hierarchical, ring, star
|
|
@@ -1827,9 +1827,9 @@ async function main() {
|
|
|
1827
1827
|
const __dirname = path.dirname(__filename);
|
|
1828
1828
|
const packagePath = path.join(__dirname, '..', 'package.json');
|
|
1829
1829
|
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
|
|
1830
|
-
console.log('
|
|
1830
|
+
console.log('ruv-swarm v' + packageJson.version);
|
|
1831
1831
|
} catch (error) {
|
|
1832
|
-
console.log('
|
|
1832
|
+
console.log('ruv-swarm v1.0.8');
|
|
1833
1833
|
}
|
|
1834
1834
|
console.log('Enhanced WASM-powered neural swarm orchestration');
|
|
1835
1835
|
console.log('Modular Claude Code integration with remote execution support');
|
package/bin/ruv-swarm-memory.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Memory optimization command for
|
|
4
|
+
* Memory optimization command for ruv-swarm
|
|
5
5
|
* Demonstrates memory usage optimization across cognitive patterns
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ const { NeuralAgentFactory, COGNITIVE_PATTERNS } = require('../src/neural-agent'
|
|
|
10
10
|
const chalk = require('chalk');
|
|
11
11
|
|
|
12
12
|
async function runMemoryOptimizationDemo() {
|
|
13
|
-
console.log(chalk.bold.cyan('\nš§
|
|
13
|
+
console.log(chalk.bold.cyan('\nš§ ruv-swarm Memory Optimization Demo\n'));
|
|
14
14
|
|
|
15
15
|
const neuralCLI = new NeuralCLI();
|
|
16
16
|
await neuralCLI.initialize();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Production-ready
|
|
3
|
+
* Production-ready ruv-swarm MCP server with security and stability
|
|
4
4
|
* Combines security fixes from Issue #107 with crash protection
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -155,7 +155,7 @@ function logValidationError(error, command) {
|
|
|
155
155
|
if (error.parameter) {
|
|
156
156
|
console.log(` Parameter: ${error.parameter}`);
|
|
157
157
|
}
|
|
158
|
-
console.log(`\nš” For help with valid parameters, run:
|
|
158
|
+
console.log(`\nš” For help with valid parameters, run: ruv-swarm help`);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
function stabilityLog(message) {
|
|
@@ -261,7 +261,7 @@ async function handleInit(args) {
|
|
|
261
261
|
const topology = validateTopology(rawTopology);
|
|
262
262
|
const maxAgents = validateMaxAgents(rawMaxAgents);
|
|
263
263
|
|
|
264
|
-
console.log('š Initializing
|
|
264
|
+
console.log('š Initializing ruv-swarm...');
|
|
265
265
|
|
|
266
266
|
const result = await mcpTools.swarm_init({
|
|
267
267
|
topology,
|
|
@@ -290,11 +290,11 @@ async function handleInit(args) {
|
|
|
290
290
|
noBackup: noBackup,
|
|
291
291
|
interactive: !noInteractive,
|
|
292
292
|
workingDir: process.cwd(),
|
|
293
|
-
packageName: '
|
|
293
|
+
packageName: 'ruv-swarm'
|
|
294
294
|
});
|
|
295
295
|
} catch (error) {
|
|
296
296
|
console.log('ā ļø Claude integration setup had issues:', error.message);
|
|
297
|
-
console.log('š” Manual setup: claude mcp add
|
|
297
|
+
console.log('š” Manual setup: claude mcp add ruv-swarm npx ruv-swarm mcp start');
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -360,7 +360,7 @@ async function handleOrchestrate(args) {
|
|
|
360
360
|
const rawTask = args.join(' ');
|
|
361
361
|
if (!rawTask) {
|
|
362
362
|
console.log('ā No task provided');
|
|
363
|
-
console.log('Usage:
|
|
363
|
+
console.log('Usage: ruv-swarm orchestrate "task description"');
|
|
364
364
|
return;
|
|
365
365
|
}
|
|
366
366
|
|
|
@@ -392,7 +392,7 @@ async function handleClaudeInvoke(args) {
|
|
|
392
392
|
|
|
393
393
|
if (!prompt.trim()) {
|
|
394
394
|
console.log('ā No prompt provided');
|
|
395
|
-
console.log('Usage:
|
|
395
|
+
console.log('Usage: ruv-swarm claude-invoke "your swarm prompt"');
|
|
396
396
|
console.log('Note: Use --dangerously-skip-permissions explicitly if needed');
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
@@ -408,7 +408,7 @@ async function handleClaudeInvoke(args) {
|
|
|
408
408
|
throw error;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
console.log('š Invoking Claude Code with
|
|
411
|
+
console.log('š Invoking Claude Code with ruv-swarm integration...');
|
|
412
412
|
console.log('Prompt: ' + prompt.trim());
|
|
413
413
|
|
|
414
414
|
try {
|
|
@@ -517,7 +517,7 @@ async function startMcpServer(args) {
|
|
|
517
517
|
try {
|
|
518
518
|
if (protocol === 'stdio') {
|
|
519
519
|
// In stdio mode, only JSON-RPC messages should go to stdout
|
|
520
|
-
logger.info('
|
|
520
|
+
logger.info('ruv-swarm MCP server starting in stdio mode', {
|
|
521
521
|
protocol,
|
|
522
522
|
sessionId,
|
|
523
523
|
nodeVersion: process.version,
|
|
@@ -674,7 +674,7 @@ async function startMcpServer(args) {
|
|
|
674
674
|
method: 'server.initialized',
|
|
675
675
|
params: {
|
|
676
676
|
serverInfo: {
|
|
677
|
-
name: '
|
|
677
|
+
name: 'ruv-swarm',
|
|
678
678
|
version: version,
|
|
679
679
|
capabilities: {
|
|
680
680
|
tools: true,
|
|
@@ -778,7 +778,7 @@ async function getMcpStatus() {
|
|
|
778
778
|
console.log('š MCP Server Status:');
|
|
779
779
|
console.log(' Protocol: stdio (for Claude Code integration)');
|
|
780
780
|
console.log(' Status: Ready to start');
|
|
781
|
-
console.log(' Usage: npx
|
|
781
|
+
console.log(' Usage: npx ruv-swarm mcp start [--stability]');
|
|
782
782
|
console.log(' Runtime: Infinite (no timeouts)');
|
|
783
783
|
console.log(' Stability: Auto-restart on crashes (use --stability flag)');
|
|
784
784
|
}
|
|
@@ -806,14 +806,14 @@ async function listMcpTools() {
|
|
|
806
806
|
console.log(' mcp__ruv-swarm__daa_workflow_create - Create DAA workflows');
|
|
807
807
|
console.log(' mcp__ruv-swarm__daa_learning_status - Get learning progress');
|
|
808
808
|
console.log(' ... and 6 more DAA tools');
|
|
809
|
-
console.log('\nFor full documentation, run:
|
|
809
|
+
console.log('\nFor full documentation, run: ruv-swarm init --claude');
|
|
810
810
|
}
|
|
811
811
|
|
|
812
812
|
function showMcpHelp() {
|
|
813
813
|
console.log(`
|
|
814
814
|
š MCP (Model Context Protocol) Commands
|
|
815
815
|
|
|
816
|
-
Usage:
|
|
816
|
+
Usage: ruv-swarm mcp <subcommand> [options]
|
|
817
817
|
|
|
818
818
|
Subcommands:
|
|
819
819
|
start [--protocol=stdio] [--stability] Start MCP server
|
|
@@ -831,19 +831,19 @@ Environment Variables:
|
|
|
831
831
|
MCP_TEST_MODE Enable test mode (true/false)
|
|
832
832
|
|
|
833
833
|
Examples:
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
LOG_LEVEL=DEBUG
|
|
837
|
-
|
|
834
|
+
ruv-swarm mcp start # Start stdio MCP server (infinite runtime)
|
|
835
|
+
ruv-swarm mcp start --stability # Start with crash protection
|
|
836
|
+
LOG_LEVEL=DEBUG ruv-swarm mcp start # Enable debug logging
|
|
837
|
+
ruv-swarm mcp tools # List available tools
|
|
838
838
|
|
|
839
839
|
For Claude Code integration:
|
|
840
|
-
claude mcp add
|
|
840
|
+
claude mcp add ruv-swarm npx ruv-swarm mcp start --stability
|
|
841
841
|
`);
|
|
842
842
|
}
|
|
843
843
|
|
|
844
844
|
async function configureMcp(args) {
|
|
845
845
|
console.log('š§ MCP configuration is managed through Claude Code');
|
|
846
|
-
console.log('Run:
|
|
846
|
+
console.log('Run: ruv-swarm init --claude');
|
|
847
847
|
}
|
|
848
848
|
|
|
849
849
|
async function getResourceContent(uri) {
|
|
@@ -852,10 +852,10 @@ async function getResourceContent(uri) {
|
|
|
852
852
|
contents: [{
|
|
853
853
|
uri,
|
|
854
854
|
mimeType: 'text/markdown',
|
|
855
|
-
text: `# Getting Started with
|
|
855
|
+
text: `# Getting Started with ruv-swarm
|
|
856
856
|
|
|
857
857
|
## Introduction
|
|
858
|
-
|
|
858
|
+
ruv-swarm is a powerful WASM-powered neural swarm orchestration system that enhances Claude Code's capabilities through intelligent agent coordination.
|
|
859
859
|
|
|
860
860
|
## Quick Start
|
|
861
861
|
|
|
@@ -907,10 +907,10 @@ The production version includes built-in crash protection:
|
|
|
907
907
|
## Usage
|
|
908
908
|
\`\`\`bash
|
|
909
909
|
# Enable stability mode
|
|
910
|
-
|
|
910
|
+
ruv-swarm mcp start --stability
|
|
911
911
|
|
|
912
912
|
# For Claude Code integration
|
|
913
|
-
claude mcp add
|
|
913
|
+
claude mcp add ruv-swarm npx ruv-swarm mcp start --stability
|
|
914
914
|
\`\`\`
|
|
915
915
|
|
|
916
916
|
## Features
|
|
@@ -961,7 +961,7 @@ async function handleMcpRequest(request, mcpTools, logger = null) {
|
|
|
961
961
|
}
|
|
962
962
|
},
|
|
963
963
|
serverInfo: {
|
|
964
|
-
name: '
|
|
964
|
+
name: 'ruv-swarm',
|
|
965
965
|
version: version
|
|
966
966
|
}
|
|
967
967
|
};
|
|
@@ -1228,7 +1228,7 @@ async function handleMcpRequest(request, mcpTools, logger = null) {
|
|
|
1228
1228
|
{
|
|
1229
1229
|
uri: 'swarm://docs/getting-started',
|
|
1230
1230
|
name: 'Getting Started Guide',
|
|
1231
|
-
description: 'Introduction to
|
|
1231
|
+
description: 'Introduction to ruv-swarm and basic usage',
|
|
1232
1232
|
mimeType: 'text/markdown'
|
|
1233
1233
|
},
|
|
1234
1234
|
{
|
|
@@ -1269,7 +1269,7 @@ async function handleHook(args) {
|
|
|
1269
1269
|
const { main: hooksCLIMain } = await import('../src/hooks/cli.js');
|
|
1270
1270
|
|
|
1271
1271
|
// Pass through to hooks CLI with 'hook' already consumed
|
|
1272
|
-
process.argv = ['node', '
|
|
1272
|
+
process.argv = ['node', 'ruv-swarm', 'hook', ...args];
|
|
1273
1273
|
|
|
1274
1274
|
return hooksCLIMain();
|
|
1275
1275
|
}
|
|
@@ -1297,10 +1297,10 @@ async function handleNeural(args) {
|
|
|
1297
1297
|
neural export [options] Export neural weights
|
|
1298
1298
|
|
|
1299
1299
|
Examples:
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1300
|
+
ruv-swarm neural status
|
|
1301
|
+
ruv-swarm neural train --model attention --iterations 100
|
|
1302
|
+
ruv-swarm neural patterns --model attention
|
|
1303
|
+
ruv-swarm neural export --model all --output ./weights.json`);
|
|
1304
1304
|
break;
|
|
1305
1305
|
}
|
|
1306
1306
|
} catch (error) {
|
|
@@ -1326,9 +1326,9 @@ async function handleBenchmark(args) {
|
|
|
1326
1326
|
benchmark compare [files] Compare benchmark results
|
|
1327
1327
|
|
|
1328
1328
|
Examples:
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1329
|
+
ruv-swarm benchmark run --iterations 10
|
|
1330
|
+
ruv-swarm benchmark run --test swarm-coordination
|
|
1331
|
+
ruv-swarm benchmark compare results-1.json results-2.json`);
|
|
1332
1332
|
break;
|
|
1333
1333
|
}
|
|
1334
1334
|
} catch (error) {
|
|
@@ -1357,9 +1357,9 @@ async function handlePerformance(args) {
|
|
|
1357
1357
|
performance suggest Get optimization suggestions
|
|
1358
1358
|
|
|
1359
1359
|
Examples:
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1360
|
+
ruv-swarm performance analyze --task-id recent
|
|
1361
|
+
ruv-swarm performance optimize --target speed
|
|
1362
|
+
ruv-swarm performance suggest`);
|
|
1363
1363
|
break;
|
|
1364
1364
|
}
|
|
1365
1365
|
} catch (error) {
|
|
@@ -1376,9 +1376,9 @@ async function handleDiagnose(args) {
|
|
|
1376
1376
|
async function showHelp() {
|
|
1377
1377
|
const version = await getVersion();
|
|
1378
1378
|
console.log(`
|
|
1379
|
-
š
|
|
1379
|
+
š ruv-swarm v${version} - Production-ready WASM-powered neural swarm orchestration
|
|
1380
1380
|
|
|
1381
|
-
Usage:
|
|
1381
|
+
Usage: ruv-swarm <command> [options]
|
|
1382
1382
|
|
|
1383
1383
|
Commands:
|
|
1384
1384
|
init [topology] [maxAgents] Initialize swarm (--claude for integration)
|
|
@@ -1404,13 +1404,13 @@ Commands:
|
|
|
1404
1404
|
help Show this help message
|
|
1405
1405
|
|
|
1406
1406
|
Examples:
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1407
|
+
ruv-swarm init mesh 5 --claude # Create CLAUDE.md (fails if exists)
|
|
1408
|
+
ruv-swarm init mesh 5 --claude --force # Overwrite CLAUDE.md (creates backup)
|
|
1409
|
+
ruv-swarm spawn researcher "AI Research Specialist"
|
|
1410
|
+
ruv-swarm orchestrate "Build a REST API with authentication"
|
|
1411
|
+
ruv-swarm mcp start --stability # Start with crash protection
|
|
1412
|
+
ruv-swarm hook pre-edit --file app.js --ensure-coordination
|
|
1413
|
+
ruv-swarm claude-invoke "Create a development swarm for my project"
|
|
1414
1414
|
|
|
1415
1415
|
š Security Features:
|
|
1416
1416
|
⢠Input validation and sanitization
|
|
@@ -1490,7 +1490,7 @@ async function main() {
|
|
|
1490
1490
|
break;
|
|
1491
1491
|
case 'version':
|
|
1492
1492
|
const version = await getVersion();
|
|
1493
|
-
console.log('
|
|
1493
|
+
console.log('ruv-swarm v' + version);
|
|
1494
1494
|
console.log('Production-ready WASM-powered neural swarm orchestration');
|
|
1495
1495
|
console.log('Security & Stability Enhanced Edition');
|
|
1496
1496
|
console.log('\nš Security Features:');
|