/** * Shared truncation utilities for tool outputs. * * Truncation is based on two independent limits - whichever is hit first wins: * - Line limit (default: 2000 lines) * - Byte limit (default: 50KB) * * Never returns partial lines (except bash tail truncation edge case). */ export declare const DEFAULT_MAX_LINES = 2000; export declare const DEFAULT_MAX_BYTES: number; export type { TruncationOptions, TruncationResult } from "./types.js"; import type { TruncationOptions, TruncationResult } from "./types.js"; /** * Format bytes as human-readable size. */ export declare function formatSize(bytes: number): string; /** * Truncate content from the head (keep first N lines/bytes). * Suitable for file reads where you want to see the beginning. * * Never returns partial lines. If first line exceeds byte limit, * returns empty content with firstLineExceedsLimit=true. */ export declare function truncateHead(content: string, options?: TruncationOptions): TruncationResult; /** * Truncate content from the tail (keep last N lines/bytes). * Suitable for bash output where you want to see the end (errors, final results). * * May return partial first line if the last line of original content exceeds byte limit. */ export declare function truncateTail(content: string, options?: TruncationOptions): TruncationResult; //# sourceMappingURL=truncate.d.ts.map