import type { FileEntry } from './types.js'; export type { FileEntry }; export declare const MAX_UPLOAD_SIZE: number; export declare const MAX_DOWNLOAD_SIZE: number; export interface ListFilesResult { files: FileEntry[]; truncated: boolean; } /** List files in a directory, directories first, then alphabetical */ export declare function listFiles(dirPath: string): Promise; /** * Validate and resolve a requested path against a base CWD. * Returns the resolved absolute path, or null if invalid. * * Since users already have full shell access, this mainly prevents * REST API path traversal via encoded sequences like `../../../etc/passwd`. * We resolve the path and ensure it's an absolute path that exists. */ export declare function validatePath(requested: string, baseCwd: string): Promise; /** * Validate path and reject symlinks (A1). * Used for download/file-content/stream-file to prevent symlink traversal. */ export declare function validatePathNoSymlink(requested: string, baseCwd: string): Promise; /** Validate a path that may not exist yet (for touch/mkdir). Uses realpath on baseCwd only. */ export declare function validateNewPath(requested: string, baseCwd: string): Promise;