claude-flow 3.7.0-alpha.3 → 3.7.0-alpha.4

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",
3
+ "version": "3.7.0-alpha.4",
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",
@@ -662,7 +662,19 @@ export const neuralTools = [
662
662
  features: {
663
663
  hnsw: true,
664
664
  quantization: true,
665
- flashAttention: false,
665
+ // #1770: probe the real loader instead of returning a literal false.
666
+ // Was hardcoded false, which contradicted hooks_intelligence_stats's
667
+ // simultaneous claim of `implementation: real-flash-attention`.
668
+ // The two surfaces now agree on a single source of truth.
669
+ flashAttention: await (async () => {
670
+ try {
671
+ const { getFlashAttention } = await import('../ruvector/flash-attention.js');
672
+ return getFlashAttention() !== null;
673
+ }
674
+ catch {
675
+ return false;
676
+ }
677
+ })(),
666
678
  reasoningBank: true,
667
679
  },
668
680
  };
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
14
14
  import { homedir } from 'node:os';
15
+ import { createRequire } from 'node:module';
15
16
  import { join } from 'node:path';
16
17
  // ============================================================================
17
18
  // Persistence Configuration
@@ -563,21 +564,37 @@ class LocalReasoningBank {
563
564
  // ============================================================================
564
565
  let ruvllmCoordinator = null;
565
566
  let ruvllmLoaded = false;
566
- async function loadRuvllmCoordinator() {
567
+ /**
568
+ * Synchronously load the @ruvector/ruvllm SonaCoordinator. Used both by the
569
+ * async init path (initializeIntelligence) and by sync stat readers like
570
+ * getIntelligenceStats — the dashboard would otherwise report "unavailable"
571
+ * when stats are queried before any async init has fired (#1770).
572
+ */
573
+ function loadRuvllmCoordinatorSync() {
567
574
  if (ruvllmLoaded)
568
575
  return ruvllmCoordinator;
569
576
  ruvllmLoaded = true;
570
577
  try {
571
- const { createRequire } = await import('module');
572
578
  const requireCjs = createRequire(import.meta.url);
573
579
  const ruvllm = requireCjs('@ruvector/ruvllm');
574
580
  ruvllmCoordinator = new ruvllm.SonaCoordinator(ruvllm.DEFAULT_SONA_CONFIG);
575
581
  return ruvllmCoordinator;
576
582
  }
577
- catch {
583
+ catch (err) {
584
+ // Surface the reason on debug builds so future regressions of #1770 don't
585
+ // disappear silently. Stays quiet by default to avoid noise on the cli's
586
+ // hot path (e.g., npx invocations).
587
+ if (process.env.CLAUDE_FLOW_DEBUG) {
588
+ // eslint-disable-next-line no-console
589
+ console.error('[ruvllm] SonaCoordinator load failed, falling back to JS:', err.message);
590
+ }
591
+ ruvllmCoordinator = null;
578
592
  return null;
579
593
  }
580
594
  }
595
+ async function loadRuvllmCoordinator() {
596
+ return loadRuvllmCoordinatorSync();
597
+ }
581
598
  // ============================================================================
582
599
  // Module State
583
600
  // ============================================================================
@@ -879,6 +896,14 @@ export async function findSimilarPatterns(query, options) {
879
896
  export function getIntelligenceStats() {
880
897
  const sonaStats = sonaCoordinator?.stats();
881
898
  const bankStats = reasoningBank?.stats();
899
+ // Lazy-init the ruvllm coordinator if it hasn't been loaded yet. The MCP
900
+ // dashboard (`hooks_intelligence_stats`) hits this path before any
901
+ // initializeIntelligence() call has fired, so the coordinator field would
902
+ // otherwise stay null and the dashboard would report "unavailable" even
903
+ // when @ruvector/ruvllm is fully resolvable. Sync require — cheap, idempotent.
904
+ if (!ruvllmLoaded) {
905
+ loadRuvllmCoordinatorSync();
906
+ }
882
907
  const ruvllmStats = ruvllmCoordinator?.stats?.() || null;
883
908
  // Fetch cross-module stats for unified reporting
884
909
  let contrastiveTrainer = 'unavailable';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.7.0-alpha.3",
3
+ "version": "3.7.0-alpha.4",
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",