import { z } from "zod"; import type { ReceiptCall } from "./subagent-receipt.js"; /** * Parent-set acceptance checks for a helper agent's task. * * A helper's report says "done, tests pass" in prose. The receipt shows what * it really did, but the parent still has to read it and decide whether that * meets the bar. Acceptance checks let the parent state the bar up front ("this * file exists", "the helper changed this file", "this command passed") and * have code decide each one from the filesystem and the helper's own recorded * tool calls — no model call, nothing the helper can write or forge. A check * the evidence cannot settle is reported UNVERIFIED, never guessed. */ export declare const MAX_ACCEPTANCE_CHECKS = 10; export declare const AcceptanceCheckSchema: z.ZodObject<{ type: z.ZodEnum<{ file_exists: "file_exists"; file_changed: "file_changed"; command_passed: "command_passed"; }>; target: z.ZodString; }, z.core.$strip>; export declare const AcceptanceChecksParam: z.ZodOptional; target: z.ZodString; }, z.core.$strip>>>; export type AcceptanceCheck = z.infer; export type CheckStatus = "PASS" | "FAIL" | "UNVERIFIED"; export interface CheckResult { check: AcceptanceCheck; status: CheckStatus; reason: string; } /** * Parse checks arriving over a process boundary (the worker's stdin). Invalid * input yields no checks rather than failing the helper's whole turn. */ export declare function parseAcceptanceChecks(value: unknown): AcceptanceCheck[]; /** Decide every check from the helper's recorded calls and the filesystem. */ export declare function verifyAcceptanceChecks(checks: readonly AcceptanceCheck[], calls: readonly ReceiptCall[], cwd: string): CheckResult[]; /** `2/3 passed, 1 unverified` — for the one-line completion notice. */ export declare function summarizeCheckResults(results: readonly CheckResult[]): string; /** Block appended under the helper's receipt. Empty when no checks were set. */ export declare function formatCheckResults(results: readonly CheckResult[]): string;