/** * On-disk log rotation helper. * * Children spawned by the orchestrator inherit a direct file descriptor to * their `node.log` (see `host-process-orchestrator.ts`), so rotation can no * longer be driven by an in-process byte counter — renaming the path under a * running child would leave it writing to the renamed inode. Instead the * orchestrator calls `rotateOnDisk(...)` at spawn time, before the child is * launched and its fd is opened. This is the only safe point to rotate * without coordinating with the running process. * * Within a workdir there is at most one live child, so spawn-time rotation * is sufficient for v1: a child that exceeds `logMaxBytes` mid-run will * keep appending to the active file until it (or its successor) is restarted. */ /** * Perform a rotation cascade against on-disk paths: drop the oldest, then * shift `.N-1 → .N`, …, `.1 → .2`, and finally `filePath → .1`. * * Caller is responsible for deciding when to rotate (e.g. when * `statSync(filePath).size >= logMaxBytes`). No fd is held by this helper. */ export declare function rotateOnDisk(filePath: string, maxFiles: number): void; /** Build the standard log file path for a workdir. */ export declare function defaultLogPath(workdir: string): string;