/** * Skill-library snapshot assembly for drift scanning. * * `computeDriftSignals` (evolution-core) is a pure function over a plain * snapshot; this module converts a SkillLibrary-like reader into that * snapshot. Quality score and usage-window status are caller-provided — * when absent they stay `undefined`, which the signal layer reports as * `unknown` (never a fabricated verdict). */ import { type DriftSkillSnapshot, type SkillLiveness } from '@lmzhen/dsh-evolution-core'; /** Minimal SkillLibrary surface needed for snapshot assembly. */ export interface SkillLibraryLike { list(): Promise>; read(name: string): Promise; } export interface SnapshotOptions { /** E-9 (v18): called when one skill's body cannot be read; the scan skips * that skill instead of aborting the whole run. */ onReadError?: ((name: string, error: unknown) => void) | undefined; /** Support-file relative paths per skill name, when the caller has them. */ supportFiles?: ReadonlyMap | undefined; /** Parsed frontmatter description per skill name, when available. */ descriptions?: ReadonlyMap | undefined; /** Quality score per skill name, when the caller computed it. */ quality?: ReadonlyMap | undefined; /** Protection marker per skill name (0.3.11). */ protected?: ReadonlyMap | undefined; /** Skills whose frontmatter the strict-YAML catalog cannot load (0.3.11). */ catalogInvalid?: ReadonlyMap | undefined; /** Usage observation window status (library-wide, applied to every snapshot * — the same value the facts block injects). The probe reads it straight off * the snapshot (E-36): without it the probe always answered 'unknown' while * the facts block reported the enrichment value. */ usageObserved?: boolean | undefined; /** Per-support-file read counts per skill (design §5.5). */ demand?: ReadonlyMap>> | undefined; /** Idle age per skill (design §5.6). */ liveness?: ReadonlyMap | undefined; /** Support-file char counts for files that can exceed the cap (design §16.6). */ supportChars?: ReadonlyMap>> | undefined; } /** * Assemble drift snapshots from a library reader and optional enrichment. * Missing enrichment stays `undefined` → signal layer reports `unknown`. */ export declare function snapshotFromLibrary(library: SkillLibraryLike, options?: SnapshotOptions): Promise; //# sourceMappingURL=drift-scan.d.ts.map