Skip to content
providerkit
GitHub

ChatEnvelope

Defined in: react/src/protocol.ts:309

What every event carries besides its own fields.

optional segment?: string;

Defined in: react/src/protocol.ts:322

One numbering space for seq: a host run, or the continuation after an approval. A new segment starts the count again. It means nothing without a seq.


optional seq?: number;

Defined in: react/src/protocol.ts:319

The event’s position inside segment: a whole number, 0 or more, that only goes up. A client drops any number it has already reached and resumes after the last one.

Give every numbered event a number of its own. Two events with one number are one event sent twice, and the second is dropped. When one thing on the host becomes several events, number the last and leave the others without. An event without a number always applies, so leave it out only where applying twice is harmless: a settled part, a message, a run. A text delta is never that.


v: 1;

Defined in: react/src/protocol.ts:310