import type { PrWalkthroughChangesetRef, PrWalkthroughDiffBlock, PrWalkthroughPhaseId, WalkthroughWarning } from "../../shared/pr-walkthrough/types.js";
import type { WalkthroughStorePayload } from "./walkthrough-store.js";
export interface PrWalkthroughValidationError {
    path: string;
    message: string;
}
export interface PrWalkthroughValidationSummary {
    code: "YAML_SCHEMA_INVALID";
    message: string;
    errors: PrWalkthroughValidationError[];
    retryable: true;
}
export type PrWalkthroughYamlValidationResult = {
    ok: true;
    document: PrWalkthroughYamlDocument;
} | {
    ok: false;
    summary: PrWalkthroughValidationSummary;
};
export interface PrWalkthroughYamlLaunchTarget {
    provider?: "github" | "local" | string;
    owner?: string;
    repo?: string;
    number?: number | string;
    prUrl?: string;
    url?: string;
    baseSha?: string;
    headSha?: string;
    changesetId?: string;
}
export interface PrWalkthroughYamlValidationOptions {
    target?: PrWalkthroughYamlLaunchTarget;
    maxYamlBytes?: number;
    maxStringLength?: number;
    maxArrayItems?: number;
}
export interface PrWalkthroughYamlDocument {
    schema_version: 1;
    pr: PrWalkthroughYamlPr;
    walkthrough: PrWalkthroughYamlWalkthrough;
}
export interface PrWalkthroughYamlPr {
    provider: "github";
    owner: string;
    repo: string;
    number: number;
    title: string;
    url: string;
    base_sha: string;
    head_sha: string;
    original_description: {
        body: string;
        source: "gh_api" | "gh_cli" | "unknown";
        fetched_at: string;
    };
    stats: {
        files_changed: number;
        additions: number;
        deletions: number;
    };
}
export interface PrWalkthroughYamlWalkthrough {
    context: {
        why_created: string;
        problem_solved: string;
        why_worth_merging: string;
        merge_concerns: string;
        author_intent: string;
        reviewer_map: string;
    };
    merge_assessment: {
        recommendation: "approve" | "comment" | "request_changes" | "unknown";
        confidence: "low" | "medium" | "high";
        summary: string;
        blocking_concerns: string[];
        non_blocking_concerns: string[];
    };
    design_decisions: PrWalkthroughYamlDesignDecision[];
    review_chunks: PrWalkthroughYamlReviewChunk[];
    omissions_and_followups: PrWalkthroughYamlOmission[];
    audit: {
        remaining_changed_areas: string[];
        low_signal_or_mechanical_changes: string[];
        generated_or_binary_files: string[];
        reviewer_checklist: string[];
    };
    display: {
        phase_order: PrWalkthroughPhaseId[];
        chunk_order: string[];
    };
}
export interface PrWalkthroughYamlRelevantHunk {
    file: string;
    hunk_header: string;
    line_range?: string;
    why_relevant: string;
}
export interface PrWalkthroughYamlDesignDecision {
    id: string;
    title: string;
    nav_label?: string;
    explanation: string;
    chosen_approach: string;
    alternatives_considered: Array<{
        option: string;
        pros: string[];
        cons: string[];
    }>;
    tradeoffs: string[];
    suggested_reviewer_concerns: string[];
    relevant_hunks: PrWalkthroughYamlRelevantHunk[];
}
export interface PrWalkthroughYamlReviewChunk {
    id: string;
    phase: "significant" | "other" | "audit";
    title: string;
    nav_label?: string;
    reviewer_goal: string;
    explanation: string;
    files: string[];
    relevant_hunks: PrWalkthroughYamlRelevantHunk[];
    suggested_concerns: Array<{
        severity: "blocking" | "non_blocking" | "question" | "nit";
        concern: string;
        suggested_comment: string;
        anchors: PrWalkthroughYamlAnchor[];
    }>;
    positive_notes: string[];
}
export interface PrWalkthroughYamlAnchor {
    file: string;
    hunk_header: string;
    line_range?: string;
    line?: number;
}
export interface PrWalkthroughYamlOmission {
    category: "tests" | "docs" | "migration" | "telemetry" | "security" | "performance" | "compatibility" | "cleanup" | "other";
    expected_artifact: string;
    evidence_checked: string;
    concern: string;
    suggested_comment: string;
    severity: "blocking" | "non_blocking" | "question";
}
export interface MapYamlToWalkthroughPayloadOptions {
    changesetId?: string;
    target?: PrWalkthroughYamlLaunchTarget;
    warnings?: WalkthroughWarning[];
    limits?: WalkthroughStorePayload["limits"];
    export?: WalkthroughStorePayload["export"];
}
export interface WalkthroughParsedDiffForYamlMapping {
    changeset?: Partial<PrWalkthroughChangesetRef>;
    files?: unknown[];
    diffBlocks?: PrWalkthroughDiffBlock[];
    warnings?: WalkthroughWarning[];
    limits?: WalkthroughStorePayload["limits"];
    export?: WalkthroughStorePayload["export"];
}
export declare function validatePrWalkthroughYaml(yamlText: string, options?: PrWalkthroughYamlValidationOptions): PrWalkthroughYamlValidationResult;
export declare function mapYamlToWalkthroughPayload(document: PrWalkthroughYamlDocument, parsedDiff?: WalkthroughParsedDiffForYamlMapping, options?: MapYamlToWalkthroughPayloadOptions): WalkthroughStorePayload;
//# sourceMappingURL=walkthrough-yaml-schema.d.ts.map