Skip to content

[iFrame] Add the iframe catalog schema - #2795

Draft
josemontespg wants to merge 1 commit into
mainfrom
catalogs-iframe-mcp-schemas
Draft

josemontespg wants to merge 1 commit into
mainfrom
catalogs-iframe-mcp-schemas

Conversation

@josemontespg

@josemontespg josemontespg commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds the JSON Schema for the iframe catalog, so agents, renderers and validators share one canonical definition of the sandboxed web frame components instead of the copy that lives in the Angular MCP calculator sample. The catalog targets A2UI v1.0: protocolVersion is 1.0 and the shared shapes come from specification/v1_0. The MCP catalog's McpApp schema is a separate PR on top of this stack.

Changes

  • catalogs/iframe/catalog.json ($id https://a2ui.org/specification/v1_0/catalogs/iframe/catalog.json) declares WebAppFrameUrl and WebAppFrameSrcdoc. The shared properties (allowedEvents, allowedFunctions, mutableData, data.paths, config, height, disableSchemaValidation) are inlined into both components, as the v1.0 Catalog Schema Rules require: no ComponentCommon allOf or unevaluatedProperties, relative common_types.json#/$defs/... refs, and $defs with only anyComponent (with discriminator) and anyFunction. The catalog has no functions.
  • specification/v1_0/test/run_tests.py: registers catalogs/iframe/catalog.json in the structural, identifier and $ref target checks.
  • conformance/core/catalog.yaml adds a from_json selfContained case for the published catalog, like the other extension catalogs.
  • The component specification moves from the Angular MCP calculator sample to catalogs/iframe/web_app_frame_specification.md and is rewritten against the protocol the stack implements: plain postMessage and the handshake MessagePort (no client SDK), allowlists as name to JSON Schema maps, the real error codes, kept author CSP, the actual sandbox flags, and no controls nobody implements (URL allowlist, rate limiting, a permissions property). It stays implementation-neutral and names @a2ui/catalog-iframe as the reference host. Section 4 points to catalog.json for the schemas.
  • specification/scripts/validate.py adds an iframe config that validates examples under catalogs/iframe/examples/ against agent_to_renderer.json with this catalog merged into the v1 basic catalog. This PR ships no examples: each of the two working examples lands with its end-to-end test, in [iFrame] Add the srcdoc tip calculator example to the iframe catalog #3008 (WebAppFrameSrcdoc) and [iFrame] Add the url order tracker example to the iframe catalog #3009 (WebAppFrameUrl).
  • .github/workflows/docs.yml publishes the catalog at specification/v1_0/catalogs/iframe/, so the $id URL resolves.
  • catalogs/iframe/README.md documents the components and links the specification; catalogs/README.md lists the new directory.

Verification

  • python3 specification/scripts/validate.py: all configs pass; the iframe config finds no examples yet.
  • python3 specification/v1_0/test/run_tests.py: 182 passed.
  • uv run pytest python/a2ui_core/tests/test_conformance.py: 575 passed.
  • ./scripts/fix_format.sh --check passes; every relative link in the added or moved markdown files resolves.

Pre-launch Checklist

  • I read the Contributors Guide.
  • My code changes have tests (schema and examples are covered by validate.py).

Related to #3157

@github-project-automation github-project-automation Bot moved this to Todo in A2UI Sep 25, 2026
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 4036a52 to 1fc9465 Compare September 25, 2026 01:31

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the iframe catalog (featuring WebAppFrameUrl and WebAppFrameSrcdoc components) and updates the MCP catalog to include the McpApp component, along with corresponding specifications, examples, and validation script updates. The review feedback suggests two key improvements: first, updating WebAppFrameSrcdoc's htmlContent to use DynamicString for consistency and dynamic data binding support; second, adding a mutableData property to McpApp to validate incoming state mutations against a JSON Schema, thereby enhancing security and aligning it with WebAppFrame's validation model.

Comment thread catalogs/iframe/catalog.json Resolved
Comment thread catalogs/mcp/catalog.json Resolved
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 1fc9465 to a2139d3 Compare September 25, 2026 06:20
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch 2 times, most recently from da248b3 to 99837d7 Compare October 1, 2026 20:11
@josemontespg
josemontespg removed this pull request from stack #2804 October 1, 2026 20:12
@josemontespg
josemontespg changed the base branch from main to web-core-record-props-data October 1, 2026 20:12
@josemontespg
josemontespg added this pull request to stack #2940 October 1, 2026 20:12
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 99837d7 to f9257d6 Compare October 1, 2026 20:43
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from f9257d6 to 9cb7b57 Compare October 1, 2026 21:42
@josemontespg
josemontespg removed this pull request from stack #2940 October 1, 2026 21:56
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 9cb7b57 to e459d45 Compare October 1, 2026 21:56
@josemontespg josemontespg changed the title feat(catalogs): add the iframe catalog and the McpApp component schema feat(catalogs): add the iframe catalog schema Oct 1, 2026
@josemontespg
josemontespg added this pull request to stack #2946 October 1, 2026 21:56
Comment thread specification/scripts/validate.py Resolved
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from e459d45 to 7010933 Compare October 1, 2026 22:14
Base automatically changed from web-core-record-props-data to main October 1, 2026 22:40
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 7010933 to d469303 Compare October 1, 2026 22:41
@josemontespg
josemontespg removed this pull request from stack #2946 October 2, 2026 00:35
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch 2 times, most recently from e5a8d99 to 5f4f62c Compare October 2, 2026 00:36
@josemontespg
josemontespg added this pull request to stack #2951 October 2, 2026 00:36
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch 2 times, most recently from 08a2686 to 85296cb Compare October 2, 2026 18:50
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 9fca022 to 0dfc2b5 Compare October 8, 2026 20:31
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 0dfc2b5 to 11c7837 Compare October 8, 2026 20:47
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch 2 times, most recently from 7818209 to 3acc2c9 Compare October 8, 2026 21:34
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 3acc2c9 to 949c376 Compare October 8, 2026 22:05
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 949c376 to bc17667 Compare October 8, 2026 22:58
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from bc17667 to 6aa5190 Compare October 9, 2026 18:18
@josemontespg
josemontespg removed this pull request from stack #3057 October 9, 2026 18:19
@josemontespg
josemontespg added this pull request to stack #3112 October 9, 2026 18:19
@josemontespg
josemontespg removed this pull request from stack #3112 October 9, 2026 18:40
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from 6aa5190 to c640a11 Compare October 9, 2026 18:49
@josemontespg
josemontespg added this pull request to stack #3114 October 9, 2026 18:49
@josemontespg
josemontespg force-pushed the catalogs-iframe-mcp-schemas branch from c640a11 to 4595a8b Compare October 9, 2026 19:09
@josemontespg
josemontespg removed this pull request from stack #3114 October 9, 2026 19:12
@josemontespg
josemontespg added this pull request to stack #3115 October 9, 2026 19:12
Comment thread catalogs/iframe/README.md Resolved
Comment thread specification/scripts/validate.py Resolved
Comment thread catalogs/iframe/catalog.json Resolved
Add catalogs/iframe/catalog.json, which declares the WebAppFrameUrl and
WebAppFrameSrcdoc components with their shared allowlist and data binding
definitions.

Move the component specification next to the catalog and rewrite it against
the protocol the reference host implements. Validate iframe examples in
specification/scripts/validate.py (a config can now list several catalogs,
merged into the single catalog.json alias the protocol schemas expect), and
publish the catalog at its $id URL from the docs workflow.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant