claude-flow 2.0.0-alpha.6 → 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 +2 -2
- package/package.json +1 -1
- package/src/cli/simple-commands/hive-mind.js +44 -1
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(`
|