/**
 * Filesystem operation limits validation.
 *
 * Centralizes limit checks for file reads, writes, list entries,
 * tree depth, and search results. Handlers can call these utilities
 * to enforce limits and get consistent error responses.
 */
import { MAX_FILE_SIZE, MAX_WRITE_SIZE, MAX_FS_ENTRIES, MAX_TREE_DEPTH, MAX_SEARCH_RESULTS } from "@pocketcoder/shared/constants";
export { MAX_FILE_SIZE, MAX_WRITE_SIZE, MAX_FS_ENTRIES, MAX_TREE_DEPTH, MAX_SEARCH_RESULTS };
/**
 * Validate that a file size does not exceed the read limit (10 MB).
 * Throws AppError with FILE_TOO_LARGE if exceeded.
 */
export declare function validateReadSize(size: number): void;
/**
 * Validate that content size does not exceed the write limit (1 MB).
 * Throws AppError with FILE_TOO_LARGE if exceeded.
 */
export declare function validateWriteSize(size: number): void;
/**
 * Truncate a list of entries to the MAX_FS_ENTRIES limit.
 * Returns the truncated array and a flag indicating whether truncation occurred.
 */
export declare function truncateListEntries<T>(entries: T[]): {
    entries: T[];
    truncated: boolean;
};
/**
 * Cap a requested tree depth at the MAX_TREE_DEPTH limit.
 * Returns the capped value (always <= MAX_TREE_DEPTH).
 */
export declare function capTreeDepth(requestedDepth: number): number;
/**
 * Truncate search results to the MAX_SEARCH_RESULTS limit.
 * Returns the truncated array and a flag indicating whether truncation occurred.
 */
export declare function truncateSearchResults<T>(results: T[]): {
    results: T[];
    truncated: boolean;
};
//# sourceMappingURL=limits.d.ts.map