/**
 * Keyset (seek) cursor codec for `IEventReadPort.listEvents` (OBS-LIST-1).
 *
 * The list is ordered `occurred_at DESC, id DESC`. The cursor encodes the
 * `(occurredAt, id)` of the last row on the previous page so the next page
 * seeks with `WHERE (occurred_at, id) < (cursorOccurredAt, cursorId)`.
 *
 * The cursor is opaque to consumers: a base64url-encoded JSON tuple. Shape
 * is an implementation detail — never parse it outside this module.
 *
 * Mirrors the jobs keyset codec; kept separate because the events subsystem
 * must not depend on `runtime/subsystems/jobs/`.
 */
interface EventKeyset {
    occurredAt: Date;
    id: string;
}
/** Default page size when `limit` is omitted. */
declare const DEFAULT_EVENT_LIST_LIMIT = 50;
/** Hard upper bound on page size. */
declare const MAX_EVENT_LIST_LIMIT = 200;
/** Clamp a caller-supplied `limit` into `[1, MAX_EVENT_LIST_LIMIT]`. */
declare function clampEventLimit(limit: number | undefined): number;
declare function encodeEventCursor(keyset: EventKeyset): string;
/**
 * Decode an opaque cursor back into its `(occurredAt, id)` keyset. Returns
 * `null` for malformed input so user-supplied garbage is treated as "start
 * from the beginning" rather than throwing.
 */
declare function decodeEventCursor(cursor: string): EventKeyset | null;

export { DEFAULT_EVENT_LIST_LIMIT, type EventKeyset, MAX_EVENT_LIST_LIMIT, clampEventLimit, decodeEventCursor, encodeEventCursor };
