/**
 * Ring buffer for per-step log line retention.
 *
 * Stores the last N ANSI-stripped log lines per step for use in check run
 * summaries. Log lines are keyed by `{runId}:{jobId}:{stepIndex}` so each
 * step gets its own independent buffer. When the buffer exceeds maxLines,
 * the oldest lines are evicted.
 *
 * The totalCount field tracks how many lines were added in total (not just
 * retained), enabling the truncation indicator: "showing last 20 of N lines".
 */
/** Entry stored per step in the buffer. */
export interface StepLogEntry {
    /** The retained (last N) log lines, ANSI-stripped. */
    lines: string[];
    /** Total number of lines added (including evicted ones). */
    totalCount: number;
}
export declare class StepLogBuffer {
    private readonly maxLines;
    private readonly entries;
    constructor(opts?: {
        maxLines?: number;
    });
    /**
     * Build the composite key for a step.
     */
    private buildKey;
    /**
     * Add log lines for a step.
     *
     * ANSI codes are stripped from each line before storage.
     * When the buffer exceeds maxLines, the oldest lines are evicted.
     */
    addLines(key: {
        runId: string;
        jobId: string;
        stepIndex: number;
    }, rawLines: string[]): void;
    /**
     * Get the last N lines and total count for a step.
     *
     * Returns undefined if no lines have been added for this step.
     */
    getLastLines(key: {
        runId: string;
        jobId: string;
        stepIndex: number;
    }): StepLogEntry | undefined;
    /**
     * Remove all entries for a given runId.
     *
     * Called when the execution tracker prunes a completed run from memory.
     */
    cleanup(runId: string): void;
}
//# sourceMappingURL=step-log-buffer.d.ts.map