import { type AppEvent, type AppEventPayloads, type AppEventType, type MessageId, type SessionId, type TurnId } from "./app-event.js"; /** Injectable time source so replay tests are deterministic. */ export interface Clock { now(): number; } export declare const systemClock: Clock; export interface IdFactory { event(): string; message(): MessageId; } export declare function createCountingIdFactory(prefix?: string): IdFactory; export declare function createRandomIdFactory(): IdFactory; export declare class EventSequencer { readonly ids: IdFactory; private readonly clock; private seq; private sessionId; constructor(sessionId: SessionId, ids?: IdFactory, clock?: Clock); get current(): number; /** Start a fresh sequence (e.g. after /new remints the session id). */ rebind(sessionId: SessionId): void; build(type: K, payload: AppEventPayloads[K], turnId?: TurnId | undefined): AppEvent; }