export interface StoreEntry {
    value: string | null;
    meta: Record<string, unknown> | null;
    created_at: number;
    updated_at: number;
}
export declare class StoreManager {
    private storeDir;
    /** Lazy-loaded in-memory mirror. Null until the file has been opened. */
    private cache;
    /**
     * Collections whose on-disk file couldn't be parsed. Any operation on these
     * collections returns an error until an operator inspects/fixes the file.
     * This is deliberately fail-CLOSED: silently treating a corrupted state
     * file as empty (the prior behavior) would re-process every historical id
     * and let a subsequent put() overwrite the corrupted file with a single-entry
     * blob, permanently destroying recovery information.
     */
    private erroredCollections;
    constructor(workspace: string);
    has(collection: string, id: string): string;
    put(collection: string, id: string, value?: string, meta?: Record<string, unknown>): string;
    get(collection: string, id: string): string;
    list(collection: string, options?: {
        limit?: number;
        sinceMs?: number;
    }): string;
    count(collection: string): string;
    delete(collection: string, id: string): string;
    /**
     * Bulk insert. Used by the migration script; not exposed as an LLM action.
     * Returns counts so the script can report how many were added vs already
     * present. Throws on validation / errored-collection so the migration
     * script can refuse to archive originals when bulk insert isn't safe.
     */
    bulkPut(collection: string, entries: {
        id: string;
        value?: string;
        meta?: Record<string, unknown>;
    }[]): {
        added: number;
        updated: number;
        rejected: number;
    };
    /** For tests / debug. */
    collectionPath(collection: string): string;
    private validateCollectionName;
    private validateCollectionAndId;
    /**
     * Returns an error message if this collection is in the errored state
     * (its on-disk file failed to parse), else null. Side-effects load() if
     * the collection hasn't been touched yet — load() is what populates
     * erroredCollections.
     */
    private checkErrored;
    private load;
    private persist;
}
