agent-zero/plugins/plugin_installer
frdel 6dde8c2e74 Derive plugin names; refactor API helpers
Add robust plugin name derivation and clean up API helper code.

- helpers/git.py: add giturlparse dependency and extract_author_repo(url) to reliably extract owner/repo from git URLs (strips auth and validates).
- plugins/plugin_installer/helpers/install.py: replace the old sanitize function with two derivation helpers: _derive_git_plugin_name (normalizes owner/repo into a safe plugin ID) and _derive_zip_plugin_name (determine name from zip contents or uploaded filename). Import regex and use extract_author_repo; switch import to clear_plugin_cache and remove redundant cache clears on intermediate failures.
- requirements.txt: add giturlparse==0.14.0.
- webui/js/api.js: deduplicate and move extensions/URL normalization helpers, add redirect(response) helper to centralize login redirect handling, normalize CSRF cookie secure flag formatting, and minor whitespace/logic cleanup.

These changes improve reliability of plugin ID inference from git URLs/archives and simplify/centralize client-side API helper logic.
2026-03-09 15:59:41 +01:00
..
api plugin installer flow cleanup 2026-03-09 13:35:18 +01:00
extensions/webui/plugins-list-header-buttons feat: simplify install button + add tab state and management methods to store 2026-03-03 23:39:29 -05:00
helpers Derive plugin names; refactor API helpers 2026-03-09 15:59:41 +01:00
webui plugin installer flow cleanup 2026-03-09 13:35:18 +01:00
plugin.yaml feat: add plugin installer with support for ZIP and Git installations 2026-03-03 10:53:35 -05:00