/** * lifecycle-store-memory — in-memory LifecycleStore implementation. * * The reference implementation for tests and dev environments (fallback when * DATABASE_URL is unset). All state transitions go through the request-lifecycle * state machine; illegal transitions throw rather than silently mutating state. * * Usage: * import { LifecycleStoreMemory } from 'human-in-the-loop' * * const store = new LifecycleStoreMemory() * const item = await store.create({ id: crypto.randomUUID(), ... }) * await store.complete(item.id, { verb: 'approve', resolvedBy: 'person-alex' }) * * // In tests: reset between cases * store.reset() */ import type { LifecycleItem } from './request-lifecycle.js'; import type { LifecycleStore, LifecycleStoreFilters, LifecycleItemPatch, LifecycleResponse } from './lifecycle-store.js'; /** * In-memory implementation of the LifecycleStore port. * * Thread-safety: JS is single-threaded; no locking needed for in-process use. * All mutation methods are async for interface compatibility and to ease * drop-in replacement with async implementations (Neon, etc.). * * Lifecycle enforcement: * - complete() → resolve() (claimed | in_progress → completed) * - reject() → resolve() with verb='reject' (claimed | in_progress → completed) * - escalate() → escalate() (active → escalated) * - cancel() → cancel() (active → cancelled) * All other transitions are illegal and throw. */ export declare class LifecycleStoreMemory implements LifecycleStore { private items; create(item: LifecycleItem): Promise; get(id: string): Promise; update(id: string, patch: LifecycleItemPatch): Promise; list(filters?: LifecycleStoreFilters): Promise; complete(id: string, response: LifecycleResponse): Promise; reject(id: string, reason: string, rejectedBy: string): Promise; escalate(id: string, toAssignee: string): Promise; cancel(id: string): Promise; reset(): void; count(): number; } //# sourceMappingURL=lifecycle-store-memory.d.ts.map