import type { AgencyConfig } from "../config.js"; /** Declarative description of a per-input run directory: where the project * tree is seeded from, where the entry agent lives within it, and any * candidate-file overlay applied before compile. */ export type RunWorkdirSpec = { /** Absolute dir whose contents seed the workdir (the agent's project tree). */ seedDir: string; /** Entry agent path relative to seedDir, e.g. "examples/08-optimize.agency". */ agentRelPath: string; /** Optional overlay applied after seeding — the optimizer's mutated candidate * files, keyed by path relative to seedDir. Absent for plain eval. */ overlayFiles?: Record; }; export type PreparedRunDir = { workdirPath: string; /** Absolute path of the compiled entry JS inside the workdir. */ compiledEntryPath: string; }; /** * Materialize an isolated run directory: copy the seed project tree into * `workdirPath`, overlay the candidate's mutated files (if any), then compile * the entry agent in place. The result has module-dir == cwd == workdir, so the * agent's reads, writes, and execs all resolve to this one isolated copy. */ export declare function prepareRunDir(spec: RunWorkdirSpec, workdirPath: string, config: AgencyConfig): PreparedRunDir;