/** * In-memory knowledge base for the TypeScript smooth-operator core. * * A minimal lexical-overlap retriever — the Phase-0 sibling of the Rust engine's * in-memory lexical store and the Python core's `InMemoryKnowledge`. Documents * are scored by token overlap with the query; the top-k are returned. When * nothing overlaps, the first k documents are returned anyway so the agent still * has context to ground (or honestly decline) against. */ export interface KnowledgeHit { content: string; source: string; score: number; } /** * A retriever: returns the most relevant documents for a query. Both the lexical * {@link InMemoryKnowledge} and the embedding-backed `VectorKnowledge` satisfy * this, so the agent accepts either. */ export interface Knowledge { query(query: string, topK?: number): KnowledgeHit[]; } export declare class InMemoryKnowledge { private readonly docs; /** Add a document to the knowledge base. */ ingest(content: string, source: string): void; /** Return up to `topK` documents, ranked by token overlap with `query`. */ query(query: string, topK?: number): KnowledgeHit[]; } //# sourceMappingURL=knowledge.d.ts.map