import type { SearchProviderId, SearchResponse } from "../types"; /** Shared web search parameters passed to providers. */ export interface SearchParams { query: string; limit?: number; recency?: "day" | "week" | "month" | "year"; systemPrompt: string; signal?: AbortSignal; maxOutputTokens?: number; numSearchResults?: number; temperature?: number; allowedDomains?: string[]; blockedDomains?: string[]; maxUses?: number; userLocation?: { type: "approximate"; city?: string; region?: string; country?: string; timezone?: string; }; googleSearch?: Record; codeExecution?: Record; urlContext?: Record; } /** Base class for web search providers. */ export abstract class SearchProvider { abstract readonly id: SearchProviderId; abstract readonly label: string; abstract isAvailable(): Promise | boolean; abstract search(params: SearchParams): Promise; }