---
type: "post"
id: "a2ui-swift-0-12-0-makes-catalog-environment-794284"
slug: "a2ui-swift-0-12-0-makes-catalog-environment-794284"
title: "A2UI Swift 0.12.0 makes catalog environment values read-only and adds addCatalog"
description: "A2UI project’s Swift 0.12.0 makes catalog and surface-metadata environment values read-only, so builders must change how they inject them."
retrieval_nugget: "A2UI project’s Swift 0.12.0 makes catalog and surface-metadata environment values read-only, so builders must change how they inject them."
published_at: "2026-11-25"
updated_at: "2026-11-25"
record_date: "2026-11-25"
date_kind: "published_at"
topics: ["api-design"]
entities: ["A2UI","A2UI Swift"]
related_patterns: ["agent-protocols-become-interoperability-layer"]
novelty_label: "new_fact"
what_changed: "A2UI Swift 0.12.0 adds catalog and activation updates, including read-only catalog environment values and addCatalog."
prior_refs: []
source_url: "https://github.com/a2ui-project/a2ui/releases/tag/v0.12.0%2Bswift"
source_urls: ["https://github.com/a2ui-project/a2ui/releases/tag/v0.12.0%2Bswift"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:a2ui-swift-0-12-0-makes-catalog-environment-794284"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/a2ui-swift-0-12-0-makes-catalog-environment-794284/","markdown":"https://newruntime.com/posts/a2ui-swift-0-12-0-makes-catalog-environment-794284.md","json":"https://newruntime.com/posts/a2ui-swift-0-12-0-makes-catalog-environment-794284.json"}
markdown_url: "https://newruntime.com/posts/a2ui-swift-0-12-0-makes-catalog-environment-794284.md"
---

# A2UI Swift 0.12.0 makes catalog environment values read-only and adds addCatalog

## Retrieval answer

A2UI project’s Swift 0.12.0 makes catalog and surface-metadata environment values read-only, so builders must change how they inject them.

## Summary

A2UI project’s Swift 0.12.0 makes catalog and surface-metadata environment values read-only, so builders must change how they inject them. ([github.com](https://github.com/a2ui-project/a2ui/releases/tag/v0.12.0%2Bswift))

## What happened

The release removes `A2UICatalogsKey` and `A2UIDefaultCatalogIDKey`; catalogs and surface metadata are now injected only through `Surface`. It also rejects certain nested regex repetitions with `NESTED_QUANTIFIER`: patterns where a repeated group can match the empty string in more than one way. The release notes warn these patterns could make `NSRegularExpression` run for seconds or longer on inputs only a few characters long.

Catalogs can now carry optional Markdown design instructions for agents via `CatalogProtocol` and `Catalog`; both `Catalog.init` and `Catalog.derive` accept `instructions:`. A derived catalog does not retain its source catalog’s instructions. When set, instructions are written into v1.0 inline catalogs by `MessageProcessor.getRendererCapabilities`.

MessageProcessor processing methods add `isUserActivated`, defaulting to `false`. `MessageProcessor.addCatalog(_:)` allows registration after initialization, and later `createSurface` messages, renderer function calls, and `getRendererCapabilities(options:)` see the added catalogs. Existing surfaces keep their original catalogs, and duplicate catalog IDs throw `A2UICatalogError`.

Other changes: `NodeResolver` generalizes direct data-binding properties to `DataBinding<JSONValue>` and resolves direct function-call properties while preserving typed resolution for inline dynamic unions. Rejected two-way binding writes now report `DATA_ERROR` to surface action handling and the MessageProcessor outbound listener, while leaving the data model unchanged. `SVGPathParser` now draws elliptical arc commands `A` and `a`, including arc flags without separators, enabling circles and rounded shapes in `Icon` `svgPath` values.

## What the archive adds

This follows earlier A2UI coverage of the project’s CLI v0.1.0 and its typesafe component code generator; the Swift release is a separate update. ([earlier New Runtime note](https://newruntime.com/posts/a2ui-project-ships-a2ui-cli-v0-1-0-d8938c/))

## Skill to build now

Pass catalogs through `Surface.init(viewModel:catalogs:defaultCatalogID:)` or `Surface.makeWithBasicCatalogs(viewModel:)`. Update metadata through `SurfaceViewModel` using `metadata`, `setMetadata(_:)`, `setExtension(_:value:)`, or `removeExtension(_:)`; read the three catalog and metadata values from `@Environment`.

For regex migration, rewrite repetitions so each iteration consumes at least one character—for example, use `(?:ab?){3}` instead of `(?:a?b?){3}`. If processing a payload inside a user gesture, pass `isUserActivated: true` so v1.0 `callRendererFunction` can invoke functions requiring user activation, including nested calls in its arguments.

## Reader takeaway

The breaking change is structural: SwiftUI environment values for catalogs and surface metadata are now read-only, with injection owned by Surface. Before upgrading, move setup to the named Surface and SurfaceViewModel APIs and check regex repetitions that may match empty strings in multiple ways. The release also adds post-initialization catalog registration, but existing surfaces do not inherit later additions.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Api Design](https://newruntime.com/topics/api-design.md): Explore the api-design topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
