import { type HealthResult } from "./contract.js";
export declare const HEALTH_RESULT_PATH = ".lisa/health/latest.json";
export declare const MAX_HEALTH_RESULT_BYTES: number;
/** Non-throwing read outcome for persisted runtime health state. */
export type HealthReadResult = {
    readonly status: "available";
    readonly result: HealthResult;
    readonly lastRun: string;
} | {
    readonly status: "never-run";
} | {
    readonly status: "unreadable";
    readonly reason: string;
};
/** Atomic write or monotonic no-op outcome. */
export type HealthWriteResult = {
    readonly status: "written";
    readonly path: string;
    readonly result: HealthResult;
} | {
    readonly status: "unchanged";
    readonly path: string;
    readonly result: HealthResult;
};
/**
 * Read the canonical latest result without throwing for runtime-state faults.
 * @param projectRoot - Project containing runtime health state
 * @returns Available, never-run, or unreadable outcome
 */
export declare function readLatestHealthResult(projectRoot: string): Promise<HealthReadResult>;
/**
 * Validate and atomically publish a completed result. Writes are serialized,
 * and an older or equal completion timestamp cannot replace a newer result.
 * @param projectRoot - Project receiving runtime health state
 * @param candidate - Untrusted completed result candidate
 * @returns Written or monotonic unchanged outcome
 */
export declare function writeLatestHealthResult(projectRoot: string, candidate: unknown): Promise<HealthWriteResult>;
/**
 * Validate and serialize one Health v1 result using the storage wire format.
 * Consumers use this function so emitted bytes cannot drift from persisted
 * bytes.
 * @param candidate - Untrusted completed result candidate
 * @returns Canonical bounded JSON payload, including its trailing newline
 */
export declare function serializeHealthResult(candidate: unknown): string;
//# sourceMappingURL=storage.d.ts.map