import type { PostToolUseHook } from './post-tool-use';
export interface TruncationOptions {
    /** Maximum number of lines to return. Default: 2000 */
    maxLines?: number;
    /** Maximum byte size of the returned content. Default: 50 * 1024 */
    maxBytes?: number;
    /** Maximum characters per line before truncating the line. Default: undefined (no cap) */
    maxLineWidth?: number;
    /** Whether to keep the head or tail of the output. Default: 'head' */
    direction?: 'head' | 'tail';
}
export interface TruncationResult {
    /** The (possibly truncated) content string. */
    content: string;
    /** Whether any truncation occurred. */
    truncated: boolean;
    /** Number of lines that were dropped (0 if not truncated). */
    truncatedLines: number;
    /** Number of bytes that were dropped (0 if not truncated). */
    truncatedBytes: number;
    /** True when the byte cap was the binding constraint (vs line cap). */
    hitBytes: boolean;
}
export declare function truncateWithOptions(output: string, opts?: TruncationOptions): TruncationResult;
export interface ReadTruncationOptions {
    /** Maximum number of lines to return. Default: 2000 */
    maxLines?: number;
    /** Maximum byte size of the returned content. Default: 50 * 1024 */
    maxBytes?: number;
    /** Maximum characters per line before truncating the line. Default: 2000 */
    maxLineWidth?: number;
    /** Custom hint generator. Receives truncation context; return the hint string. */
    hint?: (ctx: {
        toolName: string;
        truncatedLines: number;
        truncatedBytes: number;
        hitBytes: boolean;
        startLine: number;
        endLine: number;
        nextOffset: number;
    }) => string;
}
export declare function createReadTruncationHook(opts?: ReadTruncationOptions): PostToolUseHook;
export declare const readTruncationHook: PostToolUseHook;
//# sourceMappingURL=output-truncation.d.ts.map