feat(hermes): add update backup controls

This commit is contained in:
晴天
2026-05-27 02:33:57 +08:00
parent 77ab060e9c
commit 66a23f861c
8 changed files with 365 additions and 4 deletions

View File

@@ -512,6 +512,16 @@ export default {
hermesSessionsMaintenanceRetentionDays: _('已结束会话保留天数', 'Ended-session retention days', '已結束會話保留天數'),
hermesSessionsMaintenanceMinIntervalHours: _('自动维护最小间隔小时', 'Minimum maintenance interval hours', '自動維護最小間隔小時'),
hermesSessionsMaintenanceFootnote: _('这里写入 sessions.*。自动清理只触碰已结束会话,活跃会话由 Hermes 保留VACUUM 会在删除后回收磁盘但可能短暂阻塞写入。旧版 JSON 快照默认关闭,只有外部工具直接读取 ~/.hermes/sessions/session_*.json 时才建议开启。', 'This writes sessions.*. Auto-prune only touches ended sessions; active sessions are preserved by Hermes. VACUUM reclaims disk after deletes but may briefly block writes. Legacy JSON snapshots are off by default; enable them only if an external tool reads ~/.hermes/sessions/session_*.json directly.', '這裡寫入 sessions.*。自動清理只觸碰已結束會話,活躍會話由 Hermes 保留VACUUM 會在刪除後回收磁碟但可能短暫阻塞寫入。舊版 JSON 快照預設關閉,只有外部工具直接讀取 ~/.hermes/sessions/session_*.json 時才建議啟用。'),
hermesUpdatesConfigTitle: _('升级前备份', 'Pre-update backup', '升級前備份'),
hermesUpdatesConfigDesc: _('控制 hermes update 前是否创建完整备份,并限制升级前备份保留数量,降低自动更新失败后的恢复成本。', 'Control whether hermes update creates a full backup first, and cap how many pre-update backups are retained to reduce recovery cost after failed updates.', '控制 hermes update 前是否建立完整備份,並限制升級前備份保留數量,降低自動更新失敗後的復原成本。'),
hermesUpdatesConfigStatusReady: _('结构化配置', 'structured settings', '結構化設定'),
hermesUpdatesConfigSave: _('保存升级备份配置', 'Save update backups', '儲存升級備份設定'),
hermesUpdatesConfigSaveSuccess: _('升级前备份配置已保存,建议重启 Hermes Gateway 生效', 'Pre-update backup settings saved. Restart Hermes Gateway to take effect.', '升級前備份設定已儲存,建議重啟 Hermes Gateway 生效'),
hermesUpdatesConfigLoadFailed: _('加载升级前备份配置失败', 'Load pre-update backup settings failed', '載入升級前備份設定失敗'),
hermesUpdatesConfigSaveFailed: _('保存升级前备份配置失败', 'Save pre-update backup settings failed', '儲存升級前備份設定失敗'),
hermesUpdatesConfigPreUpdateBackup: _('执行 hermes update 前创建完整备份', 'Create a full backup before hermes update', '執行 hermes update 前建立完整備份'),
hermesUpdatesConfigBackupKeep: _('保留升级前备份数量', 'Pre-update backups to keep', '保留升級前備份數量'),
hermesUpdatesConfigFootnote: _('这里写入 updates.*。备份会落在 <HERMES_HOME>/backups/,大目录可能让每次更新慢几分钟;保留数量最少为 1如需关闭升级前备份请关闭开关而不是填 0。其他 updates 高级字段会保留在 raw YAML 中。', 'This writes updates.*. Backups are stored under <HERMES_HOME>/backups/ and large homes may add minutes to each update. Keep count must be at least 1; turn the switch off to disable pre-update backups instead of entering 0. Other advanced updates fields stay in raw YAML.', '這裡寫入 updates.*。備份會落在 <HERMES_HOME>/backups/,大目錄可能讓每次更新慢幾分鐘;保留數量最少為 1如需關閉升級前備份請關閉開關而不是填 0。其他 updates 進階欄位會保留在 raw YAML 中。'),
hermesTerminalConfigTitle: _('终端执行', 'Terminal execution', '終端執行'),
hermesTerminalConfigDesc: _('控制 Hermes 工具命令的执行环境、工作目录、超时和容器资源,避免长任务卡死或沙箱范围误配。', 'Control command execution backend, working directory, timeouts, and container resources to avoid stuck runs or sandbox misconfiguration.', '控制 Hermes 工具命令的執行環境、工作目錄、逾時和容器資源,避免長任務卡死或沙箱範圍誤配。'),
hermesTerminalConfigStatusReady: _('结构化配置', 'structured settings', '結構化設定'),