/**
 * Hybrid Section-Aware Chunking Service for OCR Provenance MCP System
 *
 * Uses markdown structure (headings, paragraphs, tables), JSON block data
 * (for atomic region detection), and page offsets (for page tracking) to
 * produce semantically coherent chunks with provenance records (chain_depth=2).
 *
 * @module services/chunking/chunker
 */
import { ChunkResult, ChunkingConfig } from '../../models/chunk.js';
import { PageOffset } from '../../models/document.js';
import { CreateProvenanceParams } from '../../models/provenance.js';
/**
 * Parameters for creating chunk provenance record
 */
export interface ChunkProvenanceParams {
    /** The chunk result containing text and position info */
    chunk: ChunkResult;
    /** Pre-computed hash of chunk.text (sha256:...) */
    chunkTextHash: string;
    /** Parent provenance ID (OCR result, chain_depth=1) */
    ocrProvenanceId: string;
    /** Root document provenance ID (chain_depth=0) */
    documentProvenanceId: string;
    /** Hash of full OCR text (input_hash) */
    ocrContentHash: string;
    /** Hash of original file */
    fileHash: string;
    /** Total number of chunks produced */
    totalChunks: number;
    /** Processing duration in milliseconds */
    processingDurationMs?: number;
    /** Chunking config used (defaults to DEFAULT_CHUNKING_CONFIG) */
    config?: ChunkingConfig;
}
/**
 * Hybrid section-aware chunking.
 *
 * Uses markdown structure (headings, paragraphs, tables), JSON block data
 * (for atomic region detection), and page offsets (for page tracking) to
 * produce semantically coherent chunks.
 *
 * @param text - Full markdown text from OCR output
 * @param pageOffsets - Page offset information for page number assignment
 * @param jsonBlocks - JSON block hierarchy from Datalab OCR (may be null)
 * @param config - Chunking configuration (default: 2000 chars, 10% overlap)
 * @returns Array of ChunkResult with section context, content types, and page info
 */
export declare function chunkHybridSectionAware(text: string, pageOffsets: PageOffset[], jsonBlocks: Record<string, unknown> | null, config?: ChunkingConfig): ChunkResult[];
/**
 * Create provenance parameters for a chunk.
 *
 * Generates a CreateProvenanceParams object suitable for creating
 * a CHUNK provenance record (chain_depth=2).
 *
 * @param params - Chunk provenance parameters
 * @returns CreateProvenanceParams ready for insertProvenance
 */
export declare function createChunkProvenance(params: ChunkProvenanceParams): CreateProvenanceParams;
export type { ChunkResult, ChunkingConfig } from '../../models/chunk.js';
export { DEFAULT_CHUNKING_CONFIG } from '../../models/chunk.js';
//# sourceMappingURL=chunker.d.ts.map