export interface SSEManager { addConnection(userId: string, controller: ReadableStreamDefaultController): void; removeConnection(userId: string, controller: ReadableStreamDefaultController): void; /** Number of live connections for a user (used to enforce a per-user cap). */ connectionCount(userId: string): number; notifyUser(userId: string, data: unknown): void; notifyAll(data: unknown): void; isOnline(userId: string): boolean; getOnlineUserIds(): string[]; } /** * In-process SSE connection registry. **Process-local by design** — presence * (`isOnline`, `getOnlineUserIds`) only sees connections owned by this * process, and there is no cross-instance seam. On multi-instance or * serverless deployments that means: * * - `isOnline` false-negatives for users whose stream lives on another * instance: the service skips their live SSE event and falls back to push * (delivery still happens, via the heavier channel, provided they have a * push subscription). * - `recipients: 'online'` broadcasts only reach the users connected to the * instance that runs `send()`. * * Treat the notification system as single-instance until a shared presence * backend exists — the same assumption the in-memory rate-limit store and the * forgot-password serverless note document. See docs/AUTH.md → Known * Limitations & Security Gaps. */ export declare function createSSEManager(): SSEManager;