@sparkleideas/ruv-swarm 1.0.18-patch.1 ā 1.0.18-patch.11
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-secure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Production-ready
|
|
3
|
+
* Production-ready ruv-swarm MCP server with ZERO timeout mechanisms
|
|
4
4
|
* ALL timeout/connection/interval code completely removed for bulletproof operation
|
|
5
5
|
* Maintains security and stability without ANY timeout-related disconnections
|
|
6
6
|
*/
|
|
@@ -156,7 +156,7 @@ function logValidationError(error, command) {
|
|
|
156
156
|
if (error.parameter) {
|
|
157
157
|
console.log(` Parameter: ${error.parameter}`);
|
|
158
158
|
}
|
|
159
|
-
console.log(`\nš” For help with valid parameters, run:
|
|
159
|
+
console.log(`\nš” For help with valid parameters, run: ruv-swarm help`);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
function stabilityLog(message) {
|
|
@@ -268,7 +268,7 @@ async function handleInit(args) {
|
|
|
268
268
|
const topology = validateTopology(rawTopology);
|
|
269
269
|
const maxAgents = validateMaxAgents(rawMaxAgents);
|
|
270
270
|
|
|
271
|
-
console.log('š Initializing
|
|
271
|
+
console.log('š Initializing ruv-swarm (NO TIMEOUT VERSION)...');
|
|
272
272
|
|
|
273
273
|
const result = await mcpTools.swarm_init({
|
|
274
274
|
topology,
|
|
@@ -298,11 +298,11 @@ async function handleInit(args) {
|
|
|
298
298
|
noBackup: noBackup,
|
|
299
299
|
interactive: !noInteractive,
|
|
300
300
|
workingDir: process.cwd(),
|
|
301
|
-
packageName: '
|
|
301
|
+
packageName: 'ruv-swarm'
|
|
302
302
|
});
|
|
303
303
|
} catch (error) {
|
|
304
304
|
console.log('ā ļø Claude integration setup had issues:', error.message);
|
|
305
|
-
console.log('š” Manual setup: claude mcp add
|
|
305
|
+
console.log('š” Manual setup: claude mcp add ruv-swarm npx ruv-swarm mcp start');
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
|
|
@@ -370,7 +370,7 @@ async function handleOrchestrate(args) {
|
|
|
370
370
|
const rawTask = args.join(' ');
|
|
371
371
|
if (!rawTask) {
|
|
372
372
|
console.log('ā No task provided');
|
|
373
|
-
console.log('Usage:
|
|
373
|
+
console.log('Usage: ruv-swarm orchestrate "task description"');
|
|
374
374
|
return;
|
|
375
375
|
}
|
|
376
376
|
|
|
@@ -403,7 +403,7 @@ async function handleClaudeInvoke(args) {
|
|
|
403
403
|
|
|
404
404
|
if (!prompt.trim()) {
|
|
405
405
|
console.log('ā No prompt provided');
|
|
406
|
-
console.log('Usage:
|
|
406
|
+
console.log('Usage: ruv-swarm claude-invoke "your swarm prompt"');
|
|
407
407
|
console.log('Note: Use --dangerously-skip-permissions explicitly if needed');
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
@@ -419,7 +419,7 @@ async function handleClaudeInvoke(args) {
|
|
|
419
419
|
throw error;
|
|
420
420
|
}
|
|
421
421
|
|
|
422
|
-
console.log('š Invoking Claude Code with
|
|
422
|
+
console.log('š Invoking Claude Code with ruv-swarm integration...');
|
|
423
423
|
console.log('Prompt: ' + prompt.trim());
|
|
424
424
|
|
|
425
425
|
try {
|
|
@@ -543,7 +543,7 @@ async function startMcpServer(args) {
|
|
|
543
543
|
try {
|
|
544
544
|
if (protocol === 'stdio') {
|
|
545
545
|
// In stdio mode, only JSON-RPC messages should go to stdout
|
|
546
|
-
logger.info('
|
|
546
|
+
logger.info('ruv-swarm MCP server starting in stdio mode (NO TIMEOUT VERSION)', {
|
|
547
547
|
protocol,
|
|
548
548
|
sessionId,
|
|
549
549
|
nodeVersion: process.version,
|
|
@@ -834,7 +834,7 @@ async function getMcpStatus() {
|
|
|
834
834
|
console.log('š MCP Server Status (NO TIMEOUT VERSION):');
|
|
835
835
|
console.log(' Protocol: stdio (for Claude Code integration)');
|
|
836
836
|
console.log(' Status: Ready to start');
|
|
837
|
-
console.log(' Usage: npx
|
|
837
|
+
console.log(' Usage: npx ruv-swarm mcp start [--stability]');
|
|
838
838
|
console.log(' Stability: Auto-restart on crashes (use --stability flag)');
|
|
839
839
|
console.log(' š„ TIMEOUT MECHANISMS: COMPLETELY DISABLED');
|
|
840
840
|
console.log(' š„ RUNTIME: INFINITE');
|
|
@@ -868,14 +868,14 @@ async function listMcpTools() {
|
|
|
868
868
|
console.log(' ⢠No connection interruptions');
|
|
869
869
|
console.log(' ⢠No connection timeouts');
|
|
870
870
|
console.log(' ⢠Bulletproof stability');
|
|
871
|
-
console.log('\nFor full documentation, run:
|
|
871
|
+
console.log('\nFor full documentation, run: ruv-swarm init --claude');
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
function showMcpHelp() {
|
|
875
875
|
console.log(`
|
|
876
876
|
š MCP (Model Context Protocol) Commands - NO TIMEOUT VERSION
|
|
877
877
|
|
|
878
|
-
Usage:
|
|
878
|
+
Usage: ruv-swarm mcp <subcommand> [options]
|
|
879
879
|
|
|
880
880
|
Subcommands:
|
|
881
881
|
start [--protocol=stdio] [--stability] Start MCP server
|
|
@@ -902,12 +902,12 @@ Environment Variables:
|
|
|
902
902
|
MCP_CONNECTION_TIMEOUT ā REMOVED
|
|
903
903
|
|
|
904
904
|
Examples:
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
905
|
+
ruv-swarm mcp start # Start stdio MCP server (no timeouts)
|
|
906
|
+
ruv-swarm mcp start --stability # Start with crash protection (no timeouts)
|
|
907
|
+
ruv-swarm mcp tools # List available tools
|
|
908
908
|
|
|
909
909
|
For Claude Code integration:
|
|
910
|
-
claude mcp add
|
|
910
|
+
claude mcp add ruv-swarm npx ruv-swarm mcp start --stability
|
|
911
911
|
|
|
912
912
|
š„ SPECIAL FEATURES:
|
|
913
913
|
⢠Bulletproof infinite runtime
|
|
@@ -919,7 +919,7 @@ For Claude Code integration:
|
|
|
919
919
|
|
|
920
920
|
async function configureMcp(args) {
|
|
921
921
|
console.log('š§ MCP configuration is managed through Claude Code');
|
|
922
|
-
console.log('Run:
|
|
922
|
+
console.log('Run: ruv-swarm init --claude');
|
|
923
923
|
console.log('š„ NO TIMEOUT CONFIGURATION NEEDED - RUNS FOREVER!');
|
|
924
924
|
}
|
|
925
925
|
|
|
@@ -929,10 +929,10 @@ async function getResourceContent(uri) {
|
|
|
929
929
|
contents: [{
|
|
930
930
|
uri,
|
|
931
931
|
mimeType: 'text/markdown',
|
|
932
|
-
text: `# Getting Started with
|
|
932
|
+
text: `# Getting Started with ruv-swarm (NO TIMEOUT VERSION)
|
|
933
933
|
|
|
934
934
|
## Introduction
|
|
935
|
-
|
|
935
|
+
ruv-swarm is a powerful WASM-powered neural swarm orchestration system that enhances Claude Code's capabilities through intelligent agent coordination.
|
|
936
936
|
|
|
937
937
|
š„ **SPECIAL FEATURE: NO TIMEOUT MECHANISMS**
|
|
938
938
|
This version has ALL timeout and connection monitoring mechanisms completely removed for bulletproof infinite runtime.
|
|
@@ -1011,10 +1011,10 @@ The production version includes built-in crash protection:
|
|
|
1011
1011
|
## Usage
|
|
1012
1012
|
\`\`\`bash
|
|
1013
1013
|
# Enable stability mode (no timeouts)
|
|
1014
|
-
|
|
1014
|
+
ruv-swarm mcp start --stability
|
|
1015
1015
|
|
|
1016
1016
|
# For Claude Code integration (no timeouts)
|
|
1017
|
-
claude mcp add
|
|
1017
|
+
claude mcp add ruv-swarm npx ruv-swarm mcp start --stability
|
|
1018
1018
|
\`\`\`
|
|
1019
1019
|
|
|
1020
1020
|
## Features
|
|
@@ -1344,7 +1344,7 @@ async function handleMcpRequest(request, mcpTools, logger = null) {
|
|
|
1344
1344
|
{
|
|
1345
1345
|
uri: 'swarm://docs/getting-started',
|
|
1346
1346
|
name: 'Getting Started Guide (NO TIMEOUT VERSION)',
|
|
1347
|
-
description: 'Introduction to
|
|
1347
|
+
description: 'Introduction to ruv-swarm and basic usage without timeouts',
|
|
1348
1348
|
mimeType: 'text/markdown'
|
|
1349
1349
|
},
|
|
1350
1350
|
{
|
|
@@ -1385,7 +1385,7 @@ async function handleHook(args) {
|
|
|
1385
1385
|
const { main: hooksCLIMain } = await import('../src/hooks/cli.js');
|
|
1386
1386
|
|
|
1387
1387
|
// Pass through to hooks CLI with 'hook' already consumed
|
|
1388
|
-
process.argv = ['node', '
|
|
1388
|
+
process.argv = ['node', 'ruv-swarm', 'hook', ...args];
|
|
1389
1389
|
|
|
1390
1390
|
return hooksCLIMain();
|
|
1391
1391
|
}
|
|
@@ -1413,10 +1413,10 @@ async function handleNeural(args) {
|
|
|
1413
1413
|
neural export [options] Export neural weights
|
|
1414
1414
|
|
|
1415
1415
|
Examples:
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1416
|
+
ruv-swarm neural status
|
|
1417
|
+
ruv-swarm neural train --model attention --iterations 100
|
|
1418
|
+
ruv-swarm neural patterns --model attention
|
|
1419
|
+
ruv-swarm neural export --model all --output ./weights.json
|
|
1420
1420
|
|
|
1421
1421
|
š„ SPECIAL FEATURE: Infinite training runtime (no timeouts)`);
|
|
1422
1422
|
break;
|
|
@@ -1444,9 +1444,9 @@ async function handleBenchmark(args) {
|
|
|
1444
1444
|
benchmark compare [files] Compare benchmark results
|
|
1445
1445
|
|
|
1446
1446
|
Examples:
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1447
|
+
ruv-swarm benchmark run --iterations 10
|
|
1448
|
+
ruv-swarm benchmark run --test swarm-coordination
|
|
1449
|
+
ruv-swarm benchmark compare results-1.json results-2.json
|
|
1450
1450
|
|
|
1451
1451
|
š„ SPECIAL FEATURE: Infinite benchmark runtime (no timeouts)`);
|
|
1452
1452
|
break;
|
|
@@ -1477,9 +1477,9 @@ async function handlePerformance(args) {
|
|
|
1477
1477
|
performance suggest Get optimization suggestions
|
|
1478
1478
|
|
|
1479
1479
|
Examples:
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1480
|
+
ruv-swarm performance analyze --task-id recent
|
|
1481
|
+
ruv-swarm performance optimize --target speed
|
|
1482
|
+
ruv-swarm performance suggest
|
|
1483
1483
|
|
|
1484
1484
|
š„ SPECIAL FEATURE: Infinite analysis runtime (no timeouts)`);
|
|
1485
1485
|
break;
|
|
@@ -1498,10 +1498,10 @@ async function handleDiagnose(args) {
|
|
|
1498
1498
|
async function showHelp() {
|
|
1499
1499
|
const version = await getVersion();
|
|
1500
1500
|
console.log(`
|
|
1501
|
-
š
|
|
1501
|
+
š ruv-swarm v${version} - NO TIMEOUT VERSION
|
|
1502
1502
|
š„ Production-ready WASM-powered neural swarm orchestration with INFINITE RUNTIME
|
|
1503
1503
|
|
|
1504
|
-
Usage:
|
|
1504
|
+
Usage: ruv-swarm <command> [options]
|
|
1505
1505
|
|
|
1506
1506
|
Commands:
|
|
1507
1507
|
init [topology] [maxAgents] Initialize swarm (--claude for integration)
|
|
@@ -1527,13 +1527,13 @@ Commands:
|
|
|
1527
1527
|
help Show this help message
|
|
1528
1528
|
|
|
1529
1529
|
Examples:
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1530
|
+
ruv-swarm init mesh 5 --claude # Create CLAUDE.md (fails if exists)
|
|
1531
|
+
ruv-swarm init mesh 5 --claude --force # Overwrite CLAUDE.md (creates backup)
|
|
1532
|
+
ruv-swarm spawn researcher "AI Research Specialist"
|
|
1533
|
+
ruv-swarm orchestrate "Build a REST API with authentication"
|
|
1534
|
+
ruv-swarm mcp start --stability # Start with crash protection
|
|
1535
|
+
ruv-swarm hook pre-edit --file app.js --ensure-coordination
|
|
1536
|
+
ruv-swarm claude-invoke "Create a development swarm for my project"
|
|
1537
1537
|
|
|
1538
1538
|
š Security Features:
|
|
1539
1539
|
⢠Input validation and sanitization
|
|
@@ -1621,7 +1621,7 @@ async function main() {
|
|
|
1621
1621
|
break;
|
|
1622
1622
|
case 'version':
|
|
1623
1623
|
const version = await getVersion();
|
|
1624
|
-
console.log('
|
|
1624
|
+
console.log('ruv-swarm v' + version + ' - NO TIMEOUT VERSION');
|
|
1625
1625
|
console.log('Production-ready WASM-powered neural swarm orchestration');
|
|
1626
1626
|
console.log('Security & Stability Enhanced Edition');
|
|
1627
1627
|
console.log('\nš Security Features:');
|
package/package.json
CHANGED
package/src/benchmark.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Benchmark CLI for
|
|
2
|
+
* Benchmark CLI for ruv-swarm
|
|
3
3
|
* Provides performance benchmarking and comparison tools
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -30,7 +30,7 @@ class BenchmarkCLI {
|
|
|
30
30
|
const testType = this.getArg(args, '--test') || 'comprehensive';
|
|
31
31
|
const outputFile = this.getArg(args, '--output');
|
|
32
32
|
|
|
33
|
-
console.log('š
|
|
33
|
+
console.log('š ruv-swarm Performance Benchmark\n');
|
|
34
34
|
console.log(`Test Type: ${testType}`);
|
|
35
35
|
console.log(`Iterations: ${iterations}`);
|
|
36
36
|
console.log('');
|
|
@@ -168,7 +168,7 @@ class BenchmarkCLI {
|
|
|
168
168
|
await fs.writeFile(outputFile, JSON.stringify(results, null, 2));
|
|
169
169
|
console.log(`\nš¾ Results saved to: ${outputFile}`);
|
|
170
170
|
} else {
|
|
171
|
-
const defaultPath = path.join(process.cwd(), '
|
|
171
|
+
const defaultPath = path.join(process.cwd(), '.ruv-swarm', 'benchmarks', `benchmark-${Date.now()}.json`);
|
|
172
172
|
await fs.mkdir(path.dirname(defaultPath), { recursive: true });
|
|
173
173
|
await fs.writeFile(defaultPath, JSON.stringify(results, null, 2));
|
|
174
174
|
console.log(`\nš¾ Results saved to: ${path.relative(process.cwd(), defaultPath)}`);
|
|
@@ -187,7 +187,7 @@ class BenchmarkCLI {
|
|
|
187
187
|
|
|
188
188
|
if (!file1 || !file2) {
|
|
189
189
|
console.error('ā Please provide two benchmark result files to compare');
|
|
190
|
-
console.log('Usage:
|
|
190
|
+
console.log('Usage: ruv-swarm benchmark compare file1.json file2.json');
|
|
191
191
|
process.exit(1);
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -144,7 +144,7 @@ class ClaudeFlowEnhanced {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* Initialize Claude Code Flow with
|
|
147
|
+
* Initialize Claude Code Flow with ruv-swarm integration
|
|
148
148
|
*/
|
|
149
149
|
async initialize(options = {}) {
|
|
150
150
|
console.log('š Initializing Claude Code Flow Enhanced...');
|
|
@@ -157,7 +157,7 @@ class ClaudeFlowEnhanced {
|
|
|
157
157
|
} = options;
|
|
158
158
|
|
|
159
159
|
try {
|
|
160
|
-
// Initialize
|
|
160
|
+
// Initialize ruv-swarm with SIMD optimization
|
|
161
161
|
this.ruvSwarm = await RuvSwarm.initialize({
|
|
162
162
|
loadingStrategy: 'progressive',
|
|
163
163
|
useSIMD: enableSIMD,
|
|
@@ -73,7 +73,7 @@ Result: Automatically uses hierarchical topology with architect, coder, and test
|
|
|
73
73
|
The pre-task hook automatically handles topology selection:
|
|
74
74
|
\`\`\`json
|
|
75
75
|
{
|
|
76
|
-
"command": "npx
|
|
76
|
+
"command": "npx ruv-swarm hook pre-task --auto-spawn-agents --optimize-topology"
|
|
77
77
|
}
|
|
78
78
|
\`\`\``,
|
|
79
79
|
},
|
|
@@ -213,7 +213,7 @@ Reduce token consumption while maintaining quality through intelligent coordinat
|
|
|
213
213
|
|
|
214
214
|
\`\`\`bash
|
|
215
215
|
# Check token savings after session
|
|
216
|
-
npx
|
|
216
|
+
npx ruv-swarm hook session-end --export-metrics
|
|
217
217
|
|
|
218
218
|
# Result shows:
|
|
219
219
|
{
|
|
@@ -387,7 +387,7 @@ Already enabled in settings.json:
|
|
|
387
387
|
{
|
|
388
388
|
"hooks": [{
|
|
389
389
|
"matcher": "^Task$",
|
|
390
|
-
"command": "npx
|
|
390
|
+
"command": "npx ruv-swarm hook pre-task --auto-spawn-agents"
|
|
391
391
|
}]
|
|
392
392
|
}
|
|
393
393
|
\`\`\`
|
|
@@ -452,7 +452,7 @@ Each recovery improves future prevention:
|
|
|
452
452
|
{
|
|
453
453
|
"PostToolUse": [{
|
|
454
454
|
"matcher": "^Bash$",
|
|
455
|
-
"command": "npx
|
|
455
|
+
"command": "npx ruv-swarm hook post-bash --exit-code '\${tool.result.exitCode}' --auto-recover"
|
|
456
456
|
}]
|
|
457
457
|
}
|
|
458
458
|
\`\`\`
|
|
@@ -487,7 +487,7 @@ At session end, automatically saves:
|
|
|
487
487
|
claude "Continue where we left off"
|
|
488
488
|
|
|
489
489
|
# Or manually restore specific session
|
|
490
|
-
npx
|
|
490
|
+
npx ruv-swarm hook session-restore --session-id "sess-123"
|
|
491
491
|
\`\`\`
|
|
492
492
|
|
|
493
493
|
### 3. Memory Types
|
|
@@ -513,10 +513,10 @@ npx @sparkleideas/ruv-swarm hook session-restore --session-id "sess-123"
|
|
|
513
513
|
### 4. Privacy & Control
|
|
514
514
|
\`\`\`bash
|
|
515
515
|
# View stored memory
|
|
516
|
-
ls
|
|
516
|
+
ls .ruv-swarm/
|
|
517
517
|
|
|
518
518
|
# Clear specific memory
|
|
519
|
-
rm
|
|
519
|
+
rm .ruv-swarm/session-*.json
|
|
520
520
|
|
|
521
521
|
# Disable memory
|
|
522
522
|
export RUV_SWARM_MEMORY_PERSIST=false
|
|
@@ -27,7 +27,7 @@ class ClaudeIntegrationCore {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Add
|
|
30
|
+
* Add ruv-swarm MCP server to Claude Code
|
|
31
31
|
*/
|
|
32
32
|
async addMcpServer() {
|
|
33
33
|
if (!await this.isClaudeAvailable()) {
|
|
@@ -35,10 +35,10 @@ class ClaudeIntegrationCore {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
try {
|
|
38
|
-
// Add
|
|
39
|
-
const mcpCommand = 'claude mcp add
|
|
38
|
+
// Add ruv-swarm MCP server using stdio (no port needed)
|
|
39
|
+
const mcpCommand = 'claude mcp add ruv-swarm npx ruv-swarm mcp start';
|
|
40
40
|
execSync(mcpCommand, { stdio: 'inherit', cwd: this.workingDir });
|
|
41
|
-
return { success: true, message: 'Added
|
|
41
|
+
return { success: true, message: 'Added ruv-swarm MCP server to Claude Code (stdio)' };
|
|
42
42
|
} catch (error) {
|
|
43
43
|
throw new Error(`Failed to add MCP server: ${error.message}`);
|
|
44
44
|
}
|