/**
 * Durable writers for `acked.jsonl` (T-L3-LOOP LL.4). Append-only writes
 * + mutex-guarded rewrite-and-replace for the periodic 7-day purge.
 *
 * Mutex via `proper-lockfile` (already an opensquid dep — used by
 * `src/runtime/daemon.ts` for PID locking). Lock file lives next to
 * acked.jsonl as `acked.jsonl.lock`; contention is rare (single UPS fire
 * per session) but possible if a stale background process retains a
 * writer.
 *
 * proper-lockfile requires the target file to EXIST before acquiring the
 * lock; we touch via empty `appendFile('')` on the first call before the
 * lock acquisition.
 *
 * Keyed by UMBRELLA (T-CHAT-AS-TERMINAL CAT.1c) — was per-cwd project_uuid;
 * the ack ledger now lives under `umbrellas/<id>/inbox/acked.jsonl`.
 *
 * Imports from: node:fs/promises, node:path, proper-lockfile, ../paths.
 * Imported by: src/runtime/hooks/user-prompt-submit.ts (LL.4 drain block).
 */
import type { AckRow } from './inbox.js';
/**
 * Append a batch of AckRows to the umbrella's acked.jsonl under a
 * proper-lockfile mutex. No-op for empty input. Creates parent dir +
 * touches the target file on first call (proper-lockfile requires
 * existence).
 */
export declare function appendAckRows(umbrellaId: string, rows: readonly AckRow[]): Promise<void>;
/**
 * Atomic rewrite of acked.jsonl after a 7-day purge dropped some rows.
 * Mutex-guarded. Writes to `.tmp` then renames so a reader never observes
 * a half-written file. Empty `kept` produces an empty file (cleared).
 */
export declare function rewriteAckedAfterPurge(umbrellaId: string, kept: readonly AckRow[]): Promise<void>;
//# sourceMappingURL=inbox_writer.d.ts.map