agentscope-ai / agentscope-ai/QwenPaw

[Feature]: Support installing plugins via pip from PyPI

Ouverte
#5,484 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
TypeScript
Étoiles
35k
Forks
3.1k
Merge moyen
1 j 13 h
PR mergées (30 j)
228

Description

## Motivation

Currently, QwenPaw plugins can only be installed via ZIP archives (upload, URL, or local directory). While this works, it requires a separate distribution and installation mechanism that is non-standard for the Python ecosystem.

Projects like [Hermes Agent](https://github.com/NousResearch/hermes-agent) take a more Pythonic approach — plugins are distributed as standard Python packages installable via `pip`, leveraging PyPI for versioning, dependency resolution, and discovery. This makes it trivially easy for the community to publish, install, and update plugins.

## Proposal

Add support for installing QwenPaw plugins via `pip install`, so that:

1. **Third-party developers** can publish plugins to PyPI as standard Python packages (e.g., `pip install qwenpaw-plugin-xxx`)
2. **Users** can install plugins with a simple pip command instead of managing ZIP files
3. **Dependency management** is handled by pip/uv natively, rather than the current `requirements.txt` post-install step

## Suggested Approach

- Define a plugin discovery mechanism based on [Python entry points](https://packaging.python.org/en/latest/specifications/entry-points/) (e.g., `qwenpaw.plugins` entry point group)
- Plugin authors add an entry point in their `pyproject.toml`:
```toml
[project.entry-points."qwenpaw.plugins"]
my_plugin = "qwenpaw_plugin_xxx:register"
```
- QwenPaw scans installed entry points at startup to discover and load plugins
- Keep the existing ZIP-based installation as an alternative for non-PyPI distribution (e.g., internal/enterprise plugins, development)

## Benefits

- **Lower barrier for community contributions** — anyone familiar with Python packaging can publish a plugin
- **Standard tooling** — reuse pip, uv, poetry, etc. for dependency resolution and version management
- **Better security** — PyPI has vulnerability scanning, signed releases, and audit trails
- **Easier updates** — `pip install --upgrade qwenpaw-plugin-xxx`
- **IDE support** — installed packages are automatically discoverable by IDEs and type checkers

## Current State

| | Hermes Agent | QwenPaw (current) |
|---|---|---|
| Plugin distribution | PyPI package | ZIP archive |
| Install command | `pip install hermes-agent[plugin]` | Upload ZIP / URL / local dir |
| Dependency management | pip native | Post-install `pip install -r requirements.txt` |
| Discovery | `plugin.yaml` in package | `plugin.json` in extracted directory |
| Version management | pip/PyPI | Manual version check |

## Alternatives Considered

- Keep ZIP-only: works but creates friction for the community
- Use a custom plugin registry: reinvents what PyPI already provides well

## Additional Context

This would be complementary to the existing ZIP-based installation, not a replacement. Both methods can coexist — ZIP for development/internal use, pip for published community plugins.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start by locating the current ZIP-based plugin installation and discovery flow, including its plugin.json handling and requirements.txt post-install step. Define how installed Python entry points in the qwenpaw.plugins group are scanned and loaded while preserving ZIP installation for internal or development plugins. Done means PyPI packages can be discovered and installed through pip without removing the existing ZIP path.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
tooling
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.