feat:进一步修改,支持黑白名单(黑名单优先级更高)

This commit is contained in:
SengokuCola
2026-04-22 00:30:45 +08:00
parent 8c8f06b086
commit e9da641dbb
5 changed files with 243 additions and 16 deletions

View File

@@ -191,6 +191,10 @@ class ComponentDeclaration(BaseModel):
"""组件类型:`action`/`command`/`tool`/`event_handler`/`hook_handler`/`message_gateway`"""
plugin_id: str = Field(description="所属插件 ID")
"""所属插件 ID"""
chat_scope: str = Field(default="all", description="组件适用聊天类型all/group/private")
"""组件适用聊天类型。"""
allowed_session: List[str] = Field(default_factory=list, description="允许暴露该组件的会话 ID 或平台作用域 ID")
"""允许暴露该组件的具体会话。空列表表示不限制。"""
metadata: Dict[str, Any] = Field(default_factory=dict, description="组件元数据")
"""组件元数据"""