feat: Add remote plugin fields to plugin API#17277
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b9256c2c1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else { | ||
| plugins_manager.install_plugin(request).await | ||
| }; | ||
| let install_result = plugins_manager.install_plugin(request).await; |
There was a problem hiding this comment.
Preserve remote-state mutation in plugin/install
plugin/install now always calls plugins_manager.install_plugin(...), which performs only local install/config writes. The remote enable call path (install_plugin_with_remote_sync) is no longer reachable, so remote installed-state can drift from local state. Because removed forceRemoteSync is silently ignored at deserialization, legacy callers get a success response but no backend mutation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
forceRemoteSync is never used in prod
| } else { | ||
| plugins_manager.uninstall_plugin(plugin_id).await | ||
| }; | ||
| let uninstall_result = plugins_manager.uninstall_plugin(plugin_id).await; |
There was a problem hiding this comment.
Preserve remote-state mutation in plugin/uninstall
plugin/uninstall now unconditionally uses plugins_manager.uninstall_plugin(...), which only removes local cache/config. The remote uninstall path (uninstall_plugin_with_remote_sync) is no longer invoked, so backend installed-state can remain stale after local uninstall. This creates inconsistent plugin state once remote state is used as source of truth.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
forceRemoteSync is never actually used in prod
1ca420d to
0e2524d
Compare
sayan-oai
left a comment
There was a problem hiding this comment.
codex says some plugin/* descriptions in the app-server readme are out of date.
lgtm otherwise
|
Intentionally leave README.md outdated a little bit as the new feature is not ready to use yet. |
Summary
Update the plugin API for the new remote plugin model.
The mental model is no longer “keep local plugin state in sync with remote.” Instead, local and remote plugins are becoming separate sources. Remote catalog entries can be shown directly from the remote API before installation; after installation they are still downloaded into the local cache for execution, but remote installed state will come from the API and be held in memory rather than being read from config.
• ## API changes
forceRemoteSyncfromplugin/list,plugin/install, andplugin/uninstall.remoteSyncErrorfromplugin/list.plugin/list/plugin/read:marketplaces[].pathsource: { type: "remote", downloadUrl }composerIconUrl,logoUrl,screenshotUrlsplugin/readandplugin/installsource-compatible:marketplacePath?: AbsolutePathBuf | nullremoteMarketplaceName?: string | null