主要更新内容
- 新增插件系统:支持通过 ZIP 包安装插件,包含权限审批、官方插件市场源、持久化数据目录、HTML 注入、HTTP 路由、请求/响应钩子、定时任务、静态文件服务及插件 RPC 能力
- 插件启用的权限按 server 模块门禁受控开放(routes、hooks、HTML 注入、系统 RPC 等),需管理员审批
- 重构 JavaScript 运行时:模块化内置组件,新增
crypto、node:stream、child_process、console、events、fetch API 等 Node.js 兼容模块,并补充接口与兼容性文档 - 指标存储性能优化:优化读写 IO,新增 zstd 压缩以减少磁盘占用
- 通知系统支持任意事件负载字段,新增 SendNotification 接口
- 新增
plugin_market_sources配置项,默认启用官方插件市场源
Bug修复
- 修复 OAuth 登录后未跳转至管理后台的问题
- 修复插件响应钩子缓冲无上限及重装运行中插件不安全的问题
- 修复
process.exit(0)被误判为异常终止的问题 - 修复已注册 RPC 方法无法通过
rpc.help发现的问题 - 修复无客户端可通知时仍加载负载通知的问题
- 修复受限根目录下 fs 无跟随操作被拒绝的问题
- 修复 Ping 任务执行顺序错误,按权重与 ID 排序
- 修复插件钩子过滤与按插件 body 上限的问题
其他
- 将
database/metricstore迁移至internal/metricstore并拆分组件 - 移除未使用的旧版本兼容代码
- 启动时自动创建
data/plugin与data/plugin-data目录 EventMessage的 event/message/emoji 字段由字符串调整为任意类型,支持更灵活的通知负载- 新增依赖
klauspost/compress(zstd 压缩)
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
Full Changelog: 1.3.2...Snapshot-2608041108