feat(providers): add provider plugin system
Introduce a registry (PluginManager) that owns package managers and can load additional providers at runtime from shared-library plugins dropped in a plugins directory. Providers declare their metadata and a factory through a C ABI (provider-plugin.h); requiresPassword() tells the UI whether a provider needs sudo. Ships a sample external plugin as a template for adding new backends. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
7 files changed
+390
No files matched your search
@@ -22,6 +22,9 @@ public:
|
||||
return system("which pacman > /dev/null 2>&1") == 0;
|
||||
}
|
||||
|
||||
// pacman operations run through sudo and need the session password.
|
||||
bool requiresPassword() const override { return true; }
|
||||
|
||||
// Parse `pacman -Q` output (one "name version" line per package).
|
||||
// Exposed as static so the parsing can be unit-tested without invoking pacman.
|
||||
static std::vector<PackageInfo> parseInstalledOutput(const std::string& output);
|
||||
|
||||
Reference in new issue
Block a user