import type { PrWalkthroughCard as SharedPrWalkthroughCard, PrWalkthroughChangesetRef as SharedPrWalkthroughChangesetRef, PrWalkthroughDiffBlock as SharedPrWalkthroughDiffBlock, PrWalkthroughDiffLine as SharedPrWalkthroughDiffLine, PrWalkthroughHunk as SharedPrWalkthroughHunk, PrWalkthroughPhaseId as SharedPrWalkthroughPhaseId, PrWalkthroughSuggestedComment as SharedPrWalkthroughSuggestedComment, WalkthroughWarning as SharedWalkthroughWarning } from "../../shared/pr-walkthrough/types.js";
type PreserveShared<T> = unknown extends T ? unknown : T;
type LocalPhaseId = "orientation" | "design" | "significant" | "other" | "audit";
type PrWalkthroughPhaseId = LocalPhaseId & PreserveShared<SharedPrWalkthroughPhaseId>;
type PrWalkthroughDiffLine = {
    id: string;
    side: "old" | "new" | "context";
    oldLine?: number;
    newLine?: number;
    text: string;
    kind: "context" | "add" | "del";
} & PreserveShared<SharedPrWalkthroughDiffLine>;
type PrWalkthroughHunk = {
    id: string;
    header: string;
    lines: PrWalkthroughDiffLine[];
} & PreserveShared<SharedPrWalkthroughHunk>;
type PrWalkthroughDiffBlock = {
    id: string;
    filePath: string;
    oldPath?: string;
    hunks: PrWalkthroughHunk[];
} & PreserveShared<SharedPrWalkthroughDiffBlock>;
type PrWalkthroughSuggestedComment = {
    id: string;
    cardId: string;
    diffBlockId: string;
    lineId: string;
    body: string;
} & PreserveShared<SharedPrWalkthroughSuggestedComment>;
type PrWalkthroughCard = {
    id: string;
    phaseId: PrWalkthroughPhaseId;
    title: string;
    summary: string;
    rationale?: string;
    diffBlocks: PrWalkthroughDiffBlock[];
    suggestedComments?: PrWalkthroughSuggestedComment[];
    cardSuggestions?: string[];
    checklist?: string[];
} & PreserveShared<SharedPrWalkthroughCard>;
type PrWalkthroughChangesetRef = {
    baseSha: string;
    headSha: string;
    provider?: string;
    externalUrl?: string;
    prUrl?: string;
    prNumber?: string | number;
    prTitle?: string;
    prBody?: string;
    title?: string;
    filesChanged?: number;
    additions?: number;
    deletions?: number;
} & PreserveShared<SharedPrWalkthroughChangesetRef>;
type WalkthroughWarning = {
    code: string;
    severity: "info" | "warning" | "error";
    message: string;
    filePath?: string;
} & PreserveShared<SharedWalkthroughWarning>;
export type WalkthroughFileStatus = "added" | "modified" | "deleted" | "renamed" | "copied" | "binary";
export interface WalkthroughParsedFile {
    filePath: string;
    oldPath?: string;
    status?: WalkthroughFileStatus | string;
    diffBlocks?: PrWalkthroughDiffBlock[];
    warnings?: WalkthroughWarning[];
    isGenerated?: boolean;
    isTruncated?: boolean;
    isBinary?: boolean;
}
export interface WalkthroughLlmCardCandidate {
    id?: unknown;
    phaseId?: unknown;
    title?: unknown;
    navLabel?: unknown;
    summary?: unknown;
    rationale?: unknown;
    diffBlockIds?: unknown;
    diffBlocks?: unknown;
    suggestedComments?: unknown;
    cardSuggestions?: unknown;
    checklist?: unknown;
}
export interface WalkthroughCardSynthesisOptions {
    warnings?: WalkthroughWarning[];
    allowLlm?: boolean;
    maxLlmInputBytes?: number;
    llm?: ((input: WalkthroughLlmInput) => Promise<unknown> | unknown) | {
        synthesiseWalkthroughCards(input: WalkthroughLlmInput): Promise<unknown> | unknown;
    };
    maxCards?: number;
}
export interface WalkthroughLlmInput {
    changeset: PrWalkthroughChangesetRef;
    files: WalkthroughParsedFile[];
    warnings: WalkthroughWarning[];
    diffBlockIds: string[];
}
export declare function synthesiseWalkthroughCards(changeset: PrWalkthroughChangesetRef, files: WalkthroughParsedFile[], options?: WalkthroughCardSynthesisOptions): Promise<PrWalkthroughCard[]>;
export declare function validateSynthesisedCards(raw: unknown, files: WalkthroughParsedFile[]): PrWalkthroughCard[];
export {};
//# sourceMappingURL=card-synthesis.d.ts.map