/** * Model provisioning assert. * * WHY THIS EXISTS — a measured failure, not a hypothetical. * * The first `proven-blocked` baseline was produced on a machine whose model * cache was already warm. Relocating the cache and re-running showed the truth: * the embedding weights are NOT git-tracked (they live under * `node_modules/.../@huggingface/transformers/.cache`), so a genuinely clean * checkout has no model, and the first embedding call DOWNLOADS ~91MB. * * Worse, the harness was hiding it. The `searchMethod` probe ran BEFORE the * network guard was installed, so the download happened outside the guarded * window and the report still said "0 attempts". A check whose failure * condition has been quietly moved out of its own scope is not a check. * * Stop-condition clauses 3 ("clean checkout") and 4 ("no network at query * time") are jointly unsatisfiable if the first query fetches a model. The * ruling: weights are provisioned by an explicit, documented, NON-QUERY-TIME * step, and the eval ASSERTS their presence and fails loudly rather than ever * fetching them. * * @module v1/cli/knowledge/eval/model-presence */ export interface ModelPresence { model: string; present: boolean; /** Where the weights were found, or the locations searched if absent. */ resolvedPath: string | null; searched: string[]; bytes: number; /** How the weights got there — the provisioning story, on the artefact. */ provenance: 'node_modules cache (populated by a prior run or an explicit warm step)' | 'not provisioned'; } export declare function checkModelPresence(searchRoots?: string[]): ModelPresence; /** Throws unless the weights are already on disk. Never fetches. */ export declare function assertModelProvisioned(searchRoots?: string[]): ModelPresence; /** * The explicit, NON-QUERY-TIME provisioning step. * * This is the only place in the eval path permitted to touch the network, it * must be invoked deliberately (`monomind doc eval --provision-model`), and it * never runs as a side effect of measuring anything. That separation is the * whole point: it makes "clean checkout" and "zero network at query time" * jointly satisfiable, which they are not when the first query downloads 90MB. */ export declare function provisionModel(log: (m: string) => void): Promise; /** Check whether the reranker ONNX weights are present on disk. */ export declare function checkRerankerPresence(searchRoots?: string[]): ModelPresence; /** Provision the cross-encoder reranker model (ettin-32m). Same separation as * the embedding model: explicit, non-query-time, never a side-effect. */ export declare function provisionReranker(log: (m: string) => void): Promise; //# sourceMappingURL=model-presence.d.ts.map