import type { ServerStateStore } from '../types/server.js'; /** Threads, runs, and cron jobs in process memory. The default, and enough for one replica. */ export declare class MemoryServerStore implements ServerStateStore { private readonly items; private sequence; /** Reads a record. */ get(namespace: readonly string[], key: string): V | undefined; /** Writes a record. */ put(namespace: readonly string[], key: string, value: V): void; /** Removes a record. */ delete(namespace: readonly string[], key: string): void; /** Records under a namespace, newest written first. Defaults to 50. */ list(namespace: readonly string[], options?: { limit?: number; }): V[]; } /** The part of a long-term `Store` the server state adapter uses. */ export interface StoreLike { /** Stores an item. */ put(namespace: readonly string[], key: string, value: unknown): Promise | void; /** Reads an item. */ get(namespace: readonly string[], key: string): Promise<{ value: unknown; } | undefined> | { value: unknown; } | undefined; /** Deletes an item. */ delete(namespace: readonly string[], key: string): Promise | void; /** Items under a namespace prefix, newest first. */ search(namespacePrefix: readonly string[], options?: { limit?: number; }): Promise> | Array<{ value: unknown; }>; } /** * Server state on top of a long-term store, so threads and runs live wherever memory already does. * * `MemoryStore`, `RedisStore`, and `PostgresStore` all satisfy `StoreLike`, which is what lets a * second replica see the first replica's threads without the server growing its own adapters. */ export declare function fromStore(store: StoreLike): ServerStateStore;