Repository navigation
Conversation
…ticipant The SFU leaves participant_identity as the attributed participant when an agent sends a text stream header or chat message on someone else's behalf, but stamps the agent's identity on the stream's chunks and trailer. Receivers can't tell which participant to expect the rest of the stream from. The new sender oneof carries the real sender in those cases: sender_identity, or sender_hidden when that sender is a hidden participant. Only the SFU sets it (from server protocol 20).
🦋 Changeset detectedLatest commit: 61b8900 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
1 task
1egoman
commented
Nov 10, 2026
Comment on lines
+474
to
+486
| // The participant that actually sent this packet, when `participant_identity` names a different | ||
| // participant (an agent sending a text stream or chat message on behalf of another participant). | ||
| // Set only by the SFU, which clears any value a client sends; unset when `participant_identity` is | ||
| // the real sender. Available from server protocol 20. | ||
| oneof sender { | ||
| // identity of the participant that actually sent this packet | ||
| string sender_identity = 19; | ||
| // the participant that actually sent this packet is hidden, so its identity is withheld; only | ||
| // ever true | ||
| bool sender_hidden = 20; | ||
| } | ||
|
|
||
| // NEXT_ID: 21 |
Contributor
Author
There was a problem hiding this comment.
Note for reviewers: I am assuming currently I am ok to keep this non optional because it would be paired with a SFU protocol version bump.
But I'm not 100% sure about that, is the goal that the protobufs in here should remain backwards compatible with older SFU versions as well as the latest?
Contributor
There was a problem hiding this comment.
I think it is fine. The dependencies are updated. If we have to go back to pinning a different hash, will have to change the corresponding code.
1egoman
marked this pull request as ready for review
November 10, 2026 23:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an agent sends a text stream on behalf of another participant (e.g.
lk.transcription), the SFU leaves the header'sparticipant_identityas the attributed participant and marks itgenerated, but overwrites the identity on the stream's chunks and trailer with the agent's own. A receiver can't know from the header which participant the rest of the stream should come from, so it can't check that a stream's packets all come from one sender without breaking these streams (see livekit/client-sdk-js#2215, reverted in livekit/client-sdk-js#2242).Change
Adds a
senderoneof toDataPacket:string sender_identity = 19: the participant that actually sent the packet.bool sender_hidden = 20: the real sender is a hidden participant, so its identity is withheld (only evertrue).Only the SFU sets it, and only when
participant_identitynames someone other than the real sender (today: an agent's text stream header or chat message sent on another participant's behalf). The SFU clears any value a client sends. When it's unset,participant_identityis the real sender, so receivers expect a stream's chunks and trailer fromsender_identityif set, from a hidden participant ifsender_hidden, and fromparticipant_identityotherwise.The SFU side will bump the server protocol to 20 at the same time as this is merged, which lets clients rely on the field being set when it's needed. See my comment below though, I'm not 100% sure this is a good assumption.
participant_identitykeeps its current meaning, so existing clients are unaffected.