Repository navigation
Conversation
Pin the example runtime's @copilotkit/runtime to 1.79.0 and add runtime-1.91 for the second generation. record-a2ui.ts drives each runtime's A2UI middleware with a scripted AG-UI agent, so no model or key is needed, and normalizes UUIDs and timestamps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c ones Eighteen fixtures, nine cases per runtime version, checked by fixtures_test. The synthetic fixtures stay for the shapes the recordings don't cover; their notes now name their recorded counterparts, and single-surface tool-result activities use the recorded a2ui-surface-<toolCallId> id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A createSurface that applied followed by rejected components left a ready, blank surface, which runtime 1.79.0 produces for a component the catalog lacks. Replay every recorded fixture through the transport, the mapper, the registry and the widgets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 7 tasks
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.
Status
READY
Description
Closes #247. Part of the A2UI stack (#71). Builds on #256.
This PR records real A2UI wire traffic from Copilot Runtime 1.79.0 (A2UI middleware 0.0.10) and 1.91.0 (middleware 0.0.16). It then replays each recording through the SDK.
Recorder.
example/tool/runtime/record-a2ui.tsrunsnpm run record:a2ui, with--runtime-dir ../runtime-1.91for 1.91.0. There's no model and no key. Each case runs a scripted AG-UI agent, a subclass of the runtime's ownAbstractAgent, that emits fixed tool calls. That way the middleware's validation, retries, statuses and activities come from the runtime itself. The recorder starts the runtime on a local port and posts the same request bodies the Flutter client posts.To keep re-recordings stable, every UUID becomes
uuid-<n>in order of first appearance, and eventtimestamps are dropped. Re-recording is byte-identical. The example runtime now pins@copilotkit/runtimeto exactly1.79.0.example/tool/runtime-1.91pins1.91.0.Fixtures. There are 18 files in
packages/copilotkit/test/fixtures/a2ui/<version>/, nine cases per version:Gap: 1.79.0's connect replays the compacted events and sends no
MESSAGES_SNAPSHOT. So its history_snapshot case records the replay without one. 1.91.0 sends an empty snapshot, then the full one.Harness.
copilotkit_flutter/test/a2ui_recorded_fixtures_test.dartruns every file through:httpclient (MockClient.streamingviahttp.runWithClient)AgUiTransport, theag_uiSSE decoder and the event mapperA2uiSurfaceRegistryandA2uiSurfacewidgetsIt also checks the requests the client sends against the recorded ones. It runs in
tester.runAsync, because a run never ends under the widget test's fake async.httpis a new dev dependency.copilotkit'sfixtures_testpins the shapes that differ between versions.Fix found by the recordings. Middleware 0.0.10 doesn't check the client's catalog, so an unknown component reaches the client. There,
createSurfaceapplied butupdateComponentswas rejected, which left a Ready surface with a blank tree. The registry now drops a surface those same operations created, so the status isRejected. There's a unit test and a recorded replay for it.Synthetic fixtures. These are kept for the shapes the recordings don't cover: routing surfaceId, ACTIVITY_DELTA, debugExposure, multiple surfaces, an unknown catalog, v1.0 and invalid-after-good. Their notes are corrected:
a2ui-surface-<toolCallId>. The ids are fixed to match.buildingarrives beforeTOOL_CALL_START.Type of Change
🤖 Generated with Claude Code