import type { Octokit } from '@octokit/rest';
export type CheckRunStatus = 'queued' | 'in_progress' | 'completed';
export type CheckRunConclusion = 'success' | 'failure' | 'neutral' | 'cancelled' | 'timed_out' | 'action_required' | 'skipped';
export interface GithubCheckRunParams {
    owner: string;
    repo: string;
    headSHA: string;
    name: string;
    detailsUrl?: string;
    title?: string;
    summary?: string;
    pullNumber?: number;
    includeCheckRunComment?: boolean;
    checkRunComment?: string;
}
export declare class GithubCheckRun {
    private readonly octokit;
    private readonly owner;
    private readonly repo;
    private readonly headSHA;
    private readonly name;
    private readonly detailsUrl?;
    private readonly title;
    private readonly pullNumber?;
    private readonly includeCheckRunComment;
    private readonly checkRunComment?;
    private hasCommented;
    private creatingPromise?;
    private closing;
    private closed;
    private buffer;
    private checkRunId?;
    private lastStatus;
    private detailsFormatter;
    private _summaryOverride?;
    constructor(octokit: Octokit, params: GithubCheckRunParams);
    /**
     * Configure markdown formatting for the details (output.text).
     * Example: ch.mdOptionsDetails({ quotes: 'terraform' })
     * Result:
     * ```terraform
     * <log>
     * ```
     */
    mdOptionsDetails(opts: {
        quotes: string;
    }): void;
    set summary(data: string);
    get summary(): string | undefined;
    /**
     * Append log text and optionally set status ('queued' | 'in_progress').
     */
    update(text: string, status?: Exclude<CheckRunStatus, 'completed'>): void;
    /**
     * Finalize the check with a conclusion. Flushes buffered text, marks completed.
     */
    close(finalText: string, ok: boolean): Promise<void>;
    private __ensureCreated;
    private __updateCheckRun;
    private __buildCheckRunUrl;
    private buildOutputTextAndSummary;
    private __ensureAndUpdateStickyComment;
}
/**
 * Factory: build a GithubCheckRun using an installation token for the given org.
 */
export declare function createCheckRunForOrg(org: string, owner: string, repo: string, name: string, opts?: {
    headSHA?: string;
    pullNumber?: number;
    detailsUrl?: string;
    title?: string;
    summary?: string;
    includeCheckRunComment?: boolean;
    checkRunComment?: string;
}): Promise<GithubCheckRun>;
export declare function createCheckRun(owner: string, repo: string, name: string, opts?: {
    headSHA?: string;
    pullNumber?: number;
    detailsUrl?: string;
    title?: string;
    summary?: string;
    includeCheckRunComment?: boolean;
    checkRunComment?: string;
}): Promise<GithubCheckRun>;
export declare const CheckRun: typeof GithubCheckRun;
