import type { AuthStorage } from "@oh-my-pi/pi-ai";
import type { SearchProvider } from "./providers/base.js";
import { type SearchProviderId } from "./types.js";
export type { SearchParams } from "./providers/base.js";
export { SearchProvider } from "./providers/base.js";
export { SEARCH_PROVIDER_ORDER } from "./types.js";
/** Cheap, sync metadata accessor — never triggers a provider load. */
export declare function getSearchProviderLabel(id: SearchProviderId): string;
/** Format one provider failure for the user-facing fallback summary. */
export declare function formatSearchProviderFailure(error: unknown, provider: Pick<SearchProvider, "id" | "label">): string;
/** Format the ordered provider fallback failures for terminal/tool output. */
export declare function formatSearchProviderFailures(failures: readonly {
    provider: Pick<SearchProvider, "id" | "label">;
    error: unknown;
}[]): string;
/**
 * Resolve and cache a provider instance. First call for a given id loads the
 * underlying module; subsequent calls return the cached singleton.
 */
export declare function getSearchProvider(id: SearchProviderId): Promise<SearchProvider>;
/** Set the preferred web search provider from settings */
export declare function setPreferredSearchProvider(provider: SearchProviderId | "auto"): void;
/** Set providers that web search should never use, including fallbacks. */
export declare function setExcludedSearchProviders(providers: readonly SearchProviderId[]): void;
/**
 * Determine which providers are configured and currently available.
 * Each candidate is loaded (and its `isAvailable()` called) only as the chain
 * is walked, so unconfigured providers never pay the load cost.
 */
export declare function resolveProviderChain(authStorage: AuthStorage, preferredProvider?: SearchProviderId | "auto"): Promise<SearchProvider[]>;
