/**
 * Perplexity Web Search Provider
 *
 * Supports four auth modes:
 * - Cookies (`PERPLEXITY_COOKIES`) via `www.perplexity.ai/rest/sse/perplexity_ask`
 * - OAuth/session bearer via `AuthStorage` and `www.perplexity.ai/rest/sse/perplexity_ask`
 * - API key (`PERPLEXITY_API_KEY`) via `api.perplexity.ai/chat/completions`
 * - Anonymous via `www.perplexity.ai/rest/sse/perplexity_ask`
 */
import { type AuthStorage, type FetchImpl } from "@pk-nerdsaver-ai/pi-ai";
import type { SearchResponse } from "../../../web/search/types";
import type { SearchParams } from "./base";
import { SearchProvider } from "./base";
export interface PerplexitySearchParams {
    signal?: AbortSignal;
    query: string;
    system_prompt?: string;
    search_recency_filter?: "hour" | "day" | "week" | "month" | "year";
    num_results?: number;
    /** Maximum output tokens. Defaults to 8192. */
    max_tokens?: number;
    /** Sampling temperature (0–1). Lower = more focused/factual. Defaults to 0.2. */
    temperature?: number;
    /** Number of search results to retrieve. Defaults to 20. */
    num_search_results?: number;
    authStorage: AuthStorage;
    sessionId?: string;
    fetch?: FetchImpl;
}
/** Execute Perplexity web search */
export declare function searchPerplexity(params: PerplexitySearchParams): Promise<SearchResponse>;
/** Search provider for Perplexity. */
export declare class PerplexityProvider extends SearchProvider {
    readonly id = "perplexity";
    readonly label = "Perplexity";
    isAvailable(authStorage: AuthStorage): boolean;
    /**
     * Perplexity accepts anonymous browser-style ask requests, but keep auto
     * provider selection credential-gated so a configured provider keeps priority
     * over the anonymous fallback.
     */
    isExplicitlyAvailable(_authStorage: AuthStorage): boolean;
    search(params: SearchParams): Promise<SearchResponse>;
}
