qinglong
|
00c97e4af2
|
fix: PluginService自动从.example模板创建config.yaml (Windows兼容)
根因: Sentinel的config.yaml被gitignore, 首次运行时
load_plugin()要求config.yaml存在才能继续, 但Sentinel的
自动复制逻辑在initialize()中, 太晚了。
修复: PluginService.load_plugin()检测缺失时自动复制模板
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-14 10:24:08 +08:00 |
|
qinglong
|
5e74b0aad7
|
feat: 🛡️ Sentinel 集群监控插件 + API Key 系统 + 框架设置页
== API Key 系统 ==
- services/web_panel/routes/apikeys.py: CRUD + 权限模板 + 过期控制
- panel_auth + _check_plugin_auth 双重验证 (Session → API Key)
- 模板: readonly(只读) / monitor(监控) / full(管理)
- 持久化到 SenSuDB + 过期自动清理
== WebUI 框架设置页 ==
- static/web_panel/pages/settings.html: API Key 管理界面
- 创建对话框 (名称/权限/TTL), 列表表格, 一键删除
== 热重载修复 ==
- PluginService._reload_plugin: 路由器冻结时跳过 (避免破坏已注册路由)
== 🛡️ Sentinel 插件 ==
- 多节点 SenSu 集群性能监控
- 后台 urllib+run_in_executor 轮询 (避免事件循环死锁)
- SSE 实时推送仪表盘
- 节点管理页 (增删改+连接测试+备注)
- 路径: /sentinel/api/nodes
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-13 15:05:38 +08:00 |
|
qinglong
|
7ce495de2a
|
feat(v0.5.1): 插件进程隔离 — 集成到 PluginService
- PluginService._should_isolate() 检查全局配置 + 插件级配置
- _load_plugin_isolated() 使用 IsolatedPlugin (multiprocessing.Process)
- unload_plugin() 兼容隔离/非隔离两种实例
- 配置: plugins.isolation (全局默认) + settings.isolation (插件级)
- 插件崩溃不影响框架主进程
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-13 11:07:30 +08:00 |
|
qinglong
|
f402af58d0
|
feat(v0.3.4): 插件命令 HTTP API 自动暴露
PluginNetworkBridge.register_command_routes():
- 自动扫描插件 @plugin_command/cmd_* 方法
- 每个命令 → POST /api/plugin/{cmd_name}
- JSON body: {"args": [...], "kwargs": {...}}
- 返回: {"ok": true, "result": "..."}
PluginService.load_plugin() 在插件初始化后自动调用
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-13 11:02:45 +08:00 |
|
qinglong
|
d5388057d9
|
feat(v0.2.2): 插件热重载 — watchdog 监听 plugins/ 自动重载
- PluginService.start() 中启动 watchdog Observer
- 监听 plugins/ 下 .py/.yaml/.yml 文件变更
- 1秒防抖,避免重复触发
- 变更后自动卸载→重新加载对应插件
- 插件重载后自动重连网络路由
- PluginService.stop() 清理 observer
- 配置项 hot_reload: true/false 控制
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-13 11:01:00 +08:00 |
|
AskaEth
|
f5800cc6c3
|
Debug: fix headless mode, plugin compat, psutil optional, module imports
- headless: TUI skip now works correctly
- example_plugin: keyword args compat (plugin_name=, config=, bridge=)
- sysmon: psutil made optional (graceful degrade)
- tui_service: SysMonWidget optional
- All 22 modules import clean, 23 tests pass, integration verified
|
2026-06-10 19:26:41 +08:00 |
|
AskaEth
|
c73e569958
|
v0.2.2: headless mode, debug server auto-start, WS fix, watchdog hot-reload, example plugin
- --headless flag (skip TUI for SSH/systemd)
- InitService auto-starts cyrene_debug_server.py
- Fixed log WS URL (home.html/api/logs/ws -> api/logs/ws)
- PluginService watchdog hot-reload (plugins/ dir)
- example_plugin: 2 commands (echo, plugin_status)
- Tests: 15/15 passing
|
2026-06-10 18:50:10 +08:00 |
|
AskaEth
|
3270a84c4e
|
Rename core -> sdk (plugin SDK, self-documenting)
|
2026-06-10 18:19:05 +08:00 |
|
AskaEth
|
2bc00f8207
|
Rename fmfuncs -> core (cleaner, semantic)
|
2026-06-10 18:17:21 +08:00 |
|
AskaEth
|
1cbe52174d
|
Add plugin enhancements: PluginStatus, PluginError, subscribe_plugin, config validation
- New: fmfuncs/plugin_status.py (9 states)
- New: fmfuncs/plugin_error.py (6 exception classes)
- Enhanced: bridges/plugin_bridge.py (subscribe_plugin)
- Enhanced: bridges/plugin_network_bridge.py (setup_data_transfer, send_data)
- Enhanced: services/plugin_service.py (config validation + status tracking)
- Tests: 15/15 passing (10 original + 5 new)
|
2026-06-10 13:02:33 +08:00 |
|
AskaEth
|
e6875f0b4b
|
Initial commit: SenSu Alpha 0.2.0
- 13-service async plugin framework
- Textual TUI with CLI fallback
- Plugin hot-reload + permission system
- Web management panel (aiohttp)
- Bridge-based inter-module communication
- 10 regression tests
Fixes applied:
- PBKDF2-SHA256 auth (was plain SHA256)
- Auth bypass removed (was allow-all on fail)
- Bare excepts replaced with logged errors
- CatFramework/DreamSu -> SenSu naming unified
- ServiceManager: health checks + startup_order
- Env var credentials (SENSU_ADMIN_PASSWORD etc)
|
2026-06-10 12:28:05 +08:00 |
|