/** * Structure-aware intelligent chunking for the ingestion engine. * * Unlike naive fixed-size chunking, this respects document structure: * - Headers define chunk boundaries * - Code blocks stay together * - Lists stay together * - Tables stay together * - Overlap is applied at natural boundaries (sentences/paragraphs) * * Config: max ~2000 tokens (~8000 chars), min ~100 tokens, overlap ~200 tokens */ import type { ParsedDocument, ChunkResult } from "./types"; export interface ChunkerConfig { /** Maximum tokens per chunk (estimated as chars / 4) */ readonly maxTokens: number; /** Minimum tokens per chunk — avoid tiny fragments */ readonly minTokens: number; /** Overlap tokens between consecutive chunks */ readonly overlapTokens: number; } export declare const DEFAULT_CHUNKER_CONFIG: ChunkerConfig; /** * Chunk a parsed document into overlapping, structure-aware chunks. */ export declare function chunkDocument(doc: ParsedDocument, config?: ChunkerConfig): ChunkResult[]; //# sourceMappingURL=chunker.d.ts.map