/** * Utility functions for Simple Task Master */ /** * Validates that a path is safe and within allowed directories */ export declare function validatePath(filePath: string): string; /** * Ensures a directory exists, creating it if necessary */ export declare function ensureDirectory(dirPath: string): Promise; /** * Safely reads a file with error handling */ export declare function safeReadFile(filePath: string): Promise; /** * Checks if a file exists */ export declare function fileExists(filePath: string): Promise; /** * Gets the size of a file in bytes */ export declare function getFileSize(filePath: string): Promise; /** * Formats a timestamp to ISO string */ export declare function formatTimestamp(date?: Date): string; /** * Parses an ISO timestamp string */ export declare function parseTimestamp(timestamp: string): Date; /** * Sanitizes a string for use as a filename */ export declare function sanitizeFilename(input: string): string; /** * Truncates a string to a maximum length */ export declare function truncateString(str: string, maxLength: number): string; /** * Debounce function to limit how often a function can be called */ export declare function debounce void>(func: T, wait: number): (...args: Parameters) => void; /** * Sleep for a specified number of milliseconds */ export declare function sleep(ms: number): Promise; /** * Retry a function with exponential backoff */ export declare function retry(fn: () => Promise, maxAttempts?: number, baseDelay?: number): Promise; /** * Reads input from stdin with optional timeout */ export declare function readStdin(timeoutMs?: number): Promise; /** * Launches an external editor to get user input */ export declare function launchEditor(initialContent?: string): Promise; /** * Reads input from either a direct value, stdin (if value is "-"), or editor fallback */ export declare function readInput(value: string | undefined, fallbackToEditor?: boolean, editorPrompt?: string, stdinTimeoutMs?: number): Promise; //# sourceMappingURL=utils.d.ts.map