mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-08 09:59:53 +00:00
Add basic plugin manifests and refactor plugin/file helpers to support flexible plugin resolution and secure asset serving. - Add placeholder plugin.json for example_agent and memory plugins. - Introduce constants and small cleanup in python/helpers/files.py (AGENTS_DIR, PLUGINS_DIR, PROJECTS_DIR, USER_DIR) and add helpers: is_file, is_dir, get_abs_path_dockerized, plus minor formatting/style fixes. - Refactor plugin metadata code in python/helpers/plugins.py: replace Plugin dataclass with a lightweight PluginListItem, centralize plugin roots, and implement find_plugin_dir, find_plugin_file, get_plugin_settings, save_plugin_settings and determine_plugin_save_file_path to resolve plugin files across usr/, plugins/, projects and agent profiles with correct precedence. - Update run_ui.py to use plugin_name (instead of plugin_id), resolve plugin directories via new helpers, enforce directory traversal/security checks using files.is_in_dir and files.is_file, and namespace API routes by plugin.name. These changes enable per-user/project/agent plugin overrides, add settings load/save support, and harden static asset serving. |
||
|---|---|---|
| .. | ||
| api | ||
| extensions | ||
| helpers | ||
| prompts | ||
| tools | ||
| webui | ||
| plugin.json | ||