import { spawnHeadlessClaude } from '@vibe-agent-toolkit/utils'; import { type EvalFragment } from './eval-fragment.js'; import type { ToolExpectations } from './eval-inputs.js'; export interface RunGraderInput { evalId: string; /** The FULL captured transcript (stream-json) for this eval's executor run. */ transcript: string; expectations: string[]; expectedOutput?: string; /** Path to the vendored skill-creator grader rubric (references/grader.md). */ rubricPath: string; /** * The eval's declared tool expectations (issue #145 Phase T). Optional — when * absent, `buildGraderPrompt` emits no tool-verdict instruction and the * returned fragment omits `tool`. See `grader-prompt.ts`'s * `BuildGraderPromptOptions.toolExpectations`. */ toolExpectations?: ToolExpectations; /** Name → invocation hint for declared executables, a recognition aid alongside `toolExpectations`. */ declaredExecutables?: Array<{ name: string; howInvoked: string; kind: string; }>; /** * VAT-ONLY directory the grader fragment is written to — deliberately * OUTSIDE the skill-writable sandbox (never the executor's staged/workspace * dir) so untrusted skill code from Task 7's executor run cannot forge or * delete the fragment this run relies on. */ graderOutDir: string; graderModel: string; /** Per-run integrity nonce the grader must echo back in the fragment. */ nonce: string; maxTurns: number; maxBudgetUsd: number; timeoutMs: number; stallMs?: number; /** Grader auth env — no skill secrets are needed beyond auth. */ env: NodeJS.ProcessEnv; /** Injectable seam for tests; defaults to the real {@link spawnHeadlessClaude}. */ spawn?: typeof spawnHeadlessClaude; /** Called with each stdout chunk as it streams (for progress echo). */ onProgress?: (chunk: string) => void; /** * Reports this grader session's `total_cost_usd` (parsed from its stream-json * transcript's terminal result; `undefined` when the transcript carried none, * e.g. a mock spawn). Called once after a successful grader spawn so the run can * aggregate total spend across all executor+grader sessions (adopter follow-up). */ costSink?: (totalCostUsd: number | undefined) => void; } export declare function runGraderForEval(input: RunGraderInput): Promise; //# sourceMappingURL=eval-grader.d.ts.map