Extension widgets

Docs Documentation

Extension widgets

Bring your own widget into the block palette, like a door camera, a scoreboard from your API or an intercom panel, sandboxed and with only what you switched on.

Some things only you can build: the feed from your door camera provider, the score from your own API, a panel for the venue's intercom. An extension widget is a small web page of yours that Wunderframe shows in a block, on every screen, like any other block. You place it in the shot editor, set its fields in the inspector, and it plays with the rest of the scene.

A widget runs sandboxed, apart from the app and from your screens' keys. It can use only what it declares, and only after a workspace owner has read that list and switched it on.

What a widget is made of

Upload one ZIP package, or select the two files separately:

  • extension.json — its id (like com.acme.door), a version, a name, the blocks it adds to the palette with their inspector fields and defaults, and its capabilities.
  • entry.js — one bundled module, at most 512 KB. It can't load more code from elsewhere: no remote imports, no eval.

A widget can declare:

  • network — the exact https:// or wss:// addresses it may talk to;
  • records — reading the collections chosen in its block's fields;
  • upstreams — an API of yours it calls through Wunderframe, which adds your secret on the way;
  • camera and microphone.

A ZIP contains extension.json, entry.js and optionally an assets/ folder, at the root or inside one enclosing folder. It may be up to 8 MiB packed, 16 MiB unpacked and 128 files. The code itself still has the 512 KB limit.

Bundle raster pictures, fonts, JSON, glTF models or media, then use wf.asset('assets/room.webp') to get a data URL, or wf.assets() to list names. The files travel with the widget and play offline. Additional scripts, HTML, CSS, SVG and WASM are not bundled assets; put all executable code in entry.js.

extension.json
{
  "id": "com.acme.door",
  "version": "1.0.0",
  "engine": "^1",
  "name": "Door camera",
  "blocks": [{
    "type": "door-feed",
    "label": "Door camera",
    "icon": "video-camera",
    "editor": [{ "key": "door", "type": "text", "label": "Door" }],
    "defaults": { "door": "front" }
  }],
  "capabilities": {
    "network": ["https://api.acme.com"],
    "upstreams": [{ "name": "doorbell", "base_url": "https://api.acme.com/v2/", "secret": "api_key" }]
  }
}

Upload and switch on

  1. Upload a version

    Open Settings → Extensions, choose your ZIP under Upload a version and press Upload. Each upload is a new version, and it stays off until an owner switches it on.

  2. Read what it may do

    An owner presses Switch on. Before anything is granted, Wunderframe lists the capabilities in plain words, like Can connect to api.acme.com or Can use the camera of the screen, and what changed since the version that is on now.

  3. Place it

    Its blocks appear in the block palette. Put one on a shot, fill in its fields and publish as usual.

A new version that asks for more needs a new switch-on, so nothing is ever granted that an owner didn't see. Go back to returns to the previous version and Switch off stops it everywhere at once. Every step is recorded in the workspace's history.

Secrets for your APIs

When a widget calls an upstream with a secret, an owner sets that secret under the extension's Secrets. You can write it, never read it back: the list shows only its last characters. The secret stays on our server, sealed. Wunderframe adds it to the call to your API, so it never reaches a screen, the widget, the editor or an AI agent.

Short-lived tokens

When a widget needs records or an upstream, it asks for a token. The screen swaps its own session for one that works for five minutes, for this one extension and only what it declared, and the widget asks again before it runs out. Switching an extension off ends its tokens at once. The widget never sees the screen's key or anything of other blocks.

Building a widget, or wondering whether your idea fits one? Write to us at hello@maravillalabs.com. We'd love to see what you make.