qinglong
37d1110f2b
feat(v0.4.3): TUI 命令 Tab 补全
...
CommandSuggester 实现 Textual Suggester API:
- 根据已注册命令列表提供前缀匹配补全
- 前缀无匹配时 fallback 到包含匹配
- 按长度排序,优先最短匹配
- 在 Input placeholder 提示 'Tab 补全'
Co-Authored-By: Claude <noreply@anthropic.com >
2026-06-13 11:06:31 +08:00
qinglong
2d0a37ba19
feat(v0.4): TUI 系统监控面板 + 插件状态面板
...
v0.4.1 系统监控面板:
- 复用共享 SystemInfoCollector (TUI + Web面板同一数据源)
- CPU/MEM 彩色进度条 + 网络实时速率
- 2 秒刷新,set_interval 驱动
v0.4.2 插件状态面板:
- 展示已加载插件的名称/版本/命令数
- 3 秒刷新,PluginService 延迟注入
SystemInfoCollector:
- 注册为共享服务 (sys_collector)
- Web panel status.py 优先从 service_manager 获取
- 零重复数据采集
TUI 布局升级: 3行 → 4行 (monitor + log + message + input)
Co-Authored-By: Claude <noreply@anthropic.com >
2026-06-13 11:05:56 +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
qinglong
dcef1173f2
feat(v0.2.2): 调试服务器自启动 — InitService.start_auto_scripts()
...
通用自动启动脚本机制:
- base_config.yaml 新增 auto_start_scripts 配置段
- InitService 在日志服务就绪后扫描并拉起配置的脚本
- 脚本不存在时优雅跳过,不影响框架启动
- 每个脚本独立子进程 + 独立进程组 (os.setsid)
- 框架 shutdown 时自动终止 (SIGTERM → killpg)
- 模块级单例跟踪所有进程,避免重复启动
Co-Authored-By: Claude <noreply@anthropic.com >
2026-06-13 10:58:01 +08:00
qinglong
9de094ea54
fix: 移除遗留fmfuncs目录创建 + 清理init_service无用导入 + 文件管理器SVG图标 + 示例插件MD3改造
...
- init_service: 删除_load_fmfuncs方法和fmfuncs目录创建(已迁移到sdk/)
- init_service: 清理未使用的importlib.util和sys导入
- 文件管理器: 全部emoji替换为MD3 SVG矢量图标(文件夹/文件类型/右键菜单)
- 示例插件: dashboard.html改为MD3风格 CSS变量自动适配日夜主题
- 面包屑: 加底色+模糊+左右外边距
- CSS: .btn::after加pointer-events:none
- 插件开发指南: 更新2.6节MD3主题同步和完善的CSS变量/组件类参考表
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-12 19:00:19 +08:00
qinglong
9b997d8bda
fix: 文件选择器改为页内iframe弹窗 + 乱码编码修复 + API路径修复
...
- pickPath()从window.open改为页内iframe模态弹窗(遮罩+关闭按钮)
- files.html添加meta charset+CSS link,独立模式自动加载files.js
- API路径统一通过_apiUrl()构建,适配主面板和iframe两种上下文
- 独立iframe模式注入body/container覆写样式(无topbar)
- 选择模式栏移至底部margin-top:auto紧凑排列
- MD3风格toggle开关(显示隐藏复选框)
- CSS版本号缓存破坏
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-11 21:51:42 +08:00
qinglong
d275c78aed
docs: 插件开发指南新增 pickPath() 便捷调用说明
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-11 21:13:25 +08:00
qinglong
dc0bb79a7e
feat: 全局文件选择器 + 项目管理路径选择按钮
...
- app.js新增window.pickPath(mode,callback)全局复用
- 项目管理「工作目录」+Git部署「目标目录」添加📁 选择按钮
- Git部署不再硬编码data/projects,改用用户选择的目标目录
- files.js picker模式读取URL cb参数实现callback_id回传
- app.js版本号更新至v=0701
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-11 21:11:50 +08:00
qinglong
99c3e3e853
feat: hash路由 + 插件页面内联加载 + 侧边栏插件面板展开项
...
- Hash路由: #/dashboard #/files #/plugins/xxx 支持刷新保持/前进后退
- 登录过期保留hash,登录后自动跳回原页面
- 插件WebUI页面内联加载到page-container(不再弹新窗)
- 插件页面HTML自动处理: style提取/body剥离/script执行/padding归零
- 侧边栏新增「插件面板」可折叠项,展开列出所有已注册插件页面
- 内存卡片显示 已用/总容量(百分比右侧)
- 插件开发指南新增 2.6 WebUI页面开发章节
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-11 20:56:39 +08:00
qinglong
eeca8e37e1
docs: 更新README+架构文档 反映v0.6.0文件管理器/WS推送/WebUI重构
...
- README: 新增文件管理器特性/Web面板路由/架构更新
- 框架架构文档: 新增第十章 v0.6.0 WebUI重构+文件管理器+WS推送+MD3主题
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-11 18:28:50 +08:00
qinglong
fd715eac2b
feat: 文件管理器 + Windows兼容 + SVG主题适配 (v0.6.0)
...
新增:
- services/web_panel/routes/files.py — 全功能文件管理后端API (11个端点)
- pages/files.html + files.js — 文件管理前端 (浏览/编辑/上传/删除/右键菜单)
- 插件Picker API: window.open+postMessage唤出文件选择器
- 符号链接目录双层面包屑 (逻辑路径+物理路径)
- 文件系统全访问+跨平台 (Linux/Windows/macOS)
- permission_rules.yaml新增4个filemanager.*权限
修复:
- SVG fill=currentColor 日夜模式自适应
- 特殊目录容错 (/dev/fd损坏符号链接/proc)
- 面包屑每层级独立可点击+可编辑路径跳转
- ..行返回上级+data-is-dir补全
- rmlint→lstat回退 损坏符号链接不炸页面
文档:
- 插件开发指南新增第八章(文件管理器集成)
- 开发踩坑记录新增4条(特殊目录/双面包屑/SVG颜色/Windows)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-11 18:23:32 +08:00
qinglong
4a989bf50f
feat: WS实时推送、网速双线图、按钮MD3修复、页面加载器修复 (v0.6.0)
...
后端:
- 新增 /api/system/ws WebSocket端点 替代HTTP轮询 (每2s推送系统+框架数据)
- 修复 uptime始终为0 (sm.start_time时间戳)
- 网络采集新增TX上行+实时网速(delta法)
- 进程内存采集 (/proc/self/status VmRSS)
- 抑制aiohttp内部WS帧日志防刷爆日志文件
前端:
- 仪表盘: HTTP轮询→WS连接+指数退避自动重连
- 实时日志: 修复onclose重连bug+批量渲染30fps+500行上限防卡死
- 网速卡片: DualLineChart双线图(下行实线/上行虚线)
- Y轴零点偏移-5% 防止零网速贴底
- 所有按钮修复MD3组合类(btn+btn-tonal+btn-sm)
- 页面加载器: 改动态script元素执行 修复onclick全局作用域问题
- emoji图标→Material Design SVG图标
- CSS去残留</style>+新增.nav-item svg约束
- 登录页输入框+标签左对齐+按钮MD3样式
- 多个版本号显示修复(去双重v前缀)
- chart.js/app.js/HTML页面统一加版本号防浏览器缓存
- .gitignore新增docs/目录
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-11 16:23:31 +08:00
qinglong
fd0a97fec5
Fix login redirect: add /SenSu/index.html route, restart picks up new app.js
...
- /SenSu/index.html now serves login page (was 404 after cookie expiry)
- Fresh restart with latest page loader + inline script execution
- All routes verified: 200 OK
2026-06-11 14:47:37 +08:00
qinglong
c07cea4ff7
Fix page loader: execute inline scripts, JS module loading optional
...
- innerHTML strips script tags, now extract and eval them
- External .js module: 404 = skip gracefully (no error)
- Progress bar: completes regardless of JS module
- Proxy/projects pages now render with CSS + inline JS executes
2026-06-11 14:43:24 +08:00
qinglong
dd8a31e29a
Fix: proxy API prefix, version from config, remove auth from framework/system endpoints
...
- Proxy routes now use /SenSu/api/proxy (was missing prefix)
- Projects routes use dynamic prefix
- Version reads from config/framework/base_config.yaml
- Framework/System APIs no longer require auth (public info)
- Proxy init separated from route setup (avoids frozen router error)
- Version updated to v0.6.0
2026-06-11 14:37:28 +08:00
qinglong
6918ee6514
Fix headless mode: use sleep loop instead of CLI mode (prevent EOF exit)
...
- Headless now keeps server alive with asyncio.sleep(1) loop
- CLI mode only for non-headless fallback
- Enables running SenSu as daemon/service
2026-06-11 13:02:56 +08:00
qinglong
885929f3ff
Fix proxy/projects pages: error handling when API unavailable
...
- proxy: .catch() shows 'service not ready' instead of stuck loading
- projects: shows 'engine not ready' on API error
- Both: show 'no items' placeholder instead of blank
2026-06-11 12:47:39 +08:00
qinglong
a1dd401efc
Fix theme toggle: move init to app.js, remove duplicate script
...
- Theme initialized BEFORE page render (no flash)
- toggleTheme() now in app.js global scope
- Proxy page rewritten with btn-filled MD3 class
2026-06-11 12:46:33 +08:00
qinglong
c4e2783120
WebUI: MD3 projects/proxy pages, sidebar links, CSS animations
...
- Add projects + proxy nav items to sidebar
- Rewrite projects.html with MD3 cards + tabs + mgmt-cards
- Rewrite proxy.html with MD3 form + mgmt-cards
- CSS: button ripple, card elevation, page fade, tab slide, input glow, nav dot, status pulse, log entry fade, shimmer, scrollbar, badge bounce, card hover mouse-glow (428 lines)
2026-06-11 12:12:03 +08:00
AskaEth
b37cbf076c
WebUI: MD3 2026 redesign + light/dark theme toggle
...
- Rewrite CSS with full MD3 color tokens + elevation + shape system
- Add light theme with data-theme="light"
- Theme toggle button in top bar (persists to localStorage)
- 268 lines CSS, covers login/shell/dashboard/plugins/projects/proxy
2026-06-11 11:53:32 +08:00
AskaEth
7436f699fb
Update docs: README + project structure for v0.6
2026-06-11 10:48:58 +08:00
AskaEth
7dc87d9f3a
Fix WebSocket log URL: extract base path instead of page path
2026-06-10 21:29:43 +08:00
AskaEth
4906b4dc2a
Fix short-term issues: refactor main.py, test paths, sysmon optional psutil
2026-06-10 21:18:59 +08:00
AskaEth
3993cc41a9
Fix main.py imports (line-targeted, no try-block corruption)
...
- Phases 1-3 all integrated
- 28/28 tests passing
- 7/7 modules import OK
2026-06-10 20:56:01 +08:00
AskaEth
e52f7f3566
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
2026-06-10 20:54:11 +08:00
AskaEth
c680fea8e0
Phase 2: ProxyService reverse proxy (HTTP+WebSocket forwarding)
...
- New: services/proxy_service.py (path->URL mapping)
- New: services/web_panel/routes/proxy.py (3 REST endpoints)
- New: static/web_panel/pages/proxy.html (WebUI)
- Tests: 28/28 passing
2026-06-10 20:47:17 +08:00
AskaEth
8dbf628dd6
Phase 1: ProjectEngine + PyEnvManager + project management WebUI
...
- New: services/project_engine.py (async subprocess manager)
- New: services/pyenv_manager.py (Python version + venv + git clone)
- New: services/web_panel/routes/projects.py (5 REST endpoints)
- New: static/web_panel/pages/projects.html (WebUI)
- Tests: 28/28 passing, API verified (GET /api/projects)
- Docs: Phase1_Progress.md (local)
2026-06-10 20:41:24 +08:00
AskaEth
7e762b68fe
Fix URL line wrapping: put URL on own line with leading space for terminal clickability
2026-06-10 19:54:51 +08:00
AskaEth
7e682190ab
Fix: URL spacing for terminal clickability, DEBUG level from config
2026-06-10 19:51:07 +08:00
AskaEth
57009c7f43
Update version to v0.5.0 (config + TUI), clean DreamSu->SenSu in main.py
2026-06-10 19:46:09 +08:00
AskaEth
b5d688700d
Update docs: README + project structure for v0.5
2026-06-10 19:43:18 +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
4b26b6f086
v0.4+v0.5: TUI dashboard, tab completion, systemd, Docker, process isolation
...
- New: services/sysmon_widget.py (CPU/MEM/DISK/NET real-time)
- Enhanced: tui_service.py (4-section layout, plugin status panel)
- Enhanced: command_service.py + tui (Tab completion)
- New: deploy/sensu.service (systemd)
- New: deploy/Dockerfile (Alpine, 4200+4240)
- New: services/process_isolated.py (multiprocess plugin isolation)
- Tests: 23/23 passing
2026-06-10 19:08:16 +08:00
AskaEth
d48ef65b35
v0.3: SQLite persistence + ProjectService + dependency resolution
...
- New: services/sensu_db.py (SQLite, 5 tables)
- New: services/project_service.py (project registry, port allocation, dep resolution)
- Integrated into main.py (step 11.6)
- Tests: 23/23 passing (15 original + 8 new)
2026-06-10 18:59:25 +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
5e23778d90
Update docs: architecture + plugin guide for v0.2.1 enhancements
2026-06-10 13:09:52 +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
79f7fb86fe
Add TOC to plugin dev guide (28 entries) + Android compat fixes
2026-06-10 12:51:18 +08:00
AskaEth
ef23957bc8
Fix license in README: MIT -> Apache 2.0
2026-06-10 12:30:19 +08:00
AskaEth
1e2e2f7a27
Add Apache 2.0 License
2026-06-10 12:29:31 +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