/**
 * MandateAudit — append-only, hash-chained audit of every mandate gate decision.
 *
 * Every gate decision (ALLOW and DENY alike) is recorded. The hash chain (each
 * entry embeds the hash of the previous one) makes a deletion or edit detectable
 * (threat-model T8): break any link and `verifyChain()` reports the first broken
 * index. The chain head is surfaced read-only for the operator. An external,
 * out-of-process sink is a follow-on hardening, called out in the spec.
 *
 * Accountability after the fact is what makes ahead-of-time delegation safe: a
 * misbehaving mandate is killable AND every action it authorized is reconstructable.
 */
import type { MandateAuditEntry, MandateDecision } from './types.js';
/** Canonical bytes an entry's hash covers — field-ordered, hash EXCLUDED. */
export declare function canonicalAuditEntry(e: Omit<MandateAuditEntry, 'hash'>): string;
export interface MandateAuditDeps {
    filePath: string;
    now?: () => number;
}
export declare class MandateAudit {
    private readonly d;
    constructor(deps: MandateAuditDeps);
    /** Append a decision, chaining it to the current head. Returns the new entry. */
    record(input: {
        mandateId: string;
        agentFp: string;
        action: string;
        decision: MandateDecision;
        reason: string;
        conditionResult?: boolean | null;
    }): MandateAuditEntry;
    /** All entries (oldest→newest). Tolerant of a missing file / a torn trailing line. */
    all(): MandateAuditEntry[];
    /** The current chain head hash ('' when empty). */
    headHash(): string;
    /**
     * Verify the hash chain end-to-end. Returns `{ ok: true }` when intact, else
     * `{ ok: false, brokenAt }` with the index of the first entry whose recomputed
     * hash (or prevHash linkage) does not match — the tamper signal.
     */
    verifyChain(): {
        ok: true;
    } | {
        ok: false;
        brokenAt: number;
    };
}
//# sourceMappingURL=MandateAudit.d.ts.map