claude-flow 2.0.0-alpha.5 → 2.0.0-alpha.7
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/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
5
|
[](https://github.com/ruvnet/claude-code-flow)
|
|
6
|
-
[](https://www.npmjs.com/package/claude-flow)
|
|
7
7
|
[](https://github.com/ruvnet/claude-code-flow)
|
|
8
8
|
[](https://github.com/ruvnet/ruv-FANN)
|
|
9
9
|
[](https://github.com/ruvnet/claude-code-flow)
|
|
@@ -50,7 +50,7 @@ Instead of promising "AI magic," Claude Flow delivers practical improvements:
|
|
|
50
50
|
|
|
51
51
|
---
|
|
52
52
|
|
|
53
|
-
## 🚀 **What's New in v2.0.0-alpha.
|
|
53
|
+
## 🚀 **What's New in v2.0.0-alpha.6**
|
|
54
54
|
|
|
55
55
|
### 🔌 **Automatic MCP Setup (NEW!)**
|
|
56
56
|
- **Smart Detection** - Automatically detects Claude Code CLI installation
|
package/package.json
CHANGED
|
@@ -376,9 +376,52 @@ async function spawnSwarm(args, flags) {
|
|
|
376
376
|
});
|
|
377
377
|
|
|
378
378
|
// Initialize database connection
|
|
379
|
-
const
|
|
379
|
+
const dbDir = path.join(cwd(), '.hive-mind');
|
|
380
|
+
const dbPath = path.join(dbDir, 'hive.db');
|
|
381
|
+
|
|
382
|
+
// Ensure .hive-mind directory exists
|
|
383
|
+
if (!existsSync(dbDir)) {
|
|
384
|
+
mkdirSync(dbDir, { recursive: true });
|
|
385
|
+
}
|
|
386
|
+
|
|
380
387
|
const db = new Database(dbPath);
|
|
381
388
|
|
|
389
|
+
// Initialize database schema if not exists
|
|
390
|
+
db.exec(`
|
|
391
|
+
CREATE TABLE IF NOT EXISTS swarms (
|
|
392
|
+
id TEXT PRIMARY KEY,
|
|
393
|
+
name TEXT NOT NULL,
|
|
394
|
+
objective TEXT,
|
|
395
|
+
queen_type TEXT,
|
|
396
|
+
status TEXT DEFAULT 'active',
|
|
397
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
398
|
+
);
|
|
399
|
+
|
|
400
|
+
CREATE TABLE IF NOT EXISTS agents (
|
|
401
|
+
id TEXT PRIMARY KEY,
|
|
402
|
+
swarm_id TEXT NOT NULL,
|
|
403
|
+
name TEXT NOT NULL,
|
|
404
|
+
type TEXT NOT NULL,
|
|
405
|
+
role TEXT NOT NULL,
|
|
406
|
+
status TEXT DEFAULT 'idle',
|
|
407
|
+
capabilities TEXT,
|
|
408
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
409
|
+
FOREIGN KEY (swarm_id) REFERENCES swarms(id)
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
CREATE TABLE IF NOT EXISTS tasks (
|
|
413
|
+
id TEXT PRIMARY KEY,
|
|
414
|
+
swarm_id TEXT NOT NULL,
|
|
415
|
+
agent_id TEXT,
|
|
416
|
+
description TEXT,
|
|
417
|
+
status TEXT DEFAULT 'pending',
|
|
418
|
+
result TEXT,
|
|
419
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
420
|
+
FOREIGN KEY (swarm_id) REFERENCES swarms(id),
|
|
421
|
+
FOREIGN KEY (agent_id) REFERENCES agents(id)
|
|
422
|
+
);
|
|
423
|
+
`);
|
|
424
|
+
|
|
382
425
|
// Create swarm record
|
|
383
426
|
const swarmId = `swarm-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
384
427
|
db.prepare(`
|
|
@@ -7,6 +7,7 @@ import { createSparcStructureManually } from './sparc-structure.js';
|
|
|
7
7
|
import { createClaudeSlashCommands } from './claude-commands/slash-commands.js';
|
|
8
8
|
import { createOptimizedClaudeSlashCommands } from './claude-commands/optimized-slash-commands.js';
|
|
9
9
|
import { execSync } from 'child_process';
|
|
10
|
+
import { promises as fs } from 'fs';
|
|
10
11
|
import {
|
|
11
12
|
createSparcClaudeMd,
|
|
12
13
|
createFullClaudeMd,
|
|
@@ -1036,7 +1037,7 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1036
1037
|
// Unix wrapper
|
|
1037
1038
|
const unixWrapper = createWrapperScript('unix');
|
|
1038
1039
|
await Deno.writeTextFile(`${workingDir}/claude-flow`, unixWrapper);
|
|
1039
|
-
await
|
|
1040
|
+
await fs.chmod(`${workingDir}/claude-flow`, 0o755);
|
|
1040
1041
|
|
|
1041
1042
|
// Windows wrapper
|
|
1042
1043
|
await Deno.writeTextFile(`${workingDir}/claude-flow.bat`, createWrapperScript('windows'));
|
|
@@ -1056,7 +1057,7 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1056
1057
|
const content = createHelperScript(helper);
|
|
1057
1058
|
if (content) {
|
|
1058
1059
|
await Deno.writeTextFile(`${claudeDir}/helpers/${helper}`, content);
|
|
1059
|
-
await
|
|
1060
|
+
await fs.chmod(`${claudeDir}/helpers/${helper}`, 0o755);
|
|
1060
1061
|
}
|
|
1061
1062
|
}
|
|
1062
1063
|
}
|