/** * The one owner of the `.test.json` format, in two profiles: * * - FULL (the `agency test` CLI runner): every field the runner supports, * validated instead of the previous unchecked TypeScript casts. * - SANDBOX (`std::agency`'s `testFile()`): the deliberate subset that makes * sense inside the run() sandbox. Anything else is refused BY NAME — * a silently ignored mock would make a test pass for the wrong reason. * * Both profiles are pure text-to-data functions: no reads, writes, globals, * or clocks. Callers own file access. */ import { z } from "zod"; export type InterruptAction = "approve" | "reject"; export type ParsedInterrupt = { action: InterruptAction; value?: unknown; expectedMessage?: string; }; export type ParsedTestCase = { nodeName: string; /** Named arguments, exactly as run() takes them. */ args: Record; /** JSON.parse of expectedOutput — parsed at parse time so a malformed * expectation is a whole-file error before anything runs. */ expected: unknown; criteria: "exact"; interrupts: ParsedInterrupt[]; timeoutMs?: number; description?: string; }; export type ParsedTestFile = { sourceFile: string; defaultTimeoutMs?: number; description?: string; cases: ParsedTestCase[]; }; /** Default rule shared with the CLI runner: `.agency` beside the * json when no explicit sourceFile is declared. */ export declare function resolveSourceFile(declared: string | undefined, jsonFilename: string): string; export declare function parseTestFileSandbox(jsonText: string, jsonFilename: string): ParsedTestFile; declare const fullCaseSchema: z.ZodObject<{ nodeName: z.ZodString; input: z.ZodOptional; expectedOutput: z.ZodString; evaluationCriteria: z.ZodArray; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"llmJudge">; judgePrompt: z.ZodString; desiredAccuracy: z.ZodNumber; }, z.core.$strict>]>>; interruptHandlers: z.ZodOptional; expectedMessage: z.ZodOptional; value: z.ZodOptional; resolvedValue: z.ZodOptional; }, z.core.$strict>>>; description: z.ZodOptional; retry: z.ZodOptional; skip: z.ZodOptional; skipOnCI: z.ZodOptional; skipUnlessPlatform: z.ZodOptional>; skipReason: z.ZodOptional; timeoutMs: z.ZodOptional; llmMocks: z.ZodOptional, z.ZodRecord]>>; useTestLLMProvider: z.ZodOptional; argv: z.ZodOptional>; fetchMocks: z.ZodOptional>; fakeClock: z.ZodOptional; }, z.core.$strict>; declare const fullFileSchema: z.ZodObject<{ sourceFile: z.ZodOptional; tests: z.ZodOptional; expectedOutput: z.ZodString; evaluationCriteria: z.ZodArray; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"llmJudge">; judgePrompt: z.ZodString; desiredAccuracy: z.ZodNumber; }, z.core.$strict>]>>; interruptHandlers: z.ZodOptional; expectedMessage: z.ZodOptional; value: z.ZodOptional; resolvedValue: z.ZodOptional; }, z.core.$strict>>>; description: z.ZodOptional; retry: z.ZodOptional; skip: z.ZodOptional; skipOnCI: z.ZodOptional; skipUnlessPlatform: z.ZodOptional>; skipReason: z.ZodOptional; timeoutMs: z.ZodOptional; llmMocks: z.ZodOptional, z.ZodRecord]>>; useTestLLMProvider: z.ZodOptional; argv: z.ZodOptional>; fetchMocks: z.ZodOptional>; fakeClock: z.ZodOptional; }, z.core.$strict>>>; expectedCompileError: z.ZodOptional; description: z.ZodOptional; fetchMocks: z.ZodOptional>; skip: z.ZodOptional; skipOnCI: z.ZodOptional; skipUnlessPlatform: z.ZodOptional>; skipReason: z.ZodOptional; defaultTimeoutMs: z.ZodOptional; }, z.core.$strict>; export type FullTestCase = z.infer; export type FullTestFile = z.infer; export declare function parseTestFileFull(jsonText: string, jsonFilename: string): FullTestFile; /** `siblingAgencyBasename`: the json must test its own pair. */ export declare function parseTestFileEvalHarness(jsonText: string, jsonFilename: string, siblingAgencyBasename: string): FullTestFile; export {};