Releases: muyouzhi6/flow2api-host-agent
Releases · muyouzhi6/flow2api-host-agent
Flow2API Host Agent v0.2.8
本次更新
- 修复异常认证页场景下的假成功/假失败:当 Host Agent 通过插件同款的临时 Flow 页面恢复拿到新的
session-token时,不再因为当前页面落在accountchooser/signin而提前拒绝同步。 - aggressive 预热改为更接近浏览器插件的行为:打开临时
https://labs.google/fx/vi/tools/flow页面、等待加载和 settle,再关闭页面后读取最新 cookie。 - 修复去重误判:如果 ST 指纹没变,但 Flow2API 侧写入状态不匹配或
AT已过期,Host Agent 会继续尝试修复,而不是直接把这次刷新记成成功。 - 增强本地写后校验:支持按
email或st回查 Flow2API 数据库,并显式判断at_expires是否仍然有效。 - 新增状态提示:当
session-token已同步成功,但下游AT仍然过期时,会明确给出 warning,避免把 Host Agent 同步问题和 Flow2API 后端 AT 刷新问题混在一起。
验证
- 已在真实部署环境执行
run-once验证。 - 返回结果包含
success=true、update_status=200、write_verification.verified=true。 - 验证通过后,Flow2API 库内 ST 指纹已更新到最新值。
Flow2API Host Agent v0.2.7
What's Changed
- add one controlled aggressive recovery attempt when the browser is stuck on Google auth redirect pages
- keep recovery intent visible in state reporting so the dashboard reflects what the daemon actually tried
- improve the login page for mobile/public access with direct noVNC open actions
- remove legacy watchdog units during install to stop useless failed timer noise
Upgrade Notes
- if the browser is already stuck on
accountchooserorsessionexpired, this release will try one safe recovery pass first - if Google still keeps the browser on an abnormal auth page after that recovery pass, you still need to log in manually once to restore the session
Flow2API Host Agent v0.2.6
- Improve long-run cookie sync stability
- Prefer soft prewarm (avoid forced navigation that can bump the login session)
- Smarter ST cookie selection when multiple session cookies exist
- Guardrail: refuse to overwrite Flow2API token when browser is on abnormal auth/chooser pages
- Dedup: skip update when ST fingerprint unchanged (reduce churn) while keeping heartbeat fresh
- Rate-limit aggressive prewarm when ST is missing
v0.2.5
Flow2API Host Agent v0.2.4
稳定性改进
- Chromium 改为普通服务用户运行,降低 Google 登录风控敏感度
- 移除
--no-sandbox,避免登录页出现 unsupported command line flag 警告 - browser service 改为独立 systemd 持续托管,不再是 oneshot 放飞子进程
- 登录页“重新启动浏览器”按钮统一改为重启 browser service,避免状态不一致
- 保留并验证 token 自动刷新链路:
run-once成功、update-token 成功、写库校验成功
验证
- 确认运行中的 Chromium 不再带
--no-sandbox GET /login返回 200POST /action/launch-browser返回 303 且 browser service 确实重启run-once成功,update_api_success=true,write_verification.verified=true
包含提交
$(git rev-parse --short HEAD)feat(stability): run Chromium as non-root with sandbox-friendly services
Flow2API Host Agent v0.2.3
修复
- 修复
/login页面 500:为模板补充health上下文,解决health is undefined - 补充
python-multipart依赖,避免首次安装后 FastAPI 表单功能不可用
验证
- 本机测试
GET /login返回 200 - 页面可正常渲染
包含提交
3f1abb7fix(web): pass health to login template and add multipart dep
Flow2API Host Agent v0.2.2
变更说明
这次版本重点是把 Host Agent 从“能跑”提升到“更适合长期无人值守运行”。
核心增强
- 软预热优先:默认优先复用浏览器现有登录态,避免频繁触发 Google 重新登录
- 激进兜底:只有拿不到
__Secure-next-auth.session-token时,才主动打开/刷新 Flow 页面 - 写后强校验:不再只看
/api/plugin/update-token返回 200,而是回读 Flow2API 数据库确认写入成功 - ST 指纹比对:对比当前 ST 与库内 ST,避免“假成功”
- 异常页面告警:对
signin / callback error / account chooser等页面显式标记 warning - 自动重试:失败自动重试一次,降低偶发波动影响
Web UI 增强
- 仪表盘新增写后校验、AT 过期时间、页面状态、重试次数、指纹比对等关键信息
- 保留下次刷新时间与倒计时展示
- 配置页保存后自动重启 daemon
- 增强健康检查与运行时一致性
运维增强
- 每日低峰自愈重启 timer(self-heal)
- 更适合长期运行的 README 与使用说明
适合谁升级
- 已部署 Flow2API,并希望在 Linux 宿主机长期自动维护 Google Labs / Flow 登录态的用户
v0.2.1
Flow2API Host Agent v0.2.1
This release improves day-to-day usability for the Host Agent dashboard and fixes a real-world config pitfall.
Highlights
- Saving settings now automatically restarts the daemon so new refresh intervals take effect immediately
- Dashboard now shows the next scheduled refresh time and a live countdown
- Refresh timestamps are now displayed in UTC+8 for easier day-to-day use
What's changed
UX improvements
- Added Next Auto Refresh to the dashboard
- Added a live countdown timer so users can see when the next automatic sync will happen
- Changed displayed refresh times to UTC+8 instead of raw server-time ambiguity
Config behavior fix
- Saving settings from the Web UI now automatically runs:
systemctl restart flow2api-host-agent.service
- This fixes the previous issue where the UI showed a new interval value but the daemon was still running with the old interval until manually restarted
Why this release
Users could be confused when:
- the dashboard appeared to use a different timezone than expected
- changing refresh interval in the UI did not immediately affect the running daemon
- it was unclear when the next automatic refresh would occur
This release resolves those pain points directly.
v0.2.0
Flow2API Host Agent v0.2.0
This release focuses on hardening the project for real-world deployment and reducing common setup mistakes.
Highlights
- Unified runtime handling across Web UI, daemon, and one-shot commands
- Added
/api/healthfor layered diagnostics - Prevented common misconfiguration of
Connection Token - Improved installer to use project-local virtualenv (
.venv) - Expanded README with troubleshooting and deployment guidance
What's changed
Runtime hardening
- Web UI now uses the project virtualenv instead of relying on system
python3 - Reduced false-negative status reporting such as "Chrome not running" when the daemon is actually healthy
Better diagnostics
- Added
healthcommand inscripts/agent.py - Added
health_report()inscripts/core.py - Added
GET /api/healthin the Web UI - Dashboard now shows layered health info instead of a single vague status
Safer configuration UX
- Improved
Connection Tokenguidance in the settings page - Added validation to block URL-shaped values from being saved as token strings
- Improved login page hints for token / noVNC related pitfalls
Installer improvements
install-systemd.shnow creates and uses a local.venv- systemd services now use pinned virtualenv Python / uvicorn paths
- Improved log path conventions and post-install guidance
Documentation
- README refreshed with production-oriented guidance
- Added API / health check usage
- Added troubleshooting for common deployment errors
Upgrade notes
If you already deployed an older version:
- Pull the latest code
- Re-run
bash install-systemd.sh - Restart services:
systemctl restart flow2api-host-agent-uisystemctl restart flow2api-host-agent
- Verify health:
curl http://127.0.0.1:38110/api/health
Previous release
- v0.1.0
v0.1.0
Initial public release of Flow2API Host Agent.
Includes:
- Linux host-side token auto-refresh daemon
- Web UI with dashboard / login guide / settings / help
- noVNC-based login flow
- systemd services and optional daily maintenance timer
- README and example config for standalone deployment