/**
 * RecordingManager - Central manager for recording AI interactions.
 *
 * This class coordinates the recording of socket messages, tool calls,
 * and LLM interactions. It manages recording sessions and provides
 * a unified interface for all recording operations.
 */
import type { RecordingSession, SocketRecording, ToolRecording, LLMRecording, MetaRecording } from "./types.js";
/**
 * Configuration options for RecordingManager.
 */
export interface RecordingManagerConfig {
    /** Directory for file-based storage (required) */
    recordingsDir: string;
    /** App root directory path (required for snapshot creation) */
    appRootDirPath: string;
    /** Max session log file size in bytes before rotating (default: 512000 = 500KB) */
    maxSessionSizeBytes?: number;
    /** Max number of sessions to keep (default: 3) */
    maxSessions?: number;
    /** Max file size for snapshot inclusion in bytes (default: 1048576 = 1MB) */
    maxSnapshotFileSizeBytes?: number;
}
export declare class RecordingManager {
    private readonly config;
    private storage;
    private enabled;
    private currentSessionId;
    private readonly maxSessionSizeBytes;
    private readonly maxSessions;
    private readonly maxSnapshotFileSizeBytes;
    /** Throttled rotation check - runs at most every 5 seconds */
    private checkAndRotateIfNeeded;
    constructor(config: RecordingManagerConfig);
    /**
     * Enable recording and start a new session.
     *
     * @param initialCommitId - Optional commit ID to set as starting/current commit
     * @returns The session ID for the new session
     */
    start(initialCommitId?: string): string;
    /**
     * Start a new recording session (internal).
     * Does not enable recording - use start() to enable and start.
     *
     * @param initialCommitId - Optional commit ID to set as starting/current commit
     * @returns The session ID for the new session
     */
    private startSession;
    /**
     * Create a snapshot of the app directory for a session.
     * Fire-and-forget, does not block recording.
     * Records a meta entry with snapshot info (including any skipped files).
     */
    private createSessionSnapshot;
    /**
     * Set the current commit ID for the active session.
     * Called when commits occur during the session.
     */
    setCurrentCommitId(commitId: string): Promise<void>;
    /**
     * Check if recording is currently enabled.
     */
    isEnabled(): boolean;
    /**
     * Perform the actual rotation check.
     * Called by the throttled checkAndRotateIfNeeded.
     */
    private doRotationCheck;
    /**
     * Get the current session ID.
     */
    getCurrentSessionId(): string | null;
    /**
     * List all recorded sessions from the persistent index.
     *
     * @returns Promise resolving to array of sessions (oldest first)
     */
    listSessions(): Promise<RecordingSession[]>;
    /**
     * Record a socket message.
     *
     * By default, only records method name and peerId.
     * For specific methods (like aiGenerate), also records cleaned request data.
     */
    recordSocket(data: SocketRecording): void;
    /**
     * Record a tool call.
     */
    recordTool(data: ToolRecording): void;
    /**
     * Record an LLM call.
     */
    recordLLM(data: LLMRecording): void;
    /**
     * Record a meta entry (session metadata like snapshot info).
     */
    recordMeta(data: MetaRecording): void;
    /**
     * Clear all recordings, optionally for a specific session.
     */
    clear(sessionId?: string): Promise<void>;
}
//# sourceMappingURL=recording-manager.d.ts.map