import type { AgencyConfig } from "../../config/config.js"; /** Which files a run needs: the agent's own (computed from its imports) and * the test's (declared). The description only — copying is `copyFiles`. */ export type AgentSeed = { /** Project root the closure paths are relative to. */ baseDir: string; /** Entry .agency file, relative to baseDir. */ agentRelPath: string; /** Absolute paths of the agent's import closure (agency + TS interop). */ closureFiles: string[]; /** Resolved test fixture dir; its contents land at the workdir root. */ filesDir?: string; }; /** One planned copy: where the file comes from, and which ingredient provided * it (collision messages name the ingredient). */ export type SeedEntry = { sourceAbs: string; origin: "agent" | "test files"; }; /** Walk the agent's imports and build its seed. One closure walk per agent. */ export declare function seedFromAgentFile(agentPath: string): AgentSeed; /** Which files to copy, and where: destination (workdir-relative) → source. * Pure — nothing is written. Throws on a test-file/agent collision, naming * the path and both sources. */ export declare function filesToCopy(seed: AgentSeed): Record; /** What a COMMAND target's workdir gets: the input's files plus the invoking * cwd's project config files — there is no agent ingredient (nothing to * compile, no closure), and no collision rule for the same reason. Seeding * the config from the invoking cwd makes two machines running the same * benchmark see the same config; the consequence is that the agent under * test sees the invoking project's agency.json, eval.* settings included. */ export declare function commandFilesToCopy(filesDir: string | undefined): Record; /** Copy them. The only filesystem writes in seeding. */ export declare function copyFiles(workdirPath: string, files: Record): void; /** Write optimizer candidate edits over the seeded copy. Applied last, so a * candidate wins over both ingredients. */ export declare function applyOverlay(workdirPath: string, overlayFiles: Record | undefined): void; /** Compile the seeded agent inside its workdir, so module-dir == cwd == * workdir and all resolution stays inside the sandbox. */ export declare function compileAgent(workdirPath: string, agentRelPath: string, config: AgencyConfig): string;