Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces multi-version protocol support (v0.9 and v1.0) for A2UI, allowing renderers to support both versions simultaneously. It includes a protocol version selector for chat generation, updates to the Monaco editor to support version-specific schema validation and protocol-level error markers, and comprehensive testing for dual-version renderer compatibility. I have reviewed the code changes and the provided feedback; the suggestion to improve the VERSION_MENTION_PATTERN regex is actionable and will improve the robustness of version detection in user prompts.
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
Clears an orphaned catalog-handshake watchdog when the handshake frame was unregistered after a live catalog was established (surfaced here because registering four catalogs in ng-basic-catalog widened GET_CATALOG timing on /demos cards past card eviction).
Add generation-protocol-selector with existingUiVersion, requestedVersions, and selectGenerationVersion (implementing A1/A2/A3 and placeholder rules), and share inspectPayloadVersion across preview and generation.
Select prompt strategy and versioned catalogs via VersionRegistry in ChatPromptFactory, decide per-turn version via selectGenerationVersion in ChatCoordinator (including renderer switches and A2/A3 draft replacement), and refuse unsupported explicit version asks locally.
Add shared v0.9 catalog ID constants and withCatalogId helper, split v0.9 and v1.0 catalog modules in Lit and React samples, register [...v10Catalogs, ...v09Catalogs], update sample READMEs, and enable v0.9 sample specs.
Wrap @a2ui/web_core DynamicStringSchema and DynamicValueSchema with z.any().transform validators carrying REF:#/$defs markers so v0.9 schema serialization emits zero recursive-reference warnings while preserving strict runtime validation. Keep v1.0 local schema helpers in v1-0-mcp-catalog.ts.
Strip tagName/element from Angular v0.9 BasicCatalog entries so v0.9 renders with native Angular components alongside v1.0, register both v0.9 basic catalog IDs (sharing and memoizing the derived v0.9 schema), add native v0.9 harness/unit tests, update the Angular README, and update E2E expectations.
Add Playwright E2E coverage for dual-version Angular, Lit, and React renderers across Monaco validation, CAR_BOOKING, draft switching, v0.9 actions, UNSUPPORTED_CATALOG gating, single-catalog pass-through, mismatch recovery, version-locked chat turns, and unsupported asks.
Accept a single colon (with optional surrounding whitespace) as well as whitespace after protocol keywords (a2ui, version, protocol, spec), and allow dotless v09/v10 only immediately after those keywords. Tighten the keyword left boundary (except slash) so compound tokens and URL query keys do not match bare or dotless keyword forms; = and - are not separators, and standalone bare v10/v09 and bare "version 10" stay excluded.
| ...base, | ||
| defaultVersion: forcedDefault, | ||
| versions, | ||
| }; |
There was a problem hiding this comment.
The fake still drifts from CatalogManagement when a spec passes activeCatalog + activeProtocolVersion: signal('v1.0') without announcedCatalogs. chat-coordinator.spec.ts L2308-2312 does this; its activeCatalogs signal is []. Here's what happens:
announcedCatalogs()stays[], so theunversionedOnlybranch (L113-114) is skipped.basealready files the catalog under'v0.9'(viarawPrimary()).- L122-132 then return
{defaultVersion: 'v1.0', versions: ['v1.0', 'v0.9'], catalogsByVersion: {'v0.9': [cat]}}. A single-catalog v1.0 renderer now looks dual-version, with its only catalog under v0.9.
The real class never gets into this state. Its announced list always includes the primary (catalog-management.ts L159, L397, and the [sanitizedPrimary] fallback in sanitizeCatalogList). ChatCoordinator.systemPrompt (L167) and selectCatalogsForVersion (L918) both read protocolSupport(), so those specs run against a state the app can't reach. L140-142 then hides the empty activeCatalogs() from activeCatalog().
Could the fake default the announced list to [activeCatalog()] when the list is empty and activeCatalog() is set, the way the real class does? Then the L140-142 special case can go. A catalog-management-fake.spec.ts case for {activeCatalog, activeProtocolVersion: signal('v1.0')} that asserts protocolSupport() would pin it.
There was a problem hiding this comment.
Addressed in f501d61. FakeCatalogManagement now defaults its effective announced list to [activeCatalog()] when announcedCatalogs is empty and activeCatalog is set (matching CatalogManagement), and activeCatalog drops the empty-list special case. Added catalog-management-fake.spec.ts coverage for {activeCatalog, activeProtocolVersion: signal('v1.0')} asserting announcedCatalogs(), activeCatalogs(), activeCatalog(), and protocolSupport().
|
|
||
| this.hostCommunication.sendRenderA2UI(payload); | ||
| this.hostCommunication.sendRenderA2UI(resolved.payload); | ||
| return true; |
There was a problem hiding this comment.
The description says the shell lets a version-less v0.9 payload through and the renderer rejects it. That isn't what happens. Same for "version": "0.9":
resolvePayloadProtocolmaps the draft to v0.9 via itscatalogId(ordetectMessageVersionaccepts"0.9"), so the gate passes.V09MonacoSchemaStrategyhasversion: {type: 'string'}and doesn't require it, so the editor shows no marker.- L618 calls
sendRenderA2UI, ignores thefalseit returns, and L619 returnstrue, so the callers start the watchdog. CrossFrameValidator.validateSingleRenderMessage(cross-frame-validator.ts L559-568) accepts only"v0.9"or"1.0", soHostCommunication.sendMessage(L838) blocks the message beforepostMessage. The user gets a "Malformed payload" entry in Errors and no editor marker. The preview stays on the old surface, and 15 s later the watchdog logsIFRAME_UNRESPONSIVE.
Suggested fix: when sendRenderA2UI returns false, clear the watchdog and return false here, like GuestFrame does (guest-frame.ts L437-442). Also make version required with const: 'v0.9' in the v0.9 Monaco schema so the editor flags it, and fix the description. The other option is letting version === undefined through CrossFrameValidator, but that weakens outbound validation for every renderer.
The ignored return value predates this PR, but before it a v0.9 draft on the basic renderers stopped at the version gate; now it reaches this path.
There was a problem hiding this comment.
Addressed in 6161d0a (and updated the PR description). RawFrame.sendValidatedRenderA2UI now checks the boolean returned by hostCommunication.sendRenderA2UI(resolved.payload) and clears the watchdog / returns false when outbound validation blocks the send (matching GuestFrame). V09MonacoSchemaStrategy also now requires version with const: 'v0.9' so versionless or "0.9" v0.9 drafts show an editor diagnostic aligned with CrossFrameValidator. Added tests in raw-frame.spec.ts and v0-9-monaco-schema-strategy.spec.ts.
| protected readonly editorProtocolVersion = computed(() => { | ||
| const resolution = this.payloadResolution(); | ||
| return resolution?.status === 'supported' ? resolution.version : null; | ||
| }); |
There was a problem hiding this comment.
onLayoutChange sets layoutJson on every keystroke (L351). As soon as an edit breaks JSON syntax, parsedDraft() is null (L87-93), so resolvedDraft(), editorProtocolVersion() (L120-123) and editorProtocolCatalog() go to null. MonacoEditor then falls back to support.defaultVersion (monaco-editor.ts L504), which is v1.0 on the dual-version basic renderers, and calls setDiagnosticsOptions with v1.0 schemas. Monaco's JSON service still runs schema validation on a document with syntax errors, so typing a comma or a new key in a v0.9 draft flashes v1.0 errors such as Value must be "1.0". across the file. Once the JSON parses again, it swaps back to v0.9. Could the last supported resolution be kept while the draft doesn't parse (e.g. a linkedSignal, or detectRawJsonDraftVersion(layoutJson()) from draft-protocol-strategy.ts as the fallback)?
There was a problem hiding this comment.
Addressed in 6161d0a. RawFrame now uses a linkedSignal (lastSupportedEditorResolution) backed by resolveStickyEditorProtocol in payload-protocol-resolution.ts: while JSON is temporarily unparseable, it checks detectRawJsonDraftVersion(rawText) (when supported) and otherwise retains the previous supported version and matching catalog instead of falling back to defaultVersion (v1.0) and flashing spurious v1.0 schema errors. Clearing the editor (which parses as []) or switching to an unsupported renderer resets the sticky state. Added tests in payload-protocol-resolution.spec.ts and raw-frame.spec.ts.
| } | ||
| run.protocolVersion = decision.version; | ||
| run.replacesDraft = decision.replacesDraft; | ||
| const dropLayoutSnapshots = replacesSample || run.replacesDraft; |
There was a problem hiding this comment.
dropLayoutSnapshots = replacesSample || run.replacesDraft (L828) now also strips the layout snapshot when replacesDraft is true. Example: the user has an edited v1.0 canvas on Angular Basic (hadEditedDraft true, so replacesSample is false) and the model switches to React Slack, which is v0.9-only. selectGenerationVersion returns {version: 'v0.9', replacesDraft: true}, L848-852 filter out the snapshot, and the second request says "Rebuild any prior layout" with the user's edits no longer in context. A direct cross-version submitPrompt (e.g. "Rebuild this in v0.9") keeps the snapshot and only adds the replacement instruction, and the comment at L838-840 says earlier layouts stay unless they are the previous renderer's sample.
Suggest keeping the filter on replacesSample only, as before. The spec at L2647-2677 doesn't reach this path: hasEditedDraft defaults to false (L124), so flushDraft() resets the draft to 'Initial draft text' before the version is picked. A case with hasEditedDraft true, a v1.0 draft and a v0.9-only target that asserts the second call still has the snapshot would cover it.
There was a problem hiding this comment.
Addressed in 78f773a. Kept dropLayoutSnapshots = replacesSample in ChatCoordinator.switchRendererForToolCall so user-edited layout snapshots stay in context across cross-version renderer switches (consistent with direct cross-version submitPrompt). Added a chat-coordinator.spec.ts case with hasEditedDraft: true, an edited v1.0 draft, and a v0.9-only target verifying the second request retains the snapshot.
| const KEYWORD_LEFT_BOUNDARY = String.raw`(?<![.$\w?&=-])`; | ||
| const KEYWORD = String.raw`(?:a2ui|version|protocol|spec)`; | ||
| const KEYWORD_SEPARATOR = String.raw`(?:\s*:\s*|\s+)`; | ||
| const STANDALONE_LEFT_BOUNDARY = String.raw`(?<![.$\w])`; |
There was a problem hiding this comment.
STANDALONE_LEFT_BOUNDARY (L37) only blocks ., $ and \w, so dotted versions inside URLs and paths still count as version asks: "Bind the form to https://api.example.com/v1.0/orders", "GET /v0.9/users", ?version=v1.0, icon-v1.0 and @a2ui/web_core/v0_9 all return a version. That's the same collision you cite for not matching bare v10, and here it replaces the whole draft on a dual-version renderer or refuses the turn on React Slack / Mock V10.
One option that still allows ranges like v0.9-v1.0 (a quick port of the 118 requestedVersions table rows still passes with it):
const STANDALONE_LEFT_BOUNDARY = String.raw`(?<![.$\w/=?&])(?<![a-zA-Z]-)`;plus spec rows for the URL and path cases.
There was a problem hiding this comment.
Addressed in 78f773a. Updated STANDALONE_LEFT_BOUNDARY to (?<![.$\w/=?&])(?<![a-zA-Z]-) so dotted versions in URLs, paths, query strings, and letter-prefixed identifiers (https://api.example.com/v1.0/orders, GET /v0.9/users, ?version=v1.0, icon-v1.0, @a2ui/web_core/v0_9) no longer count as version requests while preserving hyphenated ranges like v0.9-v1.0. Added table rows in generation-protocol-selector.spec.ts.
| promptId: options?.promptId, | ||
| }, | ||
| ]); | ||
| return; |
There was a problem hiding this comment.
Optional: the local refusal in submitPrompt (L486-504) and switchRendererForToolCall (L816-825) is stored as a plain USER + MODEL pair. isFailedOrCancelledOutcome (L281-297) doesn't recognize it, so getConversationalMessages sends both on every later turn: the refused ask (e.g. "make it v0.9" on Mock V10) plus an English MODEL reply, which goes against the JSONL-only output rule and can steer the next generation toward the refused version. Marking the refusal turn (a flag checked in isFailedOrCancelledOutcome, like RENDERER_CHANGED_NOTE) would keep it visible in the chat but out of the model context.
There was a problem hiding this comment.
Addressed in 78f773a. Added isRefusal?: boolean to LlmMessage, marked unsupported-version refusal replies in both submitPrompt and switchRendererForToolCall with isRefusal: true, and updated isFailedOrCancelledOutcome to exclude them from getConversationalMessages while keeping them visible in chat history. Added tests in chat-coordinator.spec.ts for both paths.
| content: | ||
| this.systemPrompt() + | ||
| this.buildSystemPromptFor(run.protocolVersion, run.replacesDraft) + | ||
| '\nThe renderer has been selected. Use only this catalog. Rebuild any prior layout using its supported components and emit a complete createSurface/updateComponents/updateDataModel sequence.', |
There was a problem hiding this comment.
Optional: same as my note on #323. L846 still appends "emit a complete createSurface/updateComponents/updateDataModel sequence" when run.protocolVersion is v1.0, which contradicts V10PromptStrategy's single-message createSurface rule (v1-0-prompt-strategy.ts L255-256, L286-292). Now that buildSystemPromptFor adds formatDraftReplacementInstruction when the switch replaces the draft, L846 could drop that clause or branch on run.protocolVersion.
There was a problem hiding this comment.
Addressed in 78f773a. Moved the renderer-selected suffix into PromptProtocolStrategy.rendererSelectedInstruction (composed via buildPromptTrailingSuffix in prompt-protocol-strategy.ts) and passed {protocolVersion, replacesDraft, rendererSelected: true} via BuildSystemPromptOptions from switchRendererForToolCall. v1.0 now instructs a single-message createSurface payload without contradicting V10PromptStrategy, v0.9 keeps the createSurface/updateComponents/updateDataModel sequence, and draft-replacement text is no longer duplicated. Added tests in chat-prompt-factory.spec.ts and chat-coordinator.spec.ts.
|
|
||
| const text = typeof model.getValue === 'function' ? model.getValue() : fallbackText; | ||
| const range = computeProtocolMarkerRange(text, problem.anchorText); | ||
| monacoInstance.editor.setModelMarkers(model, PROTOCOL_MARKER_OWNER, [ |
There was a problem hiding this comment.
Optional: onDidChangeMarkers (L693-731) doesn't exclude PROTOCOL_MARKER_OWNER, so the error marker set here counts as an error at L705. When a draft that had schema errors is edited into a protocol problem, the schema markers are cleared (schemas: [], L525) but the update waits behind the 3 s ERROR_MARKER_DEBOUNCE_MS instead of the no-error fast path. Until then, RawFrame.hasActiveSchemaErrors and lastErrorSignature keep the old values. Filtering the owner out in onDidChangeMarkers would fix that and let RawFrame drop its two PROTOCOL_MARKER_OWNER filters (raw-frame.ts L364, L449).
There was a problem hiding this comment.
Addressed in 6161d0a. Filtered PROTOCOL_MARKER_OWNER out in MonacoEditor.onDidChangeMarkers so clearing schema errors into a protocol marker takes the immediate no-error path instead of waiting 3 s behind ERROR_MARKER_DEBOUNCE_MS, and removed the two duplicate PROTOCOL_MARKER_OWNER filters in RawFrame. Added tests in monaco-editor.spec.ts and raw-frame.spec.ts.
| payloadVersion: A2uiProtocolVersion, | ||
| supportedVersions: readonly A2uiProtocolVersion[], | ||
| ): string { | ||
| return `This renderer does not support A2UI ${payloadVersion}. It supports ${supportedVersions.join(', ')}. Change the payload's "version" or select a renderer that supports ${payloadVersion}.`; |
There was a problem hiding this comment.
Optional: on a v1.0-only renderer this says It supports v1.0. Change the payload's "version" .... Changing the field doesn't turn a v0.9 payload into a v1.0 one. The wire value is "1.0", not "v1.0", which CrossFrameValidator rejects. And payloads detected structurally (e.g. {path} bindings) may have no version at all. Something like Use an A2UI v1.0 payload ("version": "1.0") or select a renderer that supports v0.9. would be accurate.
Related: findRequestedCatalogId (L190-205) returns the first createSurface.catalogId, so in a multi-surface payload an unsupported catalog on a later surface gets past the UNSUPPORTED_CATALOG check at L112-124.
There was a problem hiding this comment.
Addressed in 6161d0a. Updated formatUnsupportedProtocolVersionMessage to include the exact wire version string ("1.0" / "v0.9") via WIRE_VERSION_BY_PROTOCOL (e.g., Use an A2UI v1.0 payload ("version": "1.0") or select a renderer that supports v0.9.), and replaced findRequestedCatalogId with findRequestedCatalogIds so resolvePayloadProtocol validates every createSurface.catalogId in multi-surface payloads. Added tests in payload-protocol-resolution.spec.ts.
| }), | ||
| window.location.origin, | ||
| ); | ||
| }); |
There was a problem hiding this comment.
Optional: the Button here has child: 'Click Proxy' (L263) with no component of that ID, so it renders empty (main.spec.tsx L279-291 fixed the same fixture with a Text child). The test also doesn't check version: 'v0.9' on the outbound payload (L305), which is the only thing that tells a v0.9 action apart from a 1.0 one. Could you add the Text child and version: 'v0.9' to the expect.objectContaining(...)?
There was a problem hiding this comment.
Addressed in 56aaecb. Added the Text child component to the Button fixture and asserted version: 'v0.9' on the outbound SEND_TO_SERVER payload in samples/react-basic-catalog/src/main.v0-9.spec.tsx.
930143a to
96382f6
Compare
When announcedCatalogs is empty and activeCatalog is set, default the fake announced list to [activeCatalog()], matching CatalogManagement, and remove the activeCatalog empty-list special case.
Clear the RawFrame watchdog and return false when sendRenderA2UI returns false, and require version const 'v0.9' in V09MonacoSchemaStrategy. Extract resolveStickyEditorProtocol into payload-protocol-resolution.ts so RawFrame preserves the last supported editor protocol version and catalog across temporarily unparseable JSON edits when still supported. Filter PROTOCOL_MARKER_OWNER inside MonacoEditor.onDidChangeMarkers and remove the redundant filters in RawFrame. Update formatUnsupportedProtocolVersionMessage with actual wire versions and check every createSurface.catalogId in multi-surface payloads.
Keep edited layout snapshots when switching renderers across versions, tighten STANDALONE_LEFT_BOUNDARY against URLs/paths/identifiers, mark local unsupported-version refusals with isRefusal so LLM context skips them while chat history preserves them, and move the switchRenderer trailing instruction into PromptProtocolStrategy (sharing BuildSystemPromptOptions) without duplicating draft replacement wording.
Switch lit-basic-catalog v0.9 basicCatalog import to @a2ui/web_core/v0_9/basic_catalog so catalogSchema exposes theme definitions and V09_SPEC_FUNCTIONS matching React and Angular. Add the missing Text child component and assert version: 'v0.9' on the outbound SEND_TO_SERVER payload in react-basic-catalog/src/main.v0-9.spec.tsx.
Route **/config.json with apiKeys.default in both chat tests, remove the redundant Settings API key dialog round-trips, and drop the unused assets/composer.config.json and **/renderers.json routes.
Description
Summary
This PR reverses the earlier per-renderer single-version assumption from
#324(where basic sample renderers became v1.0-only and the shell assumed one active protocol version per renderer) so Composer's Angular, Lit, and React basic renderers and shell support A2UIv0.9payloads alongsidev1.0. Every renderer continues to default tov1.0for new/blank sessions when it supports both versions, while single-version renderers (Mock V09,Mock V10,React Slack) strictly enforce their single announced version.CatalogManagement,catalog-domain.ts,FakeCatalogManagement): AddProtocolSupport(defaultVersion,versions,catalogsByVersion,announcedCatalogCount),resolveProtocolSupport, andselectCatalogsForVersionwhile keepingactiveProtocolVersion(),activeCatalog(),activeCatalogs(), andmergedActiveCatalog()scoped strictly todefaultVersionso initial boot staysv1.0for dual-version renderers.FakeCatalogManagementdefaultsannouncedCatalogsto[activeCatalog()]when empty andactiveCatalog()is set, matchingCatalogManagement. Suppress a false watchdog timeout error for an unregistered secondary frame that was removed before answering once a live catalog has already been established for the current renderer URL — where "established" means a liveA2UI_CATALOGhandshake succeeded for the current renderer URL since the last URL change (an earlier failed handshake or a cache-only catalog does not count; cancelling the in-progress handshake directly onHostCommunication.unregisterIframeis left as a follow-up#335). This fixes a/demosflake where registering four catalogs inng-basic-catalogslowed per-cardGET_CATALOGanswers and widened the pre-existing race window whenDemos.reconcileMountedCards()evicted off-screen cards mid-handshake.payload-protocol-resolution.ts,protocol-version-mismatch.ts,RawFrame,GuestFrame,Gallery): ReplacevalidatePayloadProtocolVersionwith sharedscanPayloadVersion(inspectPayloadVersion+detectPayloadVersion),resolvePayloadProtocol, andgatePayloadDispatch. Add nov0_9/v0.9catalogIdsubstring heuristic while keeping the existingv1_0check and A2A partitioner behavior unchanged; for indeterminate payloads,resolvePayloadProtocolresolvescreateSurface.catalogIdviaProtocolSupport.catalogsByVersion.RawFramechecks the boolean return ofHostCommunication.sendRenderA2UI(clearing the watchdog and returningfalsewhenCrossFrameValidatorblocks a payload missing a valid wire"version": "v0.9" | "1.0"). Reject unknown catalogs across allcreateSurface.catalogIdentries in a payload on multi-catalog renderers (announcedCatalogCount > 1) withUNSUPPORTED_CATALOGwhile letting single-catalog renderers pass through, and report wire versions ("v0.9"/"1.0") accurately informatUnsupportedProtocolVersionMessage.MonacoEditor,V09MonacoSchemaStrategy,RawFrame,resolveStickyEditorProtocol): Select the JSON validation schema and versioned catalogs viaVersionRegistrystrategies andselectCatalogsForVersionso pasting av0.9payload into anAngular Basicworkspace validates against thev0.9schema without false"Value must be \"1.0\"."markers. Requireversionwithconst: 'v0.9'inV09MonacoSchemaStrategy, extractresolveStickyEditorProtocol(vialinkedSignal) so unparseable JSON preserves the last supported editor protocol version and catalog (resetting todefaultVersionwhen cleared to empty, updating on valid supported drafts, and clearing tonullwhen unsupported or whenprotocolSupport()drops the version), and filterPROTOCOL_MARKER_OWNERinsideMonacoEditor.onDidChangeMarkersso clearing schema errors takes the immediate fast path.generation-protocol-selector.ts,ChatPromptFactory,PromptProtocolStrategy,ChatCoordinator,StateSync): Decide chat generation version in one pure function (selectGenerationVersion) sharingdetectRawJsonDraftVersionwithStateSync.sanitizeLayoutfor unparseable drafts: keep existing non-placeholder UI version unless explicitly asked to switch (replacing the draft when switching), treat a barecreateSurfaceplaceholder viaisUntouchedBlankDraftas from-scratch (v1.0default unlessv0.9is requested; dual-version mentions on an existing UI switch to the non-current version), match explicit version asks (v0.9/v1.0/v0_9/v1_0on their own withSTANDALONE_LEFT_BOUNDARY(?<![.$\w/=?&])(?<![a-zA-Z]-)blocking URLs/paths/query params/identifiers likeicon-v1.0while allowing digit-preceded ranges likev0.9-v1.0, or after a keyword —a2ui,version,protocol,spec, protected against preceding.,$,\w,?,&,=,-— separated by whitespace or a colon: dotted/underscored versions with or withoutv, and dotlessv09/v10), validate/heal LLM output againstselectCatalogsForVersion, keep edited layout snapshots acrossswitchRendererversion changes, mark local unsupported-version refusals withisRefusalso they stay visible inchatHistorywhilegetConversationalMessagesexcludes them from later LLM requests, and move theswitchRenderertrailing instruction intoPromptProtocolStrategy(V09PromptStrategy/V10PromptStrategy) without duplicating draft-replacement wording.v0.9basic samples & MCP recursive-ref fix (samples/ng-basic-catalog,samples/lit-basic-catalog,samples/react-basic-catalog,bridge/src/mcp/): Restore thev0.9catalog builders and tests removed in#324(231273eb) under bothhttps://a2ui.org/specification/v0_9/basic_catalog.jsonandhttps://a2ui.org/specification/v0_9/catalogs/basic/catalog.json(using@a2ui/web_core/v0_9/basic_catalogin both Lit and React so Lit'scatalogSchemaexposes theme$defsandV09_SPEC_FUNCTIONSmatching React and Angular), serving native Angularv0.9(a2ui-v09-*) components alongsidev1.0custom elements viatoNativeAngularEntriesand memoizing/reusingBasicWithMcpCatalog's generated schema inBasicWithMcpNpmIdCatalog; wrapDynamicStringSchema/DynamicValueSchemainbridge/src/mcp/functions/common.tswithz.any().transformcarryingREF:#/$defs/...markers so@a2ui/web_core0.15.0emits$ref: '#/$defs/DynamicString'forcallMcpTool.name(with$defs.DynamicStringpresent in the generated catalog schema) and zero recursive-reference warnings while keeping strict v0.9 runtime validation (and preserving nullable v1.0 helpers inv1-0-mcp-catalog.ts).Tests Whose Expectations Changed / Were Inverted / Removed
shell/src/app/chat/chat-coordinator/chat-coordinator.spec.ts: Removed'strips prototype pollution keys from mergedActiveCatalog()'because it only exercised the deleted localMockCatalogManagementstub frompr7-qa-cleanup(productionmergeCatalogsnever stripped keys; frame-boundary stripping remains covered incross-frame-validator.spec.ts).shell/e2e/v09-compat-regression.e2e.ts: Inverted'switching between live v1.0 sample renderer...'into'switching between live dual-version Angular sample renderer...'— switching toAngular Basicwith an editedv0.9draft now rendersUser Customised Car Bookingviaa2ui-v09-textand assertsmismatchCount === 0(previously expectedPROTOCOL_VERSION_MISMATCHandmismatchCount === 1).shell/e2e/slack-renderer.e2e.ts: Updated the absent-error assertion from the old'Payload protocol version'prefix to'This renderer does not support A2UI'.shell/src/app/preview/protocol-version-mismatch.spec.ts&shell/src/app/agent-chat/converters/surface-partitioner.spec.ts: RemovedvalidatePayloadProtocolVersionassertions (superseded byresolvePayloadProtocolinpayload-protocol-resolution.spec.ts), updateddetectPayloadVersion/inspectPayloadVersiontests sov0_9/v0.9catalogIdsubstrings are not treated as version signals, and documented A2Asurface-partitioner.tspre-branch default ('v0.9') andv1_0catalogId preservation.shell/src/app/preview/guest-frame/guest-frame.spec.ts,shell/src/app/preview/raw/raw-frame.spec.ts,shell/src/app/gallery/gallery.spec.ts: Updated mismatch error string expectations to the updatedformatUnsupportedProtocolVersionMessagewording, expanded mockprotocolSupport, and added tests forv0.9dispatch on a two-version renderer andUNSUPPORTED_CATALOGvs single-catalog pass-through.Commits
65 files changed, 8051 insertions(+), 655 deletions(-)
Stack
Stacked PR 8/9 — base:
pr7-qa-cleanup→ merge in order:pr1-e2e-stabilization(mergedb7632586)pr2-upgrade-a2ui-deps(merged900b65f6)pr3-bridge-v1-0(mergedbe5e24d3)pr4-shell-v1-0-core(mergedf82a26dd)pr5-shell-v1-0-copilot-rpc-a2apr6-samples-demos-v1-0pr7-qa-cleanuppr8-restore-v0-9-rendererspr9-cancel-handshake-on-unregister(fix(shell): cancel catalog handshake when its frame unregisters, stacked on feat(samples,shell): restore A2UI v0.9 alongside v1.0 #334)Verification
Run locally at
2dfa7517(pr8-restore-v0-9-rendererstip):corepack yarn workspace a2ui-bridge clean && corepack yarn build: exit 0corepack yarn test: 3680/3680 passed (scripts: 48,a2ui-bridge: 338,lit-basic-catalog: 26,ng-basic-catalog: 34,react-basic-catalog: 26,react-slack-catalog: 197,a2ui-composer-shell: 3011)corepack yarn lint,corepack yarn tsc,corepack yarn prettier:check,corepack yarn generate:demos:check(46 demos): all exit 0shell/,E2E_HEADLESS=true corepack yarn playwright test --project=e2e --workers=1 --retries=0 e2e/dual-version-renderers.e2e.ts e2e/v09-compat-regression.e2e.ts e2e/slack-renderer.e2e.ts e2e/slack-assistant.e2e.ts e2e/demos.e2e.ts: 60/60 passed (6.7m)corepack yarn --cwd shell e2e-headless): 244/244 passed (8.7m)Pre-launch Checklist