import { Context } from '@deepseek-ai/cordis'; import z from '@deepseek-ai/schemastery'; import type { WebFetchProvider, WebFetchRequest, WebFetchResult, WebSearchProvider, WebSearchRequest, WebSearchResult } from '@deepseek-ai/dsh-web'; export declare const name = "all-search"; export declare const inject: string[]; export interface Config { /** AnySearch API key. When set, queries use the AnySearch gateway. */ api_key?: string; /** AnySearch MCP endpoint override. */ base_url?: string; /** Firecrawl API key — Bearer quota for /v1/search; also enables Developer Index when AnySearch is configured. */ firecrawl_api_key?: string; /** TinyFish API key — enables TinyFish search and the full-browser fetch provider. */ tinyfish_api_key?: string; /** * Register TinyFish as the fetch provider. Off by default: the host may * already provide a local fetch provider, and two usable fetch providers * raise WEB_PROVIDER_AMBIGUOUS. Enable when the host has no fetch provider * or when `fetchProvider` is pinned to `tinyfish`. */ tinyfish_fetch?: boolean; /** DeepSeek API key — enables DeepSeek Search inside the anysearch wrapper. */ deepseek_api_key?: string; /** * Register DeepSeek as a fetch provider. Off by default for the same reason * as `tinyfish_fetch` — the host usually already supplies a local fetch. * Enable when you want DeepSeek tools/fetch (same key as search). */ deepseek_fetch?: boolean; } export declare const Config: z; export declare const FIRECRAWL_SEARCH_URL = "https://api.firecrawl.dev/v1/search"; export declare const TINYFISH_SEARCH_URL = "https://api.search.tinyfish.ai"; export declare const TINYFISH_FETCH_URL = "https://api.fetch.tinyfish.ai"; export declare const DEEPSEEK_SEARCH_URL = "https://api.deepseek.com/v1/tools/search"; export declare const DEEPSEEK_FETCH_URL = "https://api.deepseek.com/v1/tools/fetch"; export declare function isDeveloperQuery(query: string): boolean; export declare function isNewsQuery(query: string): boolean; export declare function isAcademicQuery(query: string): boolean; export declare class AnysearchProvider implements WebSearchProvider { private readonly apiKey; private readonly baseUrl; readonly id = "anysearch"; constructor(apiKey: string, baseUrl?: string); /** Cheap local check — no network. */ available(): boolean; search(request: WebSearchRequest, signal?: AbortSignal): Promise; private parseResults; } /** Firecrawl general web search. Works keyless; Bearer only when an API key is provided. */ export declare class FirecrawlSearchProvider implements WebSearchProvider { private readonly apiKey?; readonly id = "firecrawl"; constructor(apiKey?: string); available(): boolean; search(request: WebSearchRequest, signal?: AbortSignal): Promise; } export declare class FirecrawlDevProvider implements WebSearchProvider { private readonly apiKey; readonly id = "firecrawl-dev"; constructor(apiKey: string); available(): boolean; search(request: WebSearchRequest, signal?: AbortSignal): Promise; } /** TinyFish search — free structured results, with news and academic modes. */ export declare class TinyFishSearchProvider implements WebSearchProvider { private readonly apiKey; readonly id = "tinyfish"; constructor(apiKey: string); available(): boolean; search(request: WebSearchRequest, signal?: AbortSignal): Promise; } /** * TinyFish fetch — full-browser rendering and clean extraction. * * The seam's fetch result carries only url/statusCode/body, so a per-URL * failure is surfaced as a non-2xx status with the error text as the body. */ export declare class TinyFishFetchProvider implements WebFetchProvider { private readonly apiKey; readonly id = "tinyfish"; constructor(apiKey: string); available(): boolean; fetch(request: WebFetchRequest, signal?: AbortSignal): Promise; } /** DeepSeek Search — self-hosted search API (same Bearer key as chat). */ export declare class DeepSeekSearchProvider implements WebSearchProvider { private readonly apiKey; readonly id = "deepseek"; constructor(apiKey: string); available(): boolean; search(request: WebSearchRequest, signal?: AbortSignal): Promise; } /** * DeepSeek fetch — single-URL markdown extraction via tools/fetch. * Opt-in via `deepseek_fetch` so the host local fetch stays the default. */ export declare class DeepSeekFetchProvider implements WebFetchProvider { private readonly apiKey; readonly id = "deepseek"; constructor(apiKey: string); available(): boolean; fetch(request: WebFetchRequest, signal?: AbortSignal): Promise; } export declare function apply(ctx: Context, config: Config): void;