/**
 * StorageBackend -- Pluggable storage interface for governance data.
 *
 * Provides a uniform API for persisting governance state, allowing
 * future backends (S3, database, etc.) without changing module code.
 * Ships with FileSystemBackend as the default zero-dependency implementation.
 *
 * T-026: StorageBackend interface for swappable persistence.
 * T-028: State file versioning with migration support.
 *
 * @connexum/ai-governance
 */
/** Current schema version for state files */
export declare const CURRENT_SCHEMA_VERSION = 1;
export interface StorageBackend {
    /** Read a value by key. Returns undefined if not found. */
    get<T = unknown>(key: string): Promise<T | undefined>;
    /** Write a value by key. */
    set<T = unknown>(key: string, value: T): Promise<void>;
    /** Delete a key. Returns true if it existed. */
    delete(key: string): Promise<boolean>;
    /** Check if a key exists. */
    has(key: string): Promise<boolean>;
    /** List all keys matching an optional prefix. */
    keys(prefix?: string): Promise<string[]>;
    /** Get metadata about a stored value. */
    metadata(key: string): Promise<StorageMetadata | undefined>;
}
export interface StorageMetadata {
    key: string;
    sizeBytes: number;
    createdAt: string;
    updatedAt: string;
    schemaVersion: number;
    checksum: string;
}
/** Wrapper that adds versioning to stored values */
export interface VersionedValue<T = unknown> {
    schemaVersion: number;
    data: T;
    createdAt: string;
    updatedAt: string;
    checksum: string;
}
/** Migration function for upgrading schema versions */
export type SchemaMigration = (data: unknown, fromVersion: number) => unknown;
/**
 * FileSystemBackend -- Default storage using the local filesystem.
 */
export declare class FileSystemBackend implements StorageBackend {
    private baseDir;
    private migrations;
    constructor(baseDir: string);
    /**
     * Register a migration function for upgrading from a specific version.
     */
    registerMigration(fromVersion: number, migration: SchemaMigration): void;
    get<T = unknown>(key: string): Promise<T | undefined>;
    set<T = unknown>(key: string, value: T): Promise<void>;
    delete(key: string): Promise<boolean>;
    has(key: string): Promise<boolean>;
    keys(prefix?: string): Promise<string[]>;
    metadata(key: string): Promise<StorageMetadata | undefined>;
    private keyToPath;
    private computeChecksum;
    private migrate;
    private scanKeys;
}
//# sourceMappingURL=storage-backend.d.ts.map