export type SearchType = "auto" | "fast" | "deep"; export type LiveCrawlMode = "fallback" | "preferred"; export interface WebSearchOptions { numResults?: number; livecrawl?: LiveCrawlMode; type?: SearchType; contextMaxCharacters?: number; timeout?: number; provider?: string; } export interface CodeSearchOptions { tokensNum?: number; timeout?: number; provider?: string; } export interface SearchResult { title: string; url: string; publishedDate?: string; author?: string; text: string; } export interface WebSearchResponse { success: boolean; query: string; provider: string; results: SearchResult[]; rawText: string; error?: string; } export interface CodeSearchResponse { success: boolean; query: string; provider: string; snippets: string; error?: string; } export interface SearchProvider { name: string; webSearch(query: string, options: WebSearchOptions): Promise; codeSearch?(query: string, options: CodeSearchOptions): Promise; } declare function parseSearchResults(text: string): SearchResult[]; export declare class ExaProvider implements SearchProvider { name: string; webSearch(query: string, options?: WebSearchOptions): Promise; codeSearch(query: string, options?: CodeSearchOptions): Promise; } export declare function registerProvider(provider: SearchProvider): void; export declare function getProvider(name?: string): SearchProvider; export declare function listProviders(): string[]; export declare function webSearch(query: string, options?: WebSearchOptions): Promise; export declare function codeSearch(query: string, options?: CodeSearchOptions): Promise; export declare function webSearchWithFallback(query: string, options?: WebSearchOptions, providerOrder?: string[]): Promise; export declare function clearSearchCache(): void; export declare function getSearchCacheStats(): import("./local-cache").CacheStats; export { ExaProvider as DefaultProvider }; export { parseSearchResults }; export interface SearchConfig { site: string; displayName: string; tips?: string[]; } export interface SearchRecommendation { provider: string; displayName: string; site: string; siteFilter: string; tips: string[]; exampleQueries: string[]; } export declare function getSearchRecommendation(name: string, config: SearchConfig, query: string, location?: string): SearchRecommendation; export interface SearchRecommendationsResult { action_required: "web_search"; search_queries: string[]; instructions: string; } export declare function buildSearchRecommendations(providers: Array<{ name: string; searchConfig: SearchConfig; }>, query: string, location?: string): SearchRecommendationsResult; //# sourceMappingURL=websearch.d.ts.map