/** * Optional dense leg for capability retrieval. * * A separate embsearch store from the repo index, for two reasons that both had * to hold. The repo service goes **dormant below a byte threshold**, and a * capability index that stops working in a small repo is worse than none โ€” the * whole point is finding tools, which have nothing to do with how much code is * checked out. And the lifecycles do not line up: the repo index invalidates on * file edits, this one on a server appearing or a plugin being installed. * * Everything here is best-effort. It never downloads the binary โ€” it uses one * already on disk, and if there is none, retrieval is lexical-only and says so * rather than waiting. Nothing on this path may block a session or a tool call. * * See docs/plugin-system-architecture.md ยง6.2. */ import { type CapabilityDoc } from "./registry.js"; /** Where a capability index for a given capability-set hash lives. */ export declare function capabilityStoreDir(hash: string, agentDir?: string): string; export interface DenseHit { id: string; score: number; } /** * State of the dense leg, as reported to callers so they can say *why* a search * was lexical-only rather than silently returning fewer results. */ export type DenseState = { status: "off"; reason: string; } | { status: "building"; } | { status: "ready"; count: number; }; export declare function denseState(): DenseState; /** * Bring the dense index up for `docs`, if it can be. Idempotent, and a no-op * when the same capability set is already indexed. * * Returns once the index is usable or has been ruled out. Callers that must not * wait should not await it โ€” {@link denseSearch} works the moment it is ready * and returns nothing before that. */ export declare function ensureDenseIndex(docs: readonly CapabilityDoc[], agentDir?: string): Promise; /** Top `k` dense hits, or nothing when the leg is not ready. Never throws. */ export declare function denseSearch(query: string, k?: number): Promise; /** Shut the daemon down and forget the index. Session teardown, and tests. */ export declare function disposeDenseIndex(): Promise; //# sourceMappingURL=dense.d.ts.map