BackendFactory: (runtime: BackendRuntime) => MaybePromise<AnyBackendProtocol>Factory function type for creating backend instances.
Backends receive BackendRuntime which contains the current state and runtime information, extracted from the execution context.
// Using in middleware
const middleware = createFilesystemMiddleware({
backend: (runtime) => new StateBackend(runtime)
});