| 9 | export type TextReview = (request: ReviewRequest) => Promise<string>; |
| 10 | |
| 11 | function endReason(reason: string | undefined): string { |
| 12 | if (reason === "agent_timeout") { |
| 13 | return "agent_timeout. The harness stopped the agent when its working budget expired. Any command still " |
| 14 | + "running was cancelled at that moment, typically with exit code 2 and no output; the agent never " |
| 15 | + "saw a later result and had no opportunity to act after the cancellation."; |
| 16 | } |
| 17 | return reason ?? "unknown"; |
| 18 | } |
| 19 | |
| 20 | /** A scored second opinion of the whole run, independent of the mechanical graders' decisions. */ |
| 21 | export class SemanticReviewGrader implements Grader { |