import { StateAdapter, Lock, QueueEntry } from '#compiled/chat/index.js'; /** * In-memory state adapter for development and testing. * * WARNING: State is not persisted across restarts. * Use RedisStateAdapter for production. */ declare class MemoryStateAdapter implements StateAdapter { private readonly subscriptions; private readonly locks; private readonly cache; private readonly queues; private connected; private connectPromise; connect(): Promise; disconnect(): Promise; subscribe(threadId: string): Promise; unsubscribe(threadId: string): Promise; isSubscribed(threadId: string): Promise; acquireLock(threadId: string, ttlMs: number): Promise; forceReleaseLock(threadId: string): Promise; releaseLock(lock: Lock): Promise; extendLock(lock: Lock, ttlMs: number): Promise; get(key: string): Promise; set(key: string, value: T, ttlMs?: number): Promise; setIfNotExists(key: string, value: unknown, ttlMs?: number): Promise; delete(key: string): Promise; appendToList(key: string, value: unknown, options?: { maxLength?: number; ttlMs?: number; }): Promise; enqueue(threadId: string, entry: QueueEntry, maxSize: number): Promise; dequeue(threadId: string): Promise; queueDepth(threadId: string): Promise; getList(key: string): Promise; private ensureConnected; private cleanExpiredLocks; _getSubscriptionCount(): number; _getLockCount(): number; } /** * Options for {@link createMemoryState}. The in-memory state adapter takes no * configuration today; the type exists so the package shape matches every * other state adapter (ergonomics + konsistent). */ type MemoryStateAdapterOptions = {}; declare function createMemoryState(_options?: MemoryStateAdapterOptions): MemoryStateAdapter; export { MemoryStateAdapter, type MemoryStateAdapterOptions, createMemoryState };