import type { OpenClawConfig } from "../../config/types.openclaw.js"; import { CacheEntry } from "./web-shared.js"; export type SearchConfigRecord = (NonNullable["web"] extends infer Web ? Web extends { search?: infer Search; } ? Search : never : never) & Record; export declare const DEFAULT_SEARCH_COUNT = 5; export declare const MAX_SEARCH_COUNT = 10; export declare const SEARCH_CACHE: Map>>; export declare function resolveSearchTimeoutSeconds(searchConfig?: SearchConfigRecord): number; export declare function resolveSearchCacheTtlMs(searchConfig?: SearchConfigRecord): number; export declare function resolveSearchCount(value: unknown, fallback: number): number; export declare function readConfiguredSecretString(value: unknown, path: string): string | undefined; export declare function readProviderEnvValue(envVars: string[]): string | undefined; export declare function withTrustedWebSearchEndpoint(params: { url: string; timeoutSeconds: number; init: RequestInit; signal?: AbortSignal; }, run: (response: Response) => Promise): Promise; export declare function withSelfHostedWebSearchEndpoint(params: { url: string; timeoutSeconds: number; init: RequestInit; signal?: AbortSignal; }, run: (response: Response) => Promise): Promise; export declare function postTrustedWebToolsJson(params: { url: string; timeoutSeconds: number; apiKey: string; body: Record; errorLabel: string; maxErrorBytes?: number; extraHeaders?: Record; signal?: AbortSignal; }, parseResponse: (response: Response) => Promise): Promise; export declare function throwWebSearchApiError(res: Response, providerLabel: string): Promise; export declare function resolveSiteName(url: string | undefined): string | undefined; export declare const FRESHNESS_TO_RECENCY: Record; export declare function isoToPerplexityDate(iso: string): string | undefined; export declare function normalizeToIsoDate(value: string): string | undefined; export declare function parseIsoDateRange(params: { rawDateAfter?: string; rawDateBefore?: string; invalidDateAfterMessage: string; invalidDateBeforeMessage: string; invalidDateRangeMessage: string; docs?: string; }): { dateAfter?: string; dateBefore?: string; } | { error: "invalid_date" | "invalid_date_range"; message: string; docs: string; }; export declare function normalizeFreshness(value: string | undefined, provider: "brave" | "perplexity"): string | undefined; export declare function readCachedSearchPayload(cacheKey: string): Record | undefined; export declare function buildSearchCacheKey(parts: Array): string; export declare function writeCachedSearchPayload(cacheKey: string, payload: Record, ttlMs: number): void; export declare function buildUnsupportedSearchFilterResponse(params: Record, provider: string, docs?: string): { error: string; message: string; docs: string; } | undefined;