forked from 1b-agent/opencadstudio-upstream
feat(plugin): marketplace — install plugins from a curated registry
Add a Plugin Manager marketplace that installs external add-ons from a GitHub repo's Releases. A curated registry (plugins/registry.json in this repo, extended by PR) lists discoverable plugins; the host fetches it, shows each entry with a release dropdown, and on install downloads the asset matching the user's platform plus plugin.toml into the plugins folder (API-version checked first). Users can also link arbitrary owner/repo manually. Linked repos persist in settings. Desktop only (ureq + serde_json); the install path reuses the phase-2 loader. Part of the #100 extensibility epic (phase 2). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
29c71be101
commit
020a3a4c84
12 files changed
+599
-5
No files matched your search
@@ -15,6 +15,14 @@
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// One entry in the curated plugin registry (`plugins/registry.json`).
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RegistryEntry {
|
||||
pub repo: String,
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
}
|
||||
|
||||
/// An add-on package found on disk (not necessarily loaded or compatible).
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ExternalPlugin {
|
||||
@@ -125,7 +133,7 @@ fn lib_present_in(dir: &std::path::Path) -> bool {
|
||||
/// host doesn't pull in a full TOML parser for a fixed, host-defined schema.
|
||||
/// Returns `None` when the required `id` is missing. `dir` / `lib_present` are
|
||||
/// filled in by the caller.
|
||||
fn parse_plugin_toml(text: &str) -> Option<ExternalPlugin> {
|
||||
pub(crate) fn parse_plugin_toml(text: &str) -> Option<ExternalPlugin> {
|
||||
let mut id = None;
|
||||
let mut name = String::new();
|
||||
let mut version = String::new();
|
||||
|
||||
Reference in new issue
Block a user