import { InterruptHandler } from "./util.js"; import { AgencyConfig } from "../config/config.js"; import type { LLMMock, ScopedLLMMocks } from "../runtime/deterministicClient.js"; import type { FetchMock } from "../runtime/fetchMock.js"; import { type FullTestCase, type FullTestFile } from "../testFormat/schema.js"; import type { ResolvedRunPolicy } from "./runPolicy.js"; import { type TestReport } from "./testReport.js"; import { type TestOutput } from "./testOutput.js"; type TestCase = Omit & { llmMocks?: LLMMock[] | ScopedLLMMocks; fetchMocks?: FetchMock[]; interruptHandlers?: InterruptHandler[]; }; type Tests = Omit & { tests?: TestCase[]; fetchMocks?: FetchMock[]; }; /** Read + validate a .test.json through the shared parser. Throws with the * filename and the offending field on a malformed file. */ export declare function loadTests(testFile: string): Tests; /** The declared sourceFile (resolved beside the json), else the sibling * `.agency` — the same rule precompile groups by. */ export declare function resolveTestSourcePath(tests: Tests, testFile: string): string; type AbortReason = "sigint" | "ceiling"; export type SuiteContext = { aborted: boolean; abortReason: AbortReason | null; abortController: AbortController; completed: string[]; inFlight: Set; pending: Set; inFlightAtAbort: string[]; }; export declare function createSuiteContext(allFiles: string[]): SuiteContext; export declare function fixtures(config: AgencyConfig, target?: string): Promise; /** What the `agency test` command line asked for beyond the file list. */ export type TestRunOptions = { policy?: ResolvedRunPolicy; budget?: { maxCost?: string; maxTime?: string; }; /** Compile each tested file through the closure validator. */ agencyOnly?: boolean; /** Fail a case that asked the host for a capability no running * function's tag names. See lib/cli/capabilityCheck.ts. */ checkCapabilities?: boolean; output: TestOutput; }; export type Shard = { index: number; total: number; }; export declare function parseShardSpec(spec: string): Shard; export declare function partitionByShard(items: T[], shard: Shard, key: (item: T) => string): T[]; /** True when a `skipUnlessPlatform` value is set and does not match the * running OS. */ export declare function skippedForPlatform(wanted: string | undefined): boolean; export declare function printSuiteAbortSummary(suite: SuiteContext, output: TestOutput): void; export declare function test(config: AgencyConfig, inputPaths: string[], parallel: number | undefined, shard: Shard | undefined, options: TestRunOptions): Promise; export declare function testTs(config: AgencyConfig, inputPaths: string[], parallel?: number, shard?: Shard): Promise; export {};