feat(formats): implement Express and Elemental InferenceFormats #1982
Merged
Conversation
gspencergoog
force-pushed
the
unified-inference-formats-strategies
branch
5 times, most recently
from
July 10, 2026 02:38
34a0c18 to
0101648
Compare
This was referenced Jul 10, 2026
gspencergoog
force-pushed
the
unified-inference-formats-strategies
branch
3 times, most recently
from
July 10, 2026 16:56
6238957 to
82bd501
Compare
gspencergoog
force-pushed
the
unified-inference-formats-foundation
branch
from
July 10, 2026 16:59
89a547a to
1134c08
Compare
gspencergoog
force-pushed
the
unified-inference-formats-strategies
branch
10 times, most recently
from
July 13, 2026 21:12
5266cef to
77a52dd
Compare
gspencergoog
force-pushed
the
unified-inference-formats-foundation
branch
from
July 13, 2026 21:44
dd30576 to
914f571
Compare
gspencergoog
force-pushed
the
unified-inference-formats-strategies
branch
2 times, most recently
from
July 13, 2026 21:49
c0e7429 to
33fc7c2
Compare
- Make experiments parameter conditional on version == "1.0" in eval format strategy resolver. - Support resolving surface ID from both a2ui and body tags in completion solver regex. - Auto-close unclosed a2ui tags during streaming compilation in ElementalParser. - Ensure prompt generator delegates example decompilation using its pruned catalog decompiler if available. - Call _ensure_catalog before instantiating prompt generator in ExpressFormat property. - Fix prefix check for action properties in ElementalDecompiler to look for "on-".
…s and parser classes
…alid compiler root tag
… nested HTML compiler test tag wrapping
…l & clean up tests - Wrap Elemental HTML input in a virtual `<root>` tag to parse top-level sibling elements (like `<link>` outside `<body>`) without requiring LLM format changes. - Add attribute type coercion (boolean, number, integer) and fallback JSON-like array/object parsing to handle LLM format variations. - Make the `experiments` configuration in evals conditional on `version == "1.0"` in both solver and scorer to avoid loading v1.0 schemas for older formats. - Merge the redundant `test_refactoring.py` assertions into `test_formats.py` and unify catalog provider test structures. - Delete the empty `eval/tests/conftest.py` file.
… validation checks
nan-yu
reviewed
Jul 17, 2026
| self._catalog = catalog | ||
| from urllib.parse import urljoin | ||
| from jsonschema import Draft202012Validator | ||
| from jsonschema import Draft202012Validator, FormatChecker |
Collaborator
There was a problem hiding this comment.
Not for this PR, but A2uiValidatorWrapperV10 uses jsonschema validation, while v0.9 uses pydantic model validation. I'll update the a2ui-core to consolidate the validation across multiple versions separately.
…ments in functions
…own cleaning - Refactor unwrap_response in TransportParser to use BlockLexer for robust boundary detection. - Unify markdown code block wrapper cleaning in BlockLexer into a single _clean_markdown method that handles both conversational text and inner blocks. - Remove duplicate _sanitize_json_string and unused imports. - Add unit tests for inner markdown block cleaning and nested close tags in JSON string literals.
# Conflicts: # eval/a2ui_eval/strategies/express.py # eval/a2ui_eval/strategies/subagent_tool.py # eval/tests/test_strategies.py # pyproject.toml
…tegies' into unified-inference-formats-strategies
gspencergoog
force-pushed
the
unified-inference-formats-strategies
branch
from
July 17, 2026 19:19
9c08077 to
4868407
Compare
…trip codecs - Consolidated compilation and decompilation under the Parser class, turning them into symmetric codecs. - Modified InferenceFormat to remove the separate decompiler property. - Retained format decompiler classes as private internal helpers (_TransportDecompiler, _ExpressDecompiler, _ElementalDecompiler) to preserve SRP. - Updated all unit, integration, and roundtrip tests, as well as helper scripts, to use the parser decompile APIs.
…entUiCapabilities - Replaced custom ClientUiCapabilities TypedDict in a2ui_agent with the standardized V09Capabilities model from a2ui_core. - Updated base prompt interfaces, template manager, and format-specific prompt generators to support Union[dict, V09Capabilities]. - Implemented dict-to-model validation coercion in TransportFormat._select_catalog with fallback for missing optional fields in conformance tests. - Deleted src/a2ui/schema/capabilities.py.
nan-yu
approved these changes
Jul 17, 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.
Summary
This PR unifies the structured inference SDK API and evaluation harness in Python to support multiple inference formats (standard JSON transport, experimental Express DSL, and experimental Elemental HTML). It encapsulates format-specific details using polymorphic implementations of the
InferenceFormatinterface.Changes
InferenceFormatbase class contract and created polymorphic implementationsTransportFormat,ExpressFormat, andElementalFormat.ElementalCompilerroot validation to<body>.<root>tag dynamically during compilation to support top-level sibling tags (like<link>outside<body>).options).<a2ui>and</a2ui>tags intoA2UI_INFERENCE_OPEN_TAGandA2UI_INFERENCE_CLOSE_TAGconstants.format.pysolver.experimentssettings conditional onversion == "1.0"in both solver and scorer to avoid enabling experimental version 1.0 features for older version tests.ClientUiCapabilitiesTypedDict.Impact & Risks
This refactor changes internal SDK package layouts and imports, but preserves existing public API boundaries. It is non-breaking for external integrations.
Testing
Verify the changes by running all python unit tests and the evaluation suite runs: