moflo 4.8.34 → 4.8.35

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": "moflo",
3
- "version": "4.8.34",
3
+ "version": "4.8.35",
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",
@@ -730,24 +730,36 @@ async function checkSemanticQuality() {
730
730
  };
731
731
  }
732
732
  }
733
- // Check memory-backed patterns (populated by pretrain) as a fallback for neural checks
734
- async function checkMemoryPatterns(namespace) {
733
+ // Check memory-backed patterns (populated by pretrain) as a fallback for neural checks.
734
+ // Uses the same pattern-search handler that pretrain writes to.
735
+ async function checkMemoryPatterns(_namespace) {
735
736
  try {
736
- // @ts-ignore memory is not in tsconfig project references but is available at runtime
737
- const memoryMod = await import('../../../../memory/dist/index.js');
738
- if (memoryMod.search) {
739
- const results = await memoryMod.search({ query: 'pattern', namespace, limit: 1 });
740
- return results?.length ?? 0;
741
- }
742
- // Fallback: try AgentDB route
743
- if (memoryMod.getStore) {
744
- const store = memoryMod.getStore();
745
- const entries = store?.list?.(namespace) ?? [];
746
- return entries.length;
737
+ // Use the pattern-search handler (same store pretrain writes to)
738
+ const hooksMod = await import('../mcp-tools/hooks-tools.js');
739
+ if (hooksMod.hooksPatternSearch) {
740
+ const result = await hooksMod.hooksPatternSearch.handler({
741
+ query: 'pretrain',
742
+ topK: 1,
743
+ minConfidence: 0.1,
744
+ });
745
+ const matches = result?.results;
746
+ if (Array.isArray(matches))
747
+ return matches.length;
747
748
  }
748
749
  }
749
750
  catch {
750
- // Memory module not available
751
+ // hooks module not available
752
+ }
753
+ // Secondary fallback: check the memory DB file exists
754
+ try {
755
+ const { existsSync } = await import('fs');
756
+ const { join } = await import('path');
757
+ const dbPath = join(process.cwd(), '.claude', 'memory.db');
758
+ if (existsSync(dbPath))
759
+ return 1;
760
+ }
761
+ catch {
762
+ // fs not available
751
763
  }
752
764
  return 0;
753
765
  }
@@ -2,5 +2,5 @@
2
2
  * Auto-generated by build. Do not edit manually.
3
3
  * Source of truth: root package.json → scripts/sync-version.mjs
4
4
  */
5
- export const VERSION = '4.8.34';
5
+ export const VERSION = '4.8.35';
6
6
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moflo/cli",
3
- "version": "4.8.34",
3
+ "version": "4.8.35",
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",