/** * Versioned model artifacts on disk, mirroring the existing graph.json / * knowledge.json persistence discipline: plain JSON under ~/.nexus/models/, a * manifest with provenance, and a loader that returns null when absent so every * caller can fall back to the hand-tuned heuristics. Nothing here ever throws on * a missing model — a fresh install simply has no learned models yet. */ import { EmbeddingModel } from "./embedding-model.js"; import type { EmbeddingArtifact, ModelManifest } from "./types.js"; export declare function modelPath(dataDir: string, name: string): string; /** Stable hash of the training corpus — recorded in the manifest so a loader can * tell whether the model is stale relative to current memory. */ export declare function corpusHash(documents: string[]): string; export declare function saveEmbeddingArtifact(dataDir: string, name: string, artifact: EmbeddingArtifact): string; /** Load a trained embedding model, or null if none exists / it is unreadable. */ export declare function loadEmbeddingModel(dataDir: string, name?: string): EmbeddingModel | null; /** Read just the manifest (cheap-ish) for `nexus status` / inspection. */ export declare function loadManifest(dataDir: string, name?: string): ModelManifest | null; export declare function listModels(dataDir: string): string[];