/**
 * GovernanceScopeLedger — Story 14.2 (v1.5)
 *
 * Tamper-evident append-only ledger of every GovernanceDecision.
 *
 * v1.3 wrote a single consent record at decision time. v1.5 promotes this
 * to a SHA-chained JSONL ledger so any post-hoc tampering with an existing
 * entry breaks the chain and is detectable by `verify()`.
 *
 * File: `.openlife/governance-ledger.jsonl` (override via OPENLIFE_STATE_DIR).
 *
 * Chain rules:
 *   • First entry has prevHash = 'GENESIS'.
 *   • Each entry's entryHash = SHA-256( prevHash || JSON.stringify(payload) ).
 *   • verify() walks the file and reports the first index where the chain
 *     breaks. An empty file is considered valid (no entries to verify).
 *
 * The hook into GovernanceLayer.evaluate() is best-effort: a write failure
 * never blocks the decision returned to the caller.
 */
import { GovernanceDecision } from './GovernanceLayer';
export interface GovernanceLedgerEntry {
    index: number;
    ts: string;
    project: string;
    goalHash: string;
    decision: GovernanceDecision;
    prevHash: string;
    entryHash: string;
}
export interface VerifyResult {
    ok: boolean;
    entries: number;
    /** Index of the first broken entry (0-based). Only set when ok=false. */
    brokenAt?: number;
    reason?: string;
}
export declare class GovernanceScopeLedger {
    private readonly file;
    constructor(stateDir?: string);
    path(): string;
    append(goal: string, project: string, decision: GovernanceDecision): GovernanceLedgerEntry;
    read(): GovernanceLedgerEntry[];
    /** Walk the chain. Returns the first broken index when tampering is detected. */
    verify(): VerifyResult;
    private tailHash;
    private size;
}
