Overview
api.registry provides low-level access to the plugin registry. Primarily used by the Plugin Manager.
Registry Methods
registry.getAll()
Returns a deep copy of the registry array.
Array<PluginDefinition>
registry.get(id)
Returns a single plugin definition by ID (shallow copy), or null if not found.
Returns:
PluginDefinition | null
registry.save(newRegistry)
Overwrites the entire registry and persists to localStorage.
Management Methods
These are attached directly toapi (not api.registry):
api.installPlugin(id, url, name)
Install a plugin from URL. Validates the URL format and checks for duplicate IDs.
Returns:
Promise<boolean> — true if installed, false if ID already exists
Plugins installed via
installPlugin get source: 'manual'. The core will show a warning notification when loading manual plugins.api.togglePlugin(id)
Enable or disable a plugin. Loads the plugin if disabled, unloads if enabled.
Returns:
Promise<boolean> — true if successful, false if not found
api.deletePlugin(id)
Permanently remove a plugin. Unloads it first, then removes from registry.
Returns:
boolean — true if successful, false if not found
api.reloadPlugin(id)
Unload and reload a single plugin without restarting the whole board.
Returns:
Promise<boolean> — true if successful, false if not found
api.restart()
Unload all plugins, then reload all enabled plugins from the registry.
board:restarted event after completion.
restart() is useful after bulk registry changes or when you need a clean slate.Plugin ID
api.getPluginId()
Returns the ID of the currently loading plugin. Only has a value while a plugin’s setup() is executing.
string | null