/** * Embedding model loader. * * Lazy-loads all-MiniLM-L6-v2 via @xenova/transformers (optional dep). * Model is ~22MB, cached to disk after first download. * Runs in pure JS/WASM -- no native bindings needed. * * @module agent-threat-rules/embedding/model-loader */ export interface EmbeddingModel { /** Encode text to embedding vector */ encode(text: string): Promise; /** Encode multiple texts (batched) */ encodeBatch(texts: readonly string[]): Promise; /** Initialize / load the model */ initialize(): Promise; /** Model output dimension */ readonly dimension: number; /** Whether model is loaded */ readonly isLoaded: boolean; } export declare class TransformersJSModel implements EmbeddingModel { readonly dimension = 384; private pipeline; get isLoaded(): boolean; /** Lazy-load the model on first use */ initialize(): Promise; encode(text: string): Promise; encodeBatch(texts: readonly string[]): Promise; } /** Create a no-op model for testing */ export declare class MockEmbeddingModel implements EmbeddingModel { readonly dimension = 384; readonly isLoaded = true; private readonly mockVectors; constructor(mockVectors?: Map); initialize(): Promise; encode(text: string): Promise; encodeBatch(texts: readonly string[]): Promise; } //# sourceMappingURL=model-loader.d.ts.map