import { EventEmitter } from "events";
import { Task } from "../types/tasks.js";
import { Container } from "../utils/container.js";
export declare class TaskManager extends EventEmitter {
    private container;
    private readonly baseDir;
    private taskListId;
    constructor(container: Container, taskListId: string);
    getTaskListId(): string;
    setTaskListId(taskListId: string): void;
    /**
     * Syncs the task list ID with the current session's root session ID.
     * This is typically called when the session is cleared or compressed.
     */
    syncWithSession(): Promise<void>;
    private getSessionDir;
    getTaskPath(taskId: string): string;
    private getLockPath;
    ensureSessionDir(): Promise<void>;
    private withLock;
    private validateTask;
    createTask(task: Omit<Task, "id">): Promise<string>;
    getTask(taskId: string): Promise<Task | null>;
    updateTask(task: Task): Promise<void>;
    deleteTask(taskId: string): Promise<void>;
    cleanupOldTaskLists(days?: number): Promise<void>;
    listTasks(): Promise<Task[]>;
    getNextTaskId(): Promise<string>;
    /**
     * Refreshes the task list by re-reading tasks from disk and emitting a change event.
     */
    refreshTasks(): Promise<void>;
}
//# sourceMappingURL=taskManager.d.ts.map