Capabilities and permissions

What a plugin can access, and how approval works.

Table of content
  1. Request capabilities
  2. Approve and stop
  3. Scope
  4. Not available yet

Request capabilities

Declare the APIs your plugin needs in manifest.json:

{
  "name": "Topic highlighter",
  "version": 1,
  "api": { "data": true, "map": true, "ui": true }
}

Supported keys are ui, kv, theme, app, data, map, and editor. Omit an API to leave it unrequested: the current manifest parser treats a key's presence as a request, so setting it to false does not disable it. Custom note blocks require both editor and ui.

Inside a plugin, this.available('map') reports whether that API was mounted. Host permissions and access are checked separately when calls are made.

Approve and stop

Scope

Plugins are currently private projects. Map data and graphics are limited to the map approved for that preview session. A plugin cannot use the data API to switch to another map.

The data API is read-only. The editor API can save its own custom block data through Emberly's note editor. The kv API stores private state belonging to the current user and plugin; shared-map storage semantics are not implemented.

Plugin interfaces use a restricted virtual DOM. Plugin code does not receive direct access to Emberly's host DOM. Only run code you trust: the current iframe runtime does not provide hard CPU isolation against an infinite loop.

Not available yet

This reference covers the implemented Emberly subset, not every API from the original plugin-system reference.