🌊 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
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix(embeddings): handle agentic-flow shape change in 3.0.0-alpha.14
Reuven53409aba5fb5
diff --git a/v3/@claude-flow/embeddings/package.json b/v3/@claude-flow/embeddings/package.jsonindex 42b2c00f5b..7e0b9f3b42 100644--- a/v3/@claude-flow/embeddings/package.json+++ b/v3/@claude-flow/embeddings/package.json@@ -1,6 +1,6 @@{"name": "@claude-flow/embeddings",- "version": "3.0.0-alpha.13",+ "version": "3.0.0-alpha.14","description": "V3 Embedding Service - OpenAI, Transformers.js, Agentic-Flow (ONNX), Mock providers with hyperbolic embeddings, normalization, and chunking","type": "module","main": "./dist/index.js",diff --git a/v3/@claude-flow/embeddings/src/neural-integration.ts b/v3/@claude-flow/embeddings/src/neural-integration.tsindex 5b71f5774e..7493432fd2 100644--- a/v3/@claude-flow/embeddings/src/neural-integration.ts+++ b/v3/@claude-flow/embeddings/src/neural-integration.ts@@ -298,8 +298,23 @@ export async function downloadEmbeddingModel(onProgress?: (progress: { percent: number; bytesDownloaded: number; totalBytes: number }) => void): Promise<string> {try {- const { downloadModel } = await import('agentic-flow/embeddings');- return await downloadModel(modelId, targetDir ?? '.models', onProgress);+ const mod = await import('agentic-flow/embeddings').catch((err) => {+ throw err;+ });+ const downloadFn = (mod as Record<string, unknown>).downloadModel;+ if (typeof downloadFn !== 'function') {+ // agentic-flow is installed but has no downloadModel export (the+ // 2.x line shipped clearEmbeddingCache/computeEmbedding* but not+ // downloadModel; the function lives on a different path or version).+ // Treat as lazy-fetch path — @xenova/transformers will download on+ // first generate(). #1700 item 2 follow-up.+ console.warn('[embeddings] agentic-flow installed but does not expose downloadModel — ' ++ 'falling back to lazy fetch via @xenova/transformers on first generate.');+ return targetDir ?? '.models';+ }+ return await (downloadFn as (id: string, dir: string, cb?: typeof onProgress) => Promise<string>)(+ modelId, targetDir ?? '.models', onProgress+ );} catch (err) {const msg = err instanceof Error ? err.message : String(err);// Distinguish "package missing" from real download errors so callers@@ -308,8 +323,6 @@ export async function downloadEmbeddingModel(console.warn('[embeddings] agentic-flow not installed — skipping eager model download. ' +'Models will be fetched lazily by @xenova/transformers on first generate. ' +'For pre-downloaded models, run: npm install agentic-flow');- // Resolve to the target dir as a no-op completion — generate() will- // download via @xenova/transformers when first called.return targetDir ?? '.models';}throw err;