主要更新内容
- 新增插件系统:支持 ZIP 插件包安装、官方插件市场默认源(可选配
plugin_market_sources)、权限声明与审批、启用状态持久化 - 插件
server模块新增 HTTP 路由、静态目录、请求/响应 Hook、HTML 注入、定时任务、RPC 注册与调用、配置读取 - 新增插件持久化数据目录
data/plugin-data,插件更新后数据保留 - 重构 JavaScript 运行时并模块化内置模块,新增
node:stream、crypto、child_process、events支持 - 指标数据支持 zstd 压缩,读写 IO 优化
- 指标 rollup 保留期可配置(
metric_rollup_minute_retention_minutes、metric_rollup_five_minute_retention_minutes、metric_rollup_hour_retention_hours) - 新增
SendNotification通知接口,事件消息支持任意载荷字段
Bug修复
- 修复 OAuth 登录后未跳转管理后台的问题
- 修复
process.exit(0)被误判为异常退出,并改进错误上报 - 修复插件 response Hook 缓冲可能导致流式响应阻塞,并按插件设置 body 上限
- 修复插件 hook 过滤与重新安装时的卸载问题
- 修复
rpc.help无法发现已注册 RPC 方法的问题 - 修复受限目录下 lstat/readlink 等不跟随链接的操作被拒绝的问题
- 修复无客户端可通知时仍加载通知内容的问题
- 修复 ping 任务排序,按权重和 ID 顺序返回
其他
- metricstore 迁移至
internal/metricstore并拆分组件,移除旧版本兼容代码与废弃数据库辅助函数 - 启动时自动创建
data/plugin与data/plugin-data目录 - 新增 jsruntime API 与兼容性说明文档
Commits
- style: 移除没有使用的旧版本兼容代码,移动 database/metricstore 到 internal/metricstore 并拆分组件 (4077201) @Akizon77
- refactor: javascript runtime (df6ffba) @Akizon77
- refactor(jsruntime): modularize built-ins (3c58382) @Akizon77
- docs(jsruntime): add API and compatibility documentation (54851bd) @Akizon77
- docs(jsruntime): clarify unsupported methods throw instead of no-op (91ae9ed) @Akizon77
- fix(jsruntime): treat process.exit(0) as normal termination and improve error reporting (91cbeb3) @Akizon77
- feat: add plugin system and refactor jsruntime deadline handling (8985adc) @Akizon77
- feat(plugin): enforce server module permission gates (68bf4ed) @Akizon77
- feat(jsruntime): add node:stream module and embed nexttick JS (965afb3) @Akizon77
- feat: crypto module support (91d5f92) @Akizon77
- feat(plugin): set official plugin market as default source (f967ba0) @Akizon77
- fix(plugin): limit response hook buffering and safely reinstall (c27c21d) @Akizon77
- feat(plugin): add persistent storage dir for plugins (01c4816) @Akizon77
- feat: add plugin data storage and remove preview field (4040a5d) @Akizon77
- feat: add HTML injection permission and support for plugins (1f139ba) @Akizon77
- feat(plugin): add server.static for serving plugin static folders (eab03a1) @Akizon77
- fix: hook 过滤 + 按插件 body 上限 (d9713aa) @Akizon77
- feat(plugin): add server.cron scheduled task support (5488189) @Akizon77
- fix(rpc): make registered methods discoverable via rpc.help (28abafb) @Akizon77
- feat: add SendNotification and support any event payload fields (996dd90) @Akizon77
- fix(jsruntime/fs): allow no-follow operations on confined root (956b933) @Akizon77
- fix(notifier): skip load notification when no clients to notify (a714637) @Akizon77
- pref: metrics db IO Read/Write (08067bc) @Akizon77
- feat:metrics zstd compress & fix pingtask order (cba8153) @Akizon77
- fix(oauth): redirect to admin dashboard after OAuth login (d92f60f) @Akizon77
- feat(metricstore): make rollup retention configurable (9646252) @Akizon77
Full Changelog: 1.3.2...Snapshot-2608041234