Phase 3: PluginWebMixin SDK + web plugin control panels
- New: sdk/plugin_web.py (PluginWebMixin: web pages, API routes, SSE) - New: services/web_panel/routes/plugin_web.py (3 endpoints) - New: plugins/example_plugin/dashboard.html (counter + SSE demo) - Updated: example_plugin uses PluginWebMixin - Tests: 28/28 passing
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Phase 3 开发进度总结
|
||||
|
||||
> 完成: 2026-06-10
|
||||
> 测试: 28/28 通过
|
||||
|
||||
## 新增
|
||||
- `sdk/plugin_web.py` — PluginWebMixin (Web页面注册+API+SSE)
|
||||
- `services/web_panel/routes/plugin_web.py` — 插件面板路由
|
||||
- `plugins/example_plugin/dashboard.html` — 示例仪表盘 (计数器+SSE)
|
||||
|
||||
## SDK API
|
||||
- `register_web_page(path, title, html, icon)` — 注册控制页面
|
||||
- `register_api_route(method, path, handler)` — 注册 REST 端点
|
||||
- `push_sse_event(type, data)` — SSE 实时推送
|
||||
- `handle_sse(request)` — SSE 连接处理
|
||||
|
||||
## 端点
|
||||
- GET /SenSu/plugin/{name} — 插件控制面板
|
||||
- GET /SenSu/plugin/{name}/sse — SSE 事件流
|
||||
- POST /SenSu/plugin/{name}/event — 触发事件
|
||||
Reference in New Issue
Block a user