How another plugin is present in this vault, and the one-click path to making it present.
Shared by the two components that ask a user to bring another plugin in: PluginSuggestionComponent, which OFFERS one and keeps working without it, and PluginGateComponent, which REQUIRES one and does nothing until it is there. The offer and the requirement differ in what they do about the answer, not in how they read the state or how they install — so that part lives here rather than in both.
| Function | Description |
|---|
| getInstalledPluginState | Resolves how another plugin is currently present in the vault. |
| getInstalledPluginVersion | Reads the version of another plugin as this vault has it installed, or null when it is not running. The version comes out of app.plugins.manifests, which is populated for every installed plugin at startup — so, unlike anything a plugin REGISTERS, it answers the same way no matter which plugin loaded first. That load-order independence is the whole reason a conflict is detected by version rather than by asking a registry. null for a plugin that is not installed OR is installed but disabled: a disabled plugin registers nothing, so for every question this answers the two cases are the same. An installed, enabled plugin whose manifest somehow carries no version reads as an empty string rather than null, which keeps “running, version unknown” distinguishable from “not running” — a caller comparing versions should fail closed on it rather than treat it as absent. |
| installAndEnablePlugin | Installs (when needed) and enables another plugin, reporting the outcome as a notice. A no-op when the plugin is already enabled, so a caller reacting to a click need not check first. |