/** * searchBlocks — public search entry point. * * Scores a unified document set (block summaries + historical messages) * and returns ranked results. The model uses search to cheaply locate * detail that compression folded into summaries, then decompresses the * owning block for the full content. * * Two entry points: * - searchBlocks() — sync. Works for all lexical algorithms. * - searchBlocksAsync() — async. Also supports embedding-based semantic * algorithms whose score() returns a Promise. */ import type { CompressionState } from "../types.js"; import type { SearchDoc, MessageInput } from "./types.js"; import type { SearchResult, SearchOptions } from "./types.js"; /** Build SearchDoc[] from all blocks (active AND inactive) of the state. */ export declare function blockDocs(state: CompressionState): SearchDoc[]; /** * Build SearchDoc[] from historical messages supplied by the host. The host * (pai-acp) reads these from the append-only session log — they include the * original text of messages that compression later folded into block summaries. * * `ownerOf(ref)` maps a message ref to the block id that compressed it, so a * message hit tells the model exactly which block to decompress for detail. */ export declare function messageDocs(msgs: MessageInput[]): SearchDoc[]; /** Sync entry — throws for async algorithms. Pass docs from blockDocs() + messageDocs(). */ export declare function searchBlocks(docs: SearchDoc[], query: string, options?: SearchOptions): SearchResult[]; export declare function searchBlocksAsync(docs: SearchDoc[], query: string, options?: SearchOptions): Promise; //# sourceMappingURL=index.d.ts.map