/** * Navidrome MCP Server - Timeouts * Copyright (C) 2025 * SPDX-License-Identifier: AGPL-3.0-or-later */ export declare const SINGLE_VALIDATION_TIMEOUT_MS = 8000; export declare const BATCH_VALIDATION_TIMEOUT_MS = 3000; export declare const DISCOVERY_VALIDATION_TIMEOUT_MS = 3000; export declare const MAX_VALIDATION_TIMEOUT_MS = 30000; export declare const MIN_VALIDATION_TIMEOUT_MS = 1000; export declare const RADIO_VALIDATION: { readonly HEAD_TIMEOUT_RATIO: 0.6; readonly SAMPLE_BUFFER_SIZE: 8192; }; /** Property reads and writes, seek and stop are in-memory work for mpv, so a reply slower than 2s * means mpv is wedged. */ export declare const MPV_COMMAND_TIMEOUT_QUICK_MS = 2000; /** loadfile and loadlist open a remote stream, and Navidrome may be cold-starting a transcode. */ export declare const MPV_COMMAND_TIMEOUT_LOAD_MS = 5000; /** mpv binds the IPC socket a moment after spawn. Fast-failing attempts give 50 x 100ms = 5s, and * hung attempts can each add MPV_IPC_CONNECT_TIMEOUT_MS, for a worst case near 55s. */ export declare const MPV_IPC_CONNECT_RETRIES = 50; export declare const MPV_IPC_CONNECT_DELAY_MS = 100; /** An existing mpv answers fast, so attach skips the post-spawn budget. */ export declare const MPV_ATTACH_CONNECT_RETRIES = 3; export declare const MPV_ATTACH_CONNECT_DELAY_MS = 50; /** A local IPC connect settles in single-digit ms, so a slower attempt counts as hung. */ export declare const MPV_IPC_CONNECT_TIMEOUT_MS = 1000; /** The bound on the one-shot quit connection keeps shutdown from waiting on a wedged mpv. */ export declare const MPV_QUIT_SOCKET_TIMEOUT_MS = 1000; export declare const MPV_STALE_SOCKET_PROBE_MS = 100; /** Bounds the open_jukebox_remote wait for a spawned player to answer, so a player that never starts cannot hang the call. */ export declare const JUKEBOX_REMOTE_START_TIMEOUT_MS = 15000; export declare const JUKEBOX_REMOTE_START_POLL_MS = 250; /** An mpv the MCP process spawned plays untracked by the web owner for at most this long. */ export declare const WEB_OWNER_ATTACH_INTERVAL_MS = 5000; /** * Generous, because reaping mid-config is worse than a harmless idle loopback server, and its own * ephemeral port means a lingering one never blocks a freshly launched player. */ export declare const SETTINGS_PAGE_IDLE_TIMEOUT_MS: number; /** An echo is a local IPC round trip of milliseconds, so only a wedged or gone mpv hits this. */ export declare const SCROBBLE_CLAIM_ECHO_TIMEOUT_MS = 5000; /** The headless mpv filter check took 313 ms when measured. */ export declare const MPV_VISUALIZER_VALIDATE_TIMEOUT_MS = 10000; export declare const MPV_AUDIO_DEVICE_PROBE_TIMEOUT_MS = 5000; /** Windows re-registered a lost output under a new id within 1 s when measured. A longer outage may * mean the device was turned off on purpose, so playback then stays paused. */ export declare const AUDIO_OUTPUT_RESUME_WINDOW_MS = 5000; /** A check that timed out or failed to start says nothing about the filter, so its result is * dropped after this delay and the next request reruns it. */ export declare const MPV_VISUALIZER_VALIDATE_RETRY_MS = 60000; /** A fresh mpv waits this long for the filter check before its first track. A slower check leaves * that track without the filter but does not delay the play. */ export declare const MPV_VISUALIZER_SPAWN_WAIT_MS = 1000; export declare const VISUALIZER_FEED_RETRY_MS = 3000; export declare const VISUALIZER_FEED_GRACE_MS = 5000; /** Reverse proxies close an idle stream, nginx after 60 s, so a quiet SSE stream sends a comment * this often. The interval also bounds how long a dead client lingers. */ export declare const SSE_HEARTBEAT_MS = 10000; export declare const GUEST_ONLINE_WINDOW_MS: number; export declare const MPV_LOAD_COMMANDS: ReadonlySet; /** 15s covers cold-cache listing endpoints on a healthy server. Most respond in under 1s. */ export declare const DEFAULT_NAVIDROME_REQUEST_TIMEOUT_MS = 15000; /** Login is one round trip (DB lookup, bcrypt, JWT mint), so this sits below the request timeout * and a wedged login fails fast. */ export declare const DEFAULT_NAVIDROME_AUTH_TIMEOUT_MS = 10000; export declare const DEFAULT_EXTERNAL_API_TIMEOUT_MS = 15000; /** The cap on an env override keeps timeout plus retry, 25s x 2 = 50s, under the MCP SDK's 60s * `DEFAULT_REQUEST_TIMEOUT_MSEC`. */ export declare const MAX_FETCH_TIMEOUT_MS = 25000; /** A sub-second env override would fail a healthy but slow connection. */ export declare const MIN_FETCH_TIMEOUT_MS = 1000; /** A longer `Retry-After` wait on a login 429 would push a tool call past the SDK's 60s limit. */ export declare const MAX_AUTH_RATE_LIMIT_WAIT_MS = 25000; /** Navidrome's default login window, the wait when a 429 has no usable `Retry-After`. */ export declare const NAVIDROME_LOGIN_RATE_LIMIT_WINDOW_MS = 20000; /** The token renews this long before its `exp` claim, so a request in flight never carries an expired token. */ export declare const NAVIDROME_TOKEN_EXPIRY_MARGIN_MS = 60000; //# sourceMappingURL=timeouts.d.ts.map