diff --git a/.gitignore b/.gitignore index 896b2a161..b8f1c8aee 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,4 @@ a2a_agents/python/a2ui_agent/src/a2ui/assets/**/*.json ## new agent SDK path agent_sdks/python/src/a2ui/assets/**/*.json ## Generated files for sandbox frame. -samples/client/angular/projects/mcp_calculator/public/sandbox_iframe/ +samples/client/angular/projects/mcp_calculator/public/mcp_apps_inner_iframe/ diff --git a/samples/client/angular/package.json b/samples/client/angular/package.json index cc6999c4d..84774fbb5 100644 --- a/samples/client/angular/package.json +++ b/samples/client/angular/package.json @@ -14,7 +14,7 @@ "build:renderer": "cd ../../../renderers && for dir in 'web_core' 'markdown/markdown-it'; do (cd \"$dir\" && npm install && npm run build); done", "serve:agent:restaurant": "cd ../../agent/adk/restaurant_finder && uv run .", "demo:restaurant": "npm run build:renderer && concurrently -k -n \"AGENT,WEB\" -c \"magenta,blue\" \"npm run serve:agent:restaurant\" \"npm start -- restaurant\"", - "build:sandbox": "esbuild ../shared/sandbox_iframe/sandbox.ts --bundle --outfile=projects/mcp_calculator/public/sandbox_iframe/sandbox.js --format=esm --platform=browser --alias:@modelcontextprotocol/ext-apps/app-bridge=./node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js && cp ../shared/sandbox_iframe/sandbox.html projects/mcp_calculator/public/sandbox_iframe/sandbox.html" + "build:sandbox": "esbuild ../shared/mcp_apps_inner_iframe/sandbox.ts --bundle --outfile=projects/mcp_calculator/public/mcp_apps_inner_iframe/sandbox.js --format=esm --platform=browser --alias:@modelcontextprotocol/ext-apps/app-bridge=./node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js && cp ../shared/mcp_apps_inner_iframe/sandbox.html projects/mcp_calculator/public/mcp_apps_inner_iframe/sandbox.html" }, "prettier": { "printWidth": 100, diff --git a/samples/client/angular/projects/mcp_calculator/src/a2ui-catalog/mcp-app.ts b/samples/client/angular/projects/mcp_calculator/src/a2ui-catalog/mcp-app.ts index 93de8c842..9b41d59d6 100644 --- a/samples/client/angular/projects/mcp_calculator/src/a2ui-catalog/mcp-app.ts +++ b/samples/client/angular/projects/mcp_calculator/src/a2ui-catalog/mcp-app.ts @@ -149,7 +149,7 @@ export class McpApp const disableSecuritySelfTest = urlParams.get('disable_security_self_test') === 'true'; const currentOrigin = window.location.origin; - let sandboxUrl = `${currentOrigin}/sandbox_iframe/sandbox.html`; + let sandboxUrl = `${currentOrigin}/mcp_apps_inner_iframe/sandbox.html`; if (disableSecuritySelfTest) { sandboxUrl += '?disable_security_self_test=true'; } diff --git a/samples/client/lit/contact/ui/shared-constants.ts b/samples/client/lit/contact/ui/shared-constants.ts index d99f2ff9d..2213f62d6 100644 --- a/samples/client/lit/contact/ui/shared-constants.ts +++ b/samples/client/lit/contact/ui/shared-constants.ts @@ -14,6 +14,6 @@ * limitations under the License. */ -export const SANDBOX_BASE_PATH = "shared/sandbox_iframe/"; +export const SANDBOX_BASE_PATH = "shared/mcp_apps_inner_iframe/"; export const SANDBOX_ENTRY_NAME = `${SANDBOX_BASE_PATH}sandbox`; export const SANDBOX_IFRAME_PATH = `/${SANDBOX_ENTRY_NAME}.html`; diff --git a/samples/client/lit/contact/vite.config.ts b/samples/client/lit/contact/vite.config.ts index 607739b86..86062a959 100644 --- a/samples/client/lit/contact/vite.config.ts +++ b/samples/client/lit/contact/vite.config.ts @@ -58,6 +58,7 @@ export default async () => { alias: { "@a2ui/markdown-it": resolve(__dirname, "../../../../renderers/markdown/markdown-it/dist/src/markdown.js"), "sandbox.js": resolve(__dirname, "../../" + SANDBOX_ENTRY_NAME + ".ts"), + "@modelcontextprotocol/ext-apps/app-bridge": resolve(__dirname, "../node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js"), } }, optimizeDeps: { diff --git a/samples/client/shared/sandbox_iframe/README.md b/samples/client/shared/mcp_apps_inner_iframe/README.md similarity index 97% rename from samples/client/shared/sandbox_iframe/README.md rename to samples/client/shared/mcp_apps_inner_iframe/README.md index 26e6ac0ab..076cfb048 100644 --- a/samples/client/shared/sandbox_iframe/README.md +++ b/samples/client/shared/mcp_apps_inner_iframe/README.md @@ -1,4 +1,4 @@ -# Shared Sandbox iframe +# Shared MCP Apps Inner iframe (Sandbox iframe) This directory contains the unified and reusable **Sandbox iframe** implementation for **A2UI applications** (Angular, Lit) to run **untrusted third-party Model Context Protocol (MCP) applications**. diff --git a/samples/client/shared/sandbox_iframe/sandbox.html b/samples/client/shared/mcp_apps_inner_iframe/sandbox.html similarity index 100% rename from samples/client/shared/sandbox_iframe/sandbox.html rename to samples/client/shared/mcp_apps_inner_iframe/sandbox.html diff --git a/samples/client/shared/sandbox_iframe/sandbox.ts b/samples/client/shared/mcp_apps_inner_iframe/sandbox.ts similarity index 100% rename from samples/client/shared/sandbox_iframe/sandbox.ts rename to samples/client/shared/mcp_apps_inner_iframe/sandbox.ts