/** * Navidrome MCP Server - Web UI Player State / Settings / Shutdown Routes * Copyright (C) 2025 * SPDX-License-Identifier: AGPL-3.0-or-later */ import type { IncomingMessage, ServerResponse } from 'node:http'; import type { Config } from '../../config.js'; import type { SseBroadcaster } from '../broadcaster.js'; /** * `isLocal` serves other clients of this route, since the page reads it from `GET /api/auth/session`. * `lrclibEnabled` shapes only the overlay's empty-state note, since a file tag can carry lyrics. */ export declare function handlePlayerState(req: IncomingMessage, res: ServerResponse, config: Config): void; /** The dispatcher admits only a principal holding `player.settings`, which only a local request holds. */ export declare function handleGetPlayerSettings(res: ServerResponse, config: Config): void; /** * The write merges only the request's webui keys onto the unstripped stored file, so every other * stored key survives. `persisted` is false when the change holds for this session only. */ export declare function handleSetPlayerSettings(req: IncomingMessage, res: ServerResponse, config: Config, broadcaster: Pick): Promise; export declare const MCP_LEASE_PATH = "/api/mcp-lease"; /** The entry point decides what a close means, so the route only counts. */ export interface McpLeaseCounter { open(): void; close(): void; } /** * The response stays open while the MCP lives, and the OS closes the socket when that MCP dies, so * the player counts every MCP using it, not only its spawner. */ export declare function handleMcpLease(req: IncomingMessage, res: ServerResponse, leases: McpLeaseCounter): void; /** The entry point owns the settings server's lifetime, so the route only asks for its URL. */ export interface SettingsPageOpener { open(): Promise; } /** * The dispatcher admits only a principal holding `player.settings`, which only a local request holds. * The settings server binds loopback, so the URL opens only on the player's computer. */ export declare function handleOpenSettingsPage(res: ServerResponse, settingsPage: SettingsPageOpener): Promise; /** The dispatcher admits only a principal holding `player.power`, which only a local request holds. */ export declare function handleShutdown(res: ServerResponse, shutdown: () => void): void; //# sourceMappingURL=player.d.ts.map