[Feature] 插件支持声明依赖其他插件(必须依赖 / 可选依赖)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python, yaml
- Área
- backend, developer-experience
Línea de trabajo
The request centres on the dependencies block in metadata.yaml, which is the declaration point to read first, along with whatever code parses it and loads plugins. The issue leaves the declaration format open (a plain name list or the repository-style identifier) and asks for several load-time and WebUI behaviours. Settle the format and the required/optional semantics with maintainers before any code, since the done state is not defined yet.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
功能描述
希望插件能在 metadata.yaml 里声明「我依赖哪个插件」,并把依赖分成两档:
- 必须依赖:缺了它这个插件无法工作。缺失时插件不加载,并给出明确原因(缺哪个插件、要求什么版本)。
- 可选依赖:有它则增强功能,没有也能照常运行,只是拿不到增强能力。
然后可以再安装插件的时候弹出二级窗口提示安装依赖,必装的自动安装,可选的给出窗口选择性安装
期望由框架统一处理这几件事:
- 依赖的插件先于依赖方加载;出现循环依赖时报错,而不是卡住。
- 缺必须依赖时,插件进入「加载失败」列表并说明缺什么,而不是抛出一堆异常。
- 被依赖的插件被禁用、卸载或重载时,依赖方有明确行为,不会静默失效。
- WebUI 能显示依赖关系和是否满足;卸载被依赖的插件时给出提示。
声明大致长这样:
dependencies:
required:
- astrbot_plugin_xxx_core
optional:
- astrbot_plugin_yyy
或是采用仓库的格式,避免不同作者制作同名插件
使用场景
- 多个插件共用同一套底层能力:比如渲染图片、发送富文本、存储记忆、管理表情包。把底层抽成一个独立插件,上层只需声明依赖。现在只能每个插件各自复制一份,底层一升级就要改很多个仓库。
- 可选增强:某插件装了「通用生图」就走高质量生图,没装就回退到内置实现。
- 分层插件:中台类、适配类插件天然会被别的插件依赖,现在只能靠在 README 里写「请先安装我,再用某种方式对接服务」。
- 避免半坏状态:用户禁用或卸载了某个底层插件之后,上层插件仍在降级状态下运行,却没有任何提示,问题只能靠翻日志发现。
检查清单
- Lenguaje dominante
- Python
- Estrellas
- 46.4k
- Forks
- 3.4k
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 120
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AstrBotDevs/AstrBot
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
AstrBotDevs/AstrBot#11038 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
AstrBotDevs/AstrBot#11034 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
AstrBotDevs/AstrBot#10999 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug] OpenAI-compatible Gemini 工具 schema const 导致 400Posiblemente ocupada @arccat-114 la tomó hace 17 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
AstrBotDevs/AstrBot#10720 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug] Discord slash command sync aborts with KeyError when a plugin handler is defined in a submodulePosiblemente ocupada @yuexia5 la tomó hace 22 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
AstrBotDevs/AstrBot#10626 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de AstrBotDevs/AstrBot
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
navikt/tiltakspenger#129 ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 83/100
FinanceFlash/unvibecode#652 ·
Los mantenedores suelen responder en 1 día
-
netbox status: needs triage type: documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
netbox-community/netbox#23655 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
MCDReforged/MCDReforged#442 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bytedance/agentkit-samples#277 ·