moflo 4.8.8 → 4.8.10

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.
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moflo",
3
- "version": "4.8.8",
3
+ "version": "4.8.10",
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",
@@ -83,7 +83,7 @@
83
83
  "@types/bcrypt": "^5.0.2",
84
84
  "@types/node": "^20.19.37",
85
85
  "eslint": "^8.0.0",
86
- "moflo": "^4.8.6",
86
+ "moflo": "^4.8.9",
87
87
  "tsx": "^4.21.0",
88
88
  "typescript": "^5.9.3",
89
89
  "vitest": "^4.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moflo/cli",
3
- "version": "4.8.8",
3
+ "version": "4.8.10",
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",