Port A2UISwiftCore + A2UISwiftUI to A2UI v1.0 (RC)#61
Draft
Copilot wants to merge 2 commits into
Draft
Conversation
…ace, actionResponse, callFunction
Copilot
AI
changed the title
[WIP] Port to A2UI v1.0 Release Candidate
Port A2UISwiftCore + A2UISwiftUI to A2UI v1.0 (RC)
Jun 22, 2026
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.
Ports the Swift renderer from A2UI v0.9/v0.9.1 to the v1.0 Release Candidate spec. All changes are backward-compatible with v0.9 message streams where the spec allows it.
Breaking schema changes
theme→surfacePropertiesinCreateSurfacePayloadandInlineCatalog; v0.9themekey still decoded as fallbackprimaryColorremoved from surface properties parsing inA2UIStylesvgPath→path; encoder emitspath, decoder accepts bothupdateDataModelnull semantics: explicit JSONnullnow deletes the key (previously only Swiftnildid); affectsDataModel.setLeaf()"v1.0"(was"v0.9")New server→client messages
callFunction— server invokes a catalog function on the client;MessageProcessor.processCallFunction()resolves the function from loaded catalogs, executes it, and emits afunctionResponsewhenwantResponse: trueactionResponse— server reply to awantResponse: trueclient action;SurfaceModelgainsonActionResponseevent source anddeliverActionResponse()New client→server messages
functionResponse—A2uiFunctionResponsestruct +.functionResponsecase onA2uiClientMessagewantResponse/actionIdfields added toA2uiClientActionInline
createSurfaceCreateSurfacePayloadnow accepts optionalcomponentsanddataModel.MessageProcessorapplies the data model first, then delegates component setup toprocessUpdateComponents(), so bindings resolve correctly on first render.{ "version": "v1.0", "createSurface": { "surfaceId": "s1", "catalogId": "basic", "dataModel": { "name": "Alice" }, "components": [{ "id": "root", "component": "Text", "text": "{{name}}" }] }}Catalog & built-in additions
@indexbuilt-in: extracts the numeric tail of the currentDataContext.path(e.g./items/2→2), with optionaloffsetparameterCatalog.instructions: String?field (inline Markdown, replacesrules.txt)CallableFromenum (clientOnly/remoteOnly/clientOrRemote) onFunctionDefinitionSlider.steps,Video.posterUrl,TextField.placeholderbasicCatalogIdupdated tohttps://a2ui.org/specification/v1_0/catalogs/basic/catalog.jsonTests
Existing version-string assertions updated (
"v0.9"→"v1.0"). New@Testcases cover: v1.0 version acceptance,surfacePropertieswiththemefallback, inlinecreateSurface,actionResponse/callFunctiondecoding, null-deletion semantics,functionResponseround-trip, andwantResponse/actionIdencoding.