import { type CodeReviewDraft, type CodeReviewInlineComment, type CodeReviewOrchestratorAction, type CodeReviewPublishedReceipt, type CodeReviewState, type CodeReviewSubagentStatus } from "./review-state.js";
export declare const DEFAULT_CODE_REVIEW_REVIEWS_DIRECTORY = ".poe-code/code-review/reviews";
export declare const CODE_REVIEW_DIRECTORY = ".poe-code/code-review";
export declare const CODE_REVIEW_ARCHIVE_DIRECTORY = "archive";
export interface CreateCodeReviewInput {
    sessionId: string;
    prUrl: string;
    selectedAgent: string;
    selectedProfiles: string[];
    timestamp?: string;
    subagents?: Record<string, CodeReviewSubagentStatus>;
}
export interface CodeReviewStoreOptions {
    directory?: string;
    now?: () => Date;
    lockTimeoutMs?: number;
}
export interface ReadCodeReviewDraftInput extends CodeReviewStoreOptions {
    cwd: string;
    prUrl: string;
    draftStore?: string;
}
export declare function codeReviewFileName(prUrl: string): string;
export declare function resolveCodeReviewStoreDirectory(cwd: string, directory?: string): string;
export declare function createCodeReviewState(input: CreateCodeReviewInput): CodeReviewState;
export declare function readCodeReviewDraft(input: ReadCodeReviewDraftInput): Promise<CodeReviewState | undefined>;
export declare class CodeReviewYamlStore {
    #private;
    readonly directory: string;
    readonly archiveDirectory: string;
    constructor(options?: CodeReviewStoreOptions);
    pathForPullRequest(prUrl: string): string;
    create(input: CreateCodeReviewInput): Promise<CodeReviewState>;
    startRun(input: CreateCodeReviewInput): Promise<CodeReviewState>;
    read(prUrl: string): Promise<CodeReviewState | undefined>;
    addRawReview(prUrl: string, actor: string, review: CodeReviewDraft): Promise<CodeReviewState>;
    updateSubagent(prUrl: string, actor: string, status: CodeReviewSubagentStatus): Promise<CodeReviewState>;
    addSubagent(prUrl: string, actor: string, status: CodeReviewSubagentStatus): Promise<CodeReviewState>;
    setMergedReview(prUrl: string, review: CodeReviewDraft): Promise<CodeReviewState>;
    editMergedInlineComment(prUrl: string, index: number, comment: CodeReviewInlineComment): Promise<CodeReviewState>;
    deleteMergedInlineComment(prUrl: string, index: number): Promise<CodeReviewState>;
    discardMergedReview(prUrl: string): Promise<CodeReviewState>;
    appendOrchestratorAction(prUrl: string, action: Omit<CodeReviewOrchestratorAction, "at"> & {
        at?: string;
    }): Promise<CodeReviewState>;
    commit(prUrl: string, receipt: Omit<CodeReviewPublishedReceipt, "publishedAt"> & {
        publishedAt?: string;
    }): Promise<{
        state: CodeReviewState;
        archivePath: string;
    }>;
    publish<T>(prUrl: string, publish: (state: CodeReviewState) => Promise<{
        receipt: Omit<CodeReviewPublishedReceipt, "publishedAt"> & {
            publishedAt?: string;
        };
        result: T;
    }>): Promise<{
        state: CodeReviewState;
        archivePath: string;
        result: T;
    }>;
    resumePublished(prUrl: string): Promise<{
        state: CodeReviewState;
        archivePath: string;
    } | undefined>;
}
