import type { PrWalkthroughCard as SharedPrWalkthroughCard, PrWalkthroughChangesetRef as SharedPrWalkthroughChangesetRef, WalkthroughExportCapability as SharedWalkthroughExportCapability, WalkthroughLimits as SharedWalkthroughLimits, WalkthroughWarning as SharedWalkthroughWarning } from "../../shared/pr-walkthrough/types.js";
type PreserveShared<T> = unknown extends T ? unknown : T;
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 PrWalkthroughCard = {
    id: string;
    phaseId: string;
    title: string;
    summary: string;
    diffBlocks: unknown[];
} & PreserveShared<SharedPrWalkthroughCard>;
type WalkthroughWarning = {
    code: string;
    severity: "info" | "warning" | "error";
    message: string;
    filePath?: string;
} & PreserveShared<SharedWalkthroughWarning>;
type WalkthroughLimits = Record<string, unknown> & PreserveShared<SharedWalkthroughLimits>;
type WalkthroughExportCapability = Record<string, unknown> & PreserveShared<SharedWalkthroughExportCapability>;
export declare const WALKTHROUGH_STORE_SCHEMA_VERSION = 1;
export interface WalkthroughStorePayload {
    changesetId: string;
    changeset: PrWalkthroughChangesetRef;
    cards: PrWalkthroughCard[];
    warnings: WalkthroughWarning[];
    limits?: WalkthroughLimits;
    export?: WalkthroughExportCapability;
}
export interface StoredWalkthroughPayload extends WalkthroughStorePayload {
    schemaVersion: typeof WALKTHROUGH_STORE_SCHEMA_VERSION;
    updatedAt: string;
}
export declare function storeWalkthrough(payload: WalkthroughStorePayload, stateDir?: string): StoredWalkthroughPayload;
export declare function saveWalkthrough(payload: WalkthroughStorePayload, stateDir?: string): StoredWalkthroughPayload;
export declare function loadWalkthrough(changesetId: string, stateDir?: string): StoredWalkthroughPayload | null;
export declare function getWalkthrough(changesetId: string, stateDir?: string): StoredWalkthroughPayload | null;
export declare class WalkthroughStore {
    private readonly rootDir;
    constructor(stateDir: string);
    save(payload: WalkthroughStorePayload): StoredWalkthroughPayload;
    get(changesetId: string): StoredWalkthroughPayload | null;
    delete(changesetId: string): boolean;
    list(): StoredWalkthroughPayload[];
    private readFile;
    private ensureDir;
    private filePath;
}
export declare function storageKeyForChangesetId(changesetId: string): string;
export {};
//# sourceMappingURL=walkthrough-store.d.ts.map