Context
Upstream PR plugwerk/plugwerk#425 reshapes the PlugwerkInstaller SPI in the next beta release. Documentation that describes install / uninstall / download semantics needs updating before the upstream beta is published, otherwise the published docs will mislead readers.
What changed in the SPI
download(pluginId, version, targetDir): Path — now does release-info lookup + SHA-256 verification + atomic move + cleanup-on-failure. Smart bits used to live inline in install. Throws on failure.
install(pluginId, version): InstallResult — composes download(...) → pluginManager.loadPlugin → startPlugin. After successful return the plugin is live in PF4J. Reinstall semantics: same version → no-op success; different version → upgrade in place (stop + unload old → load + start new). Failure between download and start rolls back the artifact.
uninstall(pluginId): UninstallResult (was InstallResult) — stops + unloads via PluginManager, then deletes the artifact file. New parallel result type UninstallResult carries only pluginId (no version).
- Wire-up:
PlugwerkInstallerImpl now requires a PluginManager — PlugwerkPluginImpl.connect() reads it from the PF4J wrapper, embedders calling PlugwerkMarketplaceImpl.create(config, pluginManager) directly must pass one.
What needs updating in this repo
Coordination
Track the upstream PR: plugwerk/plugwerk#425. Doc changes should ship in the same release as the SDK change (or at most one day later) so readers do not see stale snippets.
Acceptance
Context
Upstream PR plugwerk/plugwerk#425 reshapes the
PlugwerkInstallerSPI in the next beta release. Documentation that describes install / uninstall / download semantics needs updating before the upstream beta is published, otherwise the published docs will mislead readers.What changed in the SPI
download(pluginId, version, targetDir): Path— now does release-info lookup + SHA-256 verification + atomic move + cleanup-on-failure. Smart bits used to live inline ininstall. Throws on failure.install(pluginId, version): InstallResult— composesdownload(...)→pluginManager.loadPlugin→startPlugin. After successful return the plugin is live in PF4J. Reinstall semantics: same version → no-op success; different version → upgrade in place (stop + unload old → load + start new). Failure between download and start rolls back the artifact.uninstall(pluginId): UninstallResult(wasInstallResult) — stops + unloads viaPluginManager, then deletes the artifact file. New parallel result typeUninstallResultcarries onlypluginId(noversion).PlugwerkInstallerImplnow requires aPluginManager—PlugwerkPluginImpl.connect()reads it from the PF4J wrapper, embedders callingPlugwerkMarketplaceImpl.create(config, pluginManager)directly must pass one.What needs updating in this repo
pluginManager.loadPlugin(...)/startPlugin(...)calls that followinstaller.install(...). They are now redundant (done internally) and would fail with duplicate-id errors.UninstallResultto the API reference; clarify that it has noversionfield (uninstall does not know it).PlugwerkMarketplaceImpl.createsignature — update embedded code samples that show programmatic construction without PF4J: the second parameter is nowpluginManager: PluginManager(required, not optional).Coordination
Track the upstream PR: plugwerk/plugwerk#425. Doc changes should ship in the same release as the SDK change (or at most one day later) so readers do not see stale snippets.
Acceptance
installer.install/installer.uninstallsnippets compile against the new SPIUninstallResulthas its own reference entry