feat(ag-ui): preserve streamed messages through snapshot reconciliation - #1166
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
blove
enabled auto-merge (squash)
September 24, 2026 23:24
This branch was successfully deployed
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.
AG-UI's private runtime can own protocol data but cannot yet accumulate streaming messages and reconcile an authoritative snapshot without losing omitted reasoning or corrected message fields.
Add two pure, private transformations: six normalized text/reasoning events build owned message records, and snapshots replace matching IDs while preserving established positions and event-only reasoning/activity when their role is omitted. Changed records capture complete portable data; unchanged records retain references. Metadata-only chunks are applied, incoming metadata is owned before the SDK's shallow merge, and invalid or duplicate targets fail atomically. A removed open target cannot silently receive later content or turn a callback failure into success.
Validation:
Snapshot replacement preserves retained positions rather than promising backend reorder; an empty snapshot preserves event-only roles. This does not expose a public session, implement tool execution or establish full AG-UI/React parity. Caller admission, child routing, state and other protocol families remain separate work. No dependency, public export, argument-schema, release or publication changes.