/** * Navidrome MCP Server - Web UI Snapshot Broadcaster * Copyright (C) 2025 * SPDX-License-Identifier: AGPL-3.0-or-later */ import type { ServerResponse } from 'node:http'; import type { NavidromeClient } from '../client/navidrome-client.js'; import type { GuestJukebox } from './auth/auth-service.js'; import type { GuestQueue } from './jukebox/guest-queue.js'; type GuestSongs = Pick; /** * Queue and visualizer events skip the property throttle, so a user action shows at once. Host and * guest clients share one build, and each guest client gets the reduced guest snapshot. */ export declare class SseBroadcaster { private readonly client; private readonly guests; private readonly clients; private readonly heldSnapshots; private readonly sentGuestQueues; private guestQueueJson; private guestQueueVersion; private readonly stalls; private lastBroadcastMs; private pendingBroadcastTimer; private heartbeatTimer; private unsubscribe; private buildInFlight; private rebuildRequested; private readonly heartbeatTasks; constructor(client: NavidromeClient, guests: GuestSongs); start(): void; stop(): void; /** Session expiry rides this beat, so it runs while playback is idle and no client is open. */ addHeartbeatTask(task: () => void): void; private sendHeartbeat; addClient(res: ServerResponse): Promise; addGuestClient(res: ServerResponse, sessionId: string, jukebox: () => GuestJukebox | null): Promise; private attach; private handleEvent; /** Immediate fan-out, also used by a player-settings change that no engine event announces. */ broadcastNow(): void; private broadcast; private fanOut; private recordGuestQueue; private guestQueueJsonFor; private handleDrain; private writeToClient; private buildSnapshot; } export {}; //# sourceMappingURL=broadcaster.d.ts.map