Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv5c76bc894e26
diff --git a/v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts
index 8a7ade452e..0f7a70e7b6 100644
--- a/v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts
+++ b/v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts
@@ -18,14 +18,26 @@ import { join } from 'node:path';
// Try to import real embeddings from @claude-flow/embeddings
let realEmbeddings: { embed: (text: string) => Promise<number[]> } | null = null;
+let embeddingServiceName: string = 'none';
try {
// Dynamic import to avoid hard dependency
const embeddingsModule = await import('@claude-flow/embeddings');
- if (embeddingsModule.SimpleEmbeddings) {
- const embedder = new embeddingsModule.SimpleEmbeddings();
- realEmbeddings = {
- embed: async (text: string) => embedder.embed(text),
- };
+ if (embeddingsModule.createEmbeddingService) {
+ // Try to create agentic-flow service (fastest), fall back to mock
+ try {
+ const service = embeddingsModule.createEmbeddingService({ provider: 'agentic-flow' });
+ realEmbeddings = {
+ embed: async (text: string) => service.embed(text),
+ };
+ embeddingServiceName = 'agentic-flow';
+ } catch {
+ // Fall back to mock service
+ const service = embeddingsModule.createEmbeddingService({ provider: 'mock' });
+ realEmbeddings = {
+ embed: async (text: string) => service.embed(text),
+ };
+ embeddingServiceName = 'mock';
+ }
}
} catch {
// @claude-flow/embeddings not available, will use fallback