import { type EmbedProvider } from '../providers/embed-provider.js'; import { type VectorStore } from '../providers/vector-store.js'; export interface IndexJobInput { url: string; text: string; contentHash: string; } export interface BackgroundIndexQueueOptions { dbPath: string; embedProvider?: () => Promise; vectorStore?: () => Promise; maxAttempts?: number; syncMode?: boolean; /** Start the background worker on construction. Defaults to true. */ autoStart?: boolean; } /** * SQLite-backed single-worker queue for embedding jobs. Crawls enqueue * {url, text, contentHash}; the worker drains the queue out-of-band so * the crawl/search response path returns without paying per-embed cost. * * Jobs survive process restarts via the on-disk table at `dbPath`. */ export declare class BackgroundIndexQueue { private db; private resolveProvider; private resolveStore; private maxAttempts; private syncMode; private worker; private wake; private stopped; private autoStart; private inflight; constructor(opts: BackgroundIndexQueueOptions); enqueue(job: IndexJobInput): Promise; pendingSize(): number; start(): void; drain(): Promise; shutdown(): void; private kickWorker; private runLoop; private processOne; private processOneInner; } export declare function getBackgroundIndexQueue(): BackgroundIndexQueue; export declare function _resetBackgroundIndexQueueForTest(): void; //# sourceMappingURL=background-queue.d.ts.map