/** * Vector knowledge — embedding-backed semantic retrieval. * * Phase-1 sibling of the reference engines' vector store. `VectorKnowledge` embeds * documents and queries and retrieves by cosine similarity, satisfying the same * {@link Knowledge} interface as the lexical retriever (so the agent accepts * either). The `Embedder` is pluggable: the default `HashEmbedder` is deterministic * and offline (feature-hashed bag-of-words) — good for tests and a zero-dependency * default — while a gateway embedder drops in behind the same interface for true * semantics. */ import type { Knowledge, KnowledgeHit } from './knowledge.js'; /** A small deterministic non-cryptographic hash (FNV-1a, 32-bit). */ export declare function hashToken(token: string): number; export interface Embedder { embed(text: string): number[]; } /** * Deterministic, offline feature-hashing embedder. Hashes each token into one of * `dim` buckets (signed) and L2-normalizes. No learned semantics, but a real * vector with cosine geometry — docs sharing tokens land near each other. */ export declare class HashEmbedder implements Embedder { private readonly dim; constructor(dim?: number); embed(text: string): number[]; } /** An embedding-backed knowledge store with cosine-similarity retrieval. */ export declare class VectorKnowledge implements Knowledge { private readonly embedder; private readonly docs; constructor(embedder?: Embedder); ingest(content: string, source: string): void; query(query: string, topK?: number): KnowledgeHit[]; } //# sourceMappingURL=vector.d.ts.map