diff --git a/v3/@claude-flow/embeddings/src/types.ts b/v3/@claude-flow/embeddings/src/types.ts index eece889a8a..f4d39b4faf 100644 --- a/v3/@claude-flow/embeddings/src/types.ts +++ b/v3/@claude-flow/embeddings/src/types.ts @@ -92,13 +92,41 @@ export interface MockEmbeddingConfig extends EmbeddingBaseConfig { simulatedLatency?: number; } +/** + * Agentic-flow provider configuration + * Uses optimized ONNX embeddings with: + * - Float32Array with flattened matrices + * - 256-entry LRU cache with FNV-1a hash + * - SIMD-friendly loop unrolling (4x) + * - Pre-allocated buffers (no GC pressure) + */ +export interface AgenticFlowEmbeddingConfig extends EmbeddingBaseConfig { + provider: 'agentic-flow'; + + /** Model ID (default: all-MiniLM-L6-v2) */ + modelId?: string; + + /** Embedding dimensions (default: 384) */ + dimensions?: number; + + /** Internal cache size for embedder (default: 256) */ + embedderCacheSize?: number; + + /** Model directory path */ + modelDir?: string; + + /** Auto-download model if not present */ + autoDownload?: boolean; +} + /** * Union of all provider configs */ export type EmbeddingConfig = | OpenAIEmbeddingConfig | TransformersEmbeddingConfig - | MockEmbeddingConfig; + | MockEmbeddingConfig + | AgenticFlowEmbeddingConfig; // ============================================================================ // Result Types