import type { Database } from "bun:sqlite";
export type TaskRiskLevel = "low" | "medium" | "high" | "critical";
export type TaskReviewState = "none" | "requested" | "approved" | "changes_requested" | "reopened";
export type RecordableTaskReviewState = Exclude<TaskReviewState, "none" | "requested">;
export interface SetTaskContractInput {
    task_id: string;
    acceptance_criteria?: string[];
    verification_commands?: string[];
    expected_artifacts?: string[];
    relevant_files?: string[];
    risk_level?: TaskRiskLevel;
    done_definition?: string[];
}
export interface TaskContract {
    task_id: string;
    acceptance_criteria: string[];
    verification_commands: string[];
    expected_artifacts: string[];
    relevant_files: string[];
    risk_level: TaskRiskLevel | null;
    done_definition: string[];
    updated_at: string;
}
export interface RequestTaskReviewInput {
    task_id: string;
    requester: string;
    reviewer?: string;
    notes?: string;
}
export interface RecordTaskReviewInput {
    task_id: string;
    state: RecordableTaskReviewState;
    reviewer: string;
    notes?: string;
    changes_requested?: string[];
}
export interface TaskReviewHistoryEntry {
    state: Exclude<TaskReviewState, "none">;
    actor: string;
    notes: string | null;
    changes_requested: string[];
    at: string;
}
export interface TaskReview {
    task_id: string;
    state: TaskReviewState;
    requester: string | null;
    reviewer: string | null;
    notes: string | null;
    changes_requested: string[];
    requested_at: string | null;
    reviewed_at: string | null;
    history: TaskReviewHistoryEntry[];
}
export interface TaskDoneContractResult {
    ok: boolean;
    task_id: string;
    missing: string[];
    contract: TaskContract;
    review: TaskReview;
    evidence: {
        task_status: string;
        acceptance_criteria: number;
        passed_verifications: string[];
        artifacts: string[];
        review_state: TaskReviewState;
    };
}
export declare function setTaskContract(input: SetTaskContractInput, db?: Database): TaskContract;
export declare function getTaskContract(taskId: string, db?: Database): TaskContract | null;
export declare function requestTaskReview(input: RequestTaskReviewInput, db?: Database): TaskReview;
export declare function recordTaskReview(input: RecordTaskReviewInput, db?: Database): TaskReview;
export declare function getTaskReview(taskId: string, db?: Database): TaskReview | null;
export declare function checkTaskDoneContract(taskId: string, db?: Database): TaskDoneContractResult;
//# sourceMappingURL=task-contracts.d.ts.map