import { type AgencyConfig } from "../config/config.js"; export type ClosureFile = { file: string; sha256: string; }; export type CodeIdentity = { entry: string; closureHash: string; closure: ClosureFile[]; }; /** Which code an agent is: the entry file and every file it transitively * imports, each hashed, plus one hash over the whole list. Paths are relative * to the files' common ancestor (never the cwd, unlike `closureBaseDir`), so * the same code hashes the same wherever it was run from. */ export declare function computeCodeIdentity(entryFile: string): CodeIdentity; export declare function closureHashOf(closure: readonly ClosureFile[]): string; /** * The config overrides a launcher hands its child, with `log.code` set to * the identity of the file that is actually about to run. Everything else in * `overrides` (an inherited statelog path, flags) survives; only `log.code` * is forced, because a `log.code` inherited from a parent process or a stale * shell names some other program, and a trace must never do that. */ export declare function withCodeIdentity(overrides: Partial, entryFile: string): Partial;