Add mcp-apps module: Spring AI 2.1.0 MCP server with MCP Apps HTML views, app-only tool callbacks, CSP declarations, SDK client tests and a Chromium harness on the official AppBridge

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4RzcCS5JCAgcxLz7T
This commit is contained in:
Claude
2026-12-05 16:43:24 +05:30
parent 8fa3c5d682
commit 508fed3b98
46 changed files with 1730 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
// Runs inside the view's frame as a real inline script, so the page's CSP applies to it (DevTools evaluate would not).
(async () => {
const r = [];
// Wait for a new task: while a DevTools call is still on the stack, Chromium lets eval through whatever the CSP says.
await new Promise((resolve) => setTimeout(resolve, 100));
try { eval("1"); r.push("eval(): ALLOWED"); } catch (e) { r.push("eval(): " + e.name); }
try { await fetch(location.ancestorOrigins[0] + "/sandbox.html"); r.push("fetch from the sandbox origin ('self'): ALLOWED"); }
catch (e) { r.push("fetch from the sandbox origin ('self'): " + e.name); }
try { await fetch("https://api.example.com/stock"); r.push("fetch undeclared origin: ALLOWED"); }
catch (e) { r.push("fetch undeclared origin: " + e.name); }
window.__probes = r;
})();