import { MultiDbManager } from '../core/multi-db-manager'; import { EmbeddingGenerator } from './embedding-generator'; /** * Coordinates embedding generation for all 5 dimensions. * Syncs embeddings with 5D-DBs using hash-based change detection. */ export declare class EmbeddingPipeline { private dbManager; private embeddingGenerator; private moduleApi; private symbolApi; private dependencyApi; private adrApi; private changeApi; private moduleSummarizer; constructor(dbManager: MultiDbManager, embeddingGenerator: EmbeddingGenerator); /** * Syncs embeddings for all dimensions. * Only generates embeddings for changed/new entities. */ syncEmbeddings(pluginId: string): Promise; /** * Syncs embeddings for a specific dimension. */ syncDimension(dimension: 'X' | 'Y' | 'Z' | 'W' | 'T', pluginId: string, model: string): Promise; /** * Gets all entities for a dimension. */ private getEntitiesForDimension; /** * Extracts content for embedding based on dimension. */ private extractContentForEmbedding; /** * Gets external ID for an entity. */ private getExternalId; /** * Computes content hash for change detection. */ private computeContentHash; /** * Estimates token count from content length (Markdown-optimized). * Markdown has different token densities: * - Code blocks: ~3 chars/token (more tokens per char due to formatting) * - Normal text: ~4 chars/token (standard estimate) * - Tables: ~2.5 chars/token (many separators increase token count) */ private estimateTokens; /** * Optimizes module documentation for embedding while preserving semantic meaning. * Strategy: Keep structure and important information, remove detailed tables. * Aggressively truncates code blocks to signatures only, limits table rows. * * @param content Full markdown content * @param maxTokens Maximum tokens allowed * @returns Optimized content */ private optimizeModuleContentForEmbedding; /** * Extracts only the structure of a module (header, interface/method names, signatures). * Used for hierarchical embeddings where details are in Y-Dimension (Symbols). * Only keeps: Headers, interface/method/class/variable names, first line of code blocks (signatures). * Removes: All tables, code block bodies, normal text. * * @param content Full markdown content * @returns Module structure (header + names + signatures, no details) */ private extractModuleStructure; } //# sourceMappingURL=embedding-pipeline.d.ts.map