How a plugin is kept in check
Each plugin is a separate program, written in TypeScript and run by Deno with every one of Deno’s permissions turned off. It cannot open files, use the network or start programs on its own. It asks Cordial for things, and Cordial does them only if you allowed that kind of request. Those kinds of request are called capabilities. A plugin lists the ones it wants, and starts with none of them granted. You grant them per profile, and Cordial describes each one in plain words before you do.Every capability a plugin can ask for
Every capability a plugin can ask for
A plugin never receives a network connection or a file. When it sets your
Discord status, it hands Cordial the text and Cordial sends it.
The plugins that come with Cordial
The first time you open the Plugins page in a profile, Cordial asks once,
in a single dialog, for the capabilities the plugins that are switched on
need. Until you choose Allow, they do nothing. Choose Not now and use
the switches on each plugin’s row to allow only some. A plugin that ships off
asks when you switch it on. Nothing is asked while you are on another page of
Settings. Why: ADR-021.
Install a plugin
There is no plugin store yet. A plugin reaches you as a file someone shares, or as a folder you are writing yourself.1
Turn plugins on
Open Settings → Plugins and switch on Use Plugins. If Deno is not installed, the page offers a Download button (about 39 MB). A
deno already on your system is used instead. See Deno.2
Install the archive
Under Install from a file, choose Choose file… and pick the plugin. You do not need a terminal and you do not need to know where plugins live.The file must be a
.tar.zst. A .tar.gz is not a Cordial plugin archive, whatever is inside it, and the picker refuses it. Why: ADR-014.3
Switch it on and grant what it needs
The plugin appears under Installed, switched off, with the permissions it asks for listed. Nothing runs until you switch it on. Then turn on only the capabilities you are happy to give it.
Where plugins live
Which plugins are switched on, and what each may do, is stored per profile, so two profiles can have different plugins on.
Writing a plugin
See Writing a plugin for a working plugin in five minutes, and the plugin API reference for every method and event.What does not work yet
- No plugin store. The signed index format and its checks exist, but nobody runs an index, so there is nothing to browse.
- FastFlags apply at the next launch. A plugin cannot change a flag in a running game.
- Two events are never sent.
client.readyandwindow.resizedare declared but nothing publishes them yet, so a plugin waiting for them waits forever. - Plugins cannot draw anything over the game or add buttons to Cordial’s window.