True if any boundary is currently active. O(1).
Reset all transient state. Called by recorder composers from
their own clear() method, which the executor invokes before
each run.
Dev mode warns if any boundaries are still active when called —
likely indicates a missed stop upstream. Leaked keys are listed
(truncated to 10) so the wiring bug is findable.
Current transient state of ONE active boundary. undefined if no
boundary is active for key.
All currently-active boundaries.
Type-only readonly: TypeScript prevents mutation through
ReadonlyMap, but a runtime cast or non-TS consumer can mutate
the underlying Map and corrupt state. Don't.
Open a new boundary with initial transient state. If a boundary
with the same key is already active, the prior state is
overwritten (last-writer-wins). Dev mode warns — usually
indicates a missed stop upstream.
Close the boundary identified by key and return its FINAL
transient state (so the consumer can do any cleanup — e.g., emit
a snapshot to a SequenceStore for durable storage). The dropped-update
count for key restarts, as it does on start.
Evolve the transient state of an active boundary using a pure
updater function. Silent no-op if no boundary is active for key
(defensive against out-of-order events). Dev mode logs a rate-
limited warning. A boundary is active from start to stop
whatever its state holds: one started with undefined is updated.
Number of currently-active boundaries. O(1).