Discover offers Update for a plugin installed from a pinned Git commit when the plugin index lists a newer commit of the same repository directory. The Plugins page update removes the installed copy, installs the target with an expected-package check that undoes a wrong install with its modules, and reinstalls the removed commit when the target fails. A network failure reaching the target's host stops the update before anything is removed.
1.7 KiB
kind, description
| kind | description |
|---|---|
| upgrade-guide | BundleInfo.updatable is replaced by BundleInfo.update, and ManagementError gains the unexpected-package code. |
BundleInfo.update replaces BundleInfo.updatable
English | 中文
Change
pluginManager.listBundles() no longer returns BundleInfo.updatable: boolean. It returns the optional BundleInfo.update, which is 'registry' for a bundle whose newer versions listVersions reads, 'git' for a bundle installed from a Git spec pinned to a full commit, and absent for a bundle updateBundle cannot replace. A bundle that updatable: true marked before is now update: 'registry'. updateBundle also accepts a 'git' bundle when options.spec names a newer commit of the same repository directory.
ManagementError['code'] gains unexpected-package: an installation run with InstallBundleOptions.expected, which updateBundle always passes, fails with it when the spec installs another package or version.
This affects code that reads listBundles() through the Host API, @deepseek-ai/dsh-plugin-manager/types, or the remote client in @deepseek-ai/dsh-api-remotes/client, and code that switches exhaustively over ManagementError['code']. The plugin_manager tool never returned the field and is unchanged.
Migration
- Replace each read of
updatable. To decide whetherlistVersionscan list a bundle's versions, testbundle.update === 'registry'; to decide whetherupdateBundlecan replace it at all, testbundle.update !== undefined. - If code switches exhaustively over
ManagementError['code'], handleunexpected-package. - Run your type check; it succeeds when no
updatableread and no unhandledManagementErrorcode remains.