Files
Nexus/docs/audit/2026-06-13-offline-quick-cmd-telegram.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

2.1 KiB
Raw Blame History

审计 — 快捷命令回车修复 + 离线告警 Telegram 分流

Changelog:

  • docs/changelog/2026-06-13-terminal-quick-cmd-enter-fix.md
  • docs/changelog/2026-06-13-offline-alert-telegram-split.md

设计/计划:

  • docs/design/specs/2026-06-13-offline-alert-telegram-split-design.md
  • docs/design/plans/2026-06-13-offline-alert-telegram-split.md

审计范围

文件 变更 状态
frontend/src/composables/useTerminalQuickCommands.ts formatQuickCmdForSend
frontend/src/composables/terminal/useTerminalSessions.ts execQuickCmd
frontend/src/components/TerminalQuickCommandsSettings.vue 保存不再 append \r
frontend/src/pages/SettingsPage.vue 离线专用 Bot UI
frontend/src/types/api.ts 离线开关文案
frontend/src/utils/auditLabels.ts reveal 审计标签
server/infrastructure/telegram/__init__.py 离线路由
server/api/settings.py offline API + _telegram_fetch_chats
server/config.py TELEGRAM_OFFLINE_*
tests/test_telegram_offline_channel.py
tests/test_terminal_quick_commands.py

Step 3 规则扫描

H 规则 结论
H1 离线 Token 敏感掩码 SAFE — SENSITIVE_KEYS
H2 reveal 审计 SAFE — reveal_offline_telegram_token
H3 半配离线回退默认 Bot SAFE — resolve_offline_telegram_credentials
H4 资源告警不走离线 Bot SAFE — send_telegram_alert 未改
H5 快捷命令 \rtrim() SAFE — 发送时 formatQuickCmdForSend
H6 Layer3 不同步离线 Bot SAFE — 设计 intentional

Closure

H 判定 依据
H1H6 SAFE 代码 + pytest 10/10 + test_ops_patrol_sync 未破坏

DoD

  • pytest tests/test_telegram_offline_channel.py tests/test_terminal_quick_commands.py passed
  • bash scripts/local_verify.sh 26/26
  • changelog / design / audit
  • 无 SECRET_KEY/API_KEY/ENCRYPTION_KEY/DATABASE_URL 变更
  • 前端 vite build 待部署脚本执行