import type { RunId, TaskId, TenantId } from '../../types/ids/index.js';
import type { CreateTaskParams, Task, TaskEventListener, TaskStatus, TaskStore, UpdateTaskParams } from '../../types/task/index.js';
import { type Logger } from '../../utils/logger.js';
export interface DiskTaskStoreConfig {
    baseDir: string;
    defaultRunId: RunId;
    tenantId?: TenantId;
    logger?: Logger;
}
export declare class DiskTaskStore implements TaskStore {
    private baseDir;
    private defaultRunId;
    private tenantId?;
    private log;
    private listeners;
    private locks;
    constructor(config: DiskTaskStoreConfig);
    private taskDir;
    private taskPath;
    private withLock;
    /**
     * Acquires locks on multiple task IDs in a canonical (lexicographic) order
     * to prevent deadlocks when operations touch several related tasks.
     * Duplicates are removed; each ID is locked exactly once.
     */
    private withLocks;
    on(listener: TaskEventListener): () => void;
    private emit;
    create(params: CreateTaskParams): Promise<Task>;
    get(id: TaskId): Promise<Task | undefined>;
    update(id: TaskId, updates: UpdateTaskParams): Promise<Task | undefined>;
    delete(id: TaskId): Promise<boolean>;
    list(filter?: {
        status?: TaskStatus;
        owner?: string;
        runId?: RunId;
    }): Promise<Task[]>;
    claim(id: TaskId, owner: string): Promise<Task | undefined>;
    block(blockerId: TaskId, blockedId: TaskId): Promise<void>;
    reset(): Promise<void>;
    private readTask;
    private findTask;
}
//# sourceMappingURL=disk.d.ts.map