import { r as KlawConfig } from "./types.klaw-xKUw_Rz7.js"; import { W as WebSearchProviderPlugin } from "./types-core-BH2BbD0A.js"; //#region src/agents/tools/web-search-citation-redirect.d.ts /** * Resolve a citation redirect URL to its final destination using a HEAD request. * Returns the original URL if resolution fails or times out. */ declare function resolveCitationRedirectUrl(url: string): Promise; //#endregion //#region src/agents/tools/web-search-provider-common.d.ts type SearchConfigRecord = (NonNullable["web"] extends infer Web ? Web extends { search?: infer Search; } ? Search : never : never) & Record; declare const DEFAULT_SEARCH_COUNT = 5; declare const MAX_SEARCH_COUNT = 10; declare function resolveSearchTimeoutSeconds(searchConfig?: SearchConfigRecord): number; declare function resolveSearchCacheTtlMs(searchConfig?: SearchConfigRecord): number; declare function resolveSearchCount(value: unknown, fallback: number): number; declare function readConfiguredSecretString(value: unknown, path: string): string | undefined; declare function readProviderEnvValue(envVars: string[]): string | undefined; declare function withTrustedWebSearchEndpoint(params: { url: string; timeoutSeconds: number; init: RequestInit; signal?: AbortSignal; }, run: (response: Response) => Promise): Promise; declare function withSelfHostedWebSearchEndpoint(params: { url: string; timeoutSeconds: number; init: RequestInit; signal?: AbortSignal; }, run: (response: Response) => Promise): Promise; 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; declare function throwWebSearchApiError(res: Response, providerLabel: string): Promise; declare function resolveSiteName(url: string | undefined): string | undefined; declare const FRESHNESS_TO_RECENCY: Record; declare function isoToPerplexityDate(iso: string): string | undefined; declare function normalizeToIsoDate(value: string): string | undefined; 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; }; declare function normalizeFreshness(value: string | undefined, provider: "brave" | "perplexity"): string | undefined; declare function readCachedSearchPayload(cacheKey: string): Record | undefined; declare function buildSearchCacheKey(parts: Array): string; declare function writeCachedSearchPayload(cacheKey: string, payload: Record, ttlMs: number): void; declare function buildUnsupportedSearchFilterResponse(params: Record, provider: string, docs?: string): { error: string; message: string; docs: string; } | undefined; //#endregion //#region src/agents/tools/web-search-provider-credentials.d.ts declare function resolveWebSearchProviderCredential(params: { credentialValue: unknown; path: string; envVars: string[]; }): string | undefined; //#endregion //#region src/plugin-sdk/provider-web-search.d.ts /** * @deprecated Implement provider-owned `createTool(...)` directly on the * returned WebSearchProviderPlugin instead of routing through core. */ declare function createPluginBackedWebSearchProvider(provider: WebSearchProviderPlugin): WebSearchProviderPlugin; //#endregion export { withTrustedWebSearchEndpoint as C, withSelfHostedWebSearchEndpoint as S, resolveCitationRedirectUrl as T, resolveSearchCacheTtlMs as _, MAX_SEARCH_COUNT as a, resolveSiteName as b, buildUnsupportedSearchFilterResponse as c, normalizeToIsoDate as d, parseIsoDateRange as f, readProviderEnvValue as g, readConfiguredSecretString as h, FRESHNESS_TO_RECENCY as i, isoToPerplexityDate as l, readCachedSearchPayload as m, resolveWebSearchProviderCredential as n, SearchConfigRecord as o, postTrustedWebToolsJson as p, DEFAULT_SEARCH_COUNT as r, buildSearchCacheKey as s, createPluginBackedWebSearchProvider as t, normalizeFreshness as u, resolveSearchCount as v, writeCachedSearchPayload as w, throwWebSearchApiError as x, resolveSearchTimeoutSeconds as y };