/** Version-bound, allowlisted official documentation retrieval and cache. */ import { type OfficialDocumentationCandidateV1 } from "./context.ts"; export type DocumentationFetch = (url: string, init: RequestInit) => Promise; export type DocumentationResolver = (hostname: string) => Promise; export interface DocumentationRequestV1 { url: string; /** Exact installed language/framework/library version bound to this evidence. */ version: string; reason: string; offline?: boolean; } export interface DocumentationClientOptions { cacheRoot?: string; allowedHosts?: readonly string[]; fetch?: DocumentationFetch; resolveHostname?: DocumentationResolver; maxBytes?: number; timeoutMs?: number; env?: NodeJS.ProcessEnv; } export interface DocumentationCacheEntryV1 { schemaVersion: 1; cacheKey: string; requestedUrl: string; finalUrl: string; version: string; fetchedAt: string; sourceSha256: string; contentSha256: string; content: string; etag?: string; lastModified?: string; } export declare class DocumentationError extends Error { readonly code: string; constructor(code: string, message: string, options?: ErrorOptions); } export declare class OfficialDocumentationClient { #private; readonly cacheRoot: string; constructor(options?: DocumentationClientOptions); retrieve(request: DocumentationRequestV1): Promise; } //# sourceMappingURL=documentation.d.ts.map