import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
/**
 * Write full content to a temp file for overflow access.
 * Returns the file path. Caller uses it in truncation notices.
 */
export async function writeOverflow(content, prefix) {
    const filePath = path.join(os.tmpdir(), `ezcoder-${prefix}-${Date.now()}.txt`);
    await fs.writeFile(filePath, content, { encoding: "utf-8", mode: 0o600 });
    return filePath;
}
//# sourceMappingURL=overflow.js.map