/**
 * Session store for ElizaOS.
 *
 * Provides file-based session storage with caching, locking, and
 * atomic updates. Designed to be used as the primary session
 * persistence layer.
 *
 * @module sessions/store
 */
import { type SessionEntry, type SessionStore } from "./types.js";
/**
 * Clear all session store caches (for testing).
 */
export declare function clearSessionStoreCacheForTest(): void;
export type LoadSessionStoreOptions = {
    /** Skip cache and read directly from disk */
    skipCache?: boolean;
};
/**
 * Load a session store from disk.
 *
 * @param storePath - Path to the store file
 * @param opts - Load options
 * @returns Session store (empty object if file doesn't exist)
 */
export declare function loadSessionStore(storePath: string, opts?: LoadSessionStoreOptions): SessionStore;
/**
 * Save a session store to disk with locking.
 *
 * @param storePath - Path to the store file
 * @param store - Store to save
 */
export declare function saveSessionStore(storePath: string, store: SessionStore): Promise<void>;
/**
 * Update a session store with a mutator function.
 *
 * Acquires a lock, reads the store, applies mutations, and saves.
 *
 * @param storePath - Path to the store file
 * @param mutator - Function to mutate the store
 * @returns Result of the mutator function
 */
export declare function updateSessionStore<T>(storePath: string, mutator: (store: SessionStore) => Promise<T> | T): Promise<T>;
/**
 * Update a single session entry.
 *
 * @param params - Update parameters
 * @returns Updated entry or null if not found
 */
export declare function updateSessionStoreEntry(params: {
    storePath: string;
    sessionKey: string;
    update: (entry: SessionEntry) => Promise<Partial<SessionEntry> | null>;
}): Promise<SessionEntry | null>;
/**
 * Get a session entry from the store.
 *
 * @param storePath - Path to the store file
 * @param sessionKey - Session key to look up
 * @returns Session entry or undefined
 */
export declare function getSessionEntry(storePath: string, sessionKey: string): SessionEntry | undefined;
/**
 * Get a session entry by session ID.
 *
 * @param storePath - Path to the store file
 * @param sessionId - Session ID to look up
 * @returns Session entry or undefined
 */
export declare function getSessionEntryById(storePath: string, sessionId: string): SessionEntry | undefined;
/**
 * Get the updated timestamp for a session.
 *
 * @param params - Query parameters
 * @returns Timestamp or undefined
 */
export declare function readSessionUpdatedAt(params: {
    storePath: string;
    sessionKey: string;
}): number | undefined;
/**
 * Create or update a session entry.
 *
 * @param params - Upsert parameters
 * @returns The created/updated entry
 */
export declare function upsertSessionEntry(params: {
    storePath: string;
    sessionKey: string;
    patch: Partial<SessionEntry>;
}): Promise<SessionEntry>;
/**
 * Delete a session entry.
 *
 * @param params - Delete parameters
 * @returns True if entry was deleted
 */
export declare function deleteSessionEntry(params: {
    storePath: string;
    sessionKey: string;
}): Promise<boolean>;
/**
 * List all session keys in a store.
 *
 * @param storePath - Path to the store file
 * @returns Array of session keys
 */
export declare function listSessionKeys(storePath: string): string[];
/**
 * List all sessions with their entries.
 *
 * @param storePath - Path to the store file
 * @returns Array of [key, entry] tuples
 */
export declare function listSessions(storePath: string): Array<[string, SessionEntry]>;
//# sourceMappingURL=store.d.ts.map