Repository navigation
feat(embed): add the a2ui-embed build command - #4300
Draft
josemontespg wants to merge 1 commit into
Draft
josemontespg wants to merge 1 commit into
josemontespg wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the a2ui-embed build command and @a2ui/embed/build module, which bundles an A2UI app and its catalogs into a single self-contained HTML file and generates a corresponding catalog schema JSON file. Feedback on the changes includes importing basename from node:path and using relative paths for config imports to prevent Windows path resolution issues, refining the static import regex to avoid false positives, and expanding ASSET_EXTENSIONS to inline common web font and media formats.
josemontespg
force-pushed
the
embed/4-build
branch
from
November 18, 2026 21:17
9c6bbee to
d721734
Compare
josemontespg
force-pushed
the
embed/4-build
branch
from
November 18, 2026 21:25
d721734 to
99ad9b6
Compare
josemontespg
force-pushed
the
embed/4-build
branch
from
November 18, 2026 22:12
99ad9b6 to
e081732
Compare
josemontespg
force-pushed
the
embed/4-build
branch
2 times, most recently
from
November 20, 2026 21:36
0540d62 to
b2babb8
Compare
josemontespg
force-pushed
the
embed/4-build
branch
from
November 20, 2026 21:51
b2babb8 to
04ae50e
Compare
josemontespg
force-pushed
the
embed/4-build
branch
2 times, most recently
from
November 21, 2026 00:43
945e93d to
eca8cb8
Compare
josemontespg
force-pushed
the
embed/4-build
branch
from
November 21, 2026 02:34
eca8cb8 to
d98e995
Compare
josemontespg
force-pushed
the
embed/4-build
branch
from
November 23, 2026 22:09
d98e995 to
f826e74
Compare
josemontespg
force-pushed
the
embed/4-build
branch
from
November 26, 2026 01:03
f826e74 to
a193ebe
Compare
josemontespg
force-pushed
the
embed/4-build
branch
2 times, most recently
from
December 2, 2026 20:07
3503ba4 to
d17d850
Compare
josemontespg
force-pushed
the
embed/4-build
branch
2 times, most recently
from
December 2, 2026 21:28
96003f2 to
af64a53
Compare
josemontespg
force-pushed
the
embed/4-build
branch
from
December 3, 2026 18:34
af64a53 to
6cf28d8
Compare
This branch has not been deployed
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
Problem: Serving an
@a2ui/embedapp under the default MCP Apps Content Security Policy requires bundling the renderer and catalogs into a single network-free HTML file alongside a matching catalog schema file for server validation and agent prompt generation.This PR adds the
a2ui-embed buildCLI and@a2ui/embed/build(defineConfig,build,basicCatalog). One build produces both the self-contained HTML bundle (rejecting external network URLs) and*.catalog.jsoncontaining each catalog's validation schema,protocolVersion, and optionalinstructions.Changes
src/builder/build.ts,html.ts, andcatalog_schema.ts: single-file HTML bundling and catalog schema output preservingprotocolVersionandinstructions.src/builder/config.ts,config_api.ts, andload_config.ts:defineConfig,basicCatalog, and Node/browser config loading.src/builder/cli.tsandtypescript/scripts/prepare-publish.mjs: thea2ui-embedexecutable and published bin wiring.src/builder/*.test.ts,README.md, andCHANGELOG.md: unit, validator-compatibility, CLI, and CSP end-to-end tests plus documentation.Verification
WIREIT_CACHE=none yarn workspace @a2ui/embed test: 195 Node tests (including Chromium CSP end-to-end tests) and 29 Karma tests pass.yarn workspace @a2ui/embed lint,yarn workspace @a2ui/embed format:check, and./scripts/fix_licenses.py --checkpass.