Skip to content
TypeScript
702 B
Raw Blame
/**
 * RunnerAdapter 계약 (PRD §7).
 * run() 은 task 실패/타임아웃/IO 오류에 **예외를 던지지 않고** success:false 를 반환하며,
 * 항상 output.txt 와 transcript.jsonl 을 남긴다(fail-soft).
 */
import type { RawRunArtifact, RunInvocation } from "../models";

export class RunnerUnavailable extends Error {
  constructor(message: string) {
    super(message);
    this.name = "RunnerUnavailable";
  }
}

export interface RunnerAdapter {
  name: string;
  isAvailable(): boolean;
  /** 미지원 벤치 → RunnerUnavailable throw */
  loadTaskCatalog(bench: string): string[];
  /** ★ task 실패에 throw 금지 */
  run(inv: RunInvocation): Promise<RawRunArtifact>;
}