claude-flow 3.5.28 → 3.5.29

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.
@@ -65,7 +65,8 @@ function bootstrapFromMemoryFiles() {
65
65
  var items = fs.readdirSync(candidates[i], { withFileTypes: true, recursive: true });
66
66
  for (var j = 0; j < items.length; j++) {
67
67
  if (items[j].name === "MEMORY.md") {
68
- var fp = items[j].path ? path.join(items[j].path, items[j].name) : path.join(candidates[i], items[j].name);
68
+ var parentDir = items[j].parentPath || items[j].path || candidates[i];
69
+ var fp = path.join(parentDir, items[j].name);
69
70
  files.push(fp);
70
71
  }
71
72
  }
@@ -96,15 +97,24 @@ function bootstrapFromMemoryFiles() {
96
97
 
97
98
  function loadEntries() {
98
99
  var store = readJSON(STORE_PATH);
99
- if (store && store.entries && store.entries.length > 0) {
100
- return store.entries.map(function(e, i) {
100
+ // Support both formats: flat array or { entries: [...] }
101
+ var entries = null;
102
+ if (store) {
103
+ if (Array.isArray(store) && store.length > 0) {
104
+ entries = store;
105
+ } else if (store.entries && store.entries.length > 0) {
106
+ entries = store.entries;
107
+ }
108
+ }
109
+ if (entries) {
110
+ return entries.map(function(e, i) {
101
111
  return {
102
112
  id: e.id || ("entry-" + i),
103
113
  content: e.content || e.value || "",
104
114
  summary: e.summary || e.key || "",
105
115
  category: e.category || e.namespace || "default",
106
116
  confidence: e.confidence || 0.5,
107
- sourceFile: e.sourceFile || "",
117
+ sourceFile: e.sourceFile || (e.metadata && e.metadata.sourceFile) || "",
108
118
  words: tokenize((e.content || e.value || "") + " " + (e.summary || e.key || "")),
109
119
  };
110
120
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.5.28",
3
+ "version": "3.5.29",
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",
@@ -54,7 +54,6 @@
54
54
  "v3:security": "npm run security:audit && npm run security:test"
55
55
  },
56
56
  "dependencies": {
57
- "@ruvector/ruvllm-wasm": "^2.0.0",
58
57
  "semver": "^7.6.0",
59
58
  "zod": "^3.22.4"
60
59
  },
@@ -663,7 +663,8 @@ export function generateIntelligenceStub() {
663
663
  ' var items = fs.readdirSync(candidates[i], { withFileTypes: true, recursive: true });',
664
664
  ' for (var j = 0; j < items.length; j++) {',
665
665
  ' if (items[j].name === "MEMORY.md") {',
666
- ' var fp = items[j].path ? path.join(items[j].path, items[j].name) : path.join(candidates[i], items[j].name);',
666
+ ' var parentDir = items[j].parentPath || items[j].path || candidates[i];',
667
+ ' var fp = path.join(parentDir, items[j].name);',
667
668
  ' files.push(fp);',
668
669
  ' }',
669
670
  ' }',
@@ -695,15 +696,24 @@ export function generateIntelligenceStub() {
695
696
  '// Load entries from auto-memory-store or bootstrap from MEMORY.md',
696
697
  'function loadEntries() {',
697
698
  ' var store = readJSON(STORE_PATH);',
698
- ' if (store && store.entries && store.entries.length > 0) {',
699
- ' return store.entries.map(function(e, i) {',
699
+ ' // Support both formats: flat array or { entries: [...] }',
700
+ ' var entries = null;',
701
+ ' if (store) {',
702
+ ' if (Array.isArray(store) && store.length > 0) {',
703
+ ' entries = store;',
704
+ ' } else if (store.entries && store.entries.length > 0) {',
705
+ ' entries = store.entries;',
706
+ ' }',
707
+ ' }',
708
+ ' if (entries) {',
709
+ ' return entries.map(function(e, i) {',
700
710
  ' return {',
701
711
  ' id: e.id || ("entry-" + i),',
702
712
  ' content: e.content || e.value || "",',
703
713
  ' summary: e.summary || e.key || "",',
704
714
  ' category: e.category || e.namespace || "default",',
705
715
  ' confidence: e.confidence || 0.5,',
706
- ' sourceFile: e.sourceFile || "",',
716
+ ' sourceFile: e.sourceFile || (e.metadata && e.metadata.sourceFile) || "",',
707
717
  ' words: tokenize((e.content || e.value || "") + " " + (e.summary || e.key || "")),',
708
718
  ' };',
709
719
  ' });',
@@ -34,9 +34,6 @@ import { coordinationTools } from './mcp-tools/coordination-tools.js';
34
34
  import { browserTools } from './mcp-tools/browser-tools.js';
35
35
  // Phase 6: AgentDB v3 controller tools
36
36
  import { agentdbTools } from './mcp-tools/agentdb-tools.js';
37
- // RuVector WASM tools
38
- import { ruvllmWasmTools } from './mcp-tools/ruvllm-tools.js';
39
- import { wasmAgentTools } from './mcp-tools/wasm-agent-tools.js';
40
37
  /**
41
38
  * MCP Tool Registry
42
39
  * Maps tool names to their handler functions
@@ -76,9 +73,6 @@ registerTools([
76
73
  ...browserTools,
77
74
  // Phase 6: AgentDB v3 controller tools
78
75
  ...agentdbTools,
79
- // RuVector WASM tools
80
- ...ruvllmWasmTools,
81
- ...wasmAgentTools,
82
76
  ]);
83
77
  /**
84
78
  * MCP Client Error
@@ -20,6 +20,4 @@ export { transferTools } from './transfer-tools.js';
20
20
  export { securityTools } from './security-tools.js';
21
21
  export { embeddingsTools } from './embeddings-tools.js';
22
22
  export { claimsTools } from './claims-tools.js';
23
- export { wasmAgentTools } from './wasm-agent-tools.js';
24
- export { ruvllmWasmTools } from './ruvllm-tools.js';
25
23
  //# sourceMappingURL=index.d.ts.map
@@ -19,6 +19,4 @@ export { transferTools } from './transfer-tools.js';
19
19
  export { securityTools } from './security-tools.js';
20
20
  export { embeddingsTools } from './embeddings-tools.js';
21
21
  export { claimsTools } from './claims-tools.js';
22
- export { wasmAgentTools } from './wasm-agent-tools.js';
23
- export { ruvllmWasmTools } from './ruvllm-tools.js';
24
22
  //# sourceMappingURL=index.js.map
@@ -1315,42 +1315,6 @@ export async function loadEmbeddingModel(options) {
1315
1315
  loadTime: Date.now() - startTime
1316
1316
  };
1317
1317
  }
1318
- // Fallback: Check for ruvector ONNX embedder (bundled MiniLM-L6-v2 since v0.2.15)
1319
- // v0.2.16: LoRA B=0 fix makes AdaptiveEmbedder safe (identity when untrained)
1320
- // Note: isReady() returns false until first embed() call (lazy init), so we
1321
- // skip the isReady() gate and verify with a probe embed instead.
1322
- const ruvector = await import('ruvector').catch(() => null);
1323
- if (ruvector?.initOnnxEmbedder) {
1324
- try {
1325
- await ruvector.initOnnxEmbedder();
1326
- // Fallback: OptimizedOnnxEmbedder (raw ONNX, lazy-inits on first embed)
1327
- const onnxEmb = ruvector.getOptimizedOnnxEmbedder?.();
1328
- if (onnxEmb?.embed) {
1329
- // Probe embed to trigger lazy ONNX init and verify it works
1330
- const probe = await onnxEmb.embed('test');
1331
- if (probe && probe.length > 0 && (Array.isArray(probe) ? probe.some((v) => v !== 0) : true)) {
1332
- if (verbose) {
1333
- console.log(`Loading ruvector ONNX embedder (all-MiniLM-L6-v2, ${probe.length}d)...`);
1334
- }
1335
- embeddingModelState = {
1336
- loaded: true,
1337
- model: (text) => onnxEmb.embed(text),
1338
- tokenizer: null,
1339
- dimensions: probe.length || 384
1340
- };
1341
- return {
1342
- success: true,
1343
- dimensions: probe.length || 384,
1344
- modelName: 'ruvector/onnx',
1345
- loadTime: Date.now() - startTime
1346
- };
1347
- }
1348
- }
1349
- }
1350
- catch {
1351
- // ruvector ONNX init failed, continue to next fallback
1352
- }
1353
- }
1354
1318
  // Legacy fallback: Check for agentic-flow core embeddings
1355
1319
  const agenticFlow = await import('agentic-flow').catch(() => null);
1356
1320
  if (agenticFlow && agenticFlow.embeddings) {
@@ -1414,17 +1378,12 @@ export async function generateEmbedding(text) {
1414
1378
  if (state.model && typeof state.model === 'function') {
1415
1379
  try {
1416
1380
  const output = await state.model(text, { pooling: 'mean', normalize: true });
1417
- // Handle both @xenova/transformers (output.data) and ruvector (plain array) formats
1418
- const embedding = output?.data
1419
- ? Array.from(output.data)
1420
- : Array.isArray(output) ? output : null;
1421
- if (embedding) {
1422
- return {
1423
- embedding,
1424
- dimensions: embedding.length,
1425
- model: 'onnx'
1426
- };
1427
- }
1381
+ const embedding = Array.from(output.data);
1382
+ return {
1383
+ embedding,
1384
+ dimensions: embedding.length,
1385
+ model: 'onnx'
1386
+ };
1428
1387
  }
1429
1388
  catch {
1430
1389
  // Fall through to fallback
@@ -23,8 +23,6 @@ export { FlashAttention, getFlashAttention, resetFlashAttention, computeAttentio
23
23
  export { LoRAAdapter, getLoRAAdapter, resetLoRAAdapter, createLoRAAdapter, adaptEmbedding, trainLoRA, getLoRAStats, DEFAULT_RANK, DEFAULT_ALPHA, INPUT_DIM as LORA_INPUT_DIM, OUTPUT_DIM as LORA_OUTPUT_DIM, type LoRAConfig, type LoRAWeights, type AdaptationResult, type LoRAStats, } from './lora-adapter.js';
24
24
  export { ModelRouter, getModelRouter, resetModelRouter, createModelRouter, routeToModel, routeToModelFull, analyzeTaskComplexity, getModelRouterStats, recordModelOutcome, MODEL_CAPABILITIES, COMPLEXITY_INDICATORS, type ClaudeModel, type ModelRouterConfig, type ModelRoutingResult, type ComplexityAnalysis, } from './model-router.js';
25
25
  export { SemanticRouter, createSemanticRouter, type Intent, type RouteResult, type RouterConfig, } from './semantic-router.js';
26
- export { isRuvllmWasmAvailable, initRuvllmWasm, getRuvllmStatus, createHnswRouter, createSonaInstant, createMicroLora, formatChat, createKvCache, createGenerateConfig, createBufferPool, createInferenceArena, HNSW_MAX_SAFE_PATTERNS, type HnswRouterConfig, type HnswPattern, type HnswRouteResult, type SonaConfig, type MicroLoraConfig, type ChatMessage, type GenerateOptions, type RuvllmStatus, } from './ruvllm-wasm.js';
27
- export { isAgentWasmAvailable, initAgentWasm, createWasmAgent, promptWasmAgent, executeWasmTool, getWasmAgent, listWasmAgents, terminateWasmAgent, getWasmAgentState, getWasmAgentTools, getWasmAgentTodos, exportWasmState, createWasmMcpServer, listGalleryTemplates, getGalleryCount, getGalleryCategories, searchGalleryTemplates, getGalleryTemplate, createAgentFromTemplate, buildRvfContainer, buildRvfFromTemplate, type WasmAgentConfig, type WasmAgentInfo, type GalleryTemplate, type GalleryTemplateDetail, type ToolResult, } from './agent-wasm.js';
28
26
  /**
29
27
  * Check if ruvector packages are available
30
28
  */
@@ -33,10 +33,6 @@ export { FlashAttention, getFlashAttention, resetFlashAttention, computeAttentio
33
33
  export { LoRAAdapter, getLoRAAdapter, resetLoRAAdapter, createLoRAAdapter, adaptEmbedding, trainLoRA, getLoRAStats, DEFAULT_RANK, DEFAULT_ALPHA, INPUT_DIM as LORA_INPUT_DIM, OUTPUT_DIM as LORA_OUTPUT_DIM, } from './lora-adapter.js';
34
34
  export { ModelRouter, getModelRouter, resetModelRouter, createModelRouter, routeToModel, routeToModelFull, analyzeTaskComplexity, getModelRouterStats, recordModelOutcome, MODEL_CAPABILITIES, COMPLEXITY_INDICATORS, } from './model-router.js';
35
35
  export { SemanticRouter, createSemanticRouter, } from './semantic-router.js';
36
- // ── RuVector LLM WASM (inference utilities) ─────────────────
37
- export { isRuvllmWasmAvailable, initRuvllmWasm, getRuvllmStatus, createHnswRouter, createSonaInstant, createMicroLora, formatChat, createKvCache, createGenerateConfig, createBufferPool, createInferenceArena, HNSW_MAX_SAFE_PATTERNS, } from './ruvllm-wasm.js';
38
- // ── Agent WASM (sandboxed agent runtime) ────────────────────
39
- export { isAgentWasmAvailable, initAgentWasm, createWasmAgent, promptWasmAgent, executeWasmTool, getWasmAgent, listWasmAgents, terminateWasmAgent, getWasmAgentState, getWasmAgentTools, getWasmAgentTodos, exportWasmState, createWasmMcpServer, listGalleryTemplates, getGalleryCount, getGalleryCategories, searchGalleryTemplates, getGalleryTemplate, createAgentFromTemplate, buildRvfContainer, buildRvfFromTemplate, } from './agent-wasm.js';
40
36
  /**
41
37
  * Check if ruvector packages are available
42
38
  */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.5.28",
3
+ "version": "3.5.29",
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",
@@ -97,14 +97,11 @@
97
97
  "@claude-flow/guidance": "^3.0.0-alpha.1",
98
98
  "@claude-flow/memory": "^3.0.0-alpha.11",
99
99
  "@claude-flow/plugin-gastown-bridge": "^0.1.3",
100
+ "agentic-flow": "^3.0.0-alpha.1",
100
101
  "@ruvector/attention": "^0.1.4",
101
102
  "@ruvector/learning-wasm": "^0.1.29",
102
103
  "@ruvector/router": "^0.1.27",
103
- "@ruvector/rvagent-wasm": "^0.1.0",
104
- "@ruvector/ruvllm-wasm": "^2.0.2",
105
- "@ruvector/sona": "^0.1.5",
106
- "agentic-flow": "^3.0.0-alpha.1",
107
- "ruvector": "^0.2.16"
104
+ "@ruvector/sona": "^0.1.5"
108
105
  },
109
106
  "publishConfig": {
110
107
  "access": "public",