component-version-upgrade
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseComponent Version Upgrade
组件版本升级
Upgrade individual components of the TTS + Telegram bot stack without rebuilding the entire system.
Platform: macOS (Apple Silicon)
无需重建整个系统,即可升级TTS + Telegram机器人栈中的单个组件。
平台:macOS (Apple Silicon)
When to Use This Skill
何时使用此Skill
- User wants to upgrade Kokoro TTS engine, Python dependencies, or the model
- User wants to update bot dependencies (Bun packages)
- User wants to refresh from the plugin bundle
tts_generate.py - User wants to bump the Bun runtime version
- 用户希望升级Kokoro TTS引擎、Python依赖项或模型
- 用户希望更新机器人依赖项(Bun包)
- 用户希望从插件包刷新
tts_generate.py - 用户希望升级Bun运行时版本
Requirements
要求
- installed (
uv)brew install uv - installed and configured
mise - Internet connectivity for package downloads
- Existing installation (run first if not installed)
full-stack-bootstrap
- 已安装(
uv)brew install uv - 已安装并配置
mise - 具备下载包所需的网络连接
- 已完成初始安装(若未安装,先运行)
full-stack-bootstrap
Upgradeable Components
可升级组件
| Component | Command | What It Does |
|---|---|---|
| Kokoro TTS engine | | Upgrades Python deps, re-downloads model, updates version.json |
| Bot dependencies | | Updates Bun packages per package.json |
| tts_generate.py | Re-copy from plugin | Updates the TTS generation script |
| Bun runtime | | Updates the Bun version in mise.toml |
| 组件 | 命令 | 功能说明 |
|---|---|---|
| Kokoro TTS引擎 | | 升级Python依赖项,重新下载模型,更新version.json |
| 机器人依赖项 | | 根据package.json更新Bun包 |
| tts_generate.py | 从插件 | 更新TTS生成脚本 |
| Bun运行时 | | 更新mise.toml中的Bun版本 |
Workflow Phases
工作流阶段
Phase 1: Component Selection
阶段1:组件选择
Ask the user which component to upgrade using AskUserQuestion. Present the four options above.
使用AskUserQuestion询问用户要升级哪个组件,提供上述四个选项。
Phase 2: Pre-Upgrade Health Check
阶段2:升级前健康检查
bash
undefinedbash
undefinedRun health check to establish baseline
运行健康检查以建立基准
~/.local/share/kokoro/../../eon/cc-skills/plugins/tts-telegram-sync/scripts/kokoro-install.sh --health
~/.local/share/kokoro/../../eon/cc-skills/plugins/tts-telegram-sync/scripts/kokoro-install.sh --health
Record current versions
记录当前版本
cat ~/.local/share/kokoro/version.json
undefinedcat ~/.local/share/kokoro/version.json
undefinedPhase 3: Execute Upgrade
阶段3:执行升级
Run the appropriate upgrade command for the selected component.
运行所选组件对应的升级命令。
Phase 4: Post-Upgrade Verification
阶段4:升级后验证
bash
undefinedbash
undefinedHealth check again
再次运行健康检查
kokoro-install.sh --health
kokoro-install.sh --health
Generate test audio to verify TTS still works
生成测试音频以验证TTS功能正常
~/.local/share/kokoro/.venv/bin/python ~/.local/share/kokoro/tts_generate.py
--text "Upgrade verification test" --voice af_heart --lang en-us --speed 1.0
--output /tmp/kokoro-tts-upgrade-test.wav
--text "Upgrade verification test" --voice af_heart --lang en-us --speed 1.0
--output /tmp/kokoro-tts-upgrade-test.wav
undefined~/.local/share/kokoro/.venv/bin/python ~/.local/share/kokoro/tts_generate.py
--text "Upgrade verification test" --voice af_heart --lang en-us --speed 1.0
--output /tmp/kokoro-tts-upgrade-test.wav
--text "Upgrade verification test" --voice af_heart --lang en-us --speed 1.0
--output /tmp/kokoro-tts-upgrade-test.wav
undefinedPhase 5: Bot Restart (if needed)
阶段5:重启机器人(若需要)
If bot dependencies or Bun runtime were upgraded, restart the bot:
bash
pkill -f 'bun.*src/main.ts' || true
cd ~/.claude/automation/claude-telegram-sync && bun --watch run src/main.ts如果升级了机器人依赖项或Bun运行时,重启机器人:
bash
pkill -f 'bun.*src/main.ts' || true
cd ~/.claude/automation/claude-telegram-sync && bun --watch run src/main.tsTodoWrite Task Templates
TodoWrite任务模板
1. [Identify] Present upgradeable components via AskUserQuestion
2. [Preflight] Run health check on target component
3. [Backup] Note current versions (version.json, package.json)
4. [Upgrade] Execute upgrade command
5. [Verify] Run post-upgrade health check
6. [Test] Generate test audio to verify TTS still works
7. [Restart] Restart bot if needed
8. [Report] Show before/after versions1. [识别] 通过AskUserQuestion展示可升级组件
2. [预检] 对目标组件运行健康检查
3. [备份] 记录当前版本(version.json、package.json)
4. [升级] 执行升级命令
5. [验证] 运行升级后健康检查
6. [测试] 生成测试音频以验证TTS功能正常
7. [重启] 若需要则重启机器人
8. [报告] 展示升级前后版本Post-Change Checklist
变更后检查清单
- Health check passes (all 8 checks OK)
- version.json updated with new versions
- Test audio generates and plays correctly
- Bot is running if it was restarted
- 健康检查通过(所有8项检查正常)
- version.json已更新为新版本
- 测试音频可正常生成并播放
- 若重启了机器人,机器人已正常运行
Troubleshooting
故障排除
| Problem | Likely Cause | Fix |
|---|---|---|
| Upgrade fails | No internet or PyPI issue | Check connectivity, retry |
| Model download slow | First-time ~400MB, subsequent cached | Wait for download to complete |
| Version mismatch | Stale version.json | Re-run |
| MPS unavailable after upgrade | torch version incompatibility | |
| Bot won't start after upgrade | Dependency conflict | |
| 问题 | 可能原因 | 解决方法 |
|---|---|---|
| 升级失败 | 无网络或PyPI问题 | 检查网络连接,重试 |
| 模型下载缓慢 | 首次下载约400MB,后续会缓存 | 等待下载完成 |
| 版本不匹配 | version.json过期 | 重新运行 |
| 升级后MPS不可用 | torch版本不兼容 | |
| 升级后机器人无法启动 | 依赖冲突 | |
Reference Documentation
参考文档
- Upgrade Procedures -- Step-by-step upgrade instructions with rollback for each component
- Evolution Log -- Change history for this skill
- 升级流程 -- 每个组件的分步升级说明及回滚方案
- 演进日志 -- 此Skill的变更历史