main
md 44 lines 1.91 KB
Rendered Raw
1 # Plugin Installer
2
3 Install and update Agent Zero plugins from ZIP uploads, Git repositories, or the community Plugin Index surfaced through the Plugin Hub.
4
5 ## What It Does
6
7 This plugin provides the built-in installation workflow for third-party plugins. It validates plugin manifests, prevents naming conflicts, installs plugins into `usr/plugins/`, optionally updates Git-based plugins, and exposes a UI for browsing and installing community plugins.
8
9 ## Main Behavior
10
11 - **ZIP install**
12 - Accepts an uploaded archive, extracts it safely, locates `plugin.yaml`, validates metadata, and moves the plugin into `usr/plugins/`.
13 - **Git install**
14 - Clones a repository to a temporary directory, validates the plugin, then installs it into `usr/plugins/`.
15 - **Plugin update**
16 - Updates already installed Git-backed custom plugins and re-runs installation hooks.
17 - **Safety checks**
18 - Rejects archives with unsafe paths.
19 - Rejects missing or invalid `plugin.yaml` files.
20 - Rejects plugin name conflicts.
21 - **Install hooks and refresh**
22 - Runs the plugin install hook when present and calls `after_plugin_change(...)` so the app refreshes plugin state.
23 - **Plugin Hub UI**
24 - The web UI store handles browsing Plugin Index entries, showing README content, prompting about third-party plugin risk, and launching install/update actions.
25
26 ## Key Files
27
28 - **API**
29 - `api/plugin_install.py` dispatches install, update, and index fetch actions.
30 - **Installer logic**
31 - `helpers/install.py` contains archive extraction, Git install, update, validation, and hook execution.
32 - **Frontend**
33 - `webui/pluginInstallStore.js` manages the installer modal state and community index interactions.
34
35 ## Configuration Scope
36
37 - **Settings sections**: none
38 - **Always enabled**: `true`
39
40 ## Plugin Metadata
41
42 - **Name**: `_plugin_installer`
43 - **Title**: `Plugin Installer`
44 - **Description**: Install plugins from ZIP files, Git repositories, or the community index.