/** Validate a target is NOT latched (the ordinary, non-reopen doorway). Reads * `final_report` fresh — never a caller-supplied snapshot. Throws * `node_finalized` when latched; otherwise a no-op (the common case). No * side effect either way. */ export declare function assertNotFinalized(nodeId: string): void; /** Validate a target IS latched (the `--reopen` doorway) and return the exact * `final_report` value observed, so the caller can CAS-clear it later via * `commitReopen` — once every OTHER fallible precondition the requested * operation needs has already passed (e.g. `--fresh`'s recoverable-state * check). Throws `not_finalized` when the target has nothing to clear. Pure * read — never mutates. */ export declare function assertFinalizedForReopen(nodeId: string): string; /** Clear `nodeId`'s finalization latch — retract-pointer-only (only * `final_report`/`finalized_at`; the report file and every delivered feed * event are untouched). CAS'd against `expectedFinalReport` (the value the * caller observed via `assertFinalizedForReopen`): if the row no longer * matches — a concurrent `--reopen` already cleared it, or (impossible * without a reopen in between, but defended anyway) a fresh final landed — * this throws `reopen_latch_changed` instead of silently clobbering a newer * canonical result. Callers MUST NOT proceed to revive/deliver when this * throws. */ export declare function commitReopen(nodeId: string, expectedFinalReport: string): void; /** Convenience wrapper for a doorway with NO intervening fallible step between * the gate check and the reopen clear (`node lifecycle revive` has nothing * fallible between the gate and `reviveNode`). Validates and, when `reopen`, * clears in one call. * * - `reopen` false + latched → throws `node_finalized`. * - `reopen` true + latched → CAS-clears the latch (side effect) and returns. * - `reopen` true + not latched → throws `not_finalized`. * - `reopen` false + not latched → no-op (the common case). */ export declare function assertReopenGate(nodeId: string, reopen: boolean): void;