import { Message, ChatMemory } from '@agentskit/core'; interface WebStorageLike { readonly getItem: (key: string) => string | null; readonly setItem: (key: string, value: string) => void; readonly removeItem: (key: string) => void; } interface WebStorageMemoryMigration { readonly keys: readonly string[]; readonly read: (value: unknown, key: string) => readonly Message[] | undefined; } interface WebStorageMemoryOptions { readonly key: string; readonly getStorage: () => WebStorageLike | undefined; readonly maxMessages?: number; readonly maxRecordBytes?: number; readonly migration?: WebStorageMemoryMigration; } /** * Creates a validated, bounded ChatMemory over an injected browser Web Storage backend. * The storage getter is evaluated lazily so browser globals can remain SSR-safe. */ declare function createWebStorageMemory({ key, getStorage, maxMessages, maxRecordBytes, migration, }: WebStorageMemoryOptions): ChatMemory; export { type WebStorageLike, type WebStorageMemoryMigration, type WebStorageMemoryOptions, createWebStorageMemory };