export interface VerificationCriterion { id: string; description: string; type: "functional" | "visual" | "performance"; passingCondition: string; failingCondition: string; } export interface WorkProposal { proposalId: string; featureId: string; proposedBy: string; createdAt: string; implementation: { description: string; technicalApproach: string; filesAffected: string[]; estimatedSteps: number; }; verification: { criteria: VerificationCriterion[]; automatedTests: string[]; manualSteps: string[]; }; outOfScope: string[]; } export type ReviewDecision = "approved" | "revision-requested" | "rejected"; export interface ProposalReview { reviewId: string; proposalId: string; reviewedBy: string; decision: ReviewDecision; concerns: string[]; requiredChanges: string[]; reviewedAt: string; } export type ContractStatus = "active" | "completed" | "failed" | "abandoned"; export interface NegotiatedContract { contractId: string; proposal: WorkProposal; review: ProposalReview; agreedAt: string; status: ContractStatus; actualFilesChanged?: string[]; resolutionNotes?: string; } export declare class NegotiatedHandoff { private readonly contractDir; private readonly proposalDir; private readonly reviewDir; private readonly lockPath; constructor(contractDir: string); /** * Generator calls this to submit a proposal. */ submitProposal(proposal: Omit): Promise; /** * Evaluator calls this to review a proposal. */ submitReview(proposalId: string, review: Omit): Promise; /** * Once both have agreed, locks the contract. * Only proposals with an "approved" review can be finalized. * Throws if a contract already exists for this proposal (prevents * duplicate/concurrent finalization). */ finalizeContract(proposalId: string): Promise; /** * Generator calls this when work is done — triggers evaluation. */ submitForEvaluation(contractId: string, actualFilesChanged: string[]): Promise; /** * Evaluator marks the contract outcome. */ resolveContract(contractId: string, status: "completed" | "failed", notes: string): Promise; /** * Returns all active contracts. */ getActiveContracts(): Promise; /** * Returns a formatted contract summary for agent context injection. * All stored text is sanitized before injection to prevent prompt injection. */ getContractSummary(contractId: string): Promise; private readProposal; private findReviewForProposal; private readContract; private findContractForProposal; } //# sourceMappingURL=NegotiatedHandoff.d.ts.map