import { Effect } from "effect"; import { type OperationError } from "../errors/index.js"; import type { Logger, NamedLogger } from "../logging/Logger.js"; import type { LogLevel } from "../logging/types.js"; /** * A markdown-ish log file written in `## heading` sections. Writes are * serialized, so concurrent sections never interleave. */ export declare class LogFile { readonly filePath: string; private readonly mode; private readonly lock; private hasTruncated; private constructor(); /** Creates the parent directory and resolves a handle; nothing is written yet. */ static make(filePath: string, mode: "overwrite" | "append"): Effect.Effect; /** `/.log` in overwrite mode, timestamped from the runtime clock. */ static timestamped(directory: string): Effect.Effect; /** Appends one `## heading` section (the first write truncates in overwrite mode). */ section(heading: string, content: string): Effect.Effect; /** Writes a section and logs `consoleSummary` (or the content) through `logger`. */ log(logger: NamedLogger, level: LogLevel, heading: string, content: string, opts?: { consoleSummary?: string; }): Effect.Effect; private nextWriteFlag; }