import type { HarnessRunner } from '@nexus-cortex/core'; /** HarnessRunner that drives a running cortex server's /v1/messages endpoint. */ export declare function serverRunner(serverUrl: string, model: string | undefined): HarnessRunner; /** Ask the OS for a free TCP port. */ export declare function freePort(): Promise; /** Short git SHA of a checkout (the harness version label). 'unknown' off-git. */ export declare function gitShortSha(dir: string): string; /** `npm run build` in a checkout. Rejects on non-zero exit (build.sh exits 0 on * the expected/suppressed executors Pass-1 errors, so a non-zero here is real). */ export declare function buildDir(dir: string, log: (m: string) => void): Promise; export interface ServerHandle { url: string; stop: () => void; } /** * Spawn a cortex server from a checkout on a given port and wait for /health. * MODEL_ROUTER_RECORD is forced off so the server's own auto-record (the flat-75 * stub) never pollutes the shared experiment store — only the bench's graded * records count. */ export declare function startServer(dir: string, port: number, log: (m: string) => void, opts?: { healthTimeoutMs?: number; }): Promise; export interface PreparedArm { /** The runner the bench drives for this arm. */ runner: HarnessRunner; /** Tear down anything the arm started (server process, etc.). Idempotent. */ stop(): void; } export interface PrepareArmOptions { /** Port reserved for this arm — server targets bind it, command targets ignore it. */ port: number; /** Model id for endpoint targets (ignored by command targets). */ model?: string; /** Build the checkout before running it. */ build: boolean; log: (m: string) => void; } export interface ExperimentTarget { readonly kind: string; prepare(dir: string, opts: PrepareArmOptions): Promise; } /** Default target: build with `npm run build`, serve the cortex server, drive /v1/messages. */ export declare class CortexTarget implements ExperimentTarget { readonly kind = "cortex"; prepare(dir: string, opts: PrepareArmOptions): Promise; } //# sourceMappingURL=harnessProcess.d.ts.map