export type LedgerVerdict = 'pending' | 'accepted' | 'rejected'; export interface LedgerEntry { child: string; kind: 'completed' | 'blocked'; delivered_at: string; verdict: LedgerVerdict; verdict_at: string | null; verdict_note: string | null; rework_round: number; } export interface AcceptanceLedger { parent: string; project: string; children: Record; } export declare function ledgerPath(project: string, taskId: string): string; /** Read the ledger for a task node. Missing or corrupt file degrades to an empty ledger * (fail-open: worst case a result is re-delivered, never lost). */ export declare function readLedger(project: string, taskId: string): AcceptanceLedger; /** Record that a child result is being delivered to the parent task's manager. * Returns false — meaning "do NOT deliver" — iff the child is already 'accepted' * (cross-incarnation dedupe). A 'rejected' entry re-opens to 'pending' (the child * completed again after rework), preserving its rework_round. */ export declare function recordDelivered(project: string, taskId: string, childId: string, kind: 'completed' | 'blocked'): Promise; /** Record the manager's acceptance verdict for a delivered child. 'rejected' increments * rework_round (the child is expected to be reworked and re-delivered). Upserts when * the entry is missing (e.g. a verdict recorded for a delivery that predates the ledger). */ export declare function recordVerdict(project: string, taskId: string, childId: string, verdict: 'accepted' | 'rejected', note?: string | null): void; /** Entries delivered but not yet accepted/rejected — the rehydration prompt's * "pending acceptance" list (DR-0017 W3). */ export declare function pendingDeliveries(project: string, taskId: string): LedgerEntry[];