import type { ContextRecordV1 } from "../types-v1.js";
import type { ContextRecordV2 } from "../types.js";
export type AnyContextRecord = ContextRecordV1 | ContextRecordV2;
export type ContextVersion = 1 | 2;
export type MigrationResult<T> = {
    success: true;
    record: T;
} | {
    success: false;
    deleted: true;
    reason: string;
};
export interface Migration<From, To> {
    fromVersion: ContextVersion;
    toVersion: ContextVersion;
    migrate(record: From): To;
}
export declare function isContextRecordV1(record: unknown): record is ContextRecordV1;
export declare function isContextRecordV2(record: unknown): record is ContextRecordV2;
export declare function detectVersion(record: unknown): number;
//# sourceMappingURL=types.d.ts.map