SuperAPI AI 工具集

auto-updater

通用与其它

查看项目

更新于 10-16 06:42

技能介绍

用途:让 ThinkFleetBot 及其已安装技能保持最新,通过每日定时任务自动检查并应用更新,完成后发送更新摘要。

主要能力:设置每日 cron 任务,更新 ThinkFleetBot 本体(通过 thinkfleetbot doctor 或包管理器),更新所有已安装技能(thinkfleet-hub update --all),并向用户发送更新摘要。摘要包含 ThinkFleetBot 版本变化、已更新技能及版本号、已是最新的技能列表和遇到的问题。

使用方式:可让 ThinkFleetBot 直接设置,或手动添加 cron 任务:thinkfleetbot cron add --name "Daily Auto-Update" --cron "0 4 * * *" --tz "America/Los_Angeles" --session isolated --wake now --deliver --message "Run daily auto-updates: check for ThinkFleetBot updates and update all skills. Report what was updated."。默认时间为凌晨 4:00,时区为系统默认,摘要发送到主会话。

更新机制:npm/pnpm/bun 安装使用 npm update -g thinkfleetbot@latest(或 pnpm/bun 对应命令);源码安装使用 thinkfleetbot update;更新后需运行 thinkfleetbot doctor 应用迁移。技能更新使用 thinkfleet-hub update --all。

手动命令:thinkfleet-hub update --all --dry-run 仅检查不应用;thinkfleet-hub list 查看技能版本;thinkfleetbot --version 查看 ThinkFleetBot 版本。

限制与排障:需确保 cron 已启用、Gateway 持续运行;更新失败时摘要会包含错误,常见原因包括权限、网络和包冲突。可通过 thinkfleetbot cron remove "Daily Auto-Update" 移除任务,或在配置中设置 cron.enabled 为 false 临时禁用。