import type { PrWalkthroughJobRecord, WalkthroughWarning } from "./walkthrough-agent-store.js";
import type { WalkthroughParsedDiffForYamlMapping } from "./walkthrough-yaml-schema.js";
export declare const PR_WALKTHROUGH_ANALYSIS_BUNDLE_SCHEMA_VERSION = 1;
export declare const PR_WALKTHROUGH_ANALYSIS_BUNDLE_KIND = "pr_walkthrough_analysis_bundle";
export type PrWalkthroughAnalysisBundleTarget = {
    provider: "github" | string;
    owner?: string;
    repo?: string;
    number?: number;
    url?: string;
};
export type PrWalkthroughAnalysisBundleChangeset = {
    base_sha?: string;
    head_sha?: string;
    title?: string;
    body?: string;
    files_changed?: number;
    additions?: number;
    deletions?: number;
};
export type PrWalkthroughAnalysisBundleLine = {
    id?: string;
    kind: "context" | "add" | "del";
    side?: "old" | "new" | "context";
    old_line?: number;
    new_line?: number;
    text: string;
};
export type PrWalkthroughAnalysisBundleHunk = {
    id?: string;
    header: string;
    old_start?: number;
    old_lines?: number;
    new_start?: number;
    new_lines?: number;
    lines: PrWalkthroughAnalysisBundleLine[];
};
export type PrWalkthroughAnalysisBundleFile = {
    id?: string;
    path: string;
    old_path?: string | null;
    status?: string;
    additions?: number;
    deletions?: number;
    is_binary: boolean;
    is_generated: boolean;
    is_truncated: boolean;
    external_url?: string;
    blob_url?: string;
    raw_url?: string;
    contents_url?: string;
    hunks: PrWalkthroughAnalysisBundleHunk[];
};
export type PrWalkthroughAnalysisBundleExport = {
    provider: string;
    available: boolean;
    [key: string]: unknown;
};
export type PrWalkthroughAnalysisBundle = {
    schema_version: typeof PR_WALKTHROUGH_ANALYSIS_BUNDLE_SCHEMA_VERSION;
    kind: typeof PR_WALKTHROUGH_ANALYSIS_BUNDLE_KIND;
    generated_at: string;
    job_id: string;
    target: PrWalkthroughAnalysisBundleTarget;
    changeset: PrWalkthroughAnalysisBundleChangeset;
    limits?: Record<string, unknown>;
    warnings: WalkthroughWarning[];
    export?: PrWalkthroughAnalysisBundleExport;
    files: PrWalkthroughAnalysisBundleFile[];
};
export type PrWalkthroughAnalysisBundleMetadata = {
    schemaVersion: typeof PR_WALKTHROUGH_ANALYSIS_BUNDLE_SCHEMA_VERSION;
    kind: typeof PR_WALKTHROUGH_ANALYSIS_BUNDLE_KIND;
    artifactId: string;
    checksum: string;
    generatedAt: string;
    files: number;
};
export type ReadPrWalkthroughBundleRequest = {
    sessionId: string;
    jobId: string;
    mode?: "summary" | "manifest" | "files" | "file";
    path?: string;
    index?: number;
    offset?: number;
    limit?: number;
    hunkOffset?: number;
    hunkLimit?: number;
};
export declare class WalkthroughAnalysisBundleStore {
    private readonly rootDir;
    constructor(stateDir?: string);
    save(jobId: string, bundle: PrWalkthroughAnalysisBundle): {
        bundle: PrWalkthroughAnalysisBundle;
        metadata: PrWalkthroughAnalysisBundleMetadata;
    };
    load(jobId: string): PrWalkthroughAnalysisBundle | null;
    read(job: PrWalkthroughJobRecord, request?: Omit<ReadPrWalkthroughBundleRequest, "sessionId" | "jobId">): Record<string, unknown>;
    private filePath;
}
export declare function createAnalysisBundleFromParsedDiff(job: PrWalkthroughJobRecord, parsedDiff: WalkthroughParsedDiffForYamlMapping): PrWalkthroughAnalysisBundle;
export declare function analysisBundleToParsedDiff(bundle: PrWalkthroughAnalysisBundle): WalkthroughParsedDiffForYamlMapping;
export declare function missingBundleError(jobId: string): Error & {
    status?: number;
    extra?: Record<string, unknown>;
};
//# sourceMappingURL=walkthrough-analysis-bundle.d.ts.map