(** LMDB-based event log (matches Vere's implementation) *) type event_num = int64 (** Event number (1-indexed) *) type t (** Event log handle *) val create : ?enabled:bool -> string -> t (** [create ?enabled pier_path] opens or creates an event log at [pier_path/.urb/log]. If [enabled] is false, events are not persisted (default: true). Uses LMDB with two databases: "EVENTS" and "META". *) val close : t -> unit (** [close log] syncs and closes the event log *) val append : ?verbose:bool -> t -> Noun.noun -> event_num (** [append ?verbose log noun] appends [noun] to the log and returns its event number. Events are serialized as: 4-byte mug + jammed noun. *) val read_event : ?verbose:bool -> t -> event_num -> Noun.noun (** [read_event ?verbose log event_num] reads event [event_num] from the log *) val gulf : t -> (event_num * event_num) option (** [gulf log] returns [(first, last)] event numbers in the log, or None if empty *) val replay : ?verbose:bool -> t -> (event_num -> Noun.noun -> unit) -> unit (** [replay ?verbose log callback] replays all events in the log, calling [callback event_num noun] for each event *) val last_event : t -> event_num (** [last_event log] returns the last event number in the log *) val sync : t -> unit (** [sync log] syncs the log to disk *)