import type { DiarizationPreference } from "../../transcription/whisper/types.js";
import type { TranscriptCache } from "../cache/types.js";
import type { CacheMode, TranscriptDiagnostics, TranscriptResolution, TranscriptSource } from "../link-preview/types.js";
export declare const DEFAULT_TTL_MS: number;
export declare const NEGATIVE_TTL_MS: number;
type CacheDiagnostics = Pick<TranscriptDiagnostics, "cacheStatus" | "notes" | "provider" | "textProvided" | "cacheMode" | "attemptedProviders">;
export interface CacheReadArguments {
    url: string;
    cacheMode: CacheMode;
    transcriptCache: TranscriptCache | null;
    transcriptTimestamps?: boolean;
    transcriptDiarization?: DiarizationPreference | null;
    fileMtime?: number | null;
}
export interface TranscriptCacheLookup {
    cached: Awaited<ReturnType<TranscriptCache["get"]>> | null;
    resolution: TranscriptResolution | null;
    diagnostics: CacheDiagnostics;
}
export declare const readTranscriptCache: ({ url, cacheMode, transcriptCache, transcriptTimestamps, transcriptDiarization, fileMtime, }: CacheReadArguments) => Promise<TranscriptCacheLookup>;
export declare function isCachedDiarizationCompatible(metadata: Record<string, unknown> | null | undefined, preference: DiarizationPreference | null): boolean;
export declare const mapCachedSource: (source: string | null) => TranscriptSource | null;
export declare const writeTranscriptCache: ({ url, service, resourceKey, result, transcriptCache, fileMtime, }: {
    url: string;
    service: string;
    resourceKey: string | null;
    result: {
        text: string | null;
        source: TranscriptSource | null;
        metadata?: Record<string, unknown> | undefined;
    };
    transcriptCache: TranscriptCache | null;
    fileMtime?: number | null;
}) => Promise<void>;
export {};
