import type { ImageOpts, GenerateResult } from "./base.js";
import type { VideoGenerateOptions, VideoGenerateResult } from "./video/types.js";
import type { TtsProvider } from "./tts/types.js";
import type { MusicGenerateOptions, MusicGenerateResult } from "./audio/types.js";
export type Capability = "image" | "video" | "tts" | "music";
interface MediaProviderBase {
    name: string;
    capability: Capability;
    /** Declarative env var whose presence makes the provider available. */
    envKey: string;
    /** Exactly one provider per capability is the default. */
    default?: boolean;
}
export interface ImageMediaProvider extends MediaProviderBase {
    capability: "image";
    /** Human-readable label. Optional so test fakes stay terse. */
    displayName?: string;
    generateImage(opts: ImageOpts): Promise<GenerateResult>;
}
export interface VideoMediaProvider extends MediaProviderBase {
    capability: "video";
    /** Human-readable label for the generation dialog (e.g. "Seedance 2.0"). */
    displayName: string;
    generateVideo(opts: VideoGenerateOptions): Promise<VideoGenerateResult>;
}
export interface TtsMediaProvider extends MediaProviderBase {
    capability: "tts";
    /** The underlying TtsProvider singleton. Synthesis routes through the
     *  fallback chain (generateWithFallback in ./tts/registry.js), not here —
     *  this entry exists so TTS participates in list/default/availability. */
    tts: TtsProvider;
}
export interface MusicMediaProvider extends MediaProviderBase {
    capability: "music";
    /** Human-readable label for the generation dialog (e.g. "Lyria 3 Pro"). */
    displayName: string;
    /**
     * The keyless singleton adapter. The HTTP route reuses THIS registry entry
     * (entry.generateMusic) and injects config.openrouter.apiKey per-call via
     * opts.apiKey — it does NOT construct its own provider. The key therefore
     * comes from the user's config.yaml (not process.env), and this entry lets
     * music participate in list/default/availability + provider validation.
     */
    generateMusic(opts: MusicGenerateOptions): Promise<MusicGenerateResult>;
}
export type MediaProvider = ImageMediaProvider | VideoMediaProvider | TtsMediaProvider | MusicMediaProvider;
export declare function registerProvider(p: MediaProvider): void;
/** Overloads so callers get the precise capability-specific type back. */
export declare function getProvider(capability: "image", name: string): ImageMediaProvider | undefined;
export declare function getProvider(capability: "video", name: string): VideoMediaProvider | undefined;
export declare function getProvider(capability: "tts", name: string): TtsMediaProvider | undefined;
export declare function getProvider(capability: "music", name: string): MusicMediaProvider | undefined;
export declare function getProvider(capability: Capability, name: string): MediaProvider | undefined;
/** The default provider for a capability: the one flagged `default:true`, else
 *  the first registered for that capability. Deterministic, not order-fragile. */
export declare function getDefaultProvider(capability: "image"): ImageMediaProvider | undefined;
export declare function getDefaultProvider(capability: "video"): VideoMediaProvider | undefined;
export declare function getDefaultProvider(capability: "tts"): TtsMediaProvider | undefined;
export declare function getDefaultProvider(capability: "music"): MusicMediaProvider | undefined;
export declare function getDefaultProvider(capability: Capability): MediaProvider | undefined;
export interface ProviderListing {
    name: string;
    capability: Capability;
    envKey: string;
    default: boolean;
    /** True when the provider's envKey is present in the environment. edge-tts is
     *  a local binary and is always reported available. */
    available: boolean;
}
/** Lists providers, optionally filtered to one capability. */
export declare function listProviders(capability?: Capability): ProviderListing[];
/** Test/teardown seam — clears the registry. */
export declare function _resetProviders(): void;
/**
 * Assemble every capability in one place. Video + TTS are registered statically
 * on import (see registerStaticProviders); this adds the keyed image provider
 * (OpenRouter gpt-5.4-image-2) once a key is present, and re-asserts the static
 * set so a fresh process / reset has them too.
 */
export declare function initProviders(config: {
    openrouter?: {
        apiKey?: string;
    };
}): Promise<void>;
export {};
//# sourceMappingURL=registry.d.ts.map