import { type CatalogEntry, type CatalogStatus, type CatalogTarget } from './types.js'; export interface CatalogAsset { id: string; kind: CatalogEntry['kind']; name: string; status: CatalogStatus; targets: CatalogTarget[]; grantedTools: string[]; replacesLegacy: boolean; description: string; tags: string[]; requestedTools: string[]; sha256: string; source: CatalogEntry['source']; /** Digest verified (always false for revoked entries). */ eligible: boolean; /** Verified package directory; absent when verification failed. */ dir?: string; } export interface CatalogDiagnostic { id: string; reason: string; } export interface CatalogSnapshot { assets: CatalogAsset[]; diagnostics: CatalogDiagnostic[]; stateVersion: number | null; } /** Verified, body-free view of the catalog; empty (and file-free) without state. * An unreadable state yields no assets and one `(state)` diagnostic, so * consumers keep their legacy behaviour instead of failing. */ export declare function buildSnapshot(root: string): CatalogSnapshot; /** Active, verified assets that name `target`. */ export declare function eligible(snapshot: CatalogSnapshot, target: CatalogTarget): CatalogAsset[]; export interface CatalogAuditReport { /** False only when an active entry has a problem. */ ok: boolean; configured: boolean; active: number; activeByTarget: Partial>; entries: { id: string; status: CatalogStatus; problems: string[]; }[]; legacyCollisions: { name: string; legacyOrigin: string; catalogId: string; replacesLegacy: boolean; }[]; stale: { id: string; status: CatalogStatus; ageDays: number; }[]; /** Set when state.json exists but cannot be read. */ error?: string; } /** Re-hashes every entry and reports; repairs nothing. */ export declare function catalogAudit(root: string, now?: number): CatalogAuditReport; //# sourceMappingURL=snapshot.d.ts.map