a2ui-core 0.2.0__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/.gitignore +3 -0
  2. a2ui_core-0.4.0/CHANGELOG.md +445 -0
  3. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/PKG-INFO +2 -1
  4. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/pyproject.toml +2 -1
  5. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/__init__.py +26 -1
  6. a2ui_core-0.4.0/src/a2ui/core/basic_catalog/__init__.py +67 -0
  7. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v0_8/__init__.py +14 -1
  8. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v0_8/components.py +81 -79
  9. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v0_8/styles.py +2 -2
  10. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v0_9/__init__.py +11 -1
  11. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v0_9/components.py +110 -80
  12. a2ui_core-0.4.0/src/a2ui/core/basic_catalog/v0_9/function_apis.py +361 -0
  13. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v0_9/function_impls.py +68 -21
  14. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v0_9/styles.py +4 -3
  15. a2ui_core-0.4.0/src/a2ui/core/basic_catalog/v1_0/__init__.py +221 -0
  16. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v1_0/components.py +130 -100
  17. a2ui_core-0.4.0/src/a2ui/core/basic_catalog/v1_0/function_apis.py +372 -0
  18. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v1_0/function_impls.py +101 -59
  19. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/v1_0/functions.py +0 -6
  20. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/catalog/__init__.py +48 -9
  21. a2ui_core-0.4.0/src/a2ui/core/catalog/_spec_shape.py +333 -0
  22. a2ui_core-0.4.0/src/a2ui/core/catalog/catalog.py +2894 -0
  23. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/catalog/components.py +19 -0
  24. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/catalog/functions.py +66 -7
  25. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/catalog/reference_map.py +28 -3
  26. a2ui_core-0.4.0/src/a2ui/core/catalog/system_functions.py +157 -0
  27. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/common/__init__.py +2 -0
  28. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/common/semver.py +31 -0
  29. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/common/uax31.py +12 -5
  30. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/expressions/expression_parser.py +64 -21
  31. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/adapters/v0_8.py +36 -9
  32. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/adapters/v1_0.py +1 -0
  33. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/message_processor.py +432 -53
  34. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/operations.py +1 -0
  35. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/resolution/component_context.py +6 -6
  36. a2ui_core-0.4.0/src/a2ui/core/resolution/data_context.py +521 -0
  37. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/resolution/generic_binder.py +138 -33
  38. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/rpc/rpc_handler.py +145 -27
  39. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/__init__.py +54 -6
  40. a2ui_core-0.4.0/src/a2ui/core/schema/_dynamic_types.py +372 -0
  41. a2ui_core-0.4.0/src/a2ui/core/schema/_json_schema.py +561 -0
  42. a2ui_core-0.4.0/src/a2ui/core/schema/agent_to_renderer_schema.py +235 -0
  43. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/common_types.py +85 -7
  44. a2ui_core-0.4.0/src/a2ui/core/schema/common_types_schema.py +425 -0
  45. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_8/__init__.py +8 -0
  46. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_8/client_capabilities.py +2 -2
  47. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_8/client_to_server.py +2 -2
  48. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_8/server_to_client.py +81 -10
  49. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_9/__init__.py +6 -0
  50. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_9/client_capabilities.py +7 -6
  51. a2ui_core-0.4.0/src/a2ui/core/schema/v0_9/common_types.py +354 -0
  52. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_9/server_capabilities.py +3 -3
  53. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_9/server_to_client.py +65 -18
  54. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v1_0/__init__.py +12 -2
  55. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v1_0/agent_capabilities.py +3 -3
  56. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v1_0/agent_to_renderer.py +120 -18
  57. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v1_0/catalog_definition.py +30 -21
  58. a2ui_core-0.4.0/src/a2ui/core/schema/v1_0/common_types.py +548 -0
  59. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v1_0/renderer_capabilities.py +2 -2
  60. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v1_0/renderer_to_agent.py +4 -4
  61. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/state/component_model.py +27 -17
  62. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/state/data_model.py +1 -6
  63. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/state/surface_components_model.py +41 -17
  64. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/state/surface_group_model.py +5 -9
  65. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/state/surface_model.py +64 -15
  66. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/state/validation_helpers.py +8 -7
  67. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/validation/__init__.py +18 -12
  68. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/validation/payload_validator.py +494 -107
  69. a2ui_core-0.4.0/src/a2ui/core/validation/schema_validator.py +138 -0
  70. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_accessibility.py +15 -3
  71. a2ui_core-0.4.0/tests/test_agent_to_renderer_schema.py +293 -0
  72. a2ui_core-0.4.0/tests/test_basic_catalog_documents.py +114 -0
  73. a2ui_core-0.4.0/tests/test_catalog.py +1526 -0
  74. a2ui_core-0.4.0/tests/test_catalog_json.py +941 -0
  75. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_codegen_pydantic.py +535 -35
  76. a2ui_core-0.4.0/tests/test_common_types_schema.py +297 -0
  77. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_components.py +7 -29
  78. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_conformance.py +743 -103
  79. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_dynamic_types_strictness.py +10 -3
  80. a2ui_core-0.4.0/tests/test_expression_parser.py +115 -0
  81. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_functions.py +53 -2
  82. a2ui_core-0.4.0/tests/test_peer_catalogs.py +274 -0
  83. a2ui_core-0.4.0/tests/test_processing.py +1122 -0
  84. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_resolution.py +443 -36
  85. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_rpc.py +150 -126
  86. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_schema.py +73 -0
  87. a2ui_core-0.4.0/tests/test_schema_patterns.py +141 -0
  88. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_state.py +87 -137
  89. a2ui_core-0.2.0/CHANGELOG.md +0 -162
  90. a2ui_core-0.2.0/src/a2ui/core/basic_catalog/__init__.py +0 -20
  91. a2ui_core-0.2.0/src/a2ui/core/basic_catalog/v0_9/function_apis.py +0 -253
  92. a2ui_core-0.2.0/src/a2ui/core/basic_catalog/v1_0/__init__.py +0 -165
  93. a2ui_core-0.2.0/src/a2ui/core/basic_catalog/v1_0/function_apis.py +0 -254
  94. a2ui_core-0.2.0/src/a2ui/core/basic_catalog/v1_0/operator_apis.py +0 -31
  95. a2ui_core-0.2.0/src/a2ui/core/catalog/catalog.py +0 -1096
  96. a2ui_core-0.2.0/src/a2ui/core/resolution/data_context.py +0 -375
  97. a2ui_core-0.2.0/src/a2ui/core/schema/v0_9/common_types.py +0 -241
  98. a2ui_core-0.2.0/src/a2ui/core/schema/v1_0/common_types.py +0 -331
  99. a2ui_core-0.2.0/tests/test_catalog.py +0 -1386
  100. a2ui_core-0.2.0/tests/test_expression_parser.py +0 -187
  101. a2ui_core-0.2.0/tests/test_processing.py +0 -1679
  102. a2ui_core-0.2.0/tests/test_specification_drift.py +0 -386
  103. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/README.md +0 -0
  104. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/_compat.py +0 -0
  105. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/components.py +0 -0
  106. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/expression_parser.py +0 -0
  107. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/function_apis.py +0 -0
  108. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/function_impls.py +0 -0
  109. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/locale_formatting.py +0 -0
  110. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/basic_catalog/styles.py +0 -0
  111. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/common/events.py +0 -0
  112. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/exceptions.py +0 -0
  113. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/expressions/__init__.py +0 -0
  114. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/__init__.py +0 -0
  115. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/adapters/__init__.py +0 -0
  116. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/adapters/base.py +0 -0
  117. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/adapters/factory.py +0 -0
  118. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/adapters/v0_9.py +0 -0
  119. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/execution_context.py +0 -0
  120. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/processing/format_pydantic_error.py +0 -0
  121. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/py.typed +0 -0
  122. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/resolution/__init__.py +0 -0
  123. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/resolution/resolved_binding.py +0 -0
  124. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/rpc/__init__.py +0 -0
  125. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/client_capabilities.py +0 -0
  126. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/client_to_server.py +0 -0
  127. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/constants.py +0 -0
  128. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/server_to_client.py +0 -0
  129. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_8/catalog_definition.py +0 -0
  130. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_8/constants.py +0 -0
  131. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_9/client_to_server.py +0 -0
  132. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v0_9/constants.py +0 -0
  133. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/schema/v1_0/constants.py +0 -0
  134. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/state/__init__.py +0 -0
  135. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/src/a2ui/core/version.py +0 -0
  136. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_adapters.py +0 -0
  137. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_compat_shims.py +0 -0
  138. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_format_pydantic_error.py +0 -0
  139. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_reference_map.py +0 -0
  140. {a2ui_core-0.2.0 → a2ui_core-0.4.0}/tests/test_semver.py +0 -0
@@ -15,6 +15,9 @@ site/
15
15
  .venv/
16
16
  coverage/
17
17
 
18
+ # Older a2ui-agent-sdk builds copied specification JSON into these directories.
19
+ # Nothing writes there anymore, but older checkouts can still have the files;
20
+ # these rules keep them out of commits and locally built wheels.
18
21
  ## old agent SDK path
19
22
  a2a_agents/python/a2ui_agent/src/a2ui/assets/**/*.json
20
23
  agent_sdks/python/src/a2ui/assets/**/*.json
@@ -0,0 +1,445 @@
1
+ ## Unreleased
2
+
3
+ - Catalogs can reference components, property schemas and functions in peer
4
+ catalogs with external `$ref`s such as
5
+ `simplified_catalog_v1_0.json#/components/Text`. `Catalog.peer_catalogs`
6
+ lists the peers a catalog resolves them against.
7
+ `Catalog.with_peer_catalogs(peers)` returns a new catalog linked to `peers`
8
+ and leaves the catalog it is called on unchanged. `link_catalogs` returns
9
+ the catalogs linked to one another, with optional `extra_peers`: a catalog
10
+ without cross-catalog references is returned as is, and the others are
11
+ replaced by linked copies. `inline_local_refs` takes an optional `peers`
12
+ argument. A reference names its peer by `catalogId` or `$id`, exactly or by
13
+ path suffix, before falling back to the file name. `common_types.json` and a
14
+ document named exactly `catalog.json` are never peers, and a path ending in
15
+ `/catalog.json` that names no peer refers to the catalog itself.
16
+ `MessageProcessor` links copies of the catalogs passed to it and never
17
+ modifies them, so shared catalogs such as the basic catalog stay unchanged.
18
+ - `is_valid_uax31_identifier` and `assert_uax31_identifier` no longer strip a
19
+ leading `@` before checking UAX 31 syntax, and `Catalog.from_json` now rejects
20
+ `@`-prefixed catalog function names and validates function parameter names.
21
+ `PayloadValidator` allows the reserved `@index` system function call on v1.0+
22
+ surfaces while validating user-defined function names against UAX 31.
23
+ - **BREAKING**: `a2ui.core.schema.AgentToRendererMessage`,
24
+ `RendererToAgentMessage`, and their legacy aliases now expose the full
25
+ v0.8–v1.0 union instead of being overwritten by v0.9 re-exports. The facade
26
+ no longer re-exports `AGENT_TO_RENDERER_DEFS`, `INLINE_DEF_MARKER`,
27
+ `SchemaKeywords`, `def_ref` or `Annotated`, which leaked through the old
28
+ star imports; import them from their defining modules (#3064).
29
+ - **BREAKING**: `Catalog.from_json` keeps each component's and function's
30
+ definition as the document writes it and no longer writes local references
31
+ inline, so `ComponentApi.schema` and `FunctionApi.schema` of a loaded
32
+ catalog may contain `$ref` and `allOf`. To migrate, read
33
+ `Catalog.resolved_component_schema(name)`, `resolved_function_schema(name)`
34
+ and `resolved_theme_schema`, which give the schemas with references
35
+ resolved (#3053).
36
+ - `Catalog.from_json` deserializes a catalog document into the catalog model,
37
+ and `Catalog.to_json()` serializes the model back into an unbundled catalog
38
+ document, so `Catalog.from_json(document).to_json()` equals `document`
39
+ (ignoring key order and the order of `enum` and `required`, and excluding
40
+ components and functions omitted from `anyComponent.oneOf` and
41
+ `anyFunction.oneOf`, which `from_json` filters out). No authored JSON is
42
+ cached beside the model:
43
+ - Each component's and function's `schema` is its definition as the
44
+ document writes it, with `allOf` mixins, local `#/$defs/...` and
45
+ `common_types.json#/$defs/...` references, descriptions, closure keywords,
46
+ `allowedParents`/`allowedChildren` and the function's `returnType`,
47
+ `allowedCallers` and `requiresUserActivation`. The resolved schemas are
48
+ computed once per catalog, and `validation_schema`, `PayloadValidator`
49
+ and the component reference map use them.
50
+ - `FunctionApi.is_definition` says whether a function's `schema` is its
51
+ whole catalog document entry rather than the schema of its `args`.
52
+ `from_json` sets it on every function it loads, so `to_json()` writes
53
+ each entry as it was loaded, whatever its shape or name; for a function
54
+ defined in code it defaults to None, which infers it from the schema.
55
+ - `ComponentApi.from_document` and `FunctionApi.from_document` mark entries
56
+ loaded by `from_json`. `to_json()` writes loaded entries, defs and themes
57
+ with their references as written, and points a local reference to a
58
+ common type at `common_types_uri` only in those defined in code. A list
59
+ of `functions` that repeats a `name` raises `A2uiCatalogError`.
60
+ - The catalog keeps the document's top-level fields as attributes:
61
+ `schema_dialect` (`$schema`), `schema_id` (`$id`), `title`,
62
+ `description`, `declared_protocol_version`, `declares_catalog_id`,
63
+ `instructions`, `theme_schema` with its `theme_location` (top-level
64
+ `theme`, v0.8's `styles`, or `$defs.theme`), the shared named `defs`,
65
+ `functions_form` (map or list), `union_defs` and the unknown top-level
66
+ `extras`.
67
+ - `to_json()` assembles the document from those fields. An `anyComponent`
68
+ or `anyFunction` union that lists the entries is derived from them, so a
69
+ transformed catalog lists its own entries; any other union is kept as
70
+ written. A component or function defined by a model is derived from the
71
+ model in the shape of its protocol version, and `common_types_uri` names
72
+ the document its common types references point into. A catalog defined in
73
+ code emits a canonical `protocolVersion` and the unions of its entries;
74
+ an empty union is `{"not": {}}`; a union written as `null` is kept.
75
+ `to_json()` and `validation_schema` are computed once per catalog and
76
+ return a new copy on each call, so a catalog must be treated as immutable
77
+ once built: later changes to its fields are not reflected, and `copy_with`
78
+ derives a changed catalog (#3053).
79
+ - The basic catalogs (`a2ui.core.basic_catalog.v0_8`, `v0_9` and `v1_0`)
80
+ rebuild their published catalog documents from their generated models, so
81
+ `BasicCatalog().to_json()` equals the published file without reading it;
82
+ `a2ui-core` ships no catalog JSON. The generated `BasicCatalog` passes the
83
+ document's top-level fields to `Catalog` and its theme as `theme_model`.
84
+ Their `validation_schema` is unchanged except that the v1.0 catalog emits
85
+ the `protocolVersion: "1.0"` its document declares (#3053).
86
+ - **BREAKING**: (v0_8) The generated basic catalog models no longer share one
87
+ model between nested objects of different shapes: `CheckBox.value` keeps
88
+ `literalBoolean` (`ValueItem`), and `DateTimeInput.value`, `Slider.value`
89
+ and a `Button` action's context `value` get their own models
90
+ (`DateTimeInputValueItem`, `SliderValueItem`, `ContextValueItem`), so values
91
+ the specification allows are no longer rejected. Nested object models carry
92
+ their descriptions on the fields, with line breaks kept, rather than as
93
+ docstrings. To migrate, build those values with the new models instead of
94
+ `ValueItem` (#3053).
95
+ - `Catalog.from_json` reads a v0.8 document's top-level `styles` as the theme
96
+ schema (#3053).
97
+ - `Catalog.validation_schema` is the self-contained schema used to validate
98
+ messages, previously `catalog_schema`. `catalog_schema` remains as a
99
+ deprecated alias that emits a `DeprecationWarning`; to migrate, read
100
+ `validation_schema` instead (#3053).
101
+ - `Catalog.validation_schema` emits the `protocolVersion` that the catalog
102
+ document declares (including the canonical version of a catalog defined in
103
+ code), in the bare semantic version form that
104
+ `catalog_definition.json` requires (`v0.9.1` becomes `0.9.1`; `to_json`
105
+ keeps it as written). Before v1.0, each function call schema in it
106
+ has the specification's shape: a `returnType` constant, `args` required when
107
+ it has required arguments, and `unevaluatedProperties: false` on the call
108
+ and on its `args` unless the document already decides on unlisted
109
+ properties. v1.0 function entries stay open, since `FunctionCall` closes the
110
+ call (#3053).
111
+ - `Catalog.validation_schema` bundles the published common types defs, with
112
+ local references, for every catalog, including catalogs loaded with
113
+ `Catalog.from_json`, which previously got the flat model-derived defs. It
114
+ flattens `allOf` mixins (`ComponentCommon`, `Checkable`, and local `#/$defs/`
115
+ mixins) into flat component `properties` and `required` lists with component
116
+ properties overriding mixin properties, strips envelope keys (`id`,
117
+ `component`, `catalogId`) before reconstructing the canonical component
118
+ envelope, prunes `ComponentCommon`, `Checkable` and inlined local mixins from
119
+ `$defs`, and propagates `$ref` target descriptions onto reference objects. A
120
+ catalog without functions gets `anyFunction: {"not": {}}`, so the bundled
121
+ `FunctionCall` admits no catalog function call. From v0.9, a theme
122
+ object schema that does not decide on unlisted properties gets
123
+ `additionalProperties: true`. A `title` keyword written in a catalog document
124
+ is kept instead of being stripped (#3036, #3053).
125
+ - `Catalog.from_json` reads a v0.9 function's return type from its
126
+ `returnType` constant, so `FunctionApi.return_type` is no longer `any` for
127
+ the published v0.9 basic catalog's functions (#3053).
128
+ - `Catalog.copy_with(components=, functions=, defs=)` returns a copy that
129
+ keeps the document fields, lists its own entries in the unions it derives,
130
+ and drops the authored definitions that only the dropped entries
131
+ referenced (#3053).
132
+ - `Catalog.from_json` sets a function's `description` from its definition
133
+ (#3053).
134
+ - `Catalog.from_json` no longer raises when neither the document nor the
135
+ `protocol_version` argument names a protocol version; the catalog defaults
136
+ to v0.9 (#3053).
137
+ - **BREAKING**: From v1.0, `MessageProcessor.get_renderer_capabilities`
138
+ builds `inlineCatalogs` from `Catalog.to_json()` instead of the bundled
139
+ schema, matching the v1.0 `catalog_definition.json` shape, so an inline
140
+ catalog keeps its external `common_types.json` references (#3053).
141
+ - **BREAKING** (v1_0): Components and function calls that name no
142
+ `catalogId` resolve against the surface's default catalog, and fail if the
143
+ surface has none, instead of falling back to the first registered catalog.
144
+ An updated component no longer keeps the catalog of its previous version.
145
+ - **BREAKING** (v1_0): `MessageProcessor` checks each nested function call
146
+ against the catalog it resolves to, and a call whose catalog can't be
147
+ resolved raises `A2uiCatalogError`, as a component does, even without a
148
+ validation config. Argument errors from these checks are reported together
149
+ with the component schema errors of the same update, in one
150
+ `A2uiValidationError`, which reports a detail found by both checks once.
151
+ - (v1_0) `PayloadValidator` fully checks a nested call when it runs in the
152
+ validator's catalog: when it names that catalog, or names no `catalogId` in
153
+ a component that names none either. Any other call runs in a catalog the
154
+ validator can't see, so only its envelope is checked: function and argument
155
+ identifiers, and `args` must be an object; `MessageProcessor` checks it against the catalog it resolves to.
156
+ `SurfaceComponentsModel.validate_components_update` applies the same rule,
157
+ using whether each component's catalog is the surface default. Nested calls
158
+ are checked even in a component whose type the catalog doesn't define and
159
+ the validation config allows (`allow_unknown_elements`).
160
+ - **BREAKING**: `DataContext.is_v10` is renamed to `DataContext.at_least_v10`, since it is true for v1.0 and every later version.
161
+ - **BREAKING**: `DataContext` reports a function call whose catalog can't be resolved on the surface error channel with code `CATALOG_ERROR` instead of `EXPRESSION_ERROR`. Other evaluation failures, including a function missing from its resolved catalog, keep `EXPRESSION_ERROR`.
162
+ - (v1_0) `MessageProcessor` rejects a component whose `catalogId` is not a string with `A2uiValidationError`, as it does for a function call, instead of failing to find the catalog.
163
+ - **BREAKING**: `ComponentModel` requires a catalog:
164
+ `ComponentModel(component_id, component_type, catalog, properties=None)`.
165
+ The legacy `ComponentModel(id, type, properties)` form and a `None` catalog
166
+ are no longer accepted. `MessageProcessor` raises `A2uiCatalogError` before
167
+ creating a model when neither the component nor the surface names a
168
+ catalog.
169
+ - (v1_0) A component's JSON schema no longer judges the function or args of a
170
+ nested call: the published `FunctionCall` def, which ties every call to the
171
+ functions of the component's catalog, is replaced by its envelope (`@call`,
172
+ `args`, `catalogId`) during component validation. So a JSON catalog built
173
+ from the generated or published basic schema accepts a call that names
174
+ another catalog, and the call is judged by the nested-call checks above
175
+ instead. Nested-call errors are now reported at the call's location in the
176
+ component (for example `components.t1.text.args.value`) rather than as
177
+ `functions.<name>...`, without a second, vaguer schema error for the same
178
+ call.
179
+ - (v1_0) An empty `catalogId` names a catalog, as any string does, so a
180
+ component or function call with `catalogId: ""` fails catalog resolution
181
+ instead of falling back to the surface default, and a direct
182
+ `PayloadValidator` treats it as another catalog. A non-string `catalogId`
183
+ on a nested call is a `type_mismatch` error.
184
+ - (v1_0) Reserved `@` system functions such as `@index` need no catalog: they
185
+ are validated and run without catalog resolution, on any surface. A system
186
+ function call that names a `catalogId` is rejected (`extra_field`), and
187
+ `DataContext` reports it as an `EXPRESSION_ERROR` instead of running it.
188
+ - (v1_0) A nested call with an empty `@call` name is rejected as an invalid
189
+ identifier instead of being skipped.
190
+ - (v1_0) `catalogId` and `metadata` are component envelope keys, like `id` and
191
+ `component`: `PayloadValidator` leaves them out when a component's JSON
192
+ schema or Pydantic model doesn't declare them, so a closed schema accepts a
193
+ component that names its catalog. A `catalogId` left out this way must
194
+ still be a string.
195
+ - **BREAKING** (v1_0): Every component in `updateComponents` must name its
196
+ `component` type, as the specification requires; an update of an existing
197
+ component that leaves it out is rejected.
198
+ - (v0_9) A function call's `catalogId` is ignored, since v0.9 function calls
199
+ have no such field, so the call always runs in the surface catalog.
200
+ Previously a call naming a catalog the surface lacked raised
201
+ `A2uiCatalogError`. `PayloadValidator` likewise checks such a call against
202
+ its catalog instead of only checking its identifiers.
203
+ - **BREAKING**: `SurfaceModel.default_catalog` and `SurfaceModel.catalog` are
204
+ now `CatalogApi | None`, since a v1.0 surface may have no default catalog.
205
+ New `SurfaceModel.protocol_version` holds the surface's version.
206
+ - New `SurfaceModel.resolve_catalog`, which resolves the catalog a component
207
+ or function call runs in. New `validate_system_function`
208
+ (`a2ui.core.validation`) and `is_system_function_name` (`a2ui.core.catalog`).
209
+
210
+ ## 0.3.0 (2026-10-08)
211
+
212
+ - `inline_local_refs` is exported from `a2ui.core`. It writes a schema's local
213
+ `#/` references inline, keeping references to common types, as
214
+ `Catalog.from_json` does
215
+ ([#2966](https://github.com/a2ui-project/a2ui/pull/2966)).
216
+ - (v1_0) The basic catalog's `and`, `or` and `not` read a ValidationResult
217
+ operand by its `valid` member instead of treating every non-empty dict as
218
+ truthy, so the v1.0 specification's nested
219
+ `and(required, or(required, required))` check is false when a field is
220
+ empty. The v0.9 catalog keeps plain truthiness, since its validators return
221
+ booleans.
222
+ - **BREAKING**: `DataContext` validates a function call's arguments as
223
+ written, before resolving the bindings and nested calls in them, and passes
224
+ the resolved values to the function body without validating them again.
225
+ The catalog's argument schema describes the written shape (a
226
+ `DynamicBoolean` admits a `{"@call": ...}`), so validating the resolved
227
+ values rejected, for example, the ValidationResult a v1.0 validator returns
228
+ to `and`, `or` or `not`. This matches web_core. Accordingly,
229
+ `FunctionImplementation.execute` no longer validates its arguments; callers
230
+ that invoke it directly validate the written arguments first, with
231
+ `PayloadValidator.validate_function` or the function's schema model.
232
+ - **BREAKING**: `ComponentModel.component_tree` names the component under
233
+ `component`, as an `updateComponents` message does, instead of `type`. A
234
+ property named `type` no longer replaces the component type in the tree,
235
+ and is kept. `ComponentModel.validate` validates that same dict, so a
236
+ property named `component` or `id` no longer replaces the model's own
237
+ during validation ([#2930](https://github.com/a2ui-project/a2ui/pull/2930)).
238
+ - The path syntax and function call depth checks in
239
+ `validate_recursion_and_paths` also read v1.0's `@path` and `@call`. A v1.0
240
+ payload with a malformed `@path`, or with `@call` expressions nested deeper
241
+ than the limit, used to pass validation
242
+ ([#3013](https://github.com/a2ui-project/a2ui/pull/3013)).
243
+ - JSON Schema patterns are validated with `regex` (`SchemaValidator` in
244
+ `a2ui.core.validation`), supporting Unicode property escapes such as
245
+ `\p{XID_Start}` and `\p{XID_Continue}` natively and anchoring `$` to the end
246
+ of the string per ECMA-262. `clean_schema_node` leaves `const`, `enum`,
247
+ `default`, and `examples` values untouched.
248
+ - `PayloadValidator` reports invalid `Extensions` keys even with
249
+ `allow_unknown_elements`.
250
+ - Catalog schemas reference `DynamicStringList` for string list values, as the
251
+ basic catalog does, instead of `DynamicValue`.
252
+ - Patch and pre-release protocol versions use the common types of their release
253
+ line (`1.0.0-rc.1` uses v1.0). Unparsable versions raise `A2uiCatalogError`
254
+ when a catalog schema is built.
255
+ - `GenericBinder` binds `$ref`s to catalog-defined dynamic defs (for example
256
+ `DynamicDate`).
257
+ - Add `CatalogApi`, the name for a schema-only `Catalog[ComponentApi, FunctionApi]`, exported from `a2ui.core`. `Catalog.from_json` returns it.
258
+ - Execute `functionCall` and `call` component actions locally in `GenericBinder` and prevent `SurfaceModel.dispatch_action` from emitting them as agent-facing `on_action` events.
259
+ - `ExpressionParser` accepts number literals with a leading decimal point
260
+ (`.5`, `-.5`, `+.5`, `.5e2`), including as function-call arguments. `.foo`
261
+ and `./x` are still paths.
262
+ - `ExpressionParser` raises `A2uiExpressionError` for a number literal outside
263
+ the double range, such as `1e999` or a 400-digit integer. It used to return
264
+ `inf` for float literals and an exact `int` for integer literals. Integer
265
+ literals longer than 4,300 digits no longer raise a bare `ValueError`.
266
+ - **BREAKING**: Optional JSON Schema `default` annotations in generated v0.9
267
+ and v1.0 Pydantic models are kept in field descriptions instead of becoming
268
+ field values. `const` values remain fixed.
269
+ - **BREAKING**: `BasicCatalog` from `a2ui.core.basic_catalog` is a factory that
270
+ returns the basic catalog of a protocol version, for example
271
+ `BasicCatalog("0.9")`. The package no longer re-exports the v0.9 basic
272
+ catalog's symbols; import them from `a2ui.core.basic_catalog.v0_9`.
273
+ - The v0.8 basic catalog's `catalog_id` is the v0.8 standard catalog ID,
274
+ `https://a2ui.org/specification/v0_8/standard_catalog_definition.json`.
275
+ - **BREAKING**: `PayloadValidator`, `SurfaceModel`, `SurfaceGroupModel`,
276
+ `DataContext`, and `RpcHandler` are no longer generic. They take `CatalogApi`
277
+ catalogs, so remove type arguments such as
278
+ `SurfaceModel[MyComponent, MyFunction]`.
279
+
280
+ ## 0.2.0 (2026-09-28)
281
+
282
+ - **BREAKING**: Module paths and validation interfaces moved or changed in v0.2.0. Deprecation shims are provided for renamed public module paths; importing them emits a `DeprecationWarning` naming the new path. These shims will be removed in `v0.3.0`.
283
+
284
+ **Shimmed Modules (Deprecated; removal in v0.3.0):**
285
+
286
+ | Old Path (`v0.1.x`) | New Path (`v0.2.0`) | Notes |
287
+ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- | ---------------------------------------------------- |
288
+ | `a2ui.core.basic_catalog.{components,function_apis,function_impls,styles}` | `a2ui.core.basic_catalog.v0_9.{components,function_apis,function_impls,styles}` | Re-exports v0.9 basic catalog symbols |
289
+ | `a2ui.core.basic_catalog.expression_parser` | `a2ui.core.expressions.expression_parser` | Re-exports `ExpressionParser`, `Scanner`, and limits |
290
+ | `a2ui.core.schema.{client_capabilities,client_to_server,constants,server_to_client}` | `a2ui.core.schema.v0_9.{client_capabilities,client_to_server,constants,server_to_client}` | Also aliases `A2uiClientError*` and `SPEC_VERSION*` |
291
+
292
+ **Unshimmed Internal Modules & Renames:**
293
+
294
+ Internal modules were moved without shims; callers should import from the new paths directly:
295
+
296
+ - `a2ui.core.rendering` (and `.component_context`, `.data_context`, `.generic_binder`): moved to `a2ui.core.resolution` (and matching submodules).
297
+ - `a2ui.core.validating` (and `.integrity_checker`, `.topology_analyzer`): moved to `a2ui.core.validation` (and `a2ui.core.state.validation_helpers`).
298
+ - `validate_component_integrity`: moved to `a2ui.core.validation` as `(components: dict[str, ComponentModel], root_id: str = ROOT_ID, config: ValidationConfig | None = None) -> None`.
299
+ - `analyze_topology`: moved to `a2ui.core.validation` as `(components: dict[str, ComponentModel], root_id: str = ROOT_ID, config: ValidationConfig | None = None) -> set[str]`.
300
+
301
+ **Removed Modules and APIs:**
302
+
303
+ | Removed (`v0.1.x`) | Replacement (`v0.2.0`) |
304
+ | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
305
+ | `a2ui.core.validating.validator` (`A2uiValidator`, `A2uiValidatorError`) | `a2ui.core.validation.PayloadValidator` |
306
+ | `a2ui.core.validating.catalog_schema_validator` (`CatalogSchemaValidator`, `extract_ref_fields`) | `a2ui.core.catalog.reference_map` (`ComponentRefSpec`, `build_component_ref_map`) |
307
+ | `a2ui.core.validating.integrity_checker.get_component_references` | `ComponentRefSpec.extract_child_references`, `ComponentModel.get_child_references` |
308
+ | `a2ui.core.state.{node_graph,component_node}` (`NodeGraph`, `ComponentNode`) | Removed |
309
+ | `a2ui.core.basic_catalog.locale_config` | `a2ui.core.basic_catalog.locale_formatting` (Babel/CLDR) |
310
+ | `a2ui.core.basic_catalog.operator_apis` | `a2ui.core.basic_catalog.v1_0.operator_apis` |
311
+ | `get_client_capabilities`, `get_client_data_model` | Removed |
312
+ | `SPEC_VERSION` | `PROTOCOL_VERSION` (in `a2ui.core.schema.v0_9.constants`) |
313
+ | `A2uiClientErrorMessage` | `A2uiRendererErrorMessage` |
314
+ | `Catalog(spec_version=)` | `Catalog(protocol_version=)` |
315
+ | `MessageProcessor(strict_mode=)` | `MessageProcessor(options=)` |
316
+
317
+ - **BREAKING**: `DataModel` stores data values by reference instead of making deep copies. Callers that mutate nested objects after setting them in `DataModel` will update internal state directly.
318
+ - **BREAKING**: `A2uiRpcError` argument order is now `(message, code, ...)`.
319
+ - **BREAKING**: `DataModel.set` now raises `A2uiDataError` instead of resetting the root when attempting to traverse or set a subpath under a primitive root value.
320
+ - **BREAKING**: `SurfaceComponentsModel.add_component` now raises `A2uiStateError` if a component with the same ID already exists in the model.
321
+ - **BREAKING**: pending RPC requests on `RpcHandler.dispose()` are now rejected with error code `CANCELLED` (previously `DISPOSED`).
322
+ - `SurfaceModel` now accepts a `root_id` parameter (defaulting to `"root"`) and provides a deprecated `catalog` property aliasing `default_catalog`.
323
+ - `SurfaceComponentsModel.detect_cycles` now correctly ignores disconnected orphan components by passing `allow_orphan_components=True` to topology analysis, reporting cycle and depth limit violations exclusively.
324
+ - Bound function calls to `MAX_FUNCTION_CALL_ARGS` (1,000 arguments) across both `PayloadValidator.validate_function` and runtime `DataContext._execute_function` resolution.
325
+ - Bound expression template strings to `MAX_EXPRESSION_TEMPLATE_LENGTH` (10,000 characters) and parsed expression segments to `MAX_EXPRESSION_PARTS` (1,000 parts) in `ExpressionParser`.
326
+ - Add SemVer parsing and comparison utilities (`SemVer`, `compare_semver`, `is_at_least_version`, `normalize_version_string`, `parse_semver`, `to_canonical_version`, `to_semver`) in `a2ui.core.common.semver`.
327
+ - Add `A2uiProtocolVersion` and `ProtocolVersion` enum in `a2ui.core.schema`.
328
+ - Remove `A2uiCompileError` from `a2ui_core` exception hierarchy.
329
+ - **BREAKING**: locale formatting now comes from CLDR by way of `babel`,
330
+ replacing the hand-rolled locale tables. Currency, number, date month and
331
+ weekday names, and plural category selection now match what the TypeScript
332
+ engine gets from `Intl`. That was the point: the two engines previously
333
+ disagreed for every locale other than `en-US`, on the symbol chosen and on
334
+ which Unicode space separates it from the amount.
335
+
336
+ `a2ui.core.basic_catalog` no longer exports `LocaleFormattingRules`,
337
+ `register_locale_rules`, `get_locale_rules` or `CURRENCY_SYMBOLS`, and
338
+ `locale_config.py` is deleted. `register_locale_rules` was the extension
339
+ point for registering a custom locale; that capability goes away rather than
340
+ moving, because `babel` resolves locales from CLDR only.
341
+
342
+ `babel` is added as a runtime dependency.
343
+
344
+ `babel` reads its patterns and symbols from CLDR but does not implement
345
+ CLDR's `currencySpacing`, which ICU does apply. The package supplies that
346
+ rule itself, so a currency whose symbol is alphabetic is separated from the
347
+ amount by U+00A0 as `Intl` separates it: `CHF 1,234.56`, not `CHF1,234.56`.
348
+ This affects the assigned codes `CHF`, `SEK`, `DKK`, `CZK` and `PLN` among
349
+ others, in `en-US` as well as elsewhere.
350
+
351
+ One difference from `Intl` remains. For Arabic locales such as `ar-EG`,
352
+ `Intl` shapes digits in Eastern Arabic numerals while `babel` emits Latin
353
+ ones. `babel` offers no way to close this: requesting the locale's default
354
+ numbering system converts the separators but not the digits, which agrees
355
+ with neither engine.
356
+
357
+ A locale tag the catalog cannot use falls back to `en_US` rather than
358
+ raising. `babel` raises for a malformed tag and for a well-formed tag CLDR
359
+ does not carry, such as `xx-YY`, either of which would otherwise abort every
360
+ format call made by a catalog built with it. The TypeScript engine falls back
361
+ for the same tags.
362
+
363
+ - **BREAKING**: the `Dynamic*` schema aliases no longer coerce a value of the
364
+ wrong primitive type. Each admits one primitive type, a data binding, or a
365
+ function call, matching the TypeScript engine and the specification. What
366
+ changes in practice:
367
+ - `DynamicNumber` rejects the string `"1"`, which previously validated as
368
+ `1.0`, and rejects `True`, which previously validated as `1`.
369
+ - `DynamicBoolean` rejects `1`, `0` and `"true"`, which previously validated
370
+ as `True`, `False` and `True`.
371
+ - `DynamicValue` keeps an integer as an integer. It admitted `float` but not
372
+ `int`, so a payload carrying `1` came back as `1.0`.
373
+ - `DynamicString` and `DynamicStringList` are now declared strict for
374
+ consistency. This is not a behaviour change: pydantic already refused to
375
+ coerce other primitives into a string.
376
+
377
+ Data bindings and function calls are unaffected.
378
+
379
+ - The v0.9 and v1.0 basic catalogs no longer register `add`, `subtract`, `multiply`,
380
+ `divide`, `equals`, `not_equals`, `greater_than`, `less_than`, `contains`,
381
+ `starts_with` or `ends_with`. The published catalogs declare exactly 14
382
+ functions, and none of these operators is among them, so an agent had no way to know
383
+ they were callable. `a2ui.core.basic_catalog` no longer exports their
384
+ API classes or implementations, aligning Python engine behavior with the
385
+ reference typescript implementation.
386
+
387
+ - The v1.0 `formatDate` `ISO` pattern now returns the UTC instant with exactly
388
+ three fractional digits, as `web_core` does. It previously echoed back
389
+ whichever offset the input carried, so `2025-01-01T12:00:00+02:00` formatted
390
+ as itself instead of `2025-01-01T10:00:00.000Z`. A timestamp without an
391
+ offset is read as UTC, so the result no longer depends on the host time zone.
392
+
393
+ - The v1.0 `pluralize` function now falls back to the `other` form only when
394
+ the selected category is absent, not when its value is empty. A caller that
395
+ supplies `zero: ""` gets an empty string, matching `web_core`; previously the
396
+ empty form was discarded and the `other` form rendered in its place.
397
+
398
+ - `ExpressionParser.MAX_DEPTH` is 100, up from 10, matching `web_core` and the
399
+ Swift engine. An expression nested between 11 and 100 levels deep was
400
+ rejected here and accepted there.
401
+
402
+ - A function-call argument now counts toward the expression parser's recursion
403
+ depth, as it does in `web_core`. Only nested interpolations were counted
404
+ before, so `${f(a: ${f(a: ...)})}` written as `${f(a: f(a: ...))}` recursed
405
+ unchecked and raised `RecursionError` from the interpreter rather than a
406
+ parse error.
407
+
408
+ - `Catalog.from_json` accepts a `common_types_schema` argument and rewrites
409
+ cross-document references such as `common_types.json#/$defs/ChildList` into
410
+ local `#/$defs/...` pointers, satisfying them from the supplied document or
411
+ from the built-in definitions. Catalogs that reference the published shared
412
+ types now load without the `specification/` tree on disk, and the validator
413
+ no longer reads schema files at runtime.
414
+ - Deleting a list index past the end of the list is now a no-op. It previously
415
+ padded the list with `None` up to that index, so deleting `/items/10` from a
416
+ three-element list produced an eleven-element list.
417
+ - The shared type definitions used to satisfy `common_types.json` references
418
+ are now checked against the published document by a test, with an explicit
419
+ list of the definitions that intentionally differ. Descriptions on
420
+ `AccessibilityAttributes`, `DynamicString`, `DynamicNumber` and
421
+ `DynamicBoolean` were brought back into line with the specification.
422
+ - The conformance harness now fails, rather than silently skipping, when a
423
+ suite cannot be parsed, when a case has no `name` or `action`, or when an
424
+ action has no handler. Suites the core library cannot run are named in
425
+ `UNRUNNABLE_SUITES` with a reason.
426
+ - Move `@index` (`IndexApi`, `IndexArgs`, `IndexImplementation`) from
427
+ `a2ui.core.basic_catalog.v1_0` (`v1_0/operator_apis.py` removed) to
428
+ `a2ui.core.catalog`, where `system_functions_for` supplies it to v1.0 and
429
+ later catalogs.
430
+
431
+ ## 0.1.1
432
+
433
+ - Enable type checks across `a2ui_core` (#1816).
434
+ - Fix `MessageProcessor.get_client_capabilities` exporting `None` into `inlineCatalogs` for programmatically created catalogs.
435
+ - Optimize component validation with cached Pydantic `TypeAdapter` on `ComponentImplementation`.
436
+
437
+ ## 0.1.0
438
+
439
+ - Initial standalone release of `a2ui_core` (split from `a2ui_agent`).
440
+
441
+ ## 0.0.4
442
+
443
+ ## 0.0.3
444
+
445
+ ## 0.0.1
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: a2ui-core
3
- Version: 0.2.0
3
+ Version: 0.4.0
4
4
  Summary: A2UI Python SDK - Core Library
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: babel>=2.14.0
7
7
  Requires-Dist: jsonschema>=4.26.0
8
8
  Requires-Dist: pydantic>=2.10.0
9
9
  Requires-Dist: referencing>=0.37.0
10
+ Requires-Dist: regex>=2024.11.6
10
11
  Description-Content-Type: text/markdown
11
12
 
12
13
  # A2UI Core Library (`a2ui_core`)
@@ -19,10 +19,11 @@ description = "A2UI Python SDK - Core Library"
19
19
  readme = "README.md"
20
20
  requires-python = ">=3.10"
21
21
  dependencies = [
22
+ "babel>=2.14.0",
22
23
  "jsonschema>=4.26.0",
23
24
  "pydantic>=2.10.0",
24
25
  "referencing>=0.37.0",
25
- "babel>=2.14.0",
26
+ "regex>=2024.11.6",
26
27
  ]
27
28
 
28
29
  [dependency-groups]
@@ -14,7 +14,14 @@
14
14
 
15
15
  from a2ui.core.catalog import (
16
16
  Catalog as Catalog,
17
+ CatalogApi as CatalogApi,
18
+ get_agent_to_renderer_schema_json as get_agent_to_renderer_schema_json,
19
+ get_agent_to_renderer_schema_map as get_agent_to_renderer_schema_map,
20
+ get_common_types_schema_json as get_common_types_schema_json,
21
+ get_common_types_schema_map as get_common_types_schema_map,
22
+ inline_local_refs as inline_local_refs,
17
23
  is_valid_uax31_identifier as is_valid_uax31_identifier,
24
+ link_catalogs as link_catalogs,
18
25
  )
19
26
  from a2ui.core.exceptions import (
20
27
  A2uiCatalogError as A2uiCatalogError,
@@ -36,8 +43,16 @@ from a2ui.core.processing import (
36
43
  MessageProcessor as MessageProcessor,
37
44
  MessageProcessorOptions as MessageProcessorOptions,
38
45
  )
46
+ from a2ui.core.resolution import DataContext as DataContext
39
47
  from a2ui.core.rpc import CallOptions as CallOptions, RpcHandler as RpcHandler
40
- from a2ui.core.state import DataModel as DataModel, SurfaceModel as SurfaceModel
48
+ from a2ui.core.schema import (
49
+ A2uiRendererCapabilities as A2uiRendererCapabilities,
50
+ )
51
+ from a2ui.core.state import (
52
+ ComponentModel as ComponentModel,
53
+ DataModel as DataModel,
54
+ SurfaceModel as SurfaceModel,
55
+ )
41
56
  from a2ui.core.validation import (
42
57
  PayloadValidator as PayloadValidator,
43
58
  RELAXED_VALIDATION as RELAXED_VALIDATION,
@@ -55,12 +70,16 @@ __all__ = [
55
70
  "A2uiIntegrityError",
56
71
  "A2uiParseError",
57
72
  "A2uiRecursionError",
73
+ "A2uiRendererCapabilities",
58
74
  "A2uiRpcError",
59
75
  "A2uiStateError",
60
76
  "A2uiValidationError",
61
77
  "CallOptions",
62
78
  "CapabilitiesOptions",
63
79
  "Catalog",
80
+ "CatalogApi",
81
+ "ComponentModel",
82
+ "DataContext",
64
83
  "DataModel",
65
84
  "ExecutionContext",
66
85
  "MessageProcessor",
@@ -73,5 +92,11 @@ __all__ = [
73
92
  "SurfaceModel",
74
93
  "ValidationConfig",
75
94
  "__version__",
95
+ "get_agent_to_renderer_schema_json",
96
+ "get_agent_to_renderer_schema_map",
97
+ "get_common_types_schema_json",
98
+ "get_common_types_schema_map",
99
+ "inline_local_refs",
76
100
  "is_valid_uax31_identifier",
101
+ "link_catalogs",
77
102
  ]
@@ -0,0 +1,67 @@
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """A2UI Basic Catalog Module."""
16
+
17
+ from __future__ import annotations
18
+
19
+ from a2ui.core.catalog import CatalogApi
20
+ from a2ui.core.common import to_protocol_version
21
+ from a2ui.core.exceptions import A2uiError
22
+ from a2ui.core.schema import ProtocolVersion
23
+
24
+ from . import v0_8, v0_9, v1_0
25
+
26
+
27
+ def BasicCatalog(
28
+ protocol_version: ProtocolVersion | str,
29
+ locale: str | None = None,
30
+ ) -> CatalogApi:
31
+ """Returns the basic catalog instance for the specified protocol version.
32
+
33
+ Args:
34
+ protocol_version: The protocol version (e.g. ProtocolVersion.V0_9,
35
+ ProtocolVersion.V1_0, 'v0.9', '0.9', '1.0').
36
+ locale: Optional locale string for function implementations.
37
+
38
+ Returns:
39
+ The versioned BasicCatalog instance.
40
+
41
+ Raises:
42
+ A2uiError: If the protocol version is not supported.
43
+ """
44
+ try:
45
+ p_ver = to_protocol_version(protocol_version)
46
+ except (ValueError, A2uiError) as e:
47
+ raise A2uiError(
48
+ f"Unsupported protocol version for BasicCatalog: '{protocol_version}'."
49
+ ) from e
50
+
51
+ if p_ver == ProtocolVersion.V0_8:
52
+ return v0_8.BasicCatalog(locale=locale)
53
+ if p_ver in (ProtocolVersion.V0_9, ProtocolVersion.V0_9_1):
54
+ return v0_9.BasicCatalog(locale=locale)
55
+ if p_ver == ProtocolVersion.V1_0:
56
+ return v1_0.BasicCatalog(locale=locale)
57
+ raise A2uiError(
58
+ f"Unsupported protocol version for BasicCatalog: '{protocol_version}'."
59
+ )
60
+
61
+
62
+ __all__ = [
63
+ "BasicCatalog",
64
+ "v0_8",
65
+ "v0_9",
66
+ "v1_0",
67
+ ]