github komari-monitor/komari Snapshot-2608011525

pre-release2 hours ago

主要更新内容

  • 新增插件系统:支持 ZIP 包安装(需包含 komari-plugin.json 清单),提供启用/停用、权限声明与审批、管理端/公开页面注入、配置持久化与独立日志
  • 插件通过 server 模块注册 HTTP 路由、挂载请求/响应钩子、调用或注册 RPC;插件以管理员权限运行,加载失败时自动停用并保留错误信息
  • 重构 JavaScript 运行时:将内置能力模块化,新增 eventspathosprocessfschild_processnethttp 等 Node.js 兼容模块,并补充 API 与兼容性文档
  • 文件系统访问默认限制在插件目录内,拒绝符号链接逃逸与越界访问;子进程输出与 HTTP 请求体设置大小上限,未授权的敏感调用明确抛错
  • metricstore 迁移至 internal/metricstore 并拆分组件,移除未使用的旧版本兼容代码

Bug修复

  • 修复 process.exit(0) 被误判为异常终止的问题,并改进运行时错误上报
  • 修复响应钩子导致流式响应(如 MJPEG 实时画面)被缓冲、客户端无法收到数据的问题

其他

  • 启动时自动创建 ./data/plugin 目录,新增 plugin_market_sources 配置键
  • 数据库新增 PluginConfiguration 表,用于持久化插件配置

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

Full Changelog: 1.3.2...Snapshot-2608011525

Don't miss a new komari release

NewReleases is sending notifications on new releases.