Files
Nexus/docs/design/plans/2026-06-13-offline-alert-telegram-split.md
T
Nexus Agent 821cf12ade fix(terminal,alerts): quick-cmd enter on send and offline Telegram channel
Append CR when executing quick commands (fixes trim stripping saved \r) and
allow optional dedicated Telegram bot for server offline alerts only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-13 01:45:55 +08:00

902 B
Raw Blame History

子机离线告警独立 Telegram — 实施说明

涉及文件

  • server/config.py — 新 settings 属性与 DB_OVERRIDE_MAP
  • server/infrastructure/telegram/__init__.py — 路由与 send_telegram 参数化
  • server/api/settings.py — MUTABLE_KEYS、离线 test/chats/reveal
  • frontend/src/pages/SettingsPage.vue — 离线专用 Bot UI
  • frontend/src/types/api.ts — 离线开关文案
  • frontend/src/utils/auditLabels.ts
  • tests/test_telegram_offline_channel.py

步骤

  1. 后端配置与发送路由
  2. 设置 API 与白名单
  3. 前端设置页「子机离线专用 Bot」区块
  4. pytest + local_verify

回滚

清空 telegram_offline_* 设置或删除 DB 行;离线告警自动回退默认 Bot。

测试要点

  • resolve_offline_telegram_credentials 优先离线、回退主 Bot
  • send_telegram_offline_alert 传入正确 token/chatmock httpx