moflo 4.8.7 → 4.8.9
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/build-embeddings.mjs
CHANGED
|
@@ -371,6 +371,26 @@ async function main() {
|
|
|
371
371
|
log('All entries already have embeddings');
|
|
372
372
|
const stats = getEmbeddingStats(db);
|
|
373
373
|
log(`Total: ${stats.withEmbeddings}/${stats.total} entries embedded`);
|
|
374
|
+
|
|
375
|
+
// Update vector-stats cache even on early exit
|
|
376
|
+
try {
|
|
377
|
+
const nsStats = getNamespaceStats(db);
|
|
378
|
+
const dbSizeKB = Math.floor(readFileSync(DB_PATH).length / 1024);
|
|
379
|
+
const hnswExists = existsSync(resolve(projectRoot, '.swarm', 'hnsw.index'))
|
|
380
|
+
|| existsSync(resolve(projectRoot, '.claude-flow', 'hnsw.index'));
|
|
381
|
+
const cacheData = {
|
|
382
|
+
vectorCount: stats.withEmbeddings,
|
|
383
|
+
dbSizeKB,
|
|
384
|
+
namespaces: nsStats.length,
|
|
385
|
+
hasHnsw: hnswExists,
|
|
386
|
+
updatedAt: Date.now(),
|
|
387
|
+
};
|
|
388
|
+
for (const cacheDir of [resolve(projectRoot, '.claude-flow'), resolve(projectRoot, '.swarm')]) {
|
|
389
|
+
if (!existsSync(cacheDir)) mkdirSync(cacheDir, { recursive: true });
|
|
390
|
+
writeFileSync(resolve(cacheDir, 'vector-stats.json'), JSON.stringify(cacheData));
|
|
391
|
+
}
|
|
392
|
+
} catch { /* non-fatal */ }
|
|
393
|
+
|
|
374
394
|
db.close();
|
|
375
395
|
return;
|
|
376
396
|
}
|
|
@@ -501,6 +521,25 @@ async function main() {
|
|
|
501
521
|
|
|
502
522
|
log('═══════════════════════════════════════════════════════════');
|
|
503
523
|
|
|
524
|
+
// Update vector-stats cache for statusline display
|
|
525
|
+
try {
|
|
526
|
+
const dbSizeKB = Math.floor(readFileSync(DB_PATH).length / 1024);
|
|
527
|
+
const hnswExists = existsSync(resolve(projectRoot, '.swarm', 'hnsw.index'))
|
|
528
|
+
|| existsSync(resolve(projectRoot, '.claude-flow', 'hnsw.index'));
|
|
529
|
+
const cacheData = {
|
|
530
|
+
vectorCount: stats.withEmbeddings,
|
|
531
|
+
dbSizeKB,
|
|
532
|
+
namespaces: nsStats.length,
|
|
533
|
+
hasHnsw: hnswExists,
|
|
534
|
+
updatedAt: Date.now(),
|
|
535
|
+
};
|
|
536
|
+
// Write to both locations so statusline finds it regardless of which dir it checks
|
|
537
|
+
for (const cacheDir of [resolve(projectRoot, '.claude-flow'), resolve(projectRoot, '.swarm')]) {
|
|
538
|
+
if (!existsSync(cacheDir)) mkdirSync(cacheDir, { recursive: true });
|
|
539
|
+
writeFileSync(resolve(cacheDir, 'vector-stats.json'), JSON.stringify(cacheData));
|
|
540
|
+
}
|
|
541
|
+
} catch { /* non-fatal */ }
|
|
542
|
+
|
|
504
543
|
db.close();
|
|
505
544
|
}
|
|
506
545
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moflo",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.9",
|
|
4
4
|
"description": "MoFlo — AI agent orchestration for Claude Code. Forked from ruflo/claude-flow with patches applied to source, plus feature-level orchestration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moflo/cli",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MoFlo CLI — AI agent orchestration with specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|