@ai-digital-factory/state-flow-storage-memory
v0.2.0
Published
In-memory storage adapter for the State Flow durable runtime: data lasts as long as the process (ADR 0109).
Readme
@ai-digital-factory/state-flow-storage-memory
In-memory storage for the State Flow durable runtime (ADR 0109). It needs no files and runs anywhere the runtime does.
import { createRuntime } from "@ai-digital-factory/state-flow-runtime";
import { memoryStorage } from "@ai-digital-factory/state-flow-storage-memory";
await using runtime = await createRuntime({ storage: memoryStorage() });The data lives in the object memoryStorage() returns, for as long as the process does. Every guarantee holds while the process runs, including retries, reconcile and Unresolved States for External Transitions. A crash or deploy loses in-flight work: an effect whose outcome was unknown is never reconciled. Use @ai-digital-factory/state-flow-storage-sqlite when instances must survive a restart.
One runtime owns the storage at a time. Close it and open another runtime with the same object to keep the data, which lets tests check recovery without files.
