mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
fix: add missing database tables to hive-mind spawn command
- Add collective_memory table creation to spawn command - Add consensus_decisions table creation to spawn command - Ensures both init and spawn commands create complete schema - Prevents 'no such table' errors when using spawn directly Fixes #192
This commit is contained in:
1 parent
9633e59069
commit
801faed100
5 files changed
+29
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"initialized": "2025-07-08T12:02:59.951Z",
|
||||
"initialized": "2025-07-09T20:16:20.811Z",
|
||||
"defaults": {
|
||||
"queenType": "strategic",
|
||||
"maxWorkers": 8,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -498,6 +498,34 @@ async function spawnSwarm(args, flags) {
|
||||
FOREIGN KEY (swarm_id) REFERENCES swarms(id),
|
||||
FOREIGN KEY (agent_id) REFERENCES agents(id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS collective_memory (
|
||||
id TEXT PRIMARY KEY,
|
||||
swarm_id TEXT,
|
||||
key TEXT NOT NULL,
|
||||
value TEXT,
|
||||
type TEXT DEFAULT 'knowledge',
|
||||
confidence REAL DEFAULT 1.0,
|
||||
created_by TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
accessed_at DATETIME,
|
||||
access_count INTEGER DEFAULT 0,
|
||||
compressed INTEGER DEFAULT 0,
|
||||
size INTEGER DEFAULT 0,
|
||||
FOREIGN KEY (swarm_id) REFERENCES swarms(id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS consensus_decisions (
|
||||
id TEXT PRIMARY KEY,
|
||||
swarm_id TEXT,
|
||||
topic TEXT NOT NULL,
|
||||
decision TEXT,
|
||||
votes TEXT,
|
||||
algorithm TEXT DEFAULT 'majority',
|
||||
confidence REAL,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (swarm_id) REFERENCES swarms(id)
|
||||
);
|
||||
`);
|
||||
spinner.text = 'Database schema created successfully';
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user