/** * Web-search tool — agent tool for searching the public web. * * Pluggable backends resolved at call time based on which API key is * configured (env var or secrets/credentials store): * * 1. Brave Search API (BRAVE_SEARCH_API_KEY) * 2. Tavily (TAVILY_API_KEY) * 3. Exa (EXA_API_KEY) * 4. Firecrawl (FIRECRAWL_API_KEY) * 5. Builder.io (connected Builder credentials) * * The first configured backend wins. If none is configured, the tool * returns a helpful message telling the user which keys to add. * * Connect Builder.io or register BRAVE_SEARCH_API_KEY, TAVILY_API_KEY, * EXA_API_KEY, or FIRECRAWL_API_KEY via app secrets settings or environment * variables. */ import type { ActionEntry } from "../agent/production-agent.js"; import type { CredentialContext } from "../credentials/index.js"; export interface WebSearchResult { title: string; url: string; snippet: string; } export interface WebSearchToolOptions { /** * Resolve a request-scoped secret by key. When not provided the tool falls * back to env-var lookup only. */ resolveSecret?: (key: string) => Promise; /** * Legacy credential resolver retained for older callers. */ resolveCredential?: (key: string, ctx: CredentialContext) => Promise; /** * Legacy credential context callback retained for older callers. */ getCredentialContext?: () => CredentialContext | null; /** * Resolve connected Builder credentials for managed web search. */ resolveBuilderCredentials?: () => Promise; /** * Base URL for Builder-managed web search. */ getBuilderWebSearchBaseUrl?: () => string; /** * Stable attribution headers for Builder-managed API calls. */ getBuilderRequestHeaders?: () => Record; } interface BuilderWebSearchCredentials { privateKey: string | null; publicKey: string | null; userId?: string | null; } /** * Create the web-search tool entry for the agent tool registry. */ export declare function createWebSearchToolEntry(opts?: WebSearchToolOptions): Record; export {}; //# sourceMappingURL=web-search-tool.d.ts.map