export interface Encoder { encode(text: string): Promise; encodeAll(texts: string[]): Promise; } /** * Local encoder that produces deterministic pseudo-embeddings from text. * Uses n-gram hashing to spread tokens across a fixed-dimensional vector. * NOTE: Real semantic routing requires a real embedding model. * In production, replace with HNSWEncoder backed by a proper embedding model. */ export declare class LocalEncoder implements Encoder { private readonly DIM; private static readonly MAX_CACHE; private cache; encode(text: string): Promise; encodeAll(texts: string[]): Promise; } /** * Production encoder backed by a real embedding model. * * The model is injected by the host (the CLI wires in a local * `@huggingface/transformers` feature-extraction pipeline) so this package * carries no model dependency. When no embedder is injected it degrades to the * deterministic {@link LocalEncoder}. */ export declare class HNSWEncoder implements Encoder { private fallback; private embed?; /** * @param embed Optional real embedding function. When provided it is used * exclusively — the hash-based LocalEncoder is NOT mixed in, since combining * vectors of different dimensionality would break cosine comparison. */ constructor(embed?: (text: string) => Promise); encode(text: string): Promise; encodeAll(texts: string[]): Promise; } //# sourceMappingURL=encoder.d.ts.map