/** * File storage utilities for configuration and history management */ import type { Configuration, Message, SessionMetadataFile } from '../types/index.js'; /** * Get the path to the configuration directory * Linux/macOS: ~/.config/yolo-cli/ * Windows: ~/.yolo-cli/ */ export declare function getConfigDir(): string; /** * Get the path to the configuration file */ export declare function getConfigPath(): string; /** * Get the path to the history directory for a working directory */ export declare function getHistoryDir(workingDir: string): string; /** * Get the path to the history file for a working directory * Supports multi-session with optional sessionId parameter */ export declare function getHistoryPath(workingDir: string, sessionId?: string): string; /** * Get the path to the session metadata file */ export declare function getSessionMetadataPath(workingDir: string): string; /** * Ensure a directory exists, creating it if necessary */ export declare function ensureDir(dirPath: string): Promise; /** * Check if a file exists */ export declare function fileExists(filePath: string): boolean; /** * Read and parse a JSON file */ export declare function readJsonFile(filePath: string): Promise; /** * Write an object to a JSON file with atomic write */ export declare function writeJsonFile(filePath: string, data: T): Promise; /** * Load configuration from file */ export declare function loadConfig(): Promise; /** * Save configuration to file */ export declare function saveConfig(config: Configuration): Promise; /** * Load session metadata from file */ export declare function loadSessionMetadata(workingDir: string): Promise; /** * Save session metadata to file (atomic write) */ export declare function saveSessionMetadata(workingDir: string, metadata: SessionMetadataFile): Promise; /** * Read messages from history file (JSONL format) * Supports multi-session with optional sessionId parameter */ export declare function readHistory(workingDir: string, sessionId?: string): Promise; /** * Append a message to the history file (JSONL format) * Supports multi-session with optional sessionId parameter */ export declare function appendToHistory(workingDir: string, message: Message, sessionId?: string): Promise; /** * Rotate history file if it exceeds the message limit */ export declare function rotateHistory(workingDir: string, maxMessages: number): Promise; /** * Clear all history for a working directory */ export declare function clearHistory(workingDir: string): Promise; //# sourceMappingURL=storage.d.ts.map