import type { HarnessRunner } from '@nexus-cortex/core'; import type { ExperimentTarget, PreparedArm, PrepareArmOptions } from './harnessProcess.js'; export interface CommandRunnerOptions { /** Working directory the command runs in (e.g. the candidate worktree). */ cwd: string; /** Command template, e.g. `./eval.sh {prompt}` or `python eval.py --case {prompt}`. * If it contains no `{prompt}`/`{case}` placeholder, the prompt is appended as a * single quoted argument. */ template: string; /** Exit codes whose stdout is accepted for grading. Default `[0]`. */ acceptExitCodes?: number[]; /** Per-run hard timeout in ms. Default 120000. */ timeoutMs?: number; /** Progress/diagnostic sink (stderr + nonzero-exit notices). */ log?: (message: string) => void; } export declare function commandRunner(opts: CommandRunnerOptions): HarnessRunner; /** * CommandTarget — the non-cortex `ExperimentTarget`. An optional one-shot build command, * then grade a shell command per task via `commandRunner`. Nothing to serve, nothing to * tear down — so `cortex autoresearch experiment` can run base-vs-candidate on any project * (a library, CLI, test suite, backtest) through the same statistical gate as the harness. */ export declare class CommandTarget implements ExperimentTarget { private readonly cfg; readonly kind = "command"; constructor(cfg: { template: string; buildCmd?: string; acceptExitCodes?: number[]; timeoutMs?: number; }); prepare(dir: string, opts: PrepareArmOptions): Promise; } //# sourceMappingURL=commandRunner.d.ts.map