fix(agui): suppress resolved historical interrupts on connect replay (#2911) - #2922
Open
chang6666 wants to merge 3 commits into
Open
fix(agui): suppress resolved historical interrupts on connect replay (#2911)#2922chang6666 wants to merge 3 commits into
chang6666 wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Collaborator
|
cc @dragondyt |
…ntscope-ai#2920) Framework-level presentation-state store so reconnecting clients rebuild the visible conversation without re-running the agent; collapses the agentscope-ai#2911 copilotkit workaround into the data model (only the trailing unresolved interrupt is ever retained, so a resolved historical interrupt cannot reappear on reconnect). - store/: AguiJsonPatch (RFC 6902 applier), AguiThreadSnapshot, AguiSnapshotStore + InMemoryAguiSnapshotStore, AguiSnapshotAccumulator (absorbs resolved-interrupt suppression + dangling-tool synthesis), SnapshotRecordingEnricher (last observer, flush safety net), AguiSnapshotHydrator (read-only replay; empty -> 3-frame handshake) - AguiActivityConverter + shared AguiJsonDiff helper (mirrors state converter) - AguiAdapterConfig snapshot-store-enabled/snapshotStore (default off); AguiRequestProcessor.hydrate(), clearPendingInterrupts at beginRun, flush in doFinally - starters: gated AguiSnapshotStore bean + POST {path-prefix}/connect route (WebFlux RouterFunction + MVC conditional AguiConnectController) - copilotkit: migrate /connect to framework hydrator, delete suppressResolvedInterrupts/danglingToolCalls + obsolete test, enable store - docs (en/zh): Presentation Snapshot Store section + YAML sample - tests: store package, activity converter, config/processor/starter wiring and an end-to-end process-records -> hydrate-replays case
Contributor
|
The #2911 reconnect bug is clear, but this PR now includes two different changes. |
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.
Fix #2911
Connect replay (/agent/{agentId}/connect) re-projects stored AgentEvents through the same converters, so historical RequireUserConfirmEvents that a later run already resolved were converted back into RunFinishedInterruptOutcome, re-activating the frontend interrupt form and leaving the suspended tool rendered as Running instead of Done.
Changes
Verification