/** * Web Researcher — Performs structured online research with * content scoring, entity extraction, and cross-source validation. * * Works in two modes: * 1. Plan mode: generates search queries + strategy for MCP host * 2. Process mode: takes fetched pages and produces structured findings */ export interface WebSource { url: string; title: string; snippet: string; fetchedAt: string; relevanceScore: number; domain: string; } export interface WebFinding { text: string; confidence: "high" | "medium" | "low"; sourceUrls: string[]; category: FindingCategory; entities: string[]; } export type FindingCategory = "best-practice" | "user-need" | "pain-point" | "market-data" | "design-pattern" | "technical-constraint" | "competitor-insight" | "regulatory" | "general"; export interface WebResearchResult { topic: string; sources: WebSource[]; findings: WebFinding[]; crossValidated: WebFinding[]; gaps: string[]; summary: string; researchedAt: string; } export interface ResearchPlan { queries: string[]; strategy: string; expectedSources: number; focusAreas: FindingCategory[]; } /** * Build a comprehensive research plan with multiple query angles. */ export declare function buildResearchPlan(topic: string, options?: { depth?: "quick" | "standard" | "deep"; focus?: FindingCategory[]; }): ResearchPlan; interface FetchedPage { url: string; title: string; content: string; } /** * Process fetched web content into structured, scored findings * with cross-source validation. */ export declare function processWebContent(topic: string, pages: FetchedPage[]): WebResearchResult; /** * Fetch a URL and return its text content (HTML stripped). */ export declare function fetchUrl(url: string, options?: { timeoutMs?: number; }): Promise<{ url: string; title: string; content: string; ok: boolean; error?: string; }>; /** * Research a topic by fetching explicit URLs, stripping HTML, * and producing structured findings via processWebContent(). */ export declare function executeWebResearch(topic: string, urls: string[], options?: { timeoutMs?: number; concurrency?: number; }): Promise; export interface WebResearchPlanResult { plan: ResearchPlan; /** Call with fetched page data to produce findings. */ processResults: (pages: FetchedPage[]) => WebResearchResult; } /** * Build a research plan and return it along with a callback * to process results. This allows MCP hosts or Claude agents * to perform the actual fetching. */ export declare function executeWebResearchWithPlan(topic: string, options?: { depth?: "quick" | "standard" | "deep"; focus?: FindingCategory[]; }): WebResearchPlanResult; export {};