/** * Audio-platform registry — enumerates all known MusicBackend implementations * and provides availability helpers. * * A backend is available iff: * - every var in requiredEnv is set (non-empty) in env, AND * - (!requiresVertex || at least one of GOOGLE_CLOUD_PROJECT / VERTEX_PROJECT * / GCLOUD_PROJECT is set in env), AND * - (!requiresGeminiKey || at least one of GEMINI_API_KEYS / GOOGLE_API_KEYS * / GOOGLE_API_KEY is set in env) * * The Gemini-key gate (requiresGeminiKey) covers API-key Gemini products such * as the Lyria 3 music backend: they declare an empty requiredEnv (no single * fixed var) and resolve a key from the pool sources. Gating on the flag — not * the backend id — keeps the rule decoupled from backend identity. * * Vertex credential liveness (ADC token validity) is NOT checked here — that * would require a network call. The check is intentionally env-only so it is * synchronous, pure, and testable. */ import type { MusicBackend, SfxBackend, TtsBackend } from './types.js'; /** All registered music backends, in priority order. */ export declare const MUSIC_BACKENDS: MusicBackend[]; /** * All registered TTS backends, in priority order. `gemini-tts` stays first (the * documented default), with `elevenlabs-tts` as the Gemini-free alternative — * selected explicitly via `--backend elevenlabs-tts` (or auto-picked when it is * the only available backend). */ export declare const TTS_BACKENDS: TtsBackend[]; /** * Returns true if the backend's runtime prerequisites are satisfied in `env`. * Pure and synchronous — no network calls. */ export declare function isMusicBackendAvailable(b: MusicBackend, env?: NodeJS.ProcessEnv): boolean; /** * Returns all music backends that are currently available in `env`. */ export declare function listAvailableMusicBackends(env?: NodeJS.ProcessEnv): MusicBackend[]; /** * Returns the MusicBackend with the given `id`, or throws if not found. * Does NOT check availability — the caller decides whether to gate on it. */ export declare function getMusicBackend(id: string): MusicBackend; /** * Returns true if the TTS backend's runtime prerequisites are satisfied in * `env`. Pure and synchronous — no network calls. * * Backends that set `requiresGeminiKey` (e.g. gemini-tts) declare an empty * requiredEnv (an API-key product, not a fixed env-var product), so * availability additionally requires a Gemini key from the pool sources: at * least one of GEMINI_API_KEYS / GOOGLE_API_KEYS / GOOGLE_API_KEY must be set * and non-empty. Gating on the flag (not the backend id) keeps this rule * decoupled from backend identity and extensible to future TTS backends. */ export declare function isTtsBackendAvailable(b: TtsBackend, env?: NodeJS.ProcessEnv): boolean; /** * Returns all TTS backends that are currently available in `env`. */ export declare function listAvailableTtsBackends(env?: NodeJS.ProcessEnv): TtsBackend[]; /** * Returns the TtsBackend with the given `id`, or throws if not found. * Does NOT check availability — the caller decides whether to gate on it. */ export declare function getTtsBackend(id: string): TtsBackend; /** All registered SFX backends, in priority order. */ export declare const SFX_BACKENDS: SfxBackend[]; /** * Returns true if the SFX backend's runtime prerequisites are satisfied in * `env`. Pure and synchronous — no network calls. */ export declare function isSfxBackendAvailable(b: SfxBackend, env?: NodeJS.ProcessEnv): boolean; /** * Returns all SFX backends that are currently available in `env`. */ export declare function listAvailableSfxBackends(env?: NodeJS.ProcessEnv): SfxBackend[]; /** * Returns the SfxBackend with the given `id`, or throws if not found. * Does NOT check availability — the caller decides whether to gate on it. */ export declare function getSfxBackend(id: string): SfxBackend; //# sourceMappingURL=registry.d.ts.map