/**
 * Ingestion MCP Tools
 *
 * Extracted from src/index.ts Task 20.
 * Tools: ocr_ingest_directory, ocr_ingest_files, ocr_process_pending, ocr_status
 *
 * CRITICAL: NEVER use console.log() - stdout is reserved for JSON-RPC protocol.
 * Use console.error() for all logging.
 *
 * @module tools/ingestion
 */
import { type ToolDefinition } from './shared.js';
/**
 * Parse block type from image filename.
 * Marker names images like: _page_0_Picture_21.jpeg, _page_0_Figure_3.jpeg
 * Returns block_type string or null if pattern doesn't match.
 */
export declare function parseBlockTypeFromFilename(filename: string): string | null;
/**
 * Page-level image classification from JSON block hierarchy.
 */
interface PageImageClassification {
    hasFigure: boolean;
    hasPicture: boolean;
    pictureInHeaderFooter: number;
    pictureInBody: number;
    figureCount: number;
}
/**
 * From JSON block hierarchy, classify each page's image regions.
 * Returns a map: pageNumber -> PageImageClassification
 *
 * The JSON structure has top-level children (pages), each page has children (blocks).
 * Image blocks have block_type 'Figure', 'Picture', 'FigureGroup', 'PictureGroup'.
 * Layout blocks have block_type 'PageHeader', 'PageFooter'.
 */
export declare function buildPageBlockClassification(jsonBlocks: Record<string, unknown>): Map<number, PageImageClassification>;
/**
 * Handle ocr_ingest_directory - Ingest all documents from a directory
 */
export declare function handleIngestDirectory(params: Record<string, unknown>): Promise<{
    content: Array<{
        type: 'text';
        text: string;
    }>;
}>;
/**
 * Handle ocr_ingest_files - Ingest specific files
 */
export declare function handleIngestFiles(params: Record<string, unknown>): Promise<{
    content: Array<{
        type: 'text';
        text: string;
    }>;
}>;
/**
 * Handle ocr_process_pending - Process pending documents through full OCR pipeline
 *
 * Pipeline: OCR -> Extract Images -> Chunk -> Embed -> VLM Process Images -> Complete
 * Provenance chain: DOCUMENT(0) -> OCR_RESULT(1) -> CHUNK(2)/IMAGE(2) -> EMBEDDING(3)/VLM_DESC(3)
 */
export declare function handleProcessPending(params: Record<string, unknown>, extra?: {
    sendNotification?: (notification: {
        method: string;
        params: Record<string, unknown>;
    }) => Promise<void>;
}): Promise<{
    content: Array<{
        type: 'text';
        text: string;
    }>;
}>;
/**
 * Handle ocr_status - Get OCR processing status
 */
export declare function handleOCRStatus(params: Record<string, unknown>): Promise<{
    content: Array<{
        type: 'text';
        text: string;
    }>;
}>;
/**
 * Handle ocr_retry_failed - Reset failed documents back to pending for reprocessing
 *
 * Cleans all derived data (OCR results, chunks, embeddings, images, non-root provenance)
 * before resetting status to 'pending' to avoid duplicate data on reprocessing.
 */
export declare function handleRetryFailed(params: Record<string, unknown>): Promise<{
    content: Array<{
        type: 'text';
        text: string;
    }>;
}>;
/**
 * Ingestion tools collection for MCP server registration
 */
export declare const ingestionTools: Record<string, ToolDefinition>;
export {};
//# sourceMappingURL=ingestion.d.ts.map