Extract T3 orchestration resume sequences without interpreting event bodies.
sequence/1 reads an event's sequence, a thread snapshot's
snapshotSequence, or a shell snapshot's nested snapshotSequence. Arrays
return their highest eligible sequence. Unknown event bodies still advance a
cursor. Missing/invalid sequence fields and completion markers return nil.
Project-enrichment shell snapshots marked resolvedRepositoryIdentityRoots
are always ignored: their high-water may precede replayed events on the wire.
Advancing from that marker can skip replay if a consumer crashes partway.
advance/2 is monotonic. Commit the result only after consuming the entire
chunk (and, for durable consumers, storing the corresponding application
changes). A cursor alone does not make T3 replay durable: the server can fall
back to a current-state snapshot when history is pruned or over its replay
budget. Scope stored cursors to the environment and subscription/filter set.
Summary
Functions
Advance an existing cursor after consuming items; never moves backwards.
Return the highest resumable sequence in a stream item or chunk array.
Types
@type t() :: non_neg_integer() | nil