/** * Federation registry — load/save/add/remove/list the project-local * `.openlore/federation.json` index-of-indexes manifest, plus per-repo index * liveness evaluation. * * The registry is intentionally tiny and synchronous: it references repos, it is * never a build artifact. Adding or removing a repo edits only this file (and that * repo builds its own index independently) — never a global rebuild. */ import { type ConsultedRepo, type FederationRegistry, type FederationRepoEntry, type RepoIndexState } from './types.js'; /** Absolute path to the federation manifest inside a home repo's `.openlore/`. */ export declare function federationManifestPath(homeDir: string): string; /** * Read a repo's current index fingerprint hash, or null when the repo has no * built index (or the file is unreadable/malformed). */ export declare function readRepoFingerprint(repoPath: string): string | null; /** * Load the federation registry for a home repo. Returns an empty registry when no * manifest exists. Throws only on a present-but-corrupt manifest, so a typo never * silently degrades to "no federation". */ export declare function loadRegistry(homeDir: string): FederationRegistry; /** Persist the registry atomically (write-tmp-then-rename) under `.openlore/`. */ export declare function saveRegistry(homeDir: string, registry: FederationRegistry): void; /** * Add (or refresh) a repo in the home repo's federation registry. Reads the * target's live fingerprint at registration time; a missing index is allowed * (recorded with an empty fingerprint) so a repo can be registered before its * first `openlore analyze`. De-duplicates by absolute path; a duplicate path * refreshes the existing entry rather than appending. */ export declare function addRepo(homeDir: string, repoPath: string, opts?: { name?: string; now?: string; }): { registry: FederationRegistry; entry: FederationRepoEntry; }; /** Remove a repo by name or absolute/relative path. Returns true if one was removed. */ export declare function removeRepo(homeDir: string, nameOrPath: string): boolean; /** List registry entries (sorted by name). */ export declare function listRepos(homeDir: string): FederationRepoEntry[]; /** Classify a registry entry's live index state without loading the graph. */ export declare function evaluateRepoState(entry: FederationRepoEntry): RepoIndexState; /** Build a ConsultedRepo status record (consulted flag set by the caller). */ export declare function repoStatus(entry: FederationRepoEntry, consulted: boolean): ConsultedRepo; //# sourceMappingURL=registry.d.ts.map