import { IncomingMessage, ServerResponse } from 'http'; type NextFunction = (error?: Error) => void; type MiddlewareFunction = (req: IncomingMessage, res: ServerResponse, next: NextFunction) => void; /** * Manages Server-Sent Events for federation hot reload in local development * Only active when running in development mode with dev server */ export declare class FederationBuildNotifier { private connections; private cleanupInterval; private isActive; private endpoint; /** * Initializes the SSE reloader for local development */ initialize(endpoint: string): void; /** * Creates SSE middleware for federation events */ createEventMiddleware(removeBaseHref: (req: IncomingMessage) => string): MiddlewareFunction; /** * Sets up a new SSE connection */ private _setupSSEConnection; /** * Removes a connection from the pool */ private _removeConnection; /** * Broadcasts an event to all connected clients * Only works in local development mode */ private _broadcastEvent; /** * Sends an event to a specific response stream */ private _sendEvent; /** * Starts periodic cleanup of dead connections */ private startCleanup; /** * Notifies about successful federation rebuild */ broadcastBuildCompletion(): void; /** * Notifies about cancellation of a federation rebuild */ broadcastBuildCancellation(): void; /** * Notifies about failed federation rebuild */ broadcastBuildError(error: unknown): void; /** * Stops cleanup and closes all connections * Should be called when development server stops */ stopEventServer(): void; /** * Returns the number of active connections */ get activeConnections(): number; /** * Returns whether the reloader is active */ get isRunning(): boolean; } export declare const federationBuildNotifier: FederationBuildNotifier; export {};