The manifest
{
"id": "word-of-the-day",
"name": "Word of the day",
"version": "1.0.0",
"description": "A word to use today, every morning.",
"author": "You",
"apiVersion": 1,
"main": "main.js",
"sandboxed": false,
"permissions": ["project:write", "network:api.example.com", "files:read", "exec:pandoc"],
"locales": {
"sv": { "name": "Dagens ord", "description": "Ett ord att använda i dag, varje morgon." }
}
}id: lower-case letters, digits and dashes. It's also the folder's name.sandboxed: runs the plugin in a worker of its own, apart from the window (see below).locales: its name and description in other languages, by language code. Settings → Plugins, the plugin list and the questions about permissions show them in the writer's language. Its own strings (commands, settings, notices) are the plugin's to choose bythis.app.language. When the writer changes the language, Bläck Studio loads the plugin again, soonloadruns in the new one.permissions: what the plugin needs beyond reading the book.project:writelets it change the book.library:readlets it see the writer's recent books and their series (app.library): for the welcome screen's dashboard. It needs"apiVersion": 2.microphonelets a plugin in the window record, withnavigator.mediaDevices.getUserMedia({ audio: true }): Bläck Studio lets the page have the microphone only while a plugin with this permission is on, and never a camera. It needs"apiVersion": 3. Let go of the stream as soon as you're done, so the system's sign that it's listening goes. With"apiVersion": 4it also hasapp.speech: what the writer says, written down on the device itself and never sent anywhere. On a computer that's Whisper, whose model Bläck Studio downloads once after asking the writer; on a phone or tablet it's the system's own recogniser, which tells you the words as they come. Askstatus(language)first; if it isn'tready,prepare(language)gets what's missing. Thenlisten()untilstop().onLeveltells how loud it is, to show it's hearing, and the session canpause()andresume(). A Bläck Studio from before these has neither, so check they're there.network:<host>lets it reach a host;network:*.<host>also covers that host's subdomains;network:*lets it reach anywhere on the internet. Not this computer, or the network it's on (a router, a NAS): those it reaches only by name, asnetwork:127.0.0.1, say.files:readandfiles:writelet it use files and folders the writer chooses for it, in the system's own dialog (app.files.pickFolder,pickFile). It never gets the whole disk.exec:<program>lets it run that one program: by name, as found on the PATH, with its arguments as given and no shell.exec:pandocruns Pandoc and nothing else.
network:* and every exec: permission are shown as reaching beyond Bläck Studio, with a warning. A shell, Python or Node gets a stronger one.
The writer is asked to allow these when turning the plugin on. A new version that asks for more stays off until they allow that too.