Apps
A captured app is an HTML page the owner opens, running in a sandboxed frame with no network.
apps: { "incidents.html": { handlers: ["oncall.open", "oncall.acknowledge"], resources: ["apps/incidents.html.assets/app.css", "apps/incidents.html.assets/app.js"], },},- The key is the page’s file name,
[A-Za-z0-9][A-Za-z0-9_.-]{0,119}ending in.htmlor.htm, and the host capturesapps/<key>from the realm, refusing the app when the page is missing. At most 32 apps. Legacyapps/<key>.app.jsonfiles are limited to 8 KiB each. handlerslists what the page may call, each a declarednamespace.verb, at most 32, each once. It may be empty. The compiler does not check these names; the host refuses one the realm does not declare. Each listed handler still needs its own approval, and the owner approves the app itself separately.resourceslists up to 16 stylesheets and scripts fromapps/<key>.assets/,.cssor.jsonly, each listed once, and the host captures each one. The host inlines each one in its own<style>or<script>block ahead of the page. A stylesheet containing</styleor a script containing</scriptis refused.- The host operator sets the host’s size limits. The defaults are 10 MiB for the page, 16 resources, 10 MiB for any one resource and 10 MiB for all resources together. Author checks should use the target host’s published limits (see app limits and profiles).
Inside the page, realm.call(handler, args) calls a handler and resolves to its result:
const incidents = await realm.call("oncall.open", {});await realm.call("oncall.acknowledge", { incidentId: incidents.items[0].id });- One call runs at a time. A second call made while one is waiting rejects straight away, so
awaiteach call before starting the next. - A call gives up after the host’s app call deadline, which the host sets and documents. Every refusal rejects with the same message.
- The page cannot fetch, open sockets, load remote scripts, styles, images or fonts, read the
owner’s cookies or storage, open popups or submit forms. Scripts may be inline and may use
eval. Images and fonts work asdata:orblob:URLs. Bundle everything at build time. - If the page reloads or navigates its own frame, the bridge stops answering until the owner opens the app again.
The session, approval and revocation rules are under captured browser apps.

