/** * Chunking Configuration Types * Defines configuration options for text chunking strategies */ export type ChunkingStrategy = "sentence" | "sliding_window" | "paragraph"; export interface ChunkingConfig { /** Enable or disable chunking (default: true) */ enabled: boolean; /** Chunking strategy to use (default: "sentence") */ strategy: ChunkingStrategy; /** Target chunk size in tokens (default: 450 for 512 limit with margin) */ chunkSize: number; /** Overlap between chunks as a fraction (default: 0.1 = 10%) */ overlap: number; /** Minimum chunk size in tokens - don't split smaller texts (default: 50) */ minChunkSize: number; /** Maximum chunk size as hard limit (default: 500) */ maxChunkSize: number; /** Characters per token estimate for prose (default: 4) */ charsPerTokenProse: number; /** Characters per token estimate for code (default: 3.5) */ charsPerTokenCode: number; } export declare const DEFAULT_CHUNKING_CONFIG: ChunkingConfig; /** * Result of chunking a text */ export interface TextChunk { /** The chunk content */ content: string; /** Index of this chunk within the source text */ index: number; /** Total number of chunks from the source text */ totalChunks: number; /** Character offset where this chunk starts in the original text */ startOffset: number; /** Character offset where this chunk ends in the original text */ endOffset: number; /** Estimated token count for this chunk */ estimatedTokens: number; /** Strategy used to create this chunk */ strategy: ChunkingStrategy; } /** * Metadata about the chunking operation */ export interface ChunkingResult { /** Original text that was chunked */ originalLength: number; /** Whether the text was actually chunked or returned as-is */ wasChunked: boolean; /** Chunks produced */ chunks: TextChunk[]; /** Strategy used */ strategy: ChunkingStrategy; /** Estimated total tokens in original text */ estimatedTotalTokens: number; } /** * Get chunking config from environment or defaults */ export declare function getChunkingConfig(): ChunkingConfig; //# sourceMappingURL=ChunkingConfig.d.ts.map