Skip to content

StreamEnvelope

Defined in: packages/contracts/src/stream-envelope.ts:31

headers: object

Defined in: packages/contracts/src/stream-envelope.ts:38

optional lsn?: string

Postgres commit LSN ("HI/LO" hex), stamped by the engine on live shape envelopes.

Absent on backfill rows, and absent in library (no-Postgres) mode. That absence is why ADR-0056 floors catch-up on the stream OFFSET rather than on this: a frontier that only some envelopes can advance is not a frontier.

optional offset?: string

Stamped by the durable-streams server on read; never sent by a producer.

operation: StreamOperation

optional seq?: number

Position of the change within its transaction, stamped by the replication ingestor on table-stream envelopes so the engine’s own tailer can skip at-least-once duplicates. Not present on shape streams, which is what we read — recorded so nobody builds deduplication on a field that will never arrive.

optional txid?: string


key: string

Defined in: packages/contracts/src/stream-envelope.ts:35

The stringified primary key. Composite keys are already joined by the engine.


type: string

Defined in: packages/contracts/src/stream-envelope.ts:33

The table name — the collection discriminator.


optional value?: StreamRow

Defined in: packages/contracts/src/stream-envelope.ts:37

Present for insert/update/upsert; absent for delete, which is key-only.