import { type FactoryEvent, type FactoryRecording } from "@you-agent-factory/client"; import { type FactoryEventSink } from "./event-sink.js"; export interface RecordingFactoryEventSinkOptions { /** Caller-owned recording metadata. The events collection is owned by the sink. */ readonly recording: Omit; /** Maximum number of events retained. A batch that crosses this bound fails whole. */ readonly maxEvents: number; /** Optional asynchronous boundary for backpressure or caller-controlled failure injection. */ readonly beforeWrite?: (events: readonly FactoryEvent[]) => Promise; } /** * Bounded, caller-owned canonical Factory recording. Concurrent writes are * processed in call order and each proposed full recording is validated before * the incoming batch becomes visible. */ export declare class RecordingFactoryEventSink implements FactoryEventSink { #private; constructor(options: RecordingFactoryEventSinkOptions); write(events: readonly FactoryEvent[]): Promise; snapshot(): FactoryRecording; close(): Promise; }