/** * Unified Web Search Tool * * Single tool supporting Anthropic, Perplexity, Exa, Brave, Jina, Kimi, Gemini, Codex, Tavily, Kagi, Z.AI, SearXNG, and Synthetic * providers with provider-specific parameters exposed conditionally. * */ import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core"; import * as z from "zod/v4"; import type { CustomTool } from "../../extensibility/custom-tools/types"; import type { ToolSession } from "../../tools"; import { type SearchRenderDetails } from "./render"; import type { SearchProviderId } from "./types"; /** Web search tool parameters schema */ export declare const webSearchSchema: z.ZodObject<{ query: z.ZodString; recency: z.ZodOptional>; limit: z.ZodOptional; max_tokens: z.ZodOptional; temperature: z.ZodOptional; num_search_results: z.ZodOptional; }, z.core.$strip>; export type SearchToolParams = z.infer; export interface SearchQueryParams extends SearchToolParams { provider?: SearchProviderId | "auto"; } /** * Execute a web search query for CLI/testing workflows. */ export declare function runSearchQuery(params: SearchQueryParams): Promise<{ content: Array<{ type: "text"; text: string; }>; details: SearchRenderDetails; }>; /** * Web search tool implementation. * * Supports Anthropic, Perplexity, Exa, Brave, Jina, Kimi, Gemini, Codex, Z.AI, SearXNG, and Synthetic providers with automatic fallback. * Session is accepted for interface consistency but not used. */ export declare class WebSearchTool implements AgentTool { readonly name = "web_search"; readonly label = "Web Search"; readonly description: string; readonly parameters: z.ZodObject<{ query: z.ZodString; recency: z.ZodOptional>; limit: z.ZodOptional; max_tokens: z.ZodOptional; temperature: z.ZodOptional; num_search_results: z.ZodOptional; }, z.core.$strip>; readonly strict = true; readonly loadMode = "discoverable"; readonly summary = "Search the web for up-to-date information"; constructor(_session: ToolSession); execute(_toolCallId: string, params: SearchToolParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback, _context?: AgentToolContext): Promise>; } /** Web search tool as CustomTool (for TUI rendering support) */ export declare const webSearchCustomTool: CustomTool; export declare function getSearchTools(): CustomTool[]; export { getSearchProvider, setPreferredSearchProvider } from "./provider"; export type { SearchProviderId as SearchProvider, SearchResponse } from "./types"; export { isSearchProviderPreference } from "./types";