import { mkdirSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
/**
 * Writes persisted turn trace files.
 */
export class TraceWriter {
    static write(traceDir, trace) {
        mkdirSync(traceDir, { recursive: true });
        const traceFile = join(traceDir, `trace-${Date.now()}.json`);
        writeFileSync(traceFile, JSON.stringify(trace, null, 2));
        return traceFile;
    }
}
//# sourceMappingURL=trace-writer.js.map