export interface UpstreamVersion {
    version: string;
    contentHash?: string | null;
}
export interface PickInstalledInputs {
    /** Upstream version rows (any order). */
    versions: UpstreamVersion[];
    /** Lockfile-recorded version, if any. Highest precedence. */
    lockfileVersion?: string | null;
    /** `version:` from on-disk SKILL.md frontmatter. Second precedence. */
    frontmatterVersion?: string | null;
    /** sha256 (hex) of on-disk SKILL.md content. Lowest precedence. */
    onDiskContentHash?: string | null;
}
/**
 * Decide which upstream version is "installed", given a precedence chain:
 * lockfile > frontmatter > content-hash match.
 *
 * - Lockfile wins unconditionally (even when its version doesn't appear in
 *   the upstream list — the caller still surfaces the recorded version).
 * - Frontmatter only wins when it matches an upstream row (a frontmatter
 *   version that doesn't appear upstream is treated as "unknown" — we
 *   intentionally avoid claiming the user is on a published version they
 *   actually aren't).
 * - Content-hash matches any upstream row whose `contentHash` equals the
 *   on-disk hash (case-insensitive). Sentinel hashes of the form
 *   `sha256:pending:...` are ignored.
 *
 * Returns the matching version string, or `null` when no signal is
 * available.
 */
export declare function pickInstalledVersion(input: PickInstalledInputs): string | null;
/** Read SKILL.md content if it exists; return null otherwise. */
export declare function readSkillMd(skillDir: string): string | null;
/** sha256(hex) of a UTF-8 string. */
export declare function sha256Hex(content: string): string;
