import type { TaskEntity, TaskMutationEvidence, TaskStoreDocument, TransitionEvidence } from "../types.js";
import type { SqliteDualPlanningStore } from "./sqlite-dual-planning.js";
export declare const DEFAULT_TASK_STORE_PATH = ".workspace-kit/tasks/state.json";
export type TaskStoreSaveOptions = {
    expectedPlanningGeneration?: number;
    /** Force a full relational rebuild, or request scoped row persistence when safe. */
    persistScope?: "full" | "incremental";
    /** Task ids touched since the last load/save; used by SQLite relational incremental persistence. */
    dirtyTaskIds?: string[];
    /** Transition ids appended since the last load/save. */
    newTransitionIds?: string[];
    /** Mutation ids appended since the last load/save. */
    newMutationIds?: string[];
    /**
     * When using {@link TaskStore.forSqliteDual}, run this synchronously inside the same SQLite
     * transaction as the task store flush (before relational/blob writes and planning generation bump).
     */
    beforePersistInSqliteTransaction?: () => void;
};
export type TaskStorePersistence = {
    loadDocument: () => Promise<TaskStoreDocument>;
    saveDocument: (doc: TaskStoreDocument, opts?: TaskStoreSaveOptions) => Promise<void>;
    pathLabel: string;
};
export declare class TaskStore {
    private document;
    private readonly persistence;
    private readonly dirtyTaskIds;
    private readonly newTransitionIds;
    private readonly newMutationIds;
    private forceFullPersist;
    constructor(persistence: TaskStorePersistence);
    static forJsonFile(workspacePath: string, storeRelativePath?: string): TaskStore;
    static forSqliteDual(dual: SqliteDualPlanningStore): TaskStore;
    load(): Promise<void>;
    save(opts?: TaskStoreSaveOptions): Promise<void>;
    getAllTasks(): TaskEntity[];
    getActiveTasks(): TaskEntity[];
    getTask(id: string): TaskEntity | undefined;
    addTask(task: TaskEntity): void;
    updateTask(task: TaskEntity): void;
    addEvidence(evidence: TransitionEvidence): void;
    addMutationEvidence(evidence: TaskMutationEvidence): void;
    getTransitionLog(): TransitionEvidence[];
    getMutationLog(): TaskMutationEvidence[];
    replaceAllTasks(tasks: TaskEntity[]): void;
    getFilePath(): string;
    getLastUpdated(): string;
    private buildSaveOptions;
    private resetDirtyTracking;
}
