import { type DeleteRangeOptions } from './delete-range'; import { type BatchOperation, type ConditionalBatchCondition, type ScanOptions, type Storage, type StorageCapabilities } from './interface'; /** * In-memory {@link Storage} implementation. * * Backs the engine with a `Map` — fast, dependency-free, * and ideal for tests, ephemeral runs, and CI. State is lost when the process * exits, so don't use it for anything you care about between restarts. * * @example Run an engine with in-memory storage * ```ts * import { workflow, Engine, MemoryStorage } from '@lostgradient/weft'; * * await using storage = new MemoryStorage(); * await using engine = new Engine({ storage }); * engine.register( * workflow({ name: 'noop' }).execute(async function* () { * return 'done'; * }), * ); * * const handle = await engine.start('noop', null); * const result = await handle.result(); * ``` */ export declare class MemoryStorage implements Storage { #private; constructor(); capabilities(): StorageCapabilities; get(key: string): Promise; put(key: string, value: Uint8Array): Promise; delete(key: string): Promise; scan(prefix: string, options?: ScanOptions): AsyncIterable<[string, Uint8Array]>; batch(operations: BatchOperation[]): Promise; conditionalBatch(conditions: ConditionalBatchCondition[], operations: BatchOperation[]): Promise; has(key: string): Promise; deletePrefix(prefix: string): Promise; deleteRange(prefix: string, options: DeleteRangeOptions): Promise; keys(prefix: string, options?: ScanOptions): AsyncIterable; count(prefix: string): Promise; scoped(prefix: string): Storage; get size(): number; clear(): void; snapshot(): Map; [Symbol.dispose](): void; }