import type { ReviewerIdentity } from './reviewer-tokens.js';
export type { ReviewerIdentity };
/** Policy defining how many approvals a spec needs before being approved. */
export interface ApprovalPolicy {
    /** Minimum number of approvals required to pass the approval gate. */
    requiredApprovals: number;
    /** Hours a spec can stay in 'review' before SLA is considered breached. */
    reviewSLAHours: number;
    /** Optional escalation contact (email or username) for SLA breaches. */
    escalateTo?: string | undefined;
    /** Optional list of roles allowed to approve. If empty, any reviewer can approve. */
    requireRoles?: string[] | undefined;
}
/** A single approval record from one reviewer. */
export interface ApprovalRecord {
    /** The spec that was approved or rejected. */
    specId: string;
    /**
     * Reviewer identifier (name, email, or username).
     * @deprecated Use reviewerIdentity. Retained for v2.x legacy shim.
     */
    reviewer: string;
    /**
     * SPEC-722: Verified reviewer identity. Populated when a signed reviewerToken is used.
     * Falls back to legacy ReviewerIdentity (verified: false, legacy: true) for old records.
     */
    reviewerIdentity: ReviewerIdentity;
    /** Optional role of the reviewer. */
    role?: string | undefined;
    /** ISO 8601 timestamp of this action. */
    timestamp: string;
    /** Whether this is an approval or a changes_request. */
    action: 'approved' | 'changes_requested';
    /** Comment required when requesting changes; optional for approvals. */
    comment?: string | undefined;
}
/** Computed approval status for a spec. */
export interface ApprovalStatus {
    specId: string;
    /** How many approvals this spec has received. */
    approvalCount: number;
    /** How many approvals are still needed (0 if gate is met). */
    approvalsNeeded: number;
    /** Whether the approval gate is satisfied. */
    gateOpen: boolean;
    /** List of reviewers who have approved. */
    approvers: string[];
    /** All records (approvals + change requests) for this spec. */
    records: ApprovalRecord[];
    /** Whether the SLA window has been breached. */
    slaBreached: boolean;
    /** How many hours over SLA (0 if not breached or no policy). */
    slaBreachHours: number;
    /** Hours the spec has spent in 'review' status. */
    hoursInReview: number;
    /** ISO 8601 timestamp when the spec entered review, if known. */
    reviewStartedAt?: string | undefined;
    /** The active policy, if configured. */
    policy?: ApprovalPolicy | undefined;
}
/** Result of SLA status calculation. */
export interface SLAStatus {
    slaBreached: boolean;
    slaBreachHours: number;
    hoursInReview: number;
}
export interface ConfigureApprovalPolicyInput {
    projectPath: string;
    requiredApprovals: number;
    reviewSLAHours: number;
    escalateTo?: string | undefined;
    requireRoles?: string[] | undefined;
}
export interface ApproveSpecInput {
    projectPath: string;
    specId: string;
    reviewer: string;
    role?: string | undefined;
    comment?: string | undefined;
    /** SPEC-722: Signed reviewer token (from issue_reviewer_token). Required unless legacyReviewMode is configured. */
    reviewerToken?: string | undefined;
    /** SPEC-722: Planner token originally emitted by create_spec. Required when reviewerToken is provided. */
    plannerToken?: string | undefined;
    /** SPEC-722: Multi-teammate review panel ID (allows same model if panel was heterogeneous). */
    multiTeammateReviewId?: string | undefined;
}
export interface IssueReviewerTokenInput {
    projectPath: string;
    /** Planner token emitted by create_spec for this spec. */
    plannerToken: string;
    /** Session ID of the current reviewer session. */
    sessionId: string;
    /** Model ID of the reviewer (e.g. "claude-opus-4-5"). */
    modelId: string;
    /** Host/agent platform identifier. */
    host: string;
}
export interface RequestChangesInput {
    projectPath: string;
    specId: string;
    reviewer: string;
    comment: string;
    role?: string | undefined;
}
export interface ApprovalStatusInput {
    projectPath: string;
    specId: string;
}
//# sourceMappingURL=approval.d.ts.map