Repository navigation
fix(genui)!: require canonical A2UI 1.0 messages - #8155
Conversation
Emit canonical 1.0 capabilities, operations and actions while accepting legacy v1.0 inputs for existing agents and saved conversations. Update prompt examples and keep canonical producer return types narrow. Cover both versions across envelope parsing, validation, renderer surface lifecycles, runtime middleware and markdown recovery. Audited operation, action, capability and prompt emitters in shared, core, react-core and runtime; all new output uses 1.0. Frontend and runtime packages must be upgraded together.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Shared version and envelope contract packages/shared/src/generative-ui/*, packages/shared/src/a2ui-envelope.ts, packages/shared/src/__tests__/*, packages/shared/src/generative-ui/__tests__/* |
A2UI_VERSION changes to "1.0". Operation types use the constant, and envelope capability handling uses the "1.0" key. Prompts and tests use the updated spelling; envelope tests check that "v1.0" is not read. |
Markdown operation parsing packages/core/src/a2ui-markdown/operations.ts, packages/core/src/__tests__/* |
The parser recognizes a version value that begins with a digit, and operation-shape validation uses A2UI_VERSION. Parser test fixtures and expected operations use "1.0". |
Runtime and UI version use packages/runtime/src/v2/runtime/generative-ui/*, packages/runtime/src/v2/runtime/__tests__/*, packages/react-core/src/v2/generative-ui/* |
The surface writer uses A2UI_VERSION, and the UI manifest uses the "1.0" envelope key. Runtime and React test fixtures use "1.0" for operations and envelopes. |
Evaluation and inspector compatibility tools/genui-eval/src/*, tools/genui-eval/test/*, packages/web-inspector/src/components/generative-ui-view.spec.ts |
The evaluation harness reads inline catalogs from the "1.0" envelope entry, and operation-shape validation uses A2UI_VERSION. Evaluation and inspector fixtures use "1.0". |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Merge Risk: 
Minimal · previous review d8f43
-
The canonical "1.0" version is consistently adopted across the described paths. No actionable blocker remains; consumers must coordinate upgrades because legacy "v1.0" payloads are intentionally unsupported.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 13 functions across 40 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
|
Size Change: -20 B (0%) Total Size: 2.4 MB 📦 View Changed
ℹ️ View Unchanged
|
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/channels
@copilotkit/channels-core
@copilotkit/channels-discord
@copilotkit/channels-intelligence
@copilotkit/channels-slack
@copilotkit/channels-teams
@copilotkit/channels-ui
@copilotkit/channels-whatsapp
@copilotkit/core
@copilotkit/intelligence-langgraph
@copilotkit/intelligence-mastra
@copilotkit/learning
@copilotkit/mcp-apps-renderer
@copilotkit/react-core
@copilotkit/react-native
@copilotkit/react-textarea
@copilotkit/react-ui
@copilotkit/runtime
@copilotkit/runtime-client-gql
@copilotkit/sdk-js
@copilotkit/shared
@copilotkit/sqlite-runner
@copilotkit/voice
@copilotkit/vue
@copilotkit/web-components
@copilotkit/web-inspector
commit: |
Remove the pre-release v1.0 aliases, dual capability shape, fallback reader, and compatibility-only type refinements. Use one 1.0 contract throughout the packages and workspace evaluation harness. Update fixtures to that contract and keep malformed-stream boundaries working with numeric version strings. BREAKING CHANGE: Gen UI requires version "1.0" and capability key "1.0". Pre-release v1.0 operations and capability envelopes are no longer accepted. Demos must update their payloads and align agent SDK/CopilotKit versions.
Pins the TypeScript playground to published `@copilotkit/react-core`, `@copilotkit/runtime`, and `@copilotkit/shared` **1.84.1**, including canonical A2UI `"1.0"` support first released in 1.84.0 via [#8155](#8155). Prompts, portable skills, replay recordings, install snippets, and the SDK decompiler use the same wire version. Preserves the playground author's `@a2ui/agent` 0.1.0 native stream/message accumulation, whole-reply compiler diagnostics, and the target branch’s current playground UI, including its prompt-box menu, responsive chrome, native Material styling, and manual JSON editor. Keeps macro expansion, Blueprint frames derived from the host manifest, strict truncated-stream retries, JSON fallback, and existing-surface updates. No legacy wire aliases or prefix compiler are retained. Validation on the current head (`d582e5cfe7`, CopilotKit 1.84.1): - Registry install resolves React Core, Runtime, and Shared to 1.84.1; the installed shared package declares `A2UI_VERSION="1.0"`. - Formatting, scoped lint, explicit typecheck, 11 deterministic SDK/composer tests plus existing repair tests, and production build pass (143 pages; one worker). - Catalog and skill exports combine the updated target descriptions with canonical schemas; repeated regeneration of all eight artifacts is deterministic. Frozen-lockfile install, diff checks, and normal commit hooks pass. - Production browser smoke passes 17 checks across desktop Material replay, manual editing, mobile menus, focus, and Escape behavior, with no browser errors or model POSTs. No live-provider generation claim. Targets `jerel/a2ui-playground-showcase`; no deployment is included.
The shared standard catalog still emitted `version: "v1.0"`, which CopilotKit 1.84 rejects. Emit canonical `"1.0"` operations and upgrade the standalone docs renderer from 1.81.0 to published 1.84.0 in the same change. This fixes both the docs component previews/copyable operations and the `examples/v2/a2ui-markdown` catalog, which already consumes the workspace 1.84 renderer. Add a regression that checks every shared sample operation against the real published 1.84 validator and standard catalog manifest. Pin `@copilotkit/shared` directly as a test dependency and update the standalone npm lockfile. Older A2UI catalogs are unchanged. Validation: - Regression failed with the previous producer (`v1.0` versus `1.0`); passes after the migration. - Clean standalone `npm ci`; scoped formatter/lint; docs generation and explicit typecheck; 91 test files / 585 tests pass. - Docs production build passes, with no tracked generated output changes. - Nx builds of react-core/runtime and the a2ui-markdown example pass. - Real Chrome on production builds: docs layout renders; bound form fields submit their edited values; button events work; displayed operations use `1.0`. The markdown catalog renders all 39 samples / 88 canonical operations, with a working button event and no page errors. Follow-up to CopilotKit#8155. This uses published 1.84.0 packages; there is no package release blocker or compatibility shim. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Generated showcase operations now use the standard `1.0` version format instead of `v1.0` for surface creation and related data-model and component updates. This aligns the version shown in sample operations and initial-data examples. The condition for generating optional data-model updates remains unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Intentional breaking change to the pre-release Gen UI protocol. A2UI 1.0 now uses
"1.0"for both message versions and renderer capability keys. The earlier"v1.0"spelling is no longer supported.Google's
@a2ui/[email protected]requires this spelling. CopilotKit currently advertises"v1.0"and rejects canonical messages, so upgrading the agent SDK fails before generation or rendering.The change updates the shared version constant and types, capability envelope, prompts, markdown recovery, programmatic surface writer, and existing test fixtures. There are no legacy aliases, fallback capability keys, or compatibility adapters. Regression tests verify that the old operation spelling and capability key are rejected. The workspace
genui-evalharness and its recorded offline/reference payloads also move to"1.0"; evaluation cases and scoring are unchanged.Demo impact: #8100 and other pre-release demos must update their agent SDK and CopilotKit packages together. The currently deployed playground is pinned to older packages; moving it to this release without updating its
"v1.0"assumptions will break it. Standalone demos need a published CopilotKit release containing this change. Old recordings and hand-written payloads must use"1.0"; there is no automatic migration. The separately pinned shell-docs showcase helper stays aligned with CopilotKit 1.81.0 until that consumer is upgraded.Validation:
@a2ui/[email protected]reads the canonical envelope, compiles Express, and produces operations that CopilotKit validates.Summary by CodeRabbit
1.0instead ofv1.0.v1.0spelling are no longer recognized as the current protocol version.1.0format, helping ensure newly generated content follows the supported version.