/**
 * File-Based Storage Implementation
 *
 * Implements the IPersistence interface using a file-based approach with
 * directory-per-conversation structure. Provides transparent, human-readable
 * persistence without SQLite dependencies.
 *
 * Directory Structure:
 *   .vibe/conversations/{conversationId}/
 *     state.json          - ConversationState data
 *     interactions.jsonl  - Append-only interaction logs (one JSON per line)
 */
import type { IPersistence } from './persistence-interface.js';
import type { ConversationState, InteractionLog } from './types.js';
/**
 * File-based persistence implementation
 */
export declare class FileStorage implements IPersistence {
    private conversationsDir;
    private basePath;
    /**
     * @param basePath - Path to the storage location (e.g., .vibe/conversation.sqlite for backward compat)
     *                   In the future, this should just be the .vibe directory path.
     *                   TODO: Change to accept .vibe directory path directly in v5.0 (see issue #155)
     */
    constructor(basePath: string);
    /**
     * Initialize file-based storage
     * Creates the conversations directory if it doesn't exist
     * Automatically migrates from legacy SQLite if needed
     */
    initialize(): Promise<void>;
    /**
     * Get the directory path for a conversation
     */
    private getConversationDir;
    /**
     * Get the state file path for a conversation
     */
    private getStateFilePath;
    /**
     * Get the interactions file path for a conversation
     */
    private getInteractionsFilePath;
    /**
     * Write data atomically using temp file + rename
     * Uses unique temp file names to prevent concurrent write collisions
     */
    private writeAtomic;
    /**
     * Save or update a conversation state
     */
    saveConversationState(state: ConversationState): Promise<void>;
    /**
     * Get a conversation state by ID
     * Returns null if not found or corrupted
     */
    getConversationState(conversationId: string): Promise<ConversationState | null>;
    /**
     * Get all conversation states
     * Skips corrupted state files
     */
    getAllConversationStates(): Promise<ConversationState[]>;
    /**
     * Delete a conversation state
     * Returns true if deleted, false if not found
     */
    deleteConversationState(conversationId: string): Promise<boolean>;
    /**
     * Log an interaction
     * Appends to interactions.jsonl file
     */
    logInteraction(log: InteractionLog): Promise<void>;
    /**
     * Get interaction logs for a conversation
     * Skips corrupted JSONL lines, returns empty array if file doesn't exist
     */
    getInteractionLogs(conversationId: string): Promise<InteractionLog[]>;
    /**
     * Get interaction logs by conversation ID (alias for compatibility)
     */
    getInteractionsByConversationId(conversationId: string): Promise<InteractionLog[]>;
    /**
     * Soft delete interaction logs
     * Actually performs hard delete (removes interactions.jsonl file)
     */
    softDeleteInteractionLogs(conversationId: string): Promise<void>;
    /**
     * Reset conversation state (update timestamp)
     */
    resetConversationState(conversationId: string): Promise<void>;
    /**
     * Close file storage (no-op for file-based storage)
     */
    close(): Promise<void>;
}
