import { z } from "zod";
import type { AgentTool } from "@kenkaiiii/gg-agent";
import { type GetNetworkPolicy } from "../core/network-guard.js";
export type SearchEngine = "DuckDuckGo" | "DuckDuckGoLite" | "Brave" | "Bing" | "Google";
interface SearchResult {
    title: string;
    url: string;
    snippet: string;
}
/**
 * Normalize a domain to lowercase punycode hostname, defending against Unicode
 * homograph spoofing. Returns null for un-parseable input.
 */
export declare function normalizeDomain(domain: string): string | null;
export declare function canonicalSearchResultUrl(rawURL: string): string | null;
export declare function isAdSearchResultUrl(rawURL: string): boolean;
/** Reject localized/bot-fallback pages that match only a generic query word. */
export declare function isSearchResultRelevant(result: SearchResult, query: string): boolean;
export declare function parseSearchResults(engine: SearchEngine, html: string): SearchResult[];
export declare function resetWebSearchCache(): void;
declare const parameters: z.ZodObject<{
    query: z.ZodString;
    max_results: z.ZodOptional<z.ZodNumber>;
    include_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
    exclude_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
    time_range: z.ZodOptional<z.ZodEnum<{
        month: "month";
        day: "day";
        week: "week";
        year: "year";
    }>>;
}, z.core.$strip>;
export declare function createWebSearchTool(getNetworkPolicy?: GetNetworkPolicy): AgentTool<typeof parameters>;
export {};
//# sourceMappingURL=web-search.d.ts.map