UNPKG

@boundless-oss/atlas

Version:

Atlas - MCP Server for comprehensive startup project management

68 lines 1.84 kB
export interface Embedding { text: string; vector: number[]; metadata?: Record<string, any>; } export interface SearchResult { text: string; score: number; metadata?: Record<string, any>; } export declare class LocalEmbeddings { private embeddings; /** * Generate a deterministic embedding vector from text using hashing * This is a simple local alternative to using an API */ generateEmbedding(text: string): number[]; /** * Add text with its embedding to the store */ addDocument(id: string, text: string, metadata?: Record<string, any>): void; /** * Compute cosine similarity between two vectors */ private cosineSimilarity; /** * Search for similar documents using cosine similarity */ search(query: string, topK?: number, threshold?: number): SearchResult[]; /** * Clear all embeddings */ clear(): void; /** * Get total number of embeddings */ size(): number; /** * Export embeddings for persistence */ export(): Array<[string, Embedding]>; /** * Import embeddings from export */ import(data: Array<[string, Embedding]>): void; } /** * Create a specialized embeddings store for code search */ export declare class CodeEmbeddings extends LocalEmbeddings { /** * Add code file with enhanced metadata */ addCodeFile(filePath: string, content: string, language: string): void; /** * Extract semantic features from code */ private extractCodeFeatures; /** * Search for code with query understanding */ searchCode(query: string, topK?: number): SearchResult[]; /** * Enhance search query with code-specific understanding */ private enhanceCodeQuery; } //# sourceMappingURL=embeddings.d.ts.map