/** * Delivery watermark for channel replies. * * A progress notification should carry what just happened, not the whole * accumulated log replayed from the top. Tracking which events have already * been published is what turns a stream of ever-growing, mostly-identical * bodies into one short line per real event. * * The watermark is a set of event ids rather than an index because the event * buffer is trimmed from the front when it hits its cap, which would silently * shift any index-based mark. */ import type { ChannelRenderEvent } from './types.js'; /** Cap; keeps the watermark from growing without bound on a long run. */ export declare const MAX_DELIVERED_EVENT_IDS = 512; export interface DeliveryWatermark { readonly deliveredEventIds: Set; } /** Events not yet published, in buffer order. */ export declare function selectUndeliveredEvents(state: DeliveryWatermark, events: readonly ChannelRenderEvent[]): ChannelRenderEvent[]; /** Record events as published, dropping the oldest marks past the cap. */ export declare function markEventsDelivered(state: DeliveryWatermark, events: readonly ChannelRenderEvent[]): void; //# sourceMappingURL=reply-delta.d.ts.map