/**
 * Local SQLite persistence for cloud-dispatched tasks.
 *
 * Every dispatch, status poll, and list query flows through this module so
 * that task history survives across CLI invocations without hitting the
 * remote provider each time.
 */
import type { CloudTask, CloudProviderId, CloudTaskStatus } from './types.js';
/**
 * Release the tasks.db connection so the file (and its WAL sidecars) can be
 * removed. The mirror of `closeDB()` in `../session/db.ts`, which this module
 * had no counterpart for — on Windows an open handle makes the file
 * un-unlinkable, so anything tearing down a temp home must close this too.
 */
export declare function closeStore(): void;
/** Persist a task snapshot, replacing any existing row with the same ID. */
export declare function insertTask(task: CloudTask): void;
/** Update a task's status and optionally patch summary, PR URL, or branch. */
export declare function updateTaskStatus(id: string, status: CloudTaskStatus, extra?: Partial<Pick<CloudTask, 'summary' | 'prUrl' | 'branch'>>): void;
/** Fetch a single task by its provider-assigned ID, or null if not found locally. */
export declare function getTaskById(id: string): CloudTask | null;
/** List tasks with optional provider/status filters, ordered newest-first. */
export declare function listTasks(filter?: {
    provider?: CloudProviderId;
    status?: CloudTaskStatus;
    limit?: number;
}): CloudTask[];
/** Return tasks still in a transient state (queued, allocating, running, input_required). */
export declare function listActiveTasks(): CloudTask[];
