claude-flow 3.7.0-alpha.30 → 3.7.0-alpha.31
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "3.7.0-alpha.
|
|
3
|
+
"version": "3.7.0-alpha.31",
|
|
4
4
|
"description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -838,14 +838,34 @@ export const memoryTools = [
|
|
|
838
838
|
catch { /* ignore */ }
|
|
839
839
|
}
|
|
840
840
|
// AgentDB status
|
|
841
|
+
// #1940: previously used `allEntries.entries.length` for the totals,
|
|
842
|
+
// but `listEntries({})` returns the first 20 entries with a separate
|
|
843
|
+
// `total` field for the full row count. So `memory_bridge_status`
|
|
844
|
+
// reported `totalEntries: 0`...20 even when the DB had hundreds of
|
|
845
|
+
// rows. Use `.total` for the count, and surface the namespaces with
|
|
846
|
+
// entries so the report matches what's actually in the store.
|
|
841
847
|
let agentdbEntries = 0;
|
|
842
848
|
let claudeMemoryEntries = 0;
|
|
849
|
+
const namespaceCounts = {};
|
|
843
850
|
try {
|
|
844
851
|
const { listEntries } = await getMemoryFunctions();
|
|
845
852
|
const allEntries = await listEntries({});
|
|
846
|
-
agentdbEntries = allEntries?.
|
|
853
|
+
agentdbEntries = allEntries?.total
|
|
854
|
+
?? allEntries?.entries?.length ?? 0;
|
|
847
855
|
const claudeEntries = await listEntries({ namespace: 'claude-memories' });
|
|
848
|
-
claudeMemoryEntries = claudeEntries?.
|
|
856
|
+
claudeMemoryEntries = claudeEntries?.total
|
|
857
|
+
?? claudeEntries?.entries?.length ?? 0;
|
|
858
|
+
// Per-namespace counts for the namespaces the reporter referenced
|
|
859
|
+
// (#1940). Best-effort — a namespace with 0 entries is omitted.
|
|
860
|
+
for (const ns of ['default', 'patterns', 'claude-memories', 'auto-memory', 'tasks', 'feedback', 'pretrain']) {
|
|
861
|
+
try {
|
|
862
|
+
const r = await listEntries({ namespace: ns });
|
|
863
|
+
const t = r?.total ?? r?.entries?.length ?? 0;
|
|
864
|
+
if (t > 0)
|
|
865
|
+
namespaceCounts[ns] = t;
|
|
866
|
+
}
|
|
867
|
+
catch { /* skip per-namespace failure */ }
|
|
868
|
+
}
|
|
849
869
|
}
|
|
850
870
|
catch { /* ignore */ }
|
|
851
871
|
// Intelligence status
|
|
@@ -859,9 +879,12 @@ export const memoryTools = [
|
|
|
859
879
|
catch { /* not initialized */ }
|
|
860
880
|
return {
|
|
861
881
|
claudeCode: { memoryFiles: claudeFiles, projects: claudeProjects },
|
|
862
|
-
agentdb: { totalEntries: agentdbEntries, claudeMemoryEntries, backend: 'sql.js + ONNX' },
|
|
882
|
+
agentdb: { totalEntries: agentdbEntries, claudeMemoryEntries, namespaces: namespaceCounts, backend: 'sql.js + ONNX' },
|
|
863
883
|
intelligence,
|
|
864
|
-
|
|
884
|
+
// #1940: report 'connected' whenever ANY namespace has imported
|
|
885
|
+
// content, not just `claude-memories` — the bridge can be in active
|
|
886
|
+
// use from other import paths (e.g. plugin namespaces, task memory).
|
|
887
|
+
bridge: { status: agentdbEntries > 0 ? 'connected' : 'not-synced', embedding: 'all-MiniLM-L6-v2 (384-dim)' },
|
|
865
888
|
};
|
|
866
889
|
},
|
|
867
890
|
},
|
|
@@ -579,6 +579,17 @@ export async function bridgeStoreEntry(options) {
|
|
|
579
579
|
embedding, embedding_dimensions, embedding_model,
|
|
580
580
|
tags, metadata, created_at, updated_at, expires_at, status
|
|
581
581
|
) VALUES (?, ?, ?, ?, 'semantic', ?, ?, ?, ?, ?, ?, ?, ?, 'active')`;
|
|
582
|
+
// #1941: provision a `vector_indexes` row for this namespace before the
|
|
583
|
+
// entry insert. AgentDB's HNSW/router keys lookups by namespace via this
|
|
584
|
+
// table — if it has no row for e.g. `claude-memories`, `memory_search`
|
|
585
|
+
// returns 0 results even when memory_entries holds hundreds of rows for
|
|
586
|
+
// that namespace. INSERT OR IGNORE so existing index rows are preserved.
|
|
587
|
+
try {
|
|
588
|
+
ctx.db
|
|
589
|
+
.prepare(`INSERT OR IGNORE INTO vector_indexes (id, name, dimensions) VALUES (?, ?, ?)`)
|
|
590
|
+
.run(namespace, namespace, dimensions || 384);
|
|
591
|
+
}
|
|
592
|
+
catch { /* vector_indexes may not exist on legacy DBs — fall through */ }
|
|
582
593
|
const stmt = ctx.db.prepare(insertSql);
|
|
583
594
|
stmt.run(id, key, namespace, value, embeddingJson, dimensions || null, model, tags.length > 0 ? JSON.stringify(tags) : null, '{}', now, now, ttl ? now + (ttl * 1000) : null);
|
|
584
595
|
// Phase 2: Write-through to TieredCache
|
|
@@ -1819,6 +1819,15 @@ export async function storeEntry(options) {
|
|
|
1819
1819
|
embeddingDimensions = embResult.dimensions;
|
|
1820
1820
|
embeddingModel = embResult.model;
|
|
1821
1821
|
}
|
|
1822
|
+
// #1941: provision a `vector_indexes` row for this namespace before the
|
|
1823
|
+
// entry insert. The HNSW lookup uses this table to find which namespaces
|
|
1824
|
+
// are indexed — without a row, `memory_search({namespace:"X"})` returns
|
|
1825
|
+
// 0 even when memory_entries holds matching rows. INSERT OR IGNORE
|
|
1826
|
+
// preserves the existing `default` / `patterns` rows.
|
|
1827
|
+
try {
|
|
1828
|
+
db.run(`INSERT OR IGNORE INTO vector_indexes (id, name, dimensions) VALUES (?, ?, ?)`, [namespace, namespace, embeddingDimensions ?? 384]);
|
|
1829
|
+
}
|
|
1830
|
+
catch { /* vector_indexes may not exist on legacy DBs — fall through */ }
|
|
1822
1831
|
// Insert or update entry (upsert mode uses REPLACE)
|
|
1823
1832
|
const insertSql = upsert
|
|
1824
1833
|
? `INSERT OR REPLACE INTO memory_entries (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.7.0-alpha.
|
|
3
|
+
"version": "3.7.0-alpha.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|