Skip to content

[BUG]: [swift] getRendererCapabilities drops properties of allOf-composed components in inline catalogs #4227

Open

Description

@Jimmy-Jung
  • I have searched the existing issues to make sure this bug has not already been reported.

Describe the Bug

MessageProcessor.getRendererCapabilities(options:) with includeInlineCatalogs: true and protocol v1.0 emits components whose schema is composed with allOf with only the component property. With BasicCatalog.makeCatalog(version: .v10), Button, CheckBox, ChoicePicker and TextField come out as:

{"properties": {"component": {"const": "Button"}}, "required": ["component"], "type": "object"}

Components whose schema has top-level properties (for example Text, Row, Column) keep their properties.

The cause appears to be buildInlineComponentSchema in swift/core/Sources/A2UICore/Processing/MessageProcessor.swift: it copies only processedSchema["properties"] and processedSchema["required"], so properties and required lists inside allOf members are not merged.

Steps to Reproduce

  1. Create a processor: MessageProcessor(catalogs: [BasicCatalog.makeCatalog(version: .v10)], validationConfig: .strict).
  2. Call getRendererCapabilities(options: .init(protocolVersion: .v10, includeInlineCatalogs: true)).
  3. Inspect ["1.0"]["inlineCatalogs"][0]["components"]["Button"] (same for CheckBox, ChoicePicker, TextField).

Expected Behavior

The inline schema of each component lists the same properties the renderer validates against (for Button: child, action, variant, and so on; for TextField: label, value, and so on).

Screenshots / Video / Logs

Actual output for the four components contains only component, as shown above.

Impact: an agent that builds its prompt from the renderer's inline catalog tells the model these components have no properties. In our measurement a smaller model then omitted required properties such as TextField.label and value. The strict validator still rejects those messages, so this lowers the first-try success rate rather than causing a crash.

Environment Details

  • OS: macOS 27.2 (also observed when targeting the iOS 27.2 simulator)
  • Browser/Platform: Swift 6.4, Xcode 27.2
  • SDK/Package Name & Version: A2UI Swift 0.10.0 (v0.10.0+swift); the same code is on main as of 2026-11-13
  • Protocol Version: v1.0
  • Agent Framework & LLM Model: not relevant (the output is produced before any model call)

Additional Context

A workaround on the client side is to build the prompt catalog from the original component schemas with allOf and $ref flattened, instead of from getRendererCapabilities.

Activity

  1. added
    status: needs-triageauto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang: swiftAffects SDKs or apps in the Swift programming languageother renderersstatus: first-line-handledstatus: needs-triageauto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjstype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions