# <web-island> multi-origin host shell

- Status: `experiment`
- Track: [post-<a> hypermedia & composable islands](https://aifoc.us/labs/hypermedia-and-islands/)
- Layer: 2. Post-<a> Hypermedia & Composable UI
- Updated: 1 December 2026
- Live demo: https://web-island-host-shell.kinlan-test.workers.dev
- Source: https://github.com/PaulKinlan/web-island-host-shell

## Inspired by

- [embedding is the web's composability superpower](https://aifoc.us/embedding/)
- [extensible web apps](https://aifoc.us/extensible-web-apps/)
- [webmcp is the new web intents ... maybe](https://aifoc.us/webmcp-is-the-new-web-intents/)

## Hypothesis

- **Claim:** Combining `/.well-known/web-island.json` discovery, `sandbox="allow-scripts"`, `MessageChannel` theme/size negotiation, explicit `<dialog>` batch confirmation, and ECDSA receipts enables multi-origin UI composition without granting widgets ambient host authority.
- **Confirms it:** Three separate island workers synchronize styling tokens and resize geometry via `ResizeObserver` over isolated channels, require explicit `<dialog>` approval for batched WebMCP calls, and verify signed ECDSA hold receipts.
- **Falsifies or bounds it:** Intrinsic sizing latency (`ResizeObserver` ping-pong) or multi-step authentication flows degrade cleanly below usability inside double-isolated frames.

> **Why this exists:** Portals and conversational shells often need live interactive widgets from separate third-party sites without giving those widgets access to host DOM, cookies, or unapproved actions. This lab demonstrates `/.well-known/web-island.json` discovery, `MessageChannel` theme and size syncing, explicit `<dialog>` batch approval, and signed ECDSA hold receipts across three isolated widget origins.


## What this lab tests

How does a browser portal or conversational shell compose multiple independent interactive widgets from different origins without surrendering host DOM access or losing origin authentication?

[Web Island Host Shell](https://web-island-host-shell.kinlan-test.workers.dev) ([GitHub](https://github.com/PaulKinlan/web-island-host-shell)) discovers [`/.well-known/web-island.json`](https://web-island-host-shell.kinlan-test.workers.dev/.well-known/web-island.json) manifests for three isolated widgets (`seats`, `budget`, `calendar`), mounts each as a `<web-island>` custom element enclosing `sandbox="allow-scripts"`, synchronizes design tokens and intrinsic height over [`MessageChannel`](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel) + [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver), enforces hub-and-spoke routing, gates batched [WebMCP](https://webmachinelearning.github.io/webmcp/) calls behind a `<dialog>` confirmation modal, and verifies ECDSA P-256 hold receipts.


## Open questions to iterate on

- How should allowlisted CSS custom property negotiation avoid palette spoofing or UI redressing attacks inside an island?
- Can browsers make `MessageChannel` + `ResizeObserver` sizing a declarative attribute on a native `<web-island>` element?

## Iteration log

- **2026-12-01:** Deployed 3 isolated widget workers (`seats`, `budget`, `calendar`), `.well-known/web-island.json` discovery, Invoker `<dialog>` batch gate, and ECDSA hold verification.
- **2026-12-01:** Moved island scripts/CSS out of inline tags, added live handshake/resize telemetry, real peer-isolation + ECDSA tamper probes, CSP-safe DOM syntax highlighting, and `no-cache` Worker-routed asset headers for 700px embeds.

## Primitives tested

- `Custom Elements v1`
- `<iframe sandbox>`
- `MessageChannel`
- `/.well-known/web-island.json`
- `CSS Custom Properties`
- `WebMCP`

## Connected labs in other tracks

- [web + ai spec polyfill testbed](https://aifoc.us/labs/hypermedia-and-islands/spec-polyfill-browser/) — Benchmarks `<web-island>` custom element ergonomics against spec proposals.
- [agent containment lab](https://aifoc.us/labs/browser-containment/agent-containment-lab/) — Verifies network/DOM isolation properties of `sandbox="allow-scripts"` frames.

---
Canonical: https://aifoc.us/labs/hypermedia-and-islands/web-island-host-shell/
