AgentAtomicScope typedef

AgentAtomicScope = Future<void> Function(String label, Future<void> body())

Runs a body as one atomic unit — all of it rolled back together if it throws. An application supplies one over whatever it writes (one undo group per document, a database transaction, …).

Implementation

typedef AgentAtomicScope =
    Future<void> Function(String label, Future<void> Function() body);