feat(pro): add plugin marketplace with catalog, install, and update support

Marketplace backend (agor-pro/src/marketplace.rs): fetch catalog from
GitHub, download+verify+extract plugins, install/uninstall/update with
SHA-256 checksum verification and path traversal protection. 6 Tauri
plugin commands.

PluginMarketplace.svelte: Browse/Installed tabs, search, plugin cards
with permission badges, one-click install/uninstall/update.

Plugin catalog repo: agents-orchestrator/agor-plugins (3 seed plugins).
Plugin scaffolding: scripts/plugin-init.sh.
7 marketplace vitest tests, 3 Rust tests.
This commit is contained in:
Hibryda 2026-03-17 02:20:10 +01:00
parent a98d061b04
commit 5300c09157
8 changed files with 1109 additions and 0 deletions

View file

@ -93,6 +93,59 @@ export const proGetActiveAccount = () =>
export const proSetActiveAccount = (profileId: string) =>
invoke<ActiveAccount>('plugin:agor-pro|pro_set_active_account', { profileId });
// --- Marketplace ---
export interface CatalogPlugin {
id: string;
name: string;
version: string;
author: string;
description: string;
license: string | null;
homepage: string | null;
repository: string | null;
downloadUrl: string;
checksumSha256: string;
sizeBytes: number | null;
permissions: string[];
tags: string[] | null;
minAgorVersion: string | null;
downloads: number | null;
rating: number | null;
createdAt: string | null;
updatedAt: string | null;
}
export interface InstalledPlugin {
id: string;
name: string;
version: string;
author: string;
description: string;
permissions: string[];
installPath: string;
hasUpdate: boolean;
latestVersion: string | null;
}
export const proMarketplaceFetchCatalog = () =>
invoke<CatalogPlugin[]>('plugin:agor-pro|pro_marketplace_fetch_catalog');
export const proMarketplaceInstalled = () =>
invoke<InstalledPlugin[]>('plugin:agor-pro|pro_marketplace_installed');
export const proMarketplaceInstall = (pluginId: string) =>
invoke<InstalledPlugin>('plugin:agor-pro|pro_marketplace_install', { pluginId });
export const proMarketplaceUninstall = (pluginId: string) =>
invoke<void>('plugin:agor-pro|pro_marketplace_uninstall', { pluginId });
export const proMarketplaceCheckUpdates = () =>
invoke<InstalledPlugin[]>('plugin:agor-pro|pro_marketplace_check_updates');
export const proMarketplaceUpdate = (pluginId: string) =>
invoke<InstalledPlugin>('plugin:agor-pro|pro_marketplace_update', { pluginId });
// --- Status ---
export const proStatus = () =>