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

rUvd65a92cf5af5
diff --git a/v3/@claude-flow/embeddings/src/embedding-service.ts b/v3/@claude-flow/embeddings/src/embedding-service.ts
index 0ecf11a98d..5e60052094 100644
--- a/v3/@claude-flow/embeddings/src/embedding-service.ts
+++ b/v3/@claude-flow/embeddings/src/embedding-service.ts
@@ -788,6 +788,35 @@ async function isAgenticFlowAvailable(): Promise<boolean> {
}
}
+/**
+ * Auto-install agentic-flow and initialize model
+ */
+async function autoInstallAgenticFlow(): Promise<boolean> {
+ const { exec } = await import('child_process');
+ const { promisify } = await import('util');
+ const execAsync = promisify(exec);
+
+ try {
+ // Check if already available
+ if (await isAgenticFlowAvailable()) {
+ return true;
+ }
+
+ console.log('[embeddings] Installing agentic-flow@alpha...');
+ await execAsync('npm install agentic-flow@alpha --save', { timeout: 120000 });
+
+ // Initialize the model
+ console.log('[embeddings] Downloading embedding model...');
+ await execAsync('npx agentic-flow@alpha embeddings init', { timeout: 300000 });
+
+ // Verify installation
+ return await isAgenticFlowAvailable();
+ } catch (error) {
+ console.warn('[embeddings] Auto-install failed:', error instanceof Error ? error.message : error);
+ return false;
+ }
+}
+
/**
* Create embedding service based on configuration (sync version)
* Note: For 'auto' provider or smart fallback, use createEmbeddingServiceAsync