import type { DatabaseHandle } from '../store/db.js'; import type { Embedder } from './../embeddings/types.js'; /** * Outcome of a bootstrap check. `reasons` is a cumulative list — the * server prints them on stderr so users understand why a reindex kicked in. */ export interface BootstrapResult { needsReindex: boolean; reasons: string[]; } /** * Validate schema + embedder compatibility on startup and queue any * automatic migrations. Runs BEFORE the first index call. * * Handles three cases: * 1. Brand-new DB: stamp metadata, no reindex. * 2. Model / dim change since last run: wipe embedding state + queue a * full reindex so new vectors are written against the current model. * 3. v1.3.1 → v1.4.0 upgrade (chunks table empty but nodes present, * or old FTS tokenizer): rebuild FTS in place + queue reindex so * chunks_vec gets populated. */ export declare function bootstrap(db: DatabaseHandle, embedder: Embedder): BootstrapResult;