import { G as SearchFilterCapabilities, H as ProviderConfig, S as SearchProvider, d as ProviderImageSearchCapabilities, f as ProviderReadCapabilities, i as ImageSearchProvider, m as ProviderSearchCapabilities, o as Provider, s as ProviderCapabilities, u as ProviderConstructor, y as ReadProvider } from "./provider-BeqDw0W2.mjs"; //#region src/core/registry.d.ts /** * One provider the registry knows: the metadata every listing and capability lookup answers from, * plus a loader for the class. A built-in entry's `load` is a literal `import()` of its module, so * the module runs on the first `create()` for that name and never on package import. */ interface ProviderEntry { readonly name: string; /** API key variable; `null` when registering is enough to count as configured; absent derives `_API_KEY`. */ readonly apiKeyEnvVar?: string | null; /** Local configuration check for providers whose credentials are more than one variable. */ readonly isConfigured?: () => boolean; /** Whether instances answer `isAvailable()`, so discovery can probe without loading the rest. */ readonly availability?: boolean; /** Search capability as discovery reports it; absent when the provider does not search. */ readonly search?: Omit; /** Reverse image search capability; absent when the provider does not implement it. */ readonly searchImage?: Omit; /** URL reader capability; absent when the provider does not read. */ readonly read?: Omit; /** Resolves the provider class. */ readonly load: () => Promise; } /** * Register a provider class living outside the package. * The class's static metadata and its prototype decide what discovery reports; registering a name * again shadows the previous entry until the returned function removes the registration. * @param {ProviderConstructor} provider - Provider class to register. * @returns {() => void} A function that removes this registration when it is still current. */ declare function register(provider: ProviderConstructor): () => void; /** * Create a provider instance by name. * Imports a built-in provider's module on the first call for its name; the module map shares one * import between parallel callers. Resolves apiKey from config or the provider's env var. * @param {string} name - Registered provider name. * @param {ProviderConfig} config - Provider configuration. * @returns {Promise} Configured provider instance. */ declare function create(name: string, config?: Readonly): Promise; /** * Create a provider that implements text search. * @param name - Registered provider name. * @param config - Provider configuration. * @returns {Promise} A provider with search support. */ declare function createSearchProvider(name: string, config?: Readonly): Promise; /** * Create a provider that implements reverse image search. * @param name - Registered provider name. * @param config - Provider configuration. * @returns {Promise} A provider with reverse image search support. */ declare function createImageSearchProvider(name: string, config?: Readonly): Promise; /** * Create a provider that implements URL reading. * @param name - Registered provider name. * @param config - Provider configuration. * @returns {Promise} A provider with read support. */ declare function createReadProvider(name: string, config?: Readonly): Promise; /** * Return every registered provider name, built-ins first in manifest order. * @returns {string[]} Registered provider names. */ declare function providers(): string[]; /** * Return registered providers that implement text search. * @returns {string[]} Search provider names. */ declare function searchProviders(): string[]; /** * Return registered providers that implement reverse image search. * @returns {string[]} Image search provider names. */ declare function searchImageProviders(): string[]; /** * Return registered providers that implement URL reading. * @returns {string[]} Read provider names. */ declare function readProviders(): string[]; /** * Return the API key variable declared by a provider or derived from its name. * @param {string} name - Registered or prospective provider name. * @returns {string | null} Environment variable name, or null for a keyless provider. */ declare function getProviderApiKeyEnvVar(name: string): string | null; /** * Check local credentials without a network request or token refresh. * @param name - Registered provider name. * @returns {boolean} Whether selection from the environment can use this provider. */ declare function isProviderConfigured(name: string): boolean; declare function getSearchFilterCapabilities(name: string): SearchFilterCapabilities | undefined; /** * Return the complete operation matrix a registered provider declares. * Optional details stay absent for custom providers that only implement methods. * @param name - Registered provider name. * @returns {ProviderCapabilities | undefined} Capability metadata, or undefined when the provider is not registered. */ declare function getProviderCapabilities(name: string): ProviderCapabilities | undefined; declare function has(name: string): boolean; //#endregion export { createSearchProvider as a, getSearchFilterCapabilities as c, providers as d, readProviders as f, searchProviders as h, createReadProvider as i, has as l, searchImageProviders as m, create as n, getProviderApiKeyEnvVar as o, register as p, createImageSearchProvider as r, getProviderCapabilities as s, ProviderEntry as t, isProviderConfigured as u }; //# sourceMappingURL=registry-8-px3fxS.d.mts.map