import type { ResearchSource } from "./community-research.js"; /** * Real ResearchFetcher plan for the community-research scout. * * The actual tool calls are made by the parent LLM (which holds the * WebSearch + FetchURL tools). This module composes the structured prompts * the parent should issue, biased per source to push toward trusted URLs. * * Usage flow: * 1. The parent reads the source picker output (from the discussion skill). * 2. Parent calls `createWebFetcherPlan(source)` to get the prompt templates. * 3. Parent issues `WebSearch(searchPrompt(query))` and pipes candidate URLs * back through `scoreEntry` or directly into the scout's `ResearchFetcher`. * 4. For each candidate URL, parent issues `FetchURL(fetchPrompt(url))` to * confirm the page renders the topic content. * 5. Parent assembles the `ResearchSourceEntry[]` and hands the structured * result back to `runCommunityResearch()` via the `ResearchFetcher` seam. * * This module is the structured-research bridge between the discussion flow * and the parent LLM's web tools. It does NOT spawn a sub-agent — the * discussion sub-agent (when invoked) has the same tools and the same plan. */ export interface WebFetcherPlan { /** Prompt the parent should send when calling `WebSearch` for the given source. */ searchPrompt: (query: string) => string; /** Prompt the parent should send when calling `FetchURL` for a candidate URL. */ fetchPrompt: (url: string) => string; /** Human-readable label for the source (used in UI / log lines). */ label: string; } /** * Build the source-specific prompt templates the parent should use when * invoking `WebSearch` and `FetchURL`. The returned object is pure data — * no tool calls happen here. */ export declare function createWebFetcherPlan(source: ResearchSource): WebFetcherPlan; /** * All four source keys in their canonical order. Useful when the discussion * handler needs to enumerate them (e.g. for the source picker). */ export declare const RESEARCH_SOURCES: readonly ["web", "official", "community", "similar"]; /** * Human-readable source picker options. The discussion handler embeds these * verbatim in the AskUserQuestion call. */ export declare const SOURCE_PICKER_OPTIONS: ReadonlyArray<{ label: string; description: string; }>;