Skip to content

ephemeral-key

ReplayKey = string & object

UUIDv7 key for one command, retained unchanged across ambiguous retries.

readonly [ephemeralKeyBrand]: "replay"

Distinguishes a replay command from other string identifiers.


CorrelationKey = string & object

UUIDv4 correlation key for a transport or external provider protocol.

readonly [ephemeralKeyBrand]: "correlation"

Distinguishes a transport correlation from a replay command.

replayKey(): ReplayKey

Mint once per command; the caller owns retention and completion.

ReplayKey


correlationKey(): CorrelationKey

Generate a correlation UUID without creating a durable domain identity.

CorrelationKey


createCorrelationSequence(): () => number

Own a connection-local sequence for protocols such as CDP that require numeric correlation IDs. A new connection owns a new sequence.

() => number