Skip to main content

Module plugin

Module plugin 

Source
Expand description

Plugin manifests and the registry of installed plugins (protocol unv-plugin-rpc/1).

A plugin is an external program in <plugins dir>/<name>/ with a plugin.json manifest. It runs with the user’s rights, as any program the user starts would; nothing here sandboxes it. What the registry does give is a record of what the user agreed to (the capabilities in the manifest and the SHA-256 of the program at install time) so a replaced binary is noticed before it is called. A plugin is never handed the master key, other entries or signing keys: the host passes it only the parameters of one operation and the credential slots the user bound to it.

Structs§

Discovered
A plugin found on disk and not yet installed.
Installed
Manifest

Constants§

CAPABILITIES
What a plugin may be asked to do. The user sees this list when enabling it.
PROTOCOL

Functions§

check_provenance
The installed program still matches what the user installed.
discover
Reads <dir>/<name>/plugin.json for every subdirectory. A broken manifest is reported with its path and does not hide the others.
get
init_schema
install
Records a plugin as installed and disabled. Installing again replaces the record (a new version or hash) and disables it: the user agrees to the new capabilities by enabling it.
list
provenance
SHA-256 of the program file, as lowercase hex: the provenance recorded at install and re-checked before each call.
remove
set_enabled