Skip to content

Release v3.2.1

Choose a tag to compare

@Sakura520222 Sakura520222 released this 16 Sep 00:42
· 464 commits to main since this release

v3.2.1 (2026-09-16)

总结 / Summary

Sakura AI 3.2.1 是一个包含重要架构加固与功能增强的维护及功能版本。

本版本为 WebUI 引入了 7 天滑动会话机制并修复了会话刷新时的账户状态校验;同时将 Host Updater 升级至 0.3.0,正式引入生产环境下的 systemd 服务托管与自启动生命周期管理,全面强制执行 Web、sandboxd 与 Agent Runner 的三镜像事务部署契约,并对多项核心依赖及 CI 构建发布流程进行了更新与优化。

Sakura AI 3.2.1 is a maintenance and feature release focusing on architectural hardening and key feature enhancements.

This release introduces seven-day sliding WebUI sessions along with fixes to ensure session renewal checks authoritative account states; upgrades Host Updater to 0.3.0 with production systemd service management and reboot self-recovery; strictly enforces the three-image transaction deployment contract across Web, sandboxd, and Agent runner; and updates several core dependencies alongside CI build and release workflows.

升级提示 / Upgrade Notes

  • 生产环境宿主机升级:已安装 Host Updater 的管理员需执行 sudo ./start.sh updater reinstall,以获取支持三镜像契约的 0.3.0 版本二进制,并自动生成、启用和启动 sakura-ai-updater.service systemd 自启动服务。

  • 宿主机环境检查:生产环境 Host Updater 要求 Linux 宿主机的 PID 1 为可用的 systemd;在容器、NAS 或其他无可用 systemd 的环境下执行生产安装将会明确报错失败(开发调试需显式声明 SAKURA_UPDATER_DEV=1)。

  • 依赖重新同步:源码或直接在宿主机运行后端的环境需重新同步依赖(如运行 uv sync 或 pip install -r requirements.txt),以满足升级后的 openai (>=3.8.0)、redis (>=8.1.0)、python-telegram-bot (>=22.8)、pydantic (>=2.13.5) 等包版本约束。

  • Host Updater migration in production: Administrators running the Host Updater must execute 'sudo ./start.sh updater reinstall' to acquire the 0.3.0 binary supporting the three-image contract and render, enable, and start the sakura-ai-updater.service systemd unit.

  • Host environment check: Production Host Updater requires PID 1 on the Linux host to be an active systemd daemon; running production install in containers, NAS, or non-systemd environments will fail explicitly (development mode requires explicit SAKURA_UPDATER_DEV=1).

  • Re-sync dependencies: Environments deploying from source or running the backend directly on the host must re-synchronize Python packages (e.g., via 'uv sync' or 'pip install -r requirements.txt') to meet updated constraints including openai (>=3.8.0), redis (>=8.1.0), python-telegram-bot (>=22.8), and pydantic (>=2.13.5).

注意事项 / Important Notes

Important

Host Updater 0.3.0 强制要求 three-image-transaction-v1、deployment-reconcile-v1 和 deployment-manifest-v1 能力;未提供这些能力的旧版 Updater 将被阻止执行应用更新,不再允许单独更新 Web 镜像。

Host Updater 0.3.0 strictly requires three-image-transaction-v1, deployment-reconcile-v1, and deployment-manifest-v1 capabilities; older Updaters lacking these capabilities are blocked from performing updates, disallowing Web-only updates.

Note

生产环境下的 Host Updater 守护进程生命周期改由 systemd (sakura-ai-updater.service) 管理,具备故障自动重启(Restart=on-failure)和开机自启能力,启停均路由至 systemd。

Host Updater daemon lifecycle in production is now supervised via systemd (sakura-ai-updater.service), providing automatic failure recovery (Restart=on-failure) and boot persistence with stop/start routed through systemd.

Note

WebUI 认证现在采用 7 天滑动过期会话,活跃请求会持续获取新鲜 Claims 进行续期,但必须通过账户状态为有效(active)的权威校验。

WebUI authentication now employs seven-day sliding sessions, automatically renewing with fresh claims on active requests while strictly validating authoritative active account state.

中文更新日志

新增功能

  • 新增 WebUI 7 天滑动会话支持
  • 支持传递启动超时配置并加固 Host Updater 的 systemd unit 托管

问题修复

  • 修复 WebUI 会话刷新逻辑,严格基于权威账户状态进行鉴权门禁
  • 修复 WebUI 会话续期机制,在最终响应中写入包含最新 Claims 的凭据
  • 强制执行 Web、sandboxd 与 Agent Runner 三镜像部署契约,并在启动与更新时校验完整运行时身份与崩溃恢复
  • 将 Updater 停止命令路由至 systemd,并在 reinstall 与守护进程启动过程中完整透传 CLI 参数
  • 修复 start.sh 脚本在 systemd stop 后 socket 残留时自动回退至底层停止逻辑
  • 优化 edge 镜像发布工作流,自动跳过已被后续提交替代的旧开发分支构建
  • 最小化 Docker Hub 镜像同步任务的 CI 权限

文档更新

  • 更新部署指南,增加 Host Updater 的 systemd 服务管理、开机自启验证与迁移步骤说明

测试

  • 更新 WebUI 认证时间戳白名单行并调整 Star Aid 回调测试以适配响应注入

其他变更

  • 升级核心依赖库:openai (>=3.8.0)、redis (>=8.1.0)、pydantic (>=2.13.5)、python-telegram-bot (>=22.8)、python-slugify (>=9.0.0)、alembic (>=1.19.2)、pyyaml (>=6.0.3)、watchfiles (>=1.2.0)、stripe (>=15.6.1)、ruff (>=0.16.6) 并同步 uv.lock
  • 调整发布说明工作流中大模型调用的 reasoning effort 与 max tokens 配置
  • 将版本号提升至 3.2.1,并将 .codex/ 忽略项加入 .gitignore
  • 整理与提炼 Sakura 知识库结构化经验,合并反思与记忆记录
English Changelog

New Features

  • Add seven-day sliding WebUI sessions
  • Propagate startup timeout and harden systemd unit management for host updater

Bug Fixes

  • Gate WebUI session renewal on authoritative account state
  • Renew WebUI sessions on final response with fresh claims
  • Enforce three-image deployment contract across Web, sandboxd, and Agent runner, verifying full runtime identity and crash recovery
  • Route updater stop through systemd and forward CLI arguments through reinstall and daemon startup
  • Fall back to raw backend stop in start.sh if updater socket survives systemd stop
  • Skip superseded development heads in edge image publication workflows
  • Minimize mirror job permissions in CI

Documentation

  • Document systemd service management, boot enablement verification, and migration procedures for Host Updater

Tests

  • Track shifted timestamp allowlist line and adapt Star Aid callback regression tests to response injection

Other Changes

  • Update dependencies: openai (>=3.8.0), redis (>=8.1.0), pydantic (>=2.13.5), python-telegram-bot (>=22.8), python-slugify (>=9.0.0), alembic (>=1.19.2), pyyaml (>=6.0.3), watchfiles (>=1.2.0), stripe (>=15.6.1), ruff (>=0.16.6), and sync uv.lock
  • Update reasoning effort and max tokens in release prompt workflow payload
  • Bump version to 3.2.1 and add .codex/ to .gitignore
  • Extract structured knowledge from reflections and consolidate Sakura memory records