import type { HttpClient, RequestOptions } from "../http.js"; import type { ContextParams, ContextResponse, SearchParams, SearchResponse } from "../types.js"; /** * Asking the system what it knows. * * Two methods, and they answer different questions. `search` returns ranked * records for a person or a UI. `context` returns prose for a model, bounded * by TOKENS rather than by row count - which is the only bound that expresses * the real constraint, since ten long memories overflow a window that fifty * short ones fit inside. * * `search` is a GET and `context` is a POST, matching the API: a search is * linkable and cacheable, while a context request can carry two hundred * excluded ids and every proxy in between has its own idea of how long a URL * may be. */ export declare class Search { #private; constructor(http: HttpClient); /** * Ranked results, with an account of how they were found. * * Read `diagnostics.degraded` before showing the results. Search degrades * rather than fails - with embeddings unavailable it falls back to * deterministic retrieval and still answers - and a UI that cannot tell * degraded from healthy tells the user the system knows nothing when it is * merely looking with one eye. */ query(params: SearchParams, options?: RequestOptions): Promise; /** * A context window, assembled and ready to paste into a prompt. * * A POST that is safe to repeat - it reads and returns, it writes nothing - * so this is one of the few places where retrying without an idempotency key * would be harmless. It still is not retried by default: the request loop * decides by METHOD, and a per-endpoint exception is a rule that holds until * someone adds a POST next to it that does write. */ context(params: ContextParams, options?: RequestOptions): Promise; }