import type { GitDiffSummary, GitRepoStatus, GitSnapshot, GitSnapshotCompareSummary, GitSnapshotReason } from './git-types.js';
export type MaybePromise<T> = T | Promise<T>;
export type GitStatusProvider = (workspace: string) => MaybePromise<GitRepoStatus>;
export type GitDiffSummaryProvider = (workspace: string, status: GitRepoStatus) => MaybePromise<GitDiffSummary>;
export interface GitSnapshotStoreOptions {
    capacity?: number;
    getStatus?: GitStatusProvider;
    getDiffSummary?: GitDiffSummaryProvider;
    now?: () => number;
    idPrefix?: string;
}
export interface GitSnapshotCreateInput {
    workspace: string;
    reason: GitSnapshotReason;
    sessionId?: string;
    turnId?: string;
    getStatus?: GitStatusProvider;
    getDiffSummary?: GitDiffSummaryProvider;
}
export interface GitSnapshotListQuery {
    workspace?: string;
    sessionId?: string;
    limit?: number;
}
export interface GitSnapshotStore {
    create(input: GitSnapshotCreateInput): Promise<GitSnapshot>;
    get(id: string): GitSnapshot | undefined;
    compare(beforeSnapshotId: string, afterSnapshotId: string): GitSnapshotCompareSummary;
    list(query?: GitSnapshotListQuery): GitSnapshot[];
    clear(): void;
}
export declare function compareGitSnapshots(before: GitSnapshot, after: GitSnapshot): GitSnapshotCompareSummary;
export declare class InMemoryGitSnapshotStore implements GitSnapshotStore {
    private readonly snapshots;
    private readonly order;
    private readonly capacity;
    private readonly now;
    private readonly idPrefix;
    private readonly getStatusProvider?;
    private readonly getDiffSummaryProvider?;
    private counter;
    constructor(options?: GitSnapshotStoreOptions);
    create(input: GitSnapshotCreateInput): Promise<GitSnapshot>;
    get(id: string): GitSnapshot | undefined;
    compare(beforeSnapshotId: string, afterSnapshotId: string): GitSnapshotCompareSummary;
    list(query?: GitSnapshotListQuery): GitSnapshot[];
    clear(): void;
    private enforceCapacity;
}
export declare function createGitSnapshotStore(options?: GitSnapshotStoreOptions): GitSnapshotStore;
