dsh-config-manager 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/lib/cli/actions.js +2 -3
  2. package/lib/cli/import-source.js +2 -6
  3. package/lib/cli/index.js +2 -3
  4. package/lib/client.d.ts +21 -7
  5. package/lib/client.js +26122 -25799
  6. package/lib/core/exporter.js +2 -4
  7. package/lib/core/host-schedulers/cache-cleanup.d.ts +41 -0
  8. package/lib/core/host-schedulers/cache-cleanup.js +45 -0
  9. package/lib/core/host-schedulers/lifecycle-hooks.d.ts +51 -0
  10. package/lib/core/host-schedulers/lifecycle-hooks.js +78 -0
  11. package/lib/core/host-schedulers/market-cache.d.ts +40 -0
  12. package/lib/core/host-schedulers/market-cache.js +92 -0
  13. package/lib/core/messages-core.d.ts +1 -0
  14. package/lib/core/messages-core.js +2 -0
  15. package/lib/core/migration-history.d.ts +18 -2
  16. package/lib/core/migration-history.js +19 -3
  17. package/lib/core/model-tools.js +2 -6
  18. package/lib/core/restore.d.ts +0 -2
  19. package/lib/core/restore.js +16 -18
  20. package/lib/core/verify-recovery.js +4 -7
  21. package/lib/index.d.ts +3 -22
  22. package/lib/index.js +71 -327
  23. package/lib/profiles/dsh-profile-manager.d.ts +23 -1
  24. package/lib/profiles/dsh-profile-manager.js +70 -2
  25. package/lib/routes/kit.d.ts +21 -0
  26. package/lib/routes/kit.js +29 -0
  27. package/lib/routes/prefs.js +6 -6
  28. package/lib/routes/recovery.js +25 -41
  29. package/lib/routes/route-support.d.ts +23 -1
  30. package/lib/routes/route-support.js +185 -0
  31. package/lib/routes/snapshots.js +4 -11
  32. package/lib/routes/sync.js +5 -7
  33. package/lib/security/redaction.d.ts +5 -1
  34. package/lib/security/redaction.js +26 -23
  35. package/lib/sync/autosync-scheduler.js +6 -2
  36. package/lib/sync/backup-scheduler.js +2 -6
  37. package/lib/sync/baseline-heal.d.ts +35 -0
  38. package/lib/sync/baseline-heal.js +39 -0
  39. package/lib/sync/push-precheck.d.ts +35 -0
  40. package/lib/sync/push-precheck.js +58 -0
  41. package/lib/sync/sync-engine.d.ts +9 -12
  42. package/lib/sync/sync-engine.js +24 -43
  43. package/lib/ui/backup-inspect.d.ts +1 -1
  44. package/lib/ui/dsh-profiles-view.d.ts +0 -10
  45. package/lib/ui/dsh-profiles-view.js +3 -7
  46. package/lib/ui/history-model.js +3 -2
  47. package/lib/ui/overview-view.d.ts +3 -3
  48. package/lib/ui/overview-view.js +9 -1
  49. package/lib/ui/snapshots-view.d.ts +0 -14
  50. package/lib/ui/snapshots-view.js +16 -2
  51. package/lib/utils/paths.d.ts +20 -4
  52. package/lib/utils/paths.js +22 -6
  53. package/lib/utils/time.d.ts +31 -0
  54. package/lib/utils/time.js +54 -0
  55. package/package.json +1 -1
  56. package/src/cli/actions.ts +2 -3
  57. package/src/cli/import-source.ts +2 -7
  58. package/src/cli/index.ts +2 -3
  59. package/src/client/about/AboutPanel.tsx +1 -1
  60. package/src/client/about/ReleaseBody.tsx +22 -52
  61. package/src/client/about/ReleaseNotesDialog.tsx +15 -69
  62. package/src/client/about/release-notes-view.ts +4 -11
  63. package/src/client/common/info-hint-guard.test.ts +11 -5
  64. package/src/client/common/ui.tsx +23 -0
  65. package/src/client/config-manager.module.css +201 -32
  66. package/src/client/css-token-guard.test.ts +135 -1
  67. package/src/client/history/history-locales.ts +2 -0
  68. package/src/client/home/HomePanel.tsx +9 -3
  69. package/src/client/import/ConflictList.tsx +3 -3
  70. package/src/client/import/ImportWizardView.tsx +1 -1
  71. package/src/client/library/ArtifactRow.tsx +2 -2
  72. package/src/client/library/RestorePlanView.tsx +21 -9
  73. package/src/client/library/report-dismiss.test.ts +5 -3
  74. package/src/client/locales/about.ts +97 -0
  75. package/src/client/locales/backup.ts +141 -0
  76. package/src/client/locales/common.ts +113 -0
  77. package/src/client/locales/export.ts +184 -0
  78. package/src/client/locales/foreign.ts +184 -0
  79. package/src/client/locales/import-compat.ts +32 -0
  80. package/src/client/locales/import.ts +192 -0
  81. package/src/client/locales/next-steps.ts +25 -0
  82. package/src/client/locales/overview-control.ts +32 -0
  83. package/src/client/locales/overview.ts +145 -0
  84. package/src/client/locales/profiles.ts +263 -0
  85. package/src/client/locales/report.ts +17 -0
  86. package/src/client/locales/restore.ts +132 -0
  87. package/src/client/locales/sessions.ts +257 -0
  88. package/src/client/locales/shell.ts +149 -0
  89. package/src/client/locales.ts +49 -1781
  90. package/src/client/market/MarketImportReview.tsx +2 -2
  91. package/src/client/market/MarketPanel.tsx +1 -1
  92. package/src/client/market/market-view.ts +3 -5
  93. package/src/client/recovery/RecoveryPanel.tsx +62 -1054
  94. package/src/client/recovery/SessionHealthCard.tsx +134 -0
  95. package/src/client/recovery/SessionHealthDialog.tsx +665 -0
  96. package/src/client/recovery/SessionLayoutSection.tsx +284 -0
  97. package/src/client/recovery/recovery-api.ts +10 -1
  98. package/src/client/recovery/recovery-panel-layout.test.ts +20 -5
  99. package/src/client/recovery/session-dialog-mount.test.ts +16 -9
  100. package/src/client/recovery/use-recovery-write.test.ts +90 -0
  101. package/src/client/recovery/use-recovery-write.ts +53 -0
  102. package/src/client/run-store.ts +57 -2
  103. package/src/client/sync/PushPreviewCard.tsx +2 -2
  104. package/src/client/sync/SyncConfirmView.tsx +5 -5
  105. package/src/client/sync/SyncLogList.tsx +2 -2
  106. package/src/client/sync/history-model.ts +7 -5
  107. package/src/client/sync/sync-locales.ts +2 -0
  108. package/src/client/sync/sync-view.ts +3 -4
  109. package/src/core/exporter.ts +2 -4
  110. package/src/core/host-schedulers/cache-cleanup.test.ts +84 -0
  111. package/src/core/host-schedulers/cache-cleanup.ts +74 -0
  112. package/src/core/host-schedulers/lifecycle-hooks.test.ts +111 -0
  113. package/src/core/host-schedulers/lifecycle-hooks.ts +118 -0
  114. package/src/core/host-schedulers/market-cache.test.ts +93 -0
  115. package/src/core/host-schedulers/market-cache.ts +116 -0
  116. package/src/core/messages-core.ts +2 -0
  117. package/src/core/migration-history.test.ts +19 -0
  118. package/src/core/migration-history.ts +28 -5
  119. package/src/core/model-tools.ts +2 -7
  120. package/src/core/restore-failure-state.test.ts +210 -0
  121. package/src/core/restore.ts +16 -18
  122. package/src/core/verify-recovery.ts +4 -7
  123. package/src/index.ts +78 -332
  124. package/src/profiles/dsh-profile-copy-rollback.test.ts +156 -0
  125. package/src/profiles/dsh-profile-manager.ts +71 -3
  126. package/src/routes/kit.ts +37 -0
  127. package/src/routes/prefs.ts +6 -6
  128. package/src/routes/recovery.ts +25 -42
  129. package/src/routes/route-support.ts +208 -1
  130. package/src/routes/snapshots.ts +4 -9
  131. package/src/routes/sync.ts +4 -7
  132. package/src/security/redaction.ts +29 -23
  133. package/src/sync/autosync-scheduler.test.ts +23 -0
  134. package/src/sync/autosync-scheduler.ts +6 -2
  135. package/src/sync/backup-scheduler.ts +3 -6
  136. package/src/sync/baseline-heal.ts +74 -0
  137. package/src/sync/push-precheck.ts +75 -0
  138. package/src/sync/sync-config.test.ts +24 -13
  139. package/src/sync/sync-engine.test.ts +88 -0
  140. package/src/sync/sync-engine.ts +33 -43
  141. package/src/ui/backup-inspect.ts +1 -1
  142. package/src/ui/dsh-profiles-view.ts +3 -5
  143. package/src/ui/history-model.test.ts +2 -1
  144. package/src/ui/history-model.ts +3 -2
  145. package/src/ui/i18n.test.ts +8 -3
  146. package/src/ui/overview-view.test.ts +12 -0
  147. package/src/ui/overview-view.ts +12 -4
  148. package/src/ui/snapshots-view.ts +2 -2
  149. package/src/utils/paths.test.ts +36 -1
  150. package/src/utils/paths.ts +30 -6
  151. package/src/utils/time.test.ts +46 -0
  152. package/src/utils/time.ts +55 -0
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Config Manager 字典分域 · 外部 agent 导入(Claude Code / Hermes / Cursor / Codex / Copilot / Antigravity)。
3
+ *
4
+ * tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
5
+ * 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
6
+ * 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
7
+ */
8
+ export const zh = {
9
+ // ---------- 外部 agent 导入(2026-10-04:Claude Code / Hermes / Cursor / Codex / Copilot / Antigravity) ----------
10
+ // t16(GUI 静态资产):**契约在先** —— 文案覆盖全部冻结来源(配置类 6 + 会话类 24)与全部 skip 码;
11
+ // t17 的组件只做 key → 文案映射(禁止渲染裸机器码),因此这里必须逐码覆盖,缺一个即「用户看见机器码」。
12
+ 'foreign.source.title': '从其它 agent 导入',
13
+ 'foreign.source.hint': '读取本机已装的其它 agent 配置,先看清将导入什么,再交给既有的导入向导(分析只读,零写入)。',
14
+ 'foreign.source.loading': '正在检测本机配置…',
15
+ 'foreign.source.empty': '未检测到任何可导入的其它 agent 配置。',
16
+ 'foreign.source.unknown': '未识别的来源。',
17
+ // 来源显示名(与 registry 的 labelKey 同源,不得借用 SectionId 名字)
18
+ 'foreign.source.claude-code': 'Claude Code',
19
+ 'foreign.source.hermes': 'Hermes',
20
+ 'foreign.source.cursor': 'Cursor',
21
+ 'foreign.source.codex': 'Codex CLI',
22
+ 'foreign.source.copilot': 'GitHub Copilot CLI',
23
+ 'foreign.source.antigravity': 'Google Antigravity',
24
+ // 会话类来源(档 B,2026-10-05;顺序 = ForeignSourceId union)
25
+ 'foreign.source.gemini': 'Gemini CLI',
26
+ 'foreign.source.reasonix': 'Reasonix',
27
+ 'foreign.source.opencode': 'OpenCode',
28
+ 'foreign.source.mimocode': 'MimoCode',
29
+ 'foreign.source.zcode': 'ZCode',
30
+ 'foreign.source.grokbuild': 'Grok Build',
31
+ 'foreign.source.openclaw': 'OpenClaw',
32
+ 'foreign.source.pi': 'Pi',
33
+ 'foreign.source.kimi': 'Kimi CLI',
34
+ 'foreign.source.kilocode': 'Kilo Code',
35
+ 'foreign.source.qoder': 'Qoder',
36
+ 'foreign.source.chatgpt': 'ChatGPT',
37
+ 'foreign.source.workbuddy': 'WorkBuddy',
38
+ 'foreign.source.qwen': '千问办公',
39
+ 'foreign.source.continue': 'Continue',
40
+ 'foreign.source.cline': 'Cline',
41
+ 'foreign.source.goose': 'Goose',
42
+ 'foreign.source.dsh4': 'DSH 会话日志(V4 代次)',
43
+ 'foreign.source.zed': 'Zed',
44
+ 'foreign.source.crush': 'Crush',
45
+ 'foreign.source.teleagent': 'TeleAgent',
46
+ 'foreign.source.trae': 'Trae',
47
+ 'foreign.source.vibe': 'Vibe',
48
+ 'foreign.source.dsh': 'DSH 会话日志(V0-V3 代次)',
49
+ // 导入过程(复用既有向导:宿主把外部配置翻译成临时 bundle 后走同一条流水线)
50
+ 'foreign.action.import': '开始导入',
51
+ 'foreign.action.refresh': '重新检测',
52
+ 'foreign.importFailed': '导入失败:{reason}',
53
+ 'foreign.previewTitle': '将导入的内容',
54
+ 'foreign.previewSections': '包含分区:{sections}',
55
+ 'foreign.previewDryRun': '只读预览:不会写入任何配置。',
56
+ // F-3:任何输入变化都作废上一次的产包结果(照 dsh-movein 的 resetPreview 语义),
57
+ // 并留下可见反馈 —— 否则用户会以为结果被静默吞掉。
58
+ 'foreign.previewReset': '来源已变化:上一次的产包结果作废,请重新「开始导入」。',
59
+ // 三类已知有损(F-5)的**卡片 chrome**(标题 / 导语 / 适用性徽章);逐条文案在
60
+ // src/ui/i18n.ts(由 src/ui/foreign-view.ts 的 foreignLossyRows 渲染)。
61
+ 'foreign.lossy.title': '已知有损',
62
+ 'foreign.lossy.hint': '下面三条是「外部配置 → bundle → 导入」这条流水线的既有行为:都不阻断导入,兼容性评分也不会为它们给出原因。',
63
+ 'foreign.lossy.applies': '本包适用',
64
+ 'foreign.lossy.notApplies': '本包不涉及',
65
+ 'foreign.credentialRefs': '需补录凭据 {count} 项(值未带出)',
66
+ 'foreign.credentialRefsNone': '无需补录凭据',
67
+ // 未迁移内容(机器码 → 文案;键名 = 'foreign.skip.<机器码>',缺键即编译期红灯)
68
+ 'foreign.skipped': '未迁移 {count} 项',
69
+ 'foreign.skip.unsupported-hooks': 'settings 的 hooks:DSH 无对等结构,未迁移',
70
+ 'foreign.skip.unsupported-commands': '斜杠命令:与 DSH 提示词不是同一语义,本次未迁移',
71
+ 'foreign.skip.credentials-not-migrated': '凭据字段只记录名字,值不读取也不迁移',
72
+ 'foreign.skip.skill-missing-file': '技能目录缺少 SKILL.md,未迁移',
73
+ 'foreign.skip.skill-invalid-frontmatter': '技能 frontmatter 非法(缺 name/description 或不是合法 YAML),DSH 会静默丢弃,故未迁移',
74
+ 'foreign.skip.skill-invalid-name': '技能名含非法字符或路径穿越,未迁移',
75
+ 'foreign.skip.mcp-server-empty': 'MCP 条目既无 command 也无 url,未迁移',
76
+ 'foreign.skip.mcp-type-sse-coerced': 'MCP type=sse:按带 url 的 http 处理',
77
+ 'foreign.skip.mcp-credential-redacted': 'MCP 值里发现凭据字段:值已丢弃,只保留字段名与引用名',
78
+ 'foreign.skip.source-unreadable': '外部文件读不到、超限或解析失败',
79
+ 'foreign.skip.source-empty-file': '配置文件存在但为空(0 字节):如实上报,不产出空分区',
80
+ 'foreign.skip.source-location-overridden': '配置位置被环境变量覆盖,按覆盖后的位置读取',
81
+ 'foreign.skip.session-cwd-derived': '会话记录里没有 cwd:按源侧目录名推导出工作目录,且该目录在本机确实存在(推不出来的一律按「缺少 cwd」跳过)',
82
+ 'foreign.skip.source-needs-explicit-path': '该来源没有自动探测位置:必须显式提供导出文件路径(自动探测永远不会命中)',
83
+ 'foreign.skip.session-format-version-unknown': '本机 DSH 会话格式版本未知:不猜版本,整批会话未迁移',
84
+ 'foreign.skip.session-format-unsupported': '本机 DSH 会话格式版本不受支持,该会话未迁移',
85
+ 'foreign.skip.session-missing-cwd': '会话记录缺少 cwd,无法归位到工作区',
86
+ 'foreign.skip.session-unsafe-id': '会话文件名不能作为安全路径段,未迁移',
87
+ 'foreign.skip.session-empty': '会话没有任何可迁移的事件',
88
+ 'foreign.skip.session-unparsable': '会话存在解析不出来的行,未迁移',
89
+ 'foreign.skip.unsupported-session-record': '该类型的会话记录本版不迁移',
90
+ 'foreign.skip.session-id-conflict': '同 id 会话已存在:不覆盖,跳过并保留本机既有的那条',
91
+ 'foreign.skip.skill-id-conflict': '技能重名:先到先得,其余跳过',
92
+ 'foreign.skip.sessions-not-migrated': '该来源的对话存储形态本版不迁移(只报告,不产出会话分区)',
93
+ 'foreign.skip.memory-report-only': '记忆文件只报告、不导入(正文不进备份包)',
94
+ 'foreign.skip.skill-category-flattened': '技能带分类层级:已压平为 DSH 的单层技能目录',
95
+ 'foreign.skip.legacy-rules-file': '旧式规则文件:DSH 无对等结构,只报告',
96
+ 'foreign.skip.instructions-merged': '多份指令源被合并为一个全局指令文件',
97
+ 'foreign.skip.instructions-override-selected': '命中更高优先级的指令文件(override),按它导入',
98
+ // 冲突语义(用户决策:同 id 不覆盖、跳过并报码)
99
+ 'foreign.conflict.policy': '同 id 冲突不覆盖本机内容:跳过并逐条报告',
100
+ } as const;
101
+
102
+ export const en: Record<keyof typeof zh, string> = {
103
+ // ---------- Importing from other agents (2026-10-04) ----------
104
+ 'foreign.source.title': 'Import from another agent',
105
+ 'foreign.source.hint': 'Read the other agents installed on this machine, review what will be imported, then hand it to the existing import wizard (analysis is read-only, zero writes).',
106
+ 'foreign.source.loading': 'Detecting local configuration…',
107
+ 'foreign.source.empty': 'No importable configuration from another agent was detected.',
108
+ 'foreign.source.unknown': 'Unrecognised source.',
109
+ 'foreign.source.claude-code': 'Claude Code',
110
+ 'foreign.source.hermes': 'Hermes',
111
+ 'foreign.source.cursor': 'Cursor',
112
+ 'foreign.source.codex': 'Codex CLI',
113
+ 'foreign.source.copilot': 'GitHub Copilot CLI',
114
+ 'foreign.source.antigravity': 'Google Antigravity',
115
+ // Conversation sources (cohort B, 2026-10-05): same order as the ForeignSourceId union
116
+ 'foreign.source.gemini': 'Gemini CLI',
117
+ 'foreign.source.reasonix': 'Reasonix',
118
+ 'foreign.source.opencode': 'OpenCode',
119
+ 'foreign.source.mimocode': 'MimoCode',
120
+ 'foreign.source.zcode': 'ZCode',
121
+ 'foreign.source.grokbuild': 'Grok Build',
122
+ 'foreign.source.openclaw': 'OpenClaw',
123
+ 'foreign.source.pi': 'Pi',
124
+ 'foreign.source.kimi': 'Kimi CLI',
125
+ 'foreign.source.kilocode': 'Kilo Code',
126
+ 'foreign.source.qoder': 'Qoder',
127
+ 'foreign.source.chatgpt': 'ChatGPT',
128
+ 'foreign.source.workbuddy': 'WorkBuddy',
129
+ 'foreign.source.qwen': 'Qwen Work',
130
+ 'foreign.source.continue': 'Continue',
131
+ 'foreign.source.cline': 'Cline',
132
+ 'foreign.source.goose': 'Goose',
133
+ 'foreign.source.dsh4': 'DSH session logs (V4)',
134
+ 'foreign.source.zed': 'Zed',
135
+ 'foreign.source.crush': 'Crush',
136
+ 'foreign.source.teleagent': 'TeleAgent',
137
+ 'foreign.source.trae': 'Trae',
138
+ 'foreign.source.vibe': 'Vibe',
139
+ 'foreign.source.dsh': 'DSH session logs (V0-V3)',
140
+ 'foreign.action.import': 'Start import',
141
+ 'foreign.action.refresh': 'Detect again',
142
+ 'foreign.importFailed': 'Import failed: {reason}',
143
+ 'foreign.previewTitle': 'What will be imported',
144
+ 'foreign.previewSections': 'Sections included: {sections}',
145
+ 'foreign.previewDryRun': 'Read-only preview: nothing is written.',
146
+ 'foreign.previewReset': 'The source changed: the last preview was discarded — start the import again.',
147
+ 'foreign.lossy.title': 'Known lossy behaviour',
148
+ 'foreign.lossy.hint': 'These three behaviours are built into the "external config → bundle → import" pipeline: none of them blocks the import, and the compatibility score never explains them.',
149
+ 'foreign.lossy.applies': 'Applies here',
150
+ 'foreign.lossy.notApplies': 'Not applicable here',
151
+ 'foreign.credentialRefs': '{count} {count, plural, credential|credentials} to re-enter (values never travel)',
152
+ 'foreign.credentialRefsNone': 'No credentials to enter',
153
+ 'foreign.skipped': '{count} {count, plural, item|items} not migrated',
154
+ 'foreign.skip.unsupported-hooks': 'settings hooks: DSH has no equivalent, not migrated',
155
+ 'foreign.skip.unsupported-commands': 'Slash commands: not the same thing as DSH prompts, not migrated this round',
156
+ 'foreign.skip.credentials-not-migrated': 'Credential fields: only the names are recorded; the values are never read or migrated',
157
+ 'foreign.skip.skill-missing-file': 'Skill directory has no SKILL.md, not migrated',
158
+ 'foreign.skip.skill-invalid-frontmatter': 'Skill frontmatter is invalid (missing name/description or not valid YAML) and DSH would silently drop it, so it was not migrated',
159
+ 'foreign.skip.skill-invalid-name': 'Skill name has illegal characters or path traversal, not migrated',
160
+ 'foreign.skip.mcp-server-empty': 'MCP entry has neither command nor url, not migrated',
161
+ 'foreign.skip.mcp-type-sse-coerced': 'MCP type=sse: treated as http with a url',
162
+ 'foreign.skip.mcp-credential-redacted': 'Credential field found in an MCP value: the value was dropped, only the field name and reference name are kept',
163
+ 'foreign.skip.source-unreadable': 'External file unreadable, over the size limit, or failed to parse',
164
+ 'foreign.skip.source-empty-file': 'Config file exists but is empty (0 bytes): reported as-is, no empty section is produced',
165
+ 'foreign.skip.source-location-overridden': 'Config location overridden by an environment variable; the overridden location was used',
166
+ 'foreign.skip.session-cwd-derived': 'The session record has no cwd: the working directory was derived from the source-side path and verified to exist on this machine (anything unprovable is skipped as a missing cwd)',
167
+ 'foreign.skip.source-needs-explicit-path': 'This source has no auto-detected location: you must supply the export file path explicitly (auto-detection never matches)',
168
+ 'foreign.skip.session-format-version-unknown': 'This DSH build reports no session format version: the version is never guessed, so no session was migrated',
169
+ 'foreign.skip.session-format-unsupported': 'This DSH build does not support that session format version, so the session was not migrated',
170
+ 'foreign.skip.session-missing-cwd': 'Session record has no cwd, so it cannot be placed under a workspace',
171
+ 'foreign.skip.session-unsafe-id': 'Session file name is not a safe path segment, not migrated',
172
+ 'foreign.skip.session-empty': 'Session has no migratable events',
173
+ 'foreign.skip.session-unparsable': 'Session has lines that cannot be parsed, not migrated',
174
+ 'foreign.skip.unsupported-session-record': 'This kind of session record is not migrated in this version',
175
+ 'foreign.skip.session-id-conflict': 'A session with the same id already exists: it is skipped without overwriting, and the local one is kept',
176
+ 'foreign.skip.skill-id-conflict': 'Duplicate skill name: first one wins, the rest are skipped',
177
+ 'foreign.skip.sessions-not-migrated': 'This source stores conversations in a form this version does not migrate (reported only; no sessions section is produced)',
178
+ 'foreign.skip.memory-report-only': 'Memory files are reported only, never imported (their text does not enter the bundle)',
179
+ 'foreign.skip.skill-category-flattened': 'Skill carried category levels: flattened into DSH\'s single-level skill folders',
180
+ 'foreign.skip.legacy-rules-file': 'Legacy rules file: DSH has no equivalent, reported only',
181
+ 'foreign.skip.instructions-merged': 'Several instruction sources were merged into one global instruction file',
182
+ 'foreign.skip.instructions-override-selected': 'A higher-priority instruction file (override) was found and is the one imported',
183
+ 'foreign.conflict.policy': 'Same-id conflicts never overwrite local content: skipped and listed in the report',
184
+ };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Config Manager 字典分域 · 导入兼容性评分(Workbench Rebuild)。
3
+ *
4
+ * tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
5
+ * 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
6
+ * 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
7
+ */
8
+ export const zh = {
9
+ // —— 导入兼容性(Workbench Rebuild)——
10
+ 'import.compatibility.sections': '{count} 个分区',
11
+ 'import.compatibility.plugins': '已装 {installed} · 待装 {toInstall}',
12
+ 'import.compatibility.paths': '{count} 项路径处理',
13
+ 'import.compatibility.secrets': '{count} 项密钥补录',
14
+ 'import.compatibility.score.excellent': '优秀',
15
+ 'import.compatibility.score.good': '良好',
16
+ 'import.compatibility.score.partial': '部分兼容',
17
+ 'import.compatibility.score.unsupported': '不支持',
18
+ 'import.compatibility.sectionsTitle': '备份包含的分区',
19
+ } as const;
20
+
21
+ export const en: Record<keyof typeof zh, string> = {
22
+ // —— Import compatibility (Workbench Rebuild) ——
23
+ 'import.compatibility.sections': '{count} {count, plural, section|sections}',
24
+ 'import.compatibility.plugins': 'installed {installed} · to install {toInstall}',
25
+ 'import.compatibility.paths': '{count} path {count, plural, issue|issues}',
26
+ 'import.compatibility.secrets': '{count} {count, plural, secret|secrets} to re-enter',
27
+ 'import.compatibility.score.excellent': 'Excellent',
28
+ 'import.compatibility.score.good': 'Good',
29
+ 'import.compatibility.score.partial': 'Partial',
30
+ 'import.compatibility.score.unsupported': 'Unsupported',
31
+ 'import.compatibility.sectionsTitle': 'Sections in this backup',
32
+ };
@@ -0,0 +1,192 @@
1
+ /**
2
+ * Config Manager 字典分域 · 导入(计划、执行、冲突与导入向导)。
3
+ *
4
+ * tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
5
+ * 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
6
+ * 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
7
+ */
8
+ export const zh = {
9
+ // —— 导入 ——
10
+ 'import.stage.select': '选择',
11
+ 'import.stage.analyze': '分析',
12
+ 'import.stage.decide': '预览与决策',
13
+ 'import.stage.confirm': '确认',
14
+ 'import.stage.execute': '执行',
15
+ 'import.stage.done': '完成',
16
+ 'import.stepper.label': '第 {current} 步,共 {total} 步:{label}',
17
+ 'import.select.title': '选择备份文件',
18
+ 'import.select.hint': '选择本机导出的 dsh-config-*.zip 备份文件开始导入。分析阶段只读,不会修改任何配置。',
19
+ 'import.select.browse': '选择 ZIP 文件',
20
+ 'import.select.reselect': '重新选择',
21
+ 'import.select.cancel': '取消选择',
22
+ 'import.select.file': '已选择:{name}',
23
+ 'import.compatibility.title': '兼容性',
24
+ 'import.compatibility.score': '兼容性评分:{score}',
25
+ 'import.preview.title': '导入预览',
26
+ 'import.preview.willChange': '将变更 {count} 项',
27
+ 'import.preview.unchanged': '已一致跳过 {count} 项',
28
+ 'import.preview.settings': '设置更新 {count}',
29
+ 'import.preview.plugins': '插件待安装 {count}',
30
+ 'import.preview.mcp': 'MCP 新增 {count}',
31
+ 'import.preview.prompts': '提示词 {count}',
32
+ 'import.preview.paths': '路径映射 {count}',
33
+ 'import.preview.rebase': '已自动重定基(备份来自另一台机器的基础路径):{from} → {to};这一步不需要手工映射',
34
+ 'import.preview.secrets': '密钥待补录 {count}',
35
+ 'import.preview.conflicts': '冲突 {count}',
36
+ 'import.preview.restart': '导入后需重启 DSH 生效',
37
+ 'import.confirm.execute': '确认导入',
38
+ 'import.confirm.warning': '导入会修改当前 DSH 配置,执行前自动创建快照。',
39
+ 'import.confirm.warningNoRollback': '导入会修改当前 DSH 配置,执行前自动创建快照;已取消整体回滚 —— 单项失败会继续,已写入内容不回退。',
40
+ 'import.confirm.encrypted': '将用备份密码解密并恢复 {count} 个凭据。',
41
+ 'import.rollbackOnError': '失败时整体回滚(推荐)',
42
+ 'import.log.title': '导入日志',
43
+ 'import.log.empty': '等待命令输出…',
44
+ 'import.log.newOutput': '↓ 新输出',
45
+ // 日志表头计数(把 500 行流水压成「成功/跳过/警告/失败」四个数)
46
+ 'import.log.counts': '成功 {ok} · 跳过 {skip} · 警告 {warn} · 失败 {fail}',
47
+ 'import.log.filterProblems': '只看问题',
48
+ 'import.log.filterAll': '显示全部',
49
+ 'import.log.problemsEmpty': '本次没有失败或警告的项',
50
+ // 结果页固定操作栏的收尾动作(替代原先埋在报告卡底部、被布局裁掉的「完成」)
51
+ 'import.done': '完成',
52
+ 'import.skipCurrent': '跳过当前插件',
53
+ 'import.skipPending': '正在跳过…',
54
+ 'import.retrySkipped': '重试失败/跳过的项 ({count})',
55
+ 'import.secrets.title': '补录密钥',
56
+ 'import.secrets.hint': '以下凭据未随备份导出(安全设计)。如需在目标 DSH 使用,请手动补录;留空将跳过。',
57
+ 'import.secrets.optional': '(可选)',
58
+ 'import.secrets.required': '(必需)',
59
+ 'import.secrets.none': '无需补录密钥',
60
+ 'import.decrypt.badge': '加密备份',
61
+ 'import.decryptArchive.title': '解锁加密备份',
62
+ 'import.decryptArchive.hint': '此备份已整体加密(整个文件被密码保护)。输入导出时设置的密码即可解密并继续导入——备份内的加密凭据也会用同一密码自动恢复,全程只需输入这一次密码;密码仅本次使用,绝不落盘。',
63
+ 'import.decryptArchive.passwordPlaceholder': '输入备份加密密码',
64
+ 'import.decryptArchive.unlock': '解锁并继续',
65
+ 'import.decrypt.previewHint': '加密备份:凭据已由解锁密码自动恢复,无需再次输入密码。',
66
+ 'import.conflicts.title': '解决冲突',
67
+ 'import.conflicts.hint': '以下配置项在目标 DSH 已存在且与备份不同,请逐项决策。',
68
+ 'import.conflicts.keepCurrent': '保留当前',
69
+ 'import.conflicts.useImported': '使用备份',
70
+ 'import.conflicts.review': '稍后决定',
71
+ 'import.conflicts.severityError': '错误',
72
+ 'import.conflicts.detailCurrent': '当前',
73
+ 'import.conflicts.detailImported': '备份',
74
+ 'import.conflicts.empty': '无冲突项',
75
+ 'import.conflicts.unresolved': '还有 {count} 项未决策',
76
+ 'import.conflicts.keepCurrentAll': '全部保留当前配置',
77
+ 'import.conflicts.useImportedAll': '全部使用备份配置',
78
+ 'import.paths.title': '路径映射',
79
+ 'import.paths.hint': '备份中的绝对路径在目标机器可能不存在,请为每条路径指定新位置(留空将跳过该路径)。',
80
+ 'import.paths.old': '原路径',
81
+ 'import.paths.new': '新路径',
82
+ // 路径来源徽章:此前直接渲染 core 的枚举字面量(kind:missing / platformMismatch),
83
+ // 用户读成「源路径不存在」——missing 的真实语义是「需为本机指定新位置」(core 不做存在性探测)。
84
+ 'import.paths.kind.missing': '需指定新位置',
85
+ 'import.paths.kind.platformMismatch': '跨平台路径',
86
+ 'import.paths.kind.homeMismatch': '基础路径不同',
87
+ 'import.paths.unresolved': '还有 {count} 条路径未映射(留空将跳过该路径,可以继续)',
88
+ 'import.paths.empty': '无需映射路径',
89
+ // 「选择本机路径」弹窗(第③项):浏览器拿不到本机真实路径,目录列举走宿主只读端点
90
+ 'import.paths.browse': '选择本机路径',
91
+ 'import.paths.picker.title': '选择本机路径',
92
+ 'import.paths.picker.up': '上一层',
93
+ 'import.paths.picker.home': '主目录',
94
+ 'import.paths.picker.thisPc': '此电脑',
95
+ 'import.paths.picker.useCurrent': '使用当前目录',
96
+ 'import.paths.picker.empty': '这个目录里没有可进入的项',
97
+ 'import.paths.picker.truncated': '只显示前 {count} 项',
98
+ 'import.paths.picker.notFound': '这个路径不存在(已为你打开上一级)',
99
+ 'import.paths.picker.denied': '没有读取这个目录的权限',
100
+ 'import.paths.picker.notAbsolute': '请填绝对路径(如 D:\\ 或 /)',
101
+ 'import.paths.picker.failed': '读取这个目录失败',
102
+ } as const;
103
+
104
+ export const en: Record<keyof typeof zh, string> = {
105
+ 'import.stage.select': 'Select',
106
+ 'import.stage.analyze': 'Analyze',
107
+ 'import.stage.decide': 'Preview & decide',
108
+ 'import.stage.confirm': 'Confirm',
109
+ 'import.stage.execute': 'Execute',
110
+ 'import.stage.done': 'Done',
111
+ 'import.stepper.label': 'Step {current} of {total}: {label}',
112
+ 'import.select.title': 'Select Backup File',
113
+ 'import.select.hint': 'Pick a dsh-config-*.zip backup exported from DSH to begin. Analysis is read-only and changes nothing.',
114
+ 'import.select.browse': 'Choose ZIP file',
115
+ 'import.select.reselect': 'Reselect',
116
+ 'import.select.cancel': 'Cancel selection',
117
+ 'import.select.file': 'Selected: {name}',
118
+ 'import.compatibility.title': 'Compatibility',
119
+ 'import.compatibility.score': 'Compatibility score: {score}',
120
+ 'import.preview.title': 'Import Preview',
121
+ 'import.preview.willChange': '{count} {count, plural, item|items} will change',
122
+ 'import.preview.unchanged': '{count} {count, plural, item|items} already identical (skipped)',
123
+ 'import.preview.settings': '{count} settings {count, plural, update|updates}',
124
+ 'import.preview.plugins': '{count} {count, plural, plugin|plugins} to install',
125
+ 'import.preview.mcp': '{count} MCP {count, plural, server|servers} added',
126
+ 'import.preview.prompts': '{count} {count, plural, prompt|prompts}',
127
+ 'import.preview.paths': '{count} path {count, plural, mapping|mappings} needed',
128
+ 'import.preview.rebase': 'Base path rebased automatically (the backup came from a machine with a different DSH base path): {from} -> {to}; no manual mapping needed',
129
+ 'import.preview.secrets': '{count} {count, plural, secret|secrets} to re-enter',
130
+ 'import.preview.conflicts': '{count} {count, plural, conflict|conflicts}',
131
+ 'import.preview.restart': 'A DSH restart is required after import',
132
+ 'import.confirm.execute': 'Confirm Import',
133
+ 'import.confirm.warning': 'Import modifies the current DSH configuration; a snapshot is taken first.',
134
+ 'import.confirm.warningNoRollback': 'Import modifies the current DSH configuration; a snapshot is taken first. Bulk rollback is off — a failure does not stop the rest, and writes are not reverted.',
135
+ 'import.confirm.encrypted': 'The backup password will decrypt and restore {count} {count, plural, credential|credentials}.',
136
+ 'import.rollbackOnError': 'Roll back everything on failure (recommended)',
137
+ 'import.log.title': 'Import Log',
138
+ 'import.log.empty': 'Waiting for command output…',
139
+ 'import.log.newOutput': '↓ New output',
140
+ 'import.log.counts': '{ok} ok · {skip} skipped · {warn} warned · {fail} failed',
141
+ 'import.log.filterProblems': 'Problems only',
142
+ 'import.log.filterAll': 'Show all',
143
+ 'import.log.problemsEmpty': 'No failed or warned items in this import',
144
+ 'import.done': 'Done',
145
+ 'import.skipCurrent': 'Skip current plugin',
146
+ 'import.skipPending': 'Skipping…',
147
+ 'import.retrySkipped': 'Retry failed/skipped items ({count})',
148
+ 'import.secrets.title': 'Re-enter Secrets',
149
+ 'import.secrets.hint': 'These credentials were not exported with the backup (security by design). Enter them manually to use them here; leave blank to skip.',
150
+ 'import.secrets.optional': '(optional)',
151
+ 'import.secrets.required': '(required)',
152
+ 'import.secrets.none': 'No secrets required',
153
+ 'import.decrypt.badge': 'encrypted backup',
154
+ 'import.decryptArchive.title': 'Unlock Encrypted Backup',
155
+ 'import.decryptArchive.hint': 'This backup is fully encrypted (the whole file is password-protected). Enter the password set at export time to decrypt and continue — encrypted credentials inside are restored with the same password, so this is the only password prompt. It is used once and never written to disk.',
156
+ 'import.decryptArchive.passwordPlaceholder': 'Enter backup encryption password',
157
+ 'import.decryptArchive.unlock': 'Unlock & Continue',
158
+ 'import.decrypt.previewHint': 'Encrypted backup: credentials are restored automatically by the unlock password — no further password prompt.',
159
+ 'import.conflicts.title': 'Resolve Conflicts',
160
+ 'import.conflicts.hint': 'These items already exist on this machine and differ from the backup. Decide per item.',
161
+ 'import.conflicts.keepCurrent': 'Keep current',
162
+ 'import.conflicts.useImported': 'Use backup',
163
+ 'import.conflicts.review': 'Decide later',
164
+ 'import.conflicts.severityError': 'Error',
165
+ 'import.conflicts.detailCurrent': 'Current',
166
+ 'import.conflicts.detailImported': 'Backup',
167
+ 'import.conflicts.empty': 'No conflicts',
168
+ 'import.conflicts.unresolved': '{count} {count, plural, item|items} unresolved',
169
+ 'import.conflicts.keepCurrentAll': 'Keep all current',
170
+ 'import.conflicts.useImportedAll': 'Use all backup',
171
+ 'import.paths.title': 'Path Mapping',
172
+ 'import.paths.hint': 'Absolute paths in the backup may not exist on this machine. Map each path to a new location (leave blank to skip).',
173
+ 'import.paths.old': 'Original path',
174
+ 'import.paths.new': 'New path',
175
+ 'import.paths.kind.missing': 'Set a new location',
176
+ 'import.paths.kind.platformMismatch': 'Cross-platform path',
177
+ 'import.paths.kind.homeMismatch': 'Different base path',
178
+ 'import.paths.unresolved': '{count} {count, plural, path|paths} unmapped (blank = skip that path, you can continue)',
179
+ 'import.paths.empty': 'No paths to map',
180
+ 'import.paths.browse': 'Choose a local path',
181
+ 'import.paths.picker.title': 'Choose a local path',
182
+ 'import.paths.picker.up': 'Up one level',
183
+ 'import.paths.picker.home': 'Home folder',
184
+ 'import.paths.picker.thisPc': 'This PC',
185
+ 'import.paths.picker.useCurrent': 'Use this folder',
186
+ 'import.paths.picker.empty': 'Nothing to open in this folder',
187
+ 'import.paths.picker.truncated': 'Showing the first {count} entries',
188
+ 'import.paths.picker.notFound': 'That path does not exist (opened its parent instead)',
189
+ 'import.paths.picker.denied': 'No permission to read this folder',
190
+ 'import.paths.picker.notAbsolute': 'Enter an absolute path (e.g. D:\\ or /)',
191
+ 'import.paths.picker.failed': 'Could not read this folder',
192
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Config Manager 字典分域 · 导入 / 同步后的收尾清单。
3
+ *
4
+ * tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
5
+ * 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
6
+ * 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
7
+ */
8
+ export const zh = {
9
+ // —— 导入/同步后收尾清单(P0-① / P2-⑪)——
10
+ 'nextSteps.title': '接下来需要处理',
11
+ 'nextSteps.done': '全部完成,无需额外处理',
12
+ 'nextSteps.restart.hint': '需重启 DSH 后生效({count}):',
13
+ 'nextSteps.secrets.hint': '未随备份导出、需在本机补录的凭据({count}):',
14
+ 'nextSteps.unresolved.hint': '未成功应用({count}),可用下方按钮重试:',
15
+ } as const;
16
+
17
+ export const en: Record<keyof typeof zh, string> = {
18
+ // —— Sync status facts (Workbench Rebuild) ——
19
+ // Import/sync next-steps checklist (P0-① / P2-⑪)
20
+ 'nextSteps.title': 'Next steps',
21
+ 'nextSteps.done': 'All done — nothing else to handle',
22
+ 'nextSteps.restart.hint': 'Take effect after restarting DSH ({count}):',
23
+ 'nextSteps.secrets.hint': 'Not exported with the backup — re-enter on this machine ({count}):',
24
+ 'nextSteps.unresolved.hint': 'Not applied ({count}) — retry with the button below:',
25
+ };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Config Manager 字典分域 · 总览控制中心(结果列、活动复制、分区导航)。
3
+ *
4
+ * tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
5
+ * 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
6
+ * 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
7
+ */
8
+ export const zh = {
9
+ // —— Overview 控制中心(Workbench Rebuild v2)——
10
+ 'overview.result.success': '成功',
11
+ 'overview.result.failed': '失败',
12
+ 'overview.result.skipped': '跳过',
13
+ 'overview.result.pending': '待裁决',
14
+ 'overview.activity.copy': '复制',
15
+ 'overview.activity.redacted': '(文件名已脱敏)',
16
+ 'overview.sections.entries': '{count} 项',
17
+ 'overview.nav.activity': '活动',
18
+ 'overview.nav.about': '关于',
19
+ } as const;
20
+
21
+ export const en: Record<keyof typeof zh, string> = {
22
+ // —— Overview control center (Workbench Rebuild v2) ——
23
+ 'overview.result.success': 'OK',
24
+ 'overview.result.failed': 'Failed',
25
+ 'overview.result.skipped': 'Skipped',
26
+ 'overview.result.pending': 'Needs decision',
27
+ 'overview.activity.copy': 'Copy',
28
+ 'overview.activity.redacted': '(filename redacted)',
29
+ 'overview.sections.entries': '{count} {count, plural, item|items}',
30
+ 'overview.nav.activity': 'Activity',
31
+ 'overview.nav.about': 'About',
32
+ };
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Config Manager 字典分域 · 总览(首页)健康、指标、活动表与空态。
3
+ *
4
+ * tech-debt #22(2026-11 拆分):本文件只承载该域键值;聚合与键顺序由 ../locales.ts 编排。
5
+ * 约束:zh 文案逐字保留、en 一键一镜像(`Record<keyof typeof zh, string>` 编译期校验),
6
+ * 键集合由 src/core/engine-locale.test.ts 的既有键冻结指纹兜底。本文件零依赖、零 import。
7
+ */
8
+ export const zh = {
9
+ // —— 总览(Overview,2026-09 UX 重构)——
10
+ 'overview.health.ok': '配置状态良好',
11
+ 'overview.health.noBackup': '尚无任何备份',
12
+ 'overview.health.scheduleFailed': '上次定时备份失败,建议检查备份设置',
13
+ 'overview.health.recovery': '存在未解决的恢复事项,需要处理',
14
+ 'overview.health.autoBackupOff': '自动备份已关闭,目前只有手动备份',
15
+ 'overview.health.recoveryAction': '前往「事故恢复」处理',
16
+ 'overview.metric.backups': '备份文件',
17
+ 'overview.metric.snapshots': '安全快照',
18
+ 'overview.metric.schedule': '定时备份',
19
+ 'overview.metric.sync': '远程同步',
20
+ 'overview.state.on': '开启',
21
+ 'overview.state.off': '关闭',
22
+ 'overview.meta.lastBackup': '最近:{time}',
23
+ 'overview.meta.noBackup': '尚无记录',
24
+ 'overview.meta.scheduleOn': '已开启 · 上次 {time}',
25
+ 'overview.meta.scheduleOff': '未开启(建议开启自动保护)',
26
+ 'overview.meta.scheduleFail': '上次备份失败',
27
+ 'overview.meta.syncOn': '已配置 · 上次 {time}',
28
+ 'overview.meta.syncOff': '未配置',
29
+ 'overview.meta.syncUnavailable': '读取超时',
30
+ 'overview.meta.never': '从未运行',
31
+ 'overview.time.now': '刚刚',
32
+ 'overview.time.min': '{n} 分钟前',
33
+ 'overview.time.hour': '{n} 小时前',
34
+ 'overview.time.day': '{n} 天前',
35
+ 'overview.quick.backup': '立即备份',
36
+ 'overview.quick.backupDone': '备份完成',
37
+ // issue #43:宿主对 skipped/failed 也回 200 + ok:true,提示通道由 run.status 决定(文案按 skipReason 区分)
38
+ 'overview.quick.backupSkippedDisabled': '已跳过:定时备份未启用(没有生成任何备份文件)',
39
+ 'overview.quick.backupSkippedRunning': '已跳过:上一次备份仍在进行中',
40
+ 'overview.quick.backupSkippedConflict': '已跳过:另一项任务正在执行(防重)',
41
+ 'overview.quick.backupSkippedLocked': '已跳过:环境锁被占用(另一项任务进行中,或存在需回收的残留锁)',
42
+ 'overview.quick.backupSkippedOther': '已跳过:备份服务当前无法执行(详情见宿主日志)',
43
+ 'overview.quick.backupFailed': '备份失败:{message}',
44
+ 'overview.activity.title': '最近活动',
45
+ 'overview.activity.colTime': '时间',
46
+ 'overview.activity.colEvent': '动作',
47
+ 'overview.activity.colDetail': '详情',
48
+ 'overview.activity.colResult': '结果',
49
+ 'overview.activity.empty': '暂无操作记录',
50
+ 'overview.activity.unavailable': '活动记录读取失败(这不是「没有记录」)',
51
+ // 首屏 5 个只读请求有失败时如实说清(此前失败被吞成 null,页面仍显示绿色健康 + 空活动)
52
+ 'overview.loadFailed': '有 {count} 项数据读取失败:{message} —— 下面的指标可能不完整',
53
+ 'overview.empty.title': '开始保护你的配置',
54
+ 'overview.empty.step1': '创建第一份备份',
55
+ 'overview.empty.step2': '导出 ZIP 带走',
56
+ 'overview.empty.step3': '新机器导入回来',
57
+ 'overview.kind.import': '导入',
58
+ 'overview.kind.restore': '恢复',
59
+ 'overview.kind.rollback': '回滚',
60
+ 'overview.kind.profile-create': '新建档案',
61
+ 'overview.kind.profile-select': '设置下次启动档案',
62
+ 'overview.kind.profile-switch': '切换配置档案',
63
+ 'overview.kind.profile-delete': '删除配置档案',
64
+ 'overview.kind.profile-rename': '重命名配置档案',
65
+ 'overview.kind.profile-save': '保存配置档案',
66
+ 'overview.kind.profile-import': '导入配置档案',
67
+ 'overview.kind.sync-apply': '同步应用',
68
+ 'overview.kind.autosync': '自动同步',
69
+ 'overview.kind.recovery': '恢复事项',
70
+ 'overview.kind.backup': '定时备份',
71
+ 'overview.kind.backup-manual': '手动备份',
72
+ 'overview.kind.snapshot-delete': '删除快照',
73
+ 'overview.kind.snapshot-prune': '清理快照',
74
+ 'overview.kind.other': '其他操作',
75
+ // 状态横幅
76
+ } as const;
77
+
78
+ export const en: Record<keyof typeof zh, string> = {
79
+ // —— Overview(2026-09 UX refactor)——
80
+ 'overview.health.ok': 'All healthy',
81
+ 'overview.health.noBackup': 'No backups yet',
82
+ 'overview.health.scheduleFailed': 'The last scheduled backup failed — check backup settings',
83
+ 'overview.health.recovery': 'Unresolved recovery items need attention',
84
+ 'overview.health.autoBackupOff': 'Auto backup is off — this machine only has manual backups',
85
+ 'overview.health.recoveryAction': 'Go to Incident recovery',
86
+ 'overview.metric.backups': 'Backups',
87
+ 'overview.metric.snapshots': 'Snapshots',
88
+ 'overview.metric.schedule': 'Auto backup',
89
+ 'overview.metric.sync': 'Sync',
90
+ 'overview.state.on': 'On',
91
+ 'overview.state.off': 'Off',
92
+ 'overview.meta.lastBackup': 'Last: {time}',
93
+ 'overview.meta.noBackup': 'No records yet',
94
+ 'overview.meta.scheduleOn': 'Enabled · last run {time}',
95
+ 'overview.meta.scheduleOff': 'Disabled (enable for automatic protection)',
96
+ 'overview.meta.scheduleFail': 'Last backup failed',
97
+ 'overview.meta.syncOn': 'Configured · last sync {time}',
98
+ 'overview.meta.syncOff': 'Not configured',
99
+ 'overview.meta.syncUnavailable': 'Timed out',
100
+ 'overview.meta.never': 'Never run',
101
+ 'overview.time.now': 'just now',
102
+ 'overview.time.min': '{n} min ago',
103
+ 'overview.time.hour': '{n} hr ago',
104
+ 'overview.time.day': '{n} d ago',
105
+ 'overview.quick.backup': 'Back up now',
106
+ 'overview.quick.backupDone': 'Backup finished',
107
+ // issue #43: the host returns 200 + ok:true for skipped/failed too; the toast channel follows run.status
108
+ 'overview.quick.backupSkippedDisabled': 'Skipped: scheduled backups are disabled (no backup file was created)',
109
+ 'overview.quick.backupSkippedRunning': 'Skipped: a previous backup is still running',
110
+ 'overview.quick.backupSkippedConflict': 'Skipped: another task is running (duplicate guard)',
111
+ 'overview.quick.backupSkippedLocked': 'Skipped: the environment lock is held (another task is running, or a stale lock needs recovery)',
112
+ 'overview.quick.backupSkippedOther': 'Skipped: the backup service cannot run right now (see host logs for details)',
113
+ 'overview.quick.backupFailed': 'Backup failed: {message}',
114
+ 'overview.activity.title': 'Recent activity',
115
+ 'overview.activity.colTime': 'Time',
116
+ 'overview.activity.colEvent': 'Action',
117
+ 'overview.activity.colDetail': 'Detail',
118
+ 'overview.activity.colResult': 'Result',
119
+ 'overview.activity.empty': 'No activity yet',
120
+ 'overview.activity.unavailable': 'The activity log could not be read (this is not \"no activity\")',
121
+ // Say it plainly when some of the five read-only requests failed (failures used to be swallowed into null)
122
+ 'overview.loadFailed': '{count} data {count, plural, request|requests} failed: {message} — the metrics below may be incomplete',
123
+ 'overview.empty.title': 'Start protecting your configuration',
124
+ 'overview.empty.step1': 'Create a backup',
125
+ 'overview.empty.step2': 'Export the ZIP',
126
+ 'overview.empty.step3': 'Import on the new machine',
127
+ 'overview.kind.import': 'Import',
128
+ 'overview.kind.restore': 'Restore',
129
+ 'overview.kind.rollback': 'Rollback',
130
+ 'overview.kind.profile-create': 'Profile created',
131
+ 'overview.kind.profile-select': 'Next-launch profile set',
132
+ 'overview.kind.profile-switch': 'Profile switch',
133
+ 'overview.kind.profile-delete': 'Profile delete',
134
+ 'overview.kind.profile-rename': 'Profile rename',
135
+ 'overview.kind.profile-save': 'Profile save',
136
+ 'overview.kind.profile-import': 'Profile import',
137
+ 'overview.kind.sync-apply': 'Sync apply',
138
+ 'overview.kind.autosync': 'Auto sync',
139
+ 'overview.kind.recovery': 'Recovery',
140
+ 'overview.kind.backup': 'Scheduled backup',
141
+ 'overview.kind.backup-manual': 'Manual backup',
142
+ 'overview.kind.snapshot-delete': 'Snapshot delete',
143
+ 'overview.kind.snapshot-prune': 'Snapshot prune',
144
+ 'overview.kind.other': 'Other operation',
145
+ };