import type { ControlPlaneClientRecord } from '../runtime/store/domains/control-plane.js';
import type { AnyRuntimeEvent, RuntimeEventDomain, RuntimeEventEnvelope } from '../runtime/events/index.js';
import type { ControlPlaneClientDescriptor } from './types.js';
import type { ControlPlaneServerConfig } from './types.js';
export declare const DEFAULT_SERVER_CONFIG: ControlPlaneServerConfig;
export declare const DEFAULT_DOMAINS: readonly RuntimeEventDomain[];
export interface ControlPlaneEventReplayScope {
    readonly clientKind?: string | undefined;
    readonly clientId?: string | undefined;
    readonly routeId?: string | undefined;
    readonly surfaceId?: string | undefined;
    readonly domains?: readonly RuntimeEventDomain[] | undefined;
}
export interface ControlPlaneRecentEvent {
    readonly id: string;
    readonly event: string;
    readonly createdAt: number;
    readonly payload: unknown;
}
export interface ScopedControlPlaneRecentEvent extends ControlPlaneRecentEvent {
    readonly replayScope?: ControlPlaneEventReplayScope | undefined;
}
export interface ControlPlaneReplayClientOptions {
    readonly clientId?: string | undefined;
    readonly clientKind?: string | undefined;
    readonly domains?: readonly RuntimeEventDomain[] | undefined;
    readonly routeId?: string | undefined;
    readonly surfaceId?: string | undefined;
}
export declare function serializeEnvelope(envelope: RuntimeEventEnvelope<AnyRuntimeEvent['type'], AnyRuntimeEvent>): Record<string, unknown>;
export declare function toClientDescriptor(record: ControlPlaneClientRecord): ControlPlaneClientDescriptor;
export declare function normalizeRuntimeDomains(domains: readonly RuntimeEventDomain[] | undefined): RuntimeEventDomain[];
export declare function hasReplayScope(scope: ControlPlaneEventReplayScope): boolean;
export declare function canReplayEventToClient(event: ScopedControlPlaneRecentEvent, options: ControlPlaneReplayClientOptions): boolean;
export declare function stripReplayScope(event: ScopedControlPlaneRecentEvent): ControlPlaneRecentEvent;
export declare function pruneDisconnectedClientRecords(clients: Map<string, ControlPlaneClientRecord>, now?: number): void;
//# sourceMappingURL=gateway-utils.d.ts.map