import type { AgentTool } from "@dreb/agent-core";
import { type Static } from "@sinclair/typebox";
import type { ToolDefinition } from "../extensions/types.js";
import { type TruncationResult } from "./truncate.js";
declare const webSearchSchema: import("@sinclair/typebox").TObject<{
    query: import("@sinclair/typebox").TString;
}>;
export type WebSearchToolInput = Static<typeof webSearchSchema>;
export interface WebSearchToolDetails {
    truncation?: TruncationResult;
}
interface SearchResult {
    title: string;
    url: string;
    snippet: string;
}
export interface WebSearchConfig {
    backend?: "ddg" | "searxng" | "brave";
    searxngUrl?: string;
    braveApiKey?: string;
    rateLimitMs?: number;
}
export declare function getSearchConfig(): WebSearchConfig;
export declare function executeSearch(query: string): Promise<SearchResult[]>;
export declare function createWebSearchToolDefinition(_cwd: string): ToolDefinition<typeof webSearchSchema, WebSearchToolDetails | undefined>;
export declare function createWebSearchTool(cwd: string): AgentTool<typeof webSearchSchema>;
export declare const webSearchToolDefinition: ToolDefinition<import("@sinclair/typebox").TObject<{
    query: import("@sinclair/typebox").TString;
}>, WebSearchToolDetails | undefined, any>;
export declare const webSearchTool: AgentTool<import("@sinclair/typebox").TObject<{
    query: import("@sinclair/typebox").TString;
}>, any>;
declare const webFetchSchema: import("@sinclair/typebox").TObject<{
    url: import("@sinclair/typebox").TString;
}>;
export type WebFetchToolInput = Static<typeof webFetchSchema>;
export interface WebFetchToolDetails {
    truncation?: TruncationResult;
    truncatedContent?: boolean;
}
/**
 * Detect GitHub URLs and return guidance to use the `gh` CLI or a local clone
 * instead of fetching. Fetching GitHub web pages is unreliable: `/blob/` URLs
 * return rendered HTML chrome instead of file content, private repos 404 (no
 * auth), and `api.github.com` needs a specific Accept header. The `gh` CLI is
 * authenticated and purpose-built; cloning to /tmp gives direct file access.
 *
 * Returns guidance text for GitHub hosts, or `null` for any other host.
 */
export declare function getGitHubFetchGuidance(parsed: URL): string | null;
export declare function createWebFetchToolDefinition(_cwd: string): ToolDefinition<typeof webFetchSchema, WebFetchToolDetails | undefined>;
export declare function createWebFetchTool(cwd: string): AgentTool<typeof webFetchSchema>;
export declare const webFetchToolDefinition: ToolDefinition<import("@sinclair/typebox").TObject<{
    url: import("@sinclair/typebox").TString;
}>, WebFetchToolDetails | undefined, any>;
export declare const webFetchTool: AgentTool<import("@sinclair/typebox").TObject<{
    url: import("@sinclair/typebox").TString;
}>, any>;
export {};
//# sourceMappingURL=web.d.ts.map