import type { RunTestsOutcome } from '../../languages/capabilities/provider';
export interface RunTestsArgs {
    /** Display name for logging — usually the pack id. */
    pack: string;
    /** Shell command to invoke. Run via `/bin/bash -c "<cmd>"`. */
    cmd: string;
    /** Working directory for the spawn. */
    cwd: string;
    /**
     * Relative path to the expected coverage artifact, OR a function that
     * locates it post-run (for tools that pick non-deterministic output
     * paths — e.g. .NET's `TestResults/<guid>/coverage.cobertura.xml`).
     * The function form returns the discovered relative path or `null` if
     * the artifact wasn't produced.
     */
    artifact: string | ((cwd: string) => string | null);
    /** Wall-clock cap. Default 600s (10 min) per the design doc. */
    timeoutMs?: number;
    /**
     * Optional pre-flight check. When defined and returns a non-null
     * reason, `runTests` skips the spawn and returns `unavailable` with
     * that reason. Use this to short-circuit "tool isn't installed" or
     * "project isn't configured" without paying the spawn cost.
     */
    preflight?: (cwd: string) => string | null;
}
/**
 * Spawn a test-with-coverage command, time it, classify the outcome.
 *
 * Outcome rules:
 *   - `preflight` returned a reason → `unavailable`
 *   - spawn signals ENOENT (binary missing)   → `unavailable`
 *   - exit non-zero (test fail / compile err) → `failed`
 *   - exit zero AND artifact present         → `success`
 *   - exit zero BUT artifact missing          → `failed`
 *     (the user ran the right command but it didn't produce coverage —
 *     usually means simplecov / coverage-py / similar isn't actually
 *     wired into the test setup. The hint they need is "your test
 *     run succeeded but produced no coverage report" not "no test
 *     runner found.")
 */
export declare function runTestsWithCoverage(args: RunTestsArgs): RunTestsOutcome;
//# sourceMappingURL=run-tests-helper.d.ts.map