/**
 * Log writer that transforms agent log lines into JSONL and persists to LogStorage.
 *
 * Each log line is formatted as a JSON object with timestamp, level, message,
 * and metadata fields. Lines are written to the standard log path layout:
 * executions/{runId}/job-{name}/step-{index}.log
 *
 * For filesystem storage, data is appended immediately (no buffering).
 * For S3 storage, the LogStorage backend handles read-concat-put.
 */
import type { LogStorage } from './log-storage.js';
import type { ObserverRegistry } from '../ws/observer-registry.js';
interface LogWriterDeps {
    logStorage: LogStorage;
    /** Optional observer registry for broadcasting log chunks to CLI observers. */
    observerRegistry?: ObserverRegistry;
    /** Optional function to check if a run is a test run (for observer broadcasting). */
    isTestRun?: (runId: string) => boolean;
}
export declare class LogWriter {
    private readonly logStorage;
    private readonly observerRegistry?;
    private readonly isTestRun?;
    constructor(deps: LogWriterDeps);
    /**
     * Append log lines from an agent to storage in JSONL format.
     *
     * Each line is formatted as:
     * {"ts":"2026-01-01T00:00:00.000Z","level":"stdout","msg":"line content","meta":{}}
     *
     * Also fans log chunks to connected observers for real-time streaming
     * (test runs only, when observerRegistry is configured).
     *
     * @param runId - Execution run ID
     * @param jobName - Job name (not job ID)
     * @param stepIndex - Step index within the job (0-based)
     * @param lines - Raw log lines from the agent
     * @param timestamp - Timestamp from the agent message (epoch ms)
     * @param jobId - Job ID for observer broadcasting (optional)
     * @param stepName - Step name for observer broadcasting (optional)
     */
    appendChunk(runId: string, jobName: string, stepIndex: number, lines: string[], timestamp: number, jobId?: string, stepName?: string): Promise<void>;
}
export {};
//# sourceMappingURL=log-writer.d.ts.map