Readonly[ReadonlyactivationReadonlyactiveReadonlycapabilitiesReadonlycoreReadonlydevIds of currently-registered plugins that came from a dev source (loaded
via LoadedPlugin with dev: true). Subscribers can use this to
badge dev-overridden plugins or to derive the id of the active dev plugin
for an "uninstall dev plugin" affordance.
ReadonlyenabledReadonlyeventsReadonlyfailedPlugins that failed to load or activate. Subscribers (e.g. the registry UI) can use this to flag unhealthy entries; a plugin id appears here at most once with its most recent failure.
ReadonlymodulesReadonlypendingReadonlypluginCached registry catalog state plus pass-throughs for listVersions /
getPlugin. Always present — the host supplies a pluginRegistryProvider
via ManagerOptions for real backends, or it falls back to a no-op
implementation that yields an empty catalog.
ReadonlypluginsReadonlyregistryOptionalparams: { after?: string; before?: string }Loads a plugin via the plugin loader and registers it without enabling it. Returns the loaded plugin so callers can enable it by its canonical id (which may differ from the locator used to load it, e.g. URL loaders). A plugin whose id is already enabled, such as one persisted from an earlier session, is activated as part of the add.
Clears the failure record for a plugin so it can be retried. Returns whether a failure record existed and was removed.
Disables a plugin.
By default, cascades to currently-enabled dependents (transitively, leaves
first) so disabling a depended-upon plugin never leaves its dependents
stranded. Pass cascade: false to disable only the named plugin and leave
its dependents enabled-but-broken — VS Code-style disable parity for
callers that want the escape hatch (e.g. when swapping in an alternative
implementation that satisfies the dependents' needs in its own way).
Fails with Plugin.PluginDependencyError (reason: 'core-dependent')
when cascading would require disabling a core plugin; UI flows should
surface their own confirmation before calling disable with the default.
Optionalopts: { cascade?: boolean }Enables a plugin.
Default behavior auto-resolves the plugin's declared dependsOn closure:
missing entries that exist in the plugin registry catalog are installed via
add, then enabled in dependency-first order. Set resolveDependencies
to false to enable only the named plugin and skip the closure walk
entirely — useful when substituting an alternative plugin that satisfies
the dependent's capability needs in its own way.
Optionalopts: { resolveDependencies?: boolean }Returns the plugin ids that the given plugin declares as dependencies.
Walks meta.dependsOn from both registered plugins and the plugin registry
catalog so callers can preview the closure for a plugin that isn't yet
installed. With transitive: true (default), returns the full dependency
closure in dependency-first order (deps before dependents). Without it,
returns the direct declarations only.
Optionalopts: { transitive?: boolean }Returns the plugin ids that declare the given plugin as a dependency.
Walks meta.dependsOn over registered plugins. With transitive: true
(default), returns the full reverse closure. With enabledOnly: true,
filters to currently-enabled dependents — used by UI flows to preview what
a cascading disable would touch.
Optionalopts: { enabledOnly?: boolean; transitive?: boolean }Re-runs the given active modules in place: deactivates them and every active module that transitively requires a singleton capability they provide, then activates that set again. Hot module replacement calls this after swapping a module's body; inactive ids are ignored.
Whether any module was reloaded and every re-activation succeeded.
Re-creates a lazy plugin from its loader, with the options it was made with, and swaps it in place: if enabled, its modules and their singleton dependents are torn down and the new plugin's modules activate for every event that already fired. Hot module replacement calls this when the plugin's definition changes.
Whether a resolved plugin was replaced (and, if enabled, re-enabled).
Removes a plugin from the manager (disables then unregisters).
Honors the same cascade option as disable.
Optionalopts: { cascade?: boolean }Shuts down the manager by deactivating all active modules in reverse activation order, clearing all capabilities, and resetting lifecycle bookkeeping. Plugins, core, enabled, and modules remain intact so the manager can be reused.
Runs startup: the capability-dependency resolution pass for dependency-mode modules,
concurrently with the event-mode activation pass for any module explicitly targeting the
Startup event. The event-level Startup activated message publishes only after both
passes complete. Idempotent — subsequent calls activate whatever registered since.
activate(Startup) delegates here.
Interface for the Plugin Manager.