/**
 * RemoteAckStore — durable queue for operator-bound attention acks that target
 * an attention item OWNED BY A DIFFERENT MACHINE (WS4.1 follow-up, CMT-1416).
 *
 * The problem this closes: when an operator acknowledges/resolves a pooled
 * attention item whose owner is briefly offline, the ack PATCH is lost — the
 * operator's intent evaporates and the item reappears OPEN on the owner's
 * return. This store persists the ack INTENT (with the authenticated operator
 * principal that performed it) so it survives the owner being dark; a drain
 * tick + a boot sweep re-deliver it when the owner comes back.
 *
 * Design constraints (mirrors RemoteCloseAudit / PendingInboundStore):
 *   - Append-then-compact JSONL under logs/ — no DB dependency.
 *   - Each pending ack is idempotent on (itemId, targetMachineId): a re-ack of
 *     the same item just refreshes the intent, never stacks duplicates.
 *   - The operator principal is carried as data the OWNER revalidates at apply
 *     time — this store never authorizes anything, it only remembers intent.
 *   - Best-effort writes; a failed append/compact logs loudly (an unrecorded
 *     ack-intent deserves a trace) but never throws into the ack path.
 *
 * This file ships behind the dark gate multiMachine.seamlessness.ws41DurableAck:
 * when off, the route that feeds it 503s and the store is never constructed, so
 * a single-machine or flag-off agent is a strict no-op.
 */
export interface PendingRemoteAck {
    /** Attention item id on the OWNING machine. */
    itemId: string;
    /** Registry lookup key for the owning machine (never a URL). */
    targetMachineId: string;
    /** Normalized attention status the operator chose (e.g. DONE, ACKNOWLEDGED). */
    status: string;
    /** Authenticated operator principal that performed the ack (data the owner
     *  revalidates — never trusted as authorization by this store). */
    operatorUid: string;
    /** Operator display name (for the owner's audit; not load-bearing). */
    operatorDisplayName?: string;
    /** When the operator's intent was first captured (ISO). */
    enqueuedAt: string;
    /** Delivery attempts so far (drain backoff / give-up bound). */
    attempts: number;
    /** Last delivery attempt outcome class, for observability. */
    lastOutcome?: 'pending' | 'unreachable' | 'rejected' | 'stale-superseded';
}
export declare class RemoteAckStore {
    private readonly log;
    private readonly filePath;
    /** Keyed on `${itemId}::${targetMachineId}` — idempotent intent. */
    private readonly pending;
    private loaded;
    constructor(stateDir: string, log?: (msg: string) => void);
    private key;
    private ensureLoaded;
    private append;
    /**
     * Record (or refresh) the operator's ack intent for an item owned elsewhere.
     * Idempotent on (itemId, targetMachineId): a repeat ack updates status/principal
     * and resets attempts rather than stacking a second pending row.
     */
    enqueue(intent: Omit<PendingRemoteAck, 'enqueuedAt' | 'attempts' | 'lastOutcome'>): PendingRemoteAck;
    /** Mark a delivery attempt's outcome (drain observability + backoff input). */
    recordAttempt(itemId: string, targetMachineId: string, outcome: PendingRemoteAck['lastOutcome']): void;
    /** Remove a delivered (or owner-rejected-as-stale) intent — terminal. */
    resolve(itemId: string, targetMachineId: string): void;
    /** All still-pending intents (for the drain tick / boot sweep / observability). */
    list(): PendingRemoteAck[];
    /** Pending intents targeting one machine (drain when that peer comes online). */
    listForMachine(targetMachineId: string): PendingRemoteAck[];
    /** Count of still-pending intents (cheap status read). */
    get size(): number;
}
//# sourceMappingURL=RemoteAckStore.d.ts.map