/** * File-based structured logging sink for lifecycle events. * * Subscribes to the EventBus and writes all events as NDJSON to a log file, * providing persistent, machine-readable audit trails. */ import type { EventListener } from "./events.ts"; /** * Format a timestamp for use in log file names. * * Converts an ISO-8601 timestamp to a filesystem-safe format by replacing * colons with hyphens and removing fractional seconds: * `2025-06-15T10:32:01.123Z` -> `2025-06-15T10-32-01Z` */ export declare function formatTimestamp(iso: string): string; /** Options for creating a FileLogSink. */ export type FileLogSinkOptions = { /** Directory to write log files into. Created if absent. */ logDir: string; }; /** * Writes lifecycle events as NDJSON to a file. * * Opens (or creates) a log file at the start of a run, subscribes to the * EventBus via `bus.on(sink.listener)`, and writes each event as a single * NDJSON line. The file is flushed and closed when `close()` is called or * when a `run_finished` event is received. */ export declare class FileLogSink { #private; constructor(options: FileLogSinkOptions); /** The path to the log file, once opened. */ get filePath(): string | null; /** EventListener -- pass to bus.on(). */ listener: EventListener; /** Flush and close the underlying file. Idempotent. */ close(): void; } //# sourceMappingURL=log_sink.d.ts.map