/**
 * Extract plain text from file buffers (PDF, text, etc.) for interpretation.
 * Shared by MCP store and REST store/unstructured.
 */
/** True if the PDF canvas globals (DOMMatrix etc.) were polyfilled this process. */
export declare function isPdfWorkerWrapperConfigured(): boolean;
/** Debug info for store response (polyfill method tried, configured, any error). */
export declare function getPdfWorkerDebug(): {
    wrapper_path_tried: string | null;
    configured: boolean;
    set_worker_error?: string;
};
export declare function getMimeTypeFromExtension(ext: string): string | null;
export declare function sniffMimeTypeFromBuffer(buffer: Buffer): string | null;
/**
 * Extract plain text from a file buffer for LLM extraction.
 * PDF uses pdf-parse; text/* and common extensions return utf8 string.
 */
export declare function extractTextFromBuffer(buffer: Buffer, mimeType?: string, fileName?: string): Promise<string>;
export interface GetPdfFirstPageResult {
    dataUrl: string | null;
    error?: string;
}
/**
 * Render the first page of a PDF to an image data URL for vision-based extraction.
 * Use when extractTextFromBuffer returns empty (e.g. scanned/image-only PDFs).
 * Returns { dataUrl, error? } so callers can surface failure reason.
 */
export declare function getPdfFirstPageImageDataUrl(buffer: Buffer, mimeType?: string, fileName?: string): Promise<string | null>;
export declare function getPdfFirstPageImageDataUrl(buffer: Buffer, mimeType?: string, fileName?: string, opts?: {
    returnError: true;
}): Promise<GetPdfFirstPageResult>;
//# sourceMappingURL=file_text_extraction.d.ts.map