Skip to content

DurableGroupStateStore

Defined in: packages/core/src/group-state-store.ts:211

Atomic persistence boundary for encrypted provider state, one-time KeyPackages, durable delivery, and replay metadata.

Implementations must serialize transactions independently for each canonical store key. An absent key has logical revision 0 and load represents it as undefined; a transaction over an absent key therefore observes baseRevision === 0. Every successful transaction, including a no-op, commits exactly baseRevision + 1. A callback rejection, thrown exception, validation failure, or revision overflow leaves both the prior revision and all prior data unchanged.

Count retention for outbox and control-record replay metadata is enforced by the coordinator. Consumed KeyPackage markers are bounded by the store and fail closed at capacity so a consumed reference is never made reusable by eviction.

load(key): Promise<GroupStateStoreSnapshot | undefined>

Defined in: packages/core/src/group-state-store.ts:212

GroupStateStoreKey

Promise<GroupStateStoreSnapshot | undefined>


transaction<T>(key, operation): Promise<T>

Defined in: packages/core/src/group-state-store.ts:213

T

GroupStateStoreKey

(transaction) => T | Promise<T>

Promise<T>