import type { TaskDeliverySummary, TaskDeliveryStatus, TaskListResult, TaskNotifyPolicy, TaskRecord, TaskSource, TaskStatus } from "./task-registry.types.js";
export type TaskRecordInput = Omit<TaskRecord, "taskId" | "createdAt" | "updatedAt"> & {
    taskId?: string;
    createdAt?: number;
    updatedAt?: number;
};
export type TaskListFilter = {
    agentId?: string;
    sessionKey?: string;
    source?: TaskSource | "all";
    status?: TaskStatus | "active" | "terminal" | "all";
    limit?: number;
    offset?: number;
    includeAudit?: boolean;
};
export declare function resolveTaskRegistryPath(env?: NodeJS.ProcessEnv): string;
export declare function createTaskRecord(input: TaskRecordInput): TaskRecord;
export declare function upsertTaskRecord(record: TaskRecord): TaskRecord;
export declare function findTaskRecord(taskIdOrRunId: string): TaskRecord | undefined;
export declare function updateTaskRecord(taskIdOrRunId: string, patch: Partial<TaskRecord> | ((task: TaskRecord) => Partial<TaskRecord> | TaskRecord | undefined | null)): TaskRecord | undefined;
export declare function markTaskTerminal(taskIdOrRunId: string, params: {
    status: Exclude<TaskStatus, "queued" | "running">;
    summary?: string;
    error?: string;
    deliveryStatus?: TaskDeliveryStatus;
    delivery?: TaskDeliverySummary;
}): TaskRecord | undefined;
export declare function updateTaskNotifyPolicy(taskIdOrRunId: string, notifyPolicy: TaskNotifyPolicy): TaskRecord | undefined;
export declare function listTaskRecords(filter?: TaskListFilter): TaskListResult;
export declare function buildTaskListResult(tasks: TaskRecord[], generatedAt?: number): TaskListResult;
export declare function listAllTaskRecords(): TaskRecord[];
export declare function resetTaskRegistryForTests(opts?: {
    tasks?: TaskRecord[];
    persist?: boolean;
}): void;
