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.
- package/lib/cli/actions.js +2 -3
- package/lib/cli/import-source.js +2 -6
- package/lib/cli/index.js +2 -3
- package/lib/client.d.ts +21 -7
- package/lib/client.js +26122 -25799
- package/lib/core/exporter.js +2 -4
- package/lib/core/host-schedulers/cache-cleanup.d.ts +41 -0
- package/lib/core/host-schedulers/cache-cleanup.js +45 -0
- package/lib/core/host-schedulers/lifecycle-hooks.d.ts +51 -0
- package/lib/core/host-schedulers/lifecycle-hooks.js +78 -0
- package/lib/core/host-schedulers/market-cache.d.ts +40 -0
- package/lib/core/host-schedulers/market-cache.js +92 -0
- package/lib/core/messages-core.d.ts +1 -0
- package/lib/core/messages-core.js +2 -0
- package/lib/core/migration-history.d.ts +18 -2
- package/lib/core/migration-history.js +19 -3
- package/lib/core/model-tools.js +2 -6
- package/lib/core/restore.d.ts +0 -2
- package/lib/core/restore.js +16 -18
- package/lib/core/verify-recovery.js +4 -7
- package/lib/index.d.ts +3 -22
- package/lib/index.js +71 -327
- package/lib/profiles/dsh-profile-manager.d.ts +23 -1
- package/lib/profiles/dsh-profile-manager.js +70 -2
- package/lib/routes/kit.d.ts +21 -0
- package/lib/routes/kit.js +29 -0
- package/lib/routes/prefs.js +6 -6
- package/lib/routes/recovery.js +25 -41
- package/lib/routes/route-support.d.ts +23 -1
- package/lib/routes/route-support.js +185 -0
- package/lib/routes/snapshots.js +4 -11
- package/lib/routes/sync.js +5 -7
- package/lib/security/redaction.d.ts +5 -1
- package/lib/security/redaction.js +26 -23
- package/lib/sync/autosync-scheduler.js +6 -2
- package/lib/sync/backup-scheduler.js +2 -6
- package/lib/sync/baseline-heal.d.ts +35 -0
- package/lib/sync/baseline-heal.js +39 -0
- package/lib/sync/push-precheck.d.ts +35 -0
- package/lib/sync/push-precheck.js +58 -0
- package/lib/sync/sync-engine.d.ts +9 -12
- package/lib/sync/sync-engine.js +24 -43
- package/lib/ui/backup-inspect.d.ts +1 -1
- package/lib/ui/dsh-profiles-view.d.ts +0 -10
- package/lib/ui/dsh-profiles-view.js +3 -7
- package/lib/ui/history-model.js +3 -2
- package/lib/ui/overview-view.d.ts +3 -3
- package/lib/ui/overview-view.js +9 -1
- package/lib/ui/snapshots-view.d.ts +0 -14
- package/lib/ui/snapshots-view.js +16 -2
- package/lib/utils/paths.d.ts +20 -4
- package/lib/utils/paths.js +22 -6
- package/lib/utils/time.d.ts +31 -0
- package/lib/utils/time.js +54 -0
- package/package.json +1 -1
- package/src/cli/actions.ts +2 -3
- package/src/cli/import-source.ts +2 -7
- package/src/cli/index.ts +2 -3
- package/src/client/about/AboutPanel.tsx +1 -1
- package/src/client/about/ReleaseBody.tsx +22 -52
- package/src/client/about/ReleaseNotesDialog.tsx +15 -69
- package/src/client/about/release-notes-view.ts +4 -11
- package/src/client/common/info-hint-guard.test.ts +11 -5
- package/src/client/common/ui.tsx +23 -0
- package/src/client/config-manager.module.css +201 -32
- package/src/client/css-token-guard.test.ts +135 -1
- package/src/client/history/history-locales.ts +2 -0
- package/src/client/home/HomePanel.tsx +9 -3
- package/src/client/import/ConflictList.tsx +3 -3
- package/src/client/import/ImportWizardView.tsx +1 -1
- package/src/client/library/ArtifactRow.tsx +2 -2
- package/src/client/library/RestorePlanView.tsx +21 -9
- package/src/client/library/report-dismiss.test.ts +5 -3
- package/src/client/locales/about.ts +97 -0
- package/src/client/locales/backup.ts +141 -0
- package/src/client/locales/common.ts +113 -0
- package/src/client/locales/export.ts +184 -0
- package/src/client/locales/foreign.ts +184 -0
- package/src/client/locales/import-compat.ts +32 -0
- package/src/client/locales/import.ts +192 -0
- package/src/client/locales/next-steps.ts +25 -0
- package/src/client/locales/overview-control.ts +32 -0
- package/src/client/locales/overview.ts +145 -0
- package/src/client/locales/profiles.ts +263 -0
- package/src/client/locales/report.ts +17 -0
- package/src/client/locales/restore.ts +132 -0
- package/src/client/locales/sessions.ts +257 -0
- package/src/client/locales/shell.ts +149 -0
- package/src/client/locales.ts +49 -1781
- package/src/client/market/MarketImportReview.tsx +2 -2
- package/src/client/market/MarketPanel.tsx +1 -1
- package/src/client/market/market-view.ts +3 -5
- package/src/client/recovery/RecoveryPanel.tsx +62 -1054
- package/src/client/recovery/SessionHealthCard.tsx +134 -0
- package/src/client/recovery/SessionHealthDialog.tsx +665 -0
- package/src/client/recovery/SessionLayoutSection.tsx +284 -0
- package/src/client/recovery/recovery-api.ts +10 -1
- package/src/client/recovery/recovery-panel-layout.test.ts +20 -5
- package/src/client/recovery/session-dialog-mount.test.ts +16 -9
- package/src/client/recovery/use-recovery-write.test.ts +90 -0
- package/src/client/recovery/use-recovery-write.ts +53 -0
- package/src/client/run-store.ts +57 -2
- package/src/client/sync/PushPreviewCard.tsx +2 -2
- package/src/client/sync/SyncConfirmView.tsx +5 -5
- package/src/client/sync/SyncLogList.tsx +2 -2
- package/src/client/sync/history-model.ts +7 -5
- package/src/client/sync/sync-locales.ts +2 -0
- package/src/client/sync/sync-view.ts +3 -4
- package/src/core/exporter.ts +2 -4
- package/src/core/host-schedulers/cache-cleanup.test.ts +84 -0
- package/src/core/host-schedulers/cache-cleanup.ts +74 -0
- package/src/core/host-schedulers/lifecycle-hooks.test.ts +111 -0
- package/src/core/host-schedulers/lifecycle-hooks.ts +118 -0
- package/src/core/host-schedulers/market-cache.test.ts +93 -0
- package/src/core/host-schedulers/market-cache.ts +116 -0
- package/src/core/messages-core.ts +2 -0
- package/src/core/migration-history.test.ts +19 -0
- package/src/core/migration-history.ts +28 -5
- package/src/core/model-tools.ts +2 -7
- package/src/core/restore-failure-state.test.ts +210 -0
- package/src/core/restore.ts +16 -18
- package/src/core/verify-recovery.ts +4 -7
- package/src/index.ts +78 -332
- package/src/profiles/dsh-profile-copy-rollback.test.ts +156 -0
- package/src/profiles/dsh-profile-manager.ts +71 -3
- package/src/routes/kit.ts +37 -0
- package/src/routes/prefs.ts +6 -6
- package/src/routes/recovery.ts +25 -42
- package/src/routes/route-support.ts +208 -1
- package/src/routes/snapshots.ts +4 -9
- package/src/routes/sync.ts +4 -7
- package/src/security/redaction.ts +29 -23
- package/src/sync/autosync-scheduler.test.ts +23 -0
- package/src/sync/autosync-scheduler.ts +6 -2
- package/src/sync/backup-scheduler.ts +3 -6
- package/src/sync/baseline-heal.ts +74 -0
- package/src/sync/push-precheck.ts +75 -0
- package/src/sync/sync-config.test.ts +24 -13
- package/src/sync/sync-engine.test.ts +88 -0
- package/src/sync/sync-engine.ts +33 -43
- package/src/ui/backup-inspect.ts +1 -1
- package/src/ui/dsh-profiles-view.ts +3 -5
- package/src/ui/history-model.test.ts +2 -1
- package/src/ui/history-model.ts +3 -2
- package/src/ui/i18n.test.ts +8 -3
- package/src/ui/overview-view.test.ts +12 -0
- package/src/ui/overview-view.ts +12 -4
- package/src/ui/snapshots-view.ts +2 -2
- package/src/utils/paths.test.ts +36 -1
- package/src/utils/paths.ts +30 -6
- package/src/utils/time.test.ts +46 -0
- package/src/utils/time.ts +55 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Manager 字典分域 · DSH 档案(profile)管理。
|
|
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
|
+
// —— 档案(DSH 自带 profile:$DSH_HOME/profiles/<name>;2026-09 起替换「配置档案」快照语义) ——
|
|
10
|
+
'profiles.title': '档案',
|
|
11
|
+
'profiles.subtitle': '管理 DSH 自带的 profile($DSH_HOME/profiles/<name>):每个档案 = 一套插件组合(bundles)+ 依赖 + patch 层,用 dsh --profile <name> 启动。',
|
|
12
|
+
'profiles.loading': '加载档案中…',
|
|
13
|
+
'profiles.empty': '还没有任何档案',
|
|
14
|
+
'profiles.refresh': '刷新',
|
|
15
|
+
'profiles.current': '当前运行',
|
|
16
|
+
'profiles.running.title': '运行状态',
|
|
17
|
+
'profiles.running.none': '没有正在运行的实例',
|
|
18
|
+
'profiles.running.port': '端口 {port}',
|
|
19
|
+
'profiles.running.open': '打开',
|
|
20
|
+
'profiles.running.badge': ':{port} 运行中',
|
|
21
|
+
// 行徽章专用:状态由相邻的「运行中」ok 徽章表达,这里只回答「在哪个端口」
|
|
22
|
+
// (2026-11-01:原先把 ':{port} 运行中' 与它并排,同一个词三格内出现两次)。
|
|
23
|
+
'profiles.running.portBadge': ':{port}',
|
|
24
|
+
'profiles.running.originCurrent': '当前实例',
|
|
25
|
+
'profiles.running.originOwned': '本插件启动',
|
|
26
|
+
'profiles.running.originExternal': '其他实例',
|
|
27
|
+
'profiles.running.badgePlain': '运行中',
|
|
28
|
+
'profiles.stop': '停止',
|
|
29
|
+
'profiles.stop.hint': '停止本插件启动的这个实例(先请它自己退出,优雅期超时才强制终止进程树)',
|
|
30
|
+
'profiles.stop.hintExternal': '该档案的实例由另一个 DSH 实例(或手动启动)运行——停止会结束那个进程',
|
|
31
|
+
'profiles.stop.currentHint': '这就是你正在用的这个实例:不能在它自己的界面里停自己,请关闭该窗口/终端(或到启动它的那个实例里停止)',
|
|
32
|
+
'profiles.stopMessageExternal': '确认停止档案「{name}」的实例(端口 {port})?它由另一个 DSH 实例(或手动启动)运行,停止会关闭那个实例。',
|
|
33
|
+
'profiles.stopTitle': '停止实例',
|
|
34
|
+
'profiles.stopMessage': '确认停止档案「{name}」的实例(端口 {port})?该实例里正在进行的会话会被中断。',
|
|
35
|
+
'profiles.stop.done': '已停止档案「{name}」的实例',
|
|
36
|
+
'profiles.stop.forced': '已停止档案「{name}」的实例(进程未在优雅期内退出,已结束其进程树)',
|
|
37
|
+
'profiles.stop.gone': '档案「{name}」的实例早已不在(残留记录已清理)',
|
|
38
|
+
'profiles.copy': '复制命令',
|
|
39
|
+
'profiles.copied': '已复制重启命令',
|
|
40
|
+
'profiles.launch': '启动',
|
|
41
|
+
'profiles.launch.hint': '用该档案另起一个独立 DSH 实例(自动挑空闲端口、自动打开浏览器);当前实例不受影响。只支持 Web 形态档案。',
|
|
42
|
+
'profiles.launch.notWeb': '「{name}」不是 Web 形态,不能作为独立实例启动。请在终端运行:',
|
|
43
|
+
'profiles.launch.managed': '「{name}」由桌面版独占,命令行无法启动。请在桌面端应用里打开它并安装插件。',
|
|
44
|
+
'profiles.launch.started': '已启动档案「{name}」的独立实例(端口 {port})',
|
|
45
|
+
'profiles.launch.pending': '档案「{name}」的进程已启动(端口 {port}),但 {seconds} 秒内未确认就绪 —— 请看日志确认:',
|
|
46
|
+
'profiles.launch.open': '打开新实例',
|
|
47
|
+
'profiles.launch.copyUrl': '复制 URL',
|
|
48
|
+
'profiles.launch.copiedUrl': '已复制认证 URL',
|
|
49
|
+
'profiles.launch.warn.notReady': '未能确认 Web 服务已就绪(可能仍在启动,或启动失败)',
|
|
50
|
+
'profiles.launch.warn.urlNotFound': '没能从启动日志里抓到带 token 的认证 URL — 请从日志里复制 URL 打开',
|
|
51
|
+
'profiles.launch.log': '日志',
|
|
52
|
+
'profiles.create.title': '新建档案',
|
|
53
|
+
'profiles.create.hint': '在 $DSH_HOME/profiles/<name> 下创建标准 profile(package.json + cordis.patch.yml + pnpm-workspace.yaml);第三方插件需要在该档案里单独安装。',
|
|
54
|
+
'profiles.create.nameLabel': '档案名',
|
|
55
|
+
'profiles.create.placeholder': '例如 writing / rescue',
|
|
56
|
+
'profiles.create.templateLabel': '起步模板',
|
|
57
|
+
'profiles.create.action': '创建档案',
|
|
58
|
+
'profiles.create.done': '已创建档案「{name}」',
|
|
59
|
+
'profiles.nameRequired': '请输入档案名',
|
|
60
|
+
'profiles.nameTooLong': '档案名最长 64 个字符',
|
|
61
|
+
'profiles.nameInvalid': '档案名不合法:禁止路径分隔符(/ \\)、"."、".." 与 "node_modules"',
|
|
62
|
+
'profiles.nameReserved': '「{name}」是 DSH 保留名(web / headless / sdk / sdk-minimal / acp / desktop),不能手动创建',
|
|
63
|
+
'profiles.list.title': '全部档案',
|
|
64
|
+
'profiles.list.count': '共 {count} 个',
|
|
65
|
+
'profiles.list.hint': '点击档案行查看完整详情(bundle 层 / 依赖 / patch 原文)',
|
|
66
|
+
'profiles.row.summary': '{bundles} 个层 · patch {patch} 条 · 依赖 {deps}',
|
|
67
|
+
'profiles.detail.info': '档案信息',
|
|
68
|
+
'profiles.bundles.count': '{count} 个 bundle 层',
|
|
69
|
+
'profiles.shape.web': 'Web',
|
|
70
|
+
'profiles.shape.headless': 'Headless',
|
|
71
|
+
'profiles.shape.generic': '自定义',
|
|
72
|
+
// cross-F3:中断的档案复制残留(半截副本)——必须与普通空档案可区分,且只给删除动作
|
|
73
|
+
'profiles.shape.incomplete': '未完成的副本',
|
|
74
|
+
'profiles.incomplete.from': '从「{name}」复制',
|
|
75
|
+
'profiles.incomplete.startedAt': '开始于 {time}',
|
|
76
|
+
'profiles.incomplete.dir': '目录 {path}',
|
|
77
|
+
'profiles.incomplete.hint': '这是一次被中断的档案复制:没有 package.json,无法启动。确认不需要后可直接删除(只删这个目录,不影响其它档案)。',
|
|
78
|
+
'profiles.list.incompleteCount': '未完成副本 {count} 个(不可启动)',
|
|
79
|
+
'profiles.delete.incompleteMessage': '确认删除未完成的副本「{name}」?将物理删除整个目录(含已拷入的部分文件),不可恢复。',
|
|
80
|
+
'profiles.issue.manifestInvalid': 'package.json 损坏',
|
|
81
|
+
'profiles.issue.patchTooLarge': 'patch 文件过大(未展示原文)',
|
|
82
|
+
'profiles.bundles': '插件层(bundles)',
|
|
83
|
+
'profiles.deps': '依赖',
|
|
84
|
+
'profiles.patchReload.live': 'patch 热生效',
|
|
85
|
+
'profiles.patchReload.startup': 'patch 仅启动应用',
|
|
86
|
+
'profiles.patchEntries': '{count} 条 patch',
|
|
87
|
+
'profiles.bundles.none': '(无)',
|
|
88
|
+
'profiles.nodeModules.yes': '已装 node_modules',
|
|
89
|
+
'profiles.nodeModules.no': '未装 node_modules',
|
|
90
|
+
'profiles.updatedAt': '更新于 {time}',
|
|
91
|
+
'profiles.dir': '目录',
|
|
92
|
+
'profiles.detail': '详情',
|
|
93
|
+
'profiles.detailTitle': '档案详情:{name}',
|
|
94
|
+
'profiles.detail.manifest': 'package.json',
|
|
95
|
+
'profiles.detail.patch': 'cordis.patch.yml',
|
|
96
|
+
'profiles.detail.patchMissing': '(无 patch 文件)',
|
|
97
|
+
'profiles.detail.patchTooLarge': '(patch 文件过大,未加载原文)',
|
|
98
|
+
'profiles.rename': '重命名',
|
|
99
|
+
'profiles.renameTitle': '重命名档案',
|
|
100
|
+
'profiles.renameMessage': '将档案「{name}」重命名为:',
|
|
101
|
+
'profiles.rename.done': '已重命名为「{name}」',
|
|
102
|
+
'profiles.delete': '删除',
|
|
103
|
+
'profiles.deleteTitle': '删除档案',
|
|
104
|
+
'profiles.deleteMessage': '确认删除档案「{name}」?将物理删除整个目录(含 node_modules),不可恢复。',
|
|
105
|
+
'profiles.delete.done': '已删除档案「{name}」',
|
|
106
|
+
'profiles.deleteCurrentWarning': '这是当前运行中的档案:删除后本次运行仍可用,但重启会失败。',
|
|
107
|
+
'profiles.deleteCurrentConfirm': '仍要删除当前档案',
|
|
108
|
+
'profiles.duplicate': '复制',
|
|
109
|
+
'profiles.duplicateHint': '把该档案整份复制成一份新档案(清单 / patch 层 / 依赖声明 / pnpm 锁文件;可连同已装的 node_modules 一起拷)',
|
|
110
|
+
'profiles.duplicateTitle': '复制档案',
|
|
111
|
+
'profiles.duplicateMessage': '把档案「{name}」复制成一份新档案:',
|
|
112
|
+
'profiles.duplicate.nameLabel': '副本档案名',
|
|
113
|
+
'profiles.duplicate.includeModules': '同时复制 node_modules(副本立刻可用)',
|
|
114
|
+
'profiles.duplicate.includeModulesHint': '同体积 · 约 30 秒 · 不勾选则副本启动前需装依赖',
|
|
115
|
+
'profiles.duplicate.onlyManifest': '无 node_modules:仅复制清单与 patch',
|
|
116
|
+
'profiles.duplicate.done': '已复制为档案「{name}」',
|
|
117
|
+
'profiles.duplicate.warn.depsNotInstalled': '副本没有带 node_modules:直接启动会因解析不到 bundle 而失败,先在副本目录安装依赖:',
|
|
118
|
+
'profiles.duplicate.copiedInstall': '已复制安装命令',
|
|
119
|
+
'profiles.error.exists': '同名档案已存在',
|
|
120
|
+
'profiles.error.notFound': '档案不存在(可能已被删除)',
|
|
121
|
+
'profiles.error.currentProfile': '该操作不能作用于当前运行中的档案',
|
|
122
|
+
'profiles.error.invalidName': '档案名不合法',
|
|
123
|
+
'profiles.error.reservedName': 'DSH 保留名不能手动创建',
|
|
124
|
+
'profiles.error.unknownTemplate': '未知的起步模板',
|
|
125
|
+
'profiles.error.notLaunchable': '该档案不是 Web 形态,没有浏览器界面(请用终端运行 dsh --profile <名>)',
|
|
126
|
+
'profiles.error.managedProfile': '「desktop」档案由 DeepSeek Harness Desktop 应用独占管理:删掉或改名会让桌面端下次启动时按 web 模板重建一个空档案(已装插件全部消失)。请在桌面端应用里管理它。',
|
|
127
|
+
'profiles.error.launcherUnavailable': '定位不到 dsh 启动器(非标准启动方式),请手动运行 dsh --profile <名>',
|
|
128
|
+
'profiles.error.launchFailed': '档案实例启动失败',
|
|
129
|
+
'profiles.error.alreadyRunning': '该档案的实例已经在运行(先停止再启动)',
|
|
130
|
+
'profiles.error.notRunning': '该档案没有正在运行的实例(可能已被手动关闭)',
|
|
131
|
+
'profiles.error.stopFailed': '停止实例失败',
|
|
132
|
+
'profiles.error.instanceRunning': '该档案的实例正在运行,请先停止再删除',
|
|
133
|
+
'profiles.error.generic': '操作失败:{message}',
|
|
134
|
+
} as const;
|
|
135
|
+
|
|
136
|
+
export const en: Record<keyof typeof zh, string> = {
|
|
137
|
+
// Profiles = DSH profiles ($DSH_HOME/profiles/<name>); replaced the config-snapshot meaning in 2026-09
|
|
138
|
+
'profiles.title': 'Profiles',
|
|
139
|
+
'profiles.subtitle': 'Manage DSH profiles ($DSH_HOME/profiles/<name>): each profile is one plugin stack (bundles) + dependencies + patch layer, launched with dsh --profile <name>.',
|
|
140
|
+
'profiles.loading': 'Loading profiles…',
|
|
141
|
+
'profiles.empty': 'No profiles yet',
|
|
142
|
+
'profiles.refresh': 'Refresh',
|
|
143
|
+
'profiles.current': 'Running',
|
|
144
|
+
'profiles.running.title': 'Runtime',
|
|
145
|
+
'profiles.running.none': 'No instances running',
|
|
146
|
+
'profiles.running.port': 'port {port}',
|
|
147
|
+
'profiles.running.open': 'Open',
|
|
148
|
+
'profiles.running.badge': ':{port} running',
|
|
149
|
+
'profiles.running.portBadge': ':{port}',
|
|
150
|
+
'profiles.running.originCurrent': 'current instance',
|
|
151
|
+
'profiles.running.originOwned': 'launched here',
|
|
152
|
+
'profiles.running.originExternal': 'other instance',
|
|
153
|
+
'profiles.running.badgePlain': 'running',
|
|
154
|
+
'profiles.stop': 'Stop',
|
|
155
|
+
'profiles.stop.hint': 'Stop the instance this plugin started (asked to exit gracefully first; force-killed only after the grace period)',
|
|
156
|
+
'profiles.stop.hintExternal': 'This profile runs in another DSH instance (or was started manually) — stopping ends that process',
|
|
157
|
+
'profiles.stop.currentHint': 'This is the instance you are using right now: it cannot stop itself here. Close that window/terminal, or stop it from the instance that launched it.',
|
|
158
|
+
'profiles.stopMessageExternal': 'Stop the instance of “{name}” (port {port})? It runs in another DSH instance (or was started manually); stopping closes that instance.',
|
|
159
|
+
'profiles.stopTitle': 'Stop instance',
|
|
160
|
+
'profiles.stopMessage': 'Stop the instance of “{name}” (port {port})? Sessions running inside that instance will be interrupted.',
|
|
161
|
+
'profiles.stop.done': 'Stopped the instance of “{name}”',
|
|
162
|
+
'profiles.stop.forced': 'Stopped the instance of “{name}” (it did not exit within the grace period, so its process tree was terminated)',
|
|
163
|
+
'profiles.stop.gone': 'The instance of “{name}” was already gone (stale record cleaned up)',
|
|
164
|
+
'profiles.copy': 'Copy command',
|
|
165
|
+
'profiles.copied': 'Restart command copied',
|
|
166
|
+
'profiles.launch': 'Launch',
|
|
167
|
+
'profiles.launch.hint': 'Starts an independent DSH instance for this profile (free port picked automatically, browser opened automatically); the running instance is unaffected. Web-shaped profiles only.',
|
|
168
|
+
'profiles.launch.notWeb': '“{name}” is not a Web-shaped profile and cannot start as an independent instance. Run in a terminal:',
|
|
169
|
+
'profiles.launch.managed': '“{name}” is managed by the Desktop app and cannot be started from the CLI. Open it and install plugins in the Desktop app.',
|
|
170
|
+
'profiles.launch.started': 'Started an independent instance of “{name}” (port {port})',
|
|
171
|
+
'profiles.launch.pending': 'The process for “{name}” is up (port {port}) but readiness was not confirmed within {seconds}s — check the log:',
|
|
172
|
+
'profiles.launch.open': 'Open the new instance',
|
|
173
|
+
'profiles.launch.copyUrl': 'Copy URL',
|
|
174
|
+
'profiles.launch.copiedUrl': 'Authenticated URL copied',
|
|
175
|
+
'profiles.launch.warn.notReady': 'The web service readiness could not be confirmed (it may still be starting, or it failed)',
|
|
176
|
+
'profiles.launch.warn.urlNotFound': 'No tokenized URL was found in the startup log — copy the URL from the log to open it',
|
|
177
|
+
'profiles.launch.log': 'Log',
|
|
178
|
+
'profiles.create.title': 'New profile',
|
|
179
|
+
'profiles.create.hint': 'Creates a standard profile under $DSH_HOME/profiles/<name> (package.json + cordis.patch.yml + pnpm-workspace.yaml); third-party plugins must be installed into that profile separately.',
|
|
180
|
+
'profiles.create.nameLabel': 'Profile name',
|
|
181
|
+
'profiles.create.placeholder': 'e.g. writing / rescue',
|
|
182
|
+
'profiles.create.templateLabel': 'Starting template',
|
|
183
|
+
'profiles.create.action': 'Create profile',
|
|
184
|
+
'profiles.create.done': 'Created profile “{name}”',
|
|
185
|
+
'profiles.nameRequired': 'Enter a profile name',
|
|
186
|
+
'profiles.nameTooLong': 'A profile name is at most 64 characters',
|
|
187
|
+
'profiles.nameInvalid': 'Invalid profile name: no path separators (/ \\), "." , ".." or "node_modules"',
|
|
188
|
+
'profiles.nameReserved': '“{name}” is reserved by DSH (web / headless / sdk / sdk-minimal / acp / desktop) and cannot be created manually',
|
|
189
|
+
'profiles.list.title': 'All profiles',
|
|
190
|
+
'profiles.list.count': '{count} total',
|
|
191
|
+
'profiles.list.hint': 'Click a profile row for full details (bundle layers / dependencies / raw patch)',
|
|
192
|
+
// 英文侧不再用 (s)/(ies) 括号式复数(2026-11-01):档案只有 1 个时它渲染成
|
|
193
|
+
// "1 layer(s) · 5 patch entry(ies)",在一行被截断的元信息里既占宽又不专业。
|
|
194
|
+
// zh 侧本来就是无复数形态,改成同样的「数字 + 名词」短形态后两侧结构一致。
|
|
195
|
+
'profiles.row.summary': '{bundles} layers · {patch} patches · {deps} deps',
|
|
196
|
+
'profiles.detail.info': 'Profile info',
|
|
197
|
+
'profiles.bundles.count': '{count} bundle {count, plural, layer|layers}',
|
|
198
|
+
'profiles.shape.web': 'Web',
|
|
199
|
+
'profiles.shape.headless': 'Headless',
|
|
200
|
+
'profiles.shape.generic': 'Custom',
|
|
201
|
+
// cross-F3:interrupted profile copy left on disk (half copy) — must be distinguishable from a normal empty profile
|
|
202
|
+
'profiles.shape.incomplete': 'Incomplete copy',
|
|
203
|
+
'profiles.incomplete.from': 'Copied from “{name}”',
|
|
204
|
+
'profiles.incomplete.startedAt': 'started at {time}',
|
|
205
|
+
'profiles.incomplete.dir': 'Directory {path}',
|
|
206
|
+
'profiles.incomplete.hint': 'This is an interrupted profile copy: it has no package.json and cannot be launched. Delete it if you no longer need it (only this directory is removed).',
|
|
207
|
+
'profiles.list.incompleteCount': '{count} incomplete {count, plural, copyy|copyies} (not launchable)',
|
|
208
|
+
'profiles.delete.incompleteMessage': 'Delete the incomplete copy “{name}”? The whole directory (including partially copied files) will be physically removed and cannot be recovered.',
|
|
209
|
+
'profiles.issue.manifestInvalid': 'package.json is corrupted',
|
|
210
|
+
'profiles.issue.patchTooLarge': 'patch file too large (content not shown)',
|
|
211
|
+
'profiles.bundles': 'Plugin layers (bundles)',
|
|
212
|
+
'profiles.deps': 'Dependencies',
|
|
213
|
+
'profiles.patchReload.live': 'patch hot-reloads',
|
|
214
|
+
'profiles.patchReload.startup': 'patch applies at startup only',
|
|
215
|
+
'profiles.patchEntries': '{count} patch {count, plural, entryy|entryies}',
|
|
216
|
+
'profiles.bundles.none': '(none)',
|
|
217
|
+
'profiles.nodeModules.yes': 'node_modules present',
|
|
218
|
+
'profiles.nodeModules.no': 'no node_modules',
|
|
219
|
+
'profiles.updatedAt': 'Updated {time}',
|
|
220
|
+
'profiles.dir': 'Directory',
|
|
221
|
+
'profiles.detail': 'Details',
|
|
222
|
+
'profiles.detailTitle': 'Profile details: {name}',
|
|
223
|
+
'profiles.detail.manifest': 'package.json',
|
|
224
|
+
'profiles.detail.patch': 'cordis.patch.yml',
|
|
225
|
+
'profiles.detail.patchMissing': '(no patch file)',
|
|
226
|
+
'profiles.detail.patchTooLarge': '(patch file too large, content not loaded)',
|
|
227
|
+
'profiles.rename': 'Rename',
|
|
228
|
+
'profiles.renameTitle': 'Rename profile',
|
|
229
|
+
'profiles.renameMessage': 'Rename profile "{name}" to:',
|
|
230
|
+
'profiles.rename.done': 'Renamed to “{name}”',
|
|
231
|
+
'profiles.delete': 'Delete',
|
|
232
|
+
'profiles.deleteTitle': 'Delete profile',
|
|
233
|
+
'profiles.deleteMessage': 'Delete profile "{name}"? The whole directory (including node_modules) is deleted physically and cannot be recovered.',
|
|
234
|
+
'profiles.delete.done': 'Deleted profile “{name}”',
|
|
235
|
+
'profiles.deleteCurrentWarning': 'This is the running profile: the current process keeps working, but the next start will fail.',
|
|
236
|
+
'profiles.deleteCurrentConfirm': 'Delete the running profile anyway',
|
|
237
|
+
'profiles.duplicate': 'Duplicate',
|
|
238
|
+
'profiles.duplicateHint': 'Copy this profile as a new profile (manifest / patch layer / dependency declarations / pnpm lockfile; the installed node_modules can be copied too)',
|
|
239
|
+
'profiles.duplicateTitle': 'Duplicate profile',
|
|
240
|
+
'profiles.duplicateMessage': 'Duplicate “{name}” as a new profile:',
|
|
241
|
+
'profiles.duplicate.nameLabel': 'New profile name',
|
|
242
|
+
'profiles.duplicate.includeModules': 'Also copy node_modules (the copy works immediately)',
|
|
243
|
+
'profiles.duplicate.includeModulesHint': 'Same size · ~30 s · without it, install dependencies before starting',
|
|
244
|
+
'profiles.duplicate.onlyManifest': 'No node_modules: only manifest and patch are copied',
|
|
245
|
+
'profiles.duplicate.done': 'Duplicated as profile “{name}”',
|
|
246
|
+
'profiles.duplicate.warn.depsNotInstalled': 'The copy has no node_modules: starting it fails because its bundles cannot be resolved. Install the dependencies inside the copy first:',
|
|
247
|
+
'profiles.duplicate.copiedInstall': 'Install command copied',
|
|
248
|
+
'profiles.error.exists': 'A profile with that name already exists',
|
|
249
|
+
'profiles.error.notFound': 'Profile not found (it may have been deleted)',
|
|
250
|
+
'profiles.error.currentProfile': 'This operation cannot target the running profile',
|
|
251
|
+
'profiles.error.invalidName': 'Invalid profile name',
|
|
252
|
+
'profiles.error.reservedName': 'Reserved DSH names cannot be created manually',
|
|
253
|
+
'profiles.error.unknownTemplate': 'Unknown starting template',
|
|
254
|
+
'profiles.error.notLaunchable': 'This profile is not Web-shaped and has no browser UI (run dsh --profile <name> in a terminal)',
|
|
255
|
+
'profiles.error.managedProfile': 'The "desktop" profile is managed exclusively by the DeepSeek Harness Desktop application: deleting or renaming it makes the Desktop app rebuild an empty profile from the web template on its next start (every installed plugin is lost). Manage it from the Desktop app.',
|
|
256
|
+
'profiles.error.launcherUnavailable': 'Could not locate the dsh launcher (non-standard startup); run dsh --profile <name> manually',
|
|
257
|
+
'profiles.error.launchFailed': 'Starting the profile instance failed',
|
|
258
|
+
'profiles.error.alreadyRunning': 'An instance of this profile is already running (stop it first)',
|
|
259
|
+
'profiles.error.notRunning': 'This profile has no running instance (it may have been closed manually)',
|
|
260
|
+
'profiles.error.stopFailed': 'Stopping the instance failed',
|
|
261
|
+
'profiles.error.instanceRunning': 'An instance of this profile is running — stop it before deleting',
|
|
262
|
+
'profiles.error.generic': 'Operation failed: {message}',
|
|
263
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
'report.import.title': '导入结果',
|
|
11
|
+
'report.needsRestart': '插件 / MCP 变更将在重启 DSH 后生效。',
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export const en: Record<keyof typeof zh, string> = {
|
|
15
|
+
'report.import.title': 'Import Result',
|
|
16
|
+
'report.needsRestart': 'Plugin / MCP changes take effect after restarting DSH.',
|
|
17
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Manager 字典分域 · 快照恢复与 git 风格恢复预览。
|
|
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
|
+
'home.schedule.title': '定时备份',
|
|
11
|
+
'snapshots.selectHint': '选择快照以预览恢复计划(只读预览,不会改动任何设置):',
|
|
12
|
+
'snapshots.status': '状态',
|
|
13
|
+
'snapshots.delete': '删除',
|
|
14
|
+
'snapshots.deleted': '已删除快照',
|
|
15
|
+
'snapshots.deleteConfirmTitle': '删除快照',
|
|
16
|
+
'snapshots.deleteConfirm': '确认删除 {time} 创建的快照?该导入前回滚点将被永久删除,不可恢复。',
|
|
17
|
+
'snapshots.status.pending': '进行中',
|
|
18
|
+
'snapshots.status.done': '已完成',
|
|
19
|
+
'snapshots.status.rolled-back': '已回滚',
|
|
20
|
+
'snapshots.status.unknown': '未知',
|
|
21
|
+
'snapshots.planTitle': '恢复计划预览',
|
|
22
|
+
'snapshots.noActions': '该快照无可用恢复动作(或全部跳过)。',
|
|
23
|
+
'snapshots.execute': '执行恢复',
|
|
24
|
+
'snapshots.executing': '恢复执行中…',
|
|
25
|
+
'snapshots.confirmTitle': '确认恢复',
|
|
26
|
+
'snapshots.confirmRestore': '确认执行恢复?会先把当前文件备份到一个安全位置,再删除导入期间新增的插件。',
|
|
27
|
+
'snapshots.reportTitle': '恢复报告',
|
|
28
|
+
'snapshots.reportDone': '完成',
|
|
29
|
+
'snapshots.restored': '已还原',
|
|
30
|
+
'snapshots.removedPlugins': '已卸载插件',
|
|
31
|
+
'snapshots.manualHints': '需人工处理',
|
|
32
|
+
'snapshots.failed': '失败',
|
|
33
|
+
'snapshots.skipped': '跳过',
|
|
34
|
+
// 恢复计划动作 kind 标签(原硬编码中文字符串,改走字典)
|
|
35
|
+
// —— git 风格恢复预览(快照改动逐行对照) ——
|
|
36
|
+
'snapshots.plan.changed': '将被还原 {count}',
|
|
37
|
+
'snapshots.plan.added': '新增 {count}',
|
|
38
|
+
'snapshots.plan.deleted': '将被删除 {count}',
|
|
39
|
+
'snapshots.plan.plugins': '卸载插件 {count}',
|
|
40
|
+
'snapshots.plan.hints': '需人工处理 {count}',
|
|
41
|
+
'snapshots.plan.skips': '无动作 {count}',
|
|
42
|
+
'snapshots.plan.noStats': '未统计行数',
|
|
43
|
+
'snapshots.plan.statsTruncated': '部分文件未统计行数',
|
|
44
|
+
'snapshots.plan.group.changes': '将被还原',
|
|
45
|
+
'snapshots.plan.group.deletes': '将被删除',
|
|
46
|
+
'snapshots.plan.group.plugins': '卸载插件',
|
|
47
|
+
'snapshots.plan.group.hints': '需人工处理',
|
|
48
|
+
'snapshots.plan.group.skips': '无动作',
|
|
49
|
+
'snapshots.plan.status.modified': '修改',
|
|
50
|
+
'snapshots.plan.status.added': '新增',
|
|
51
|
+
'snapshots.plan.status.deleted': '删除',
|
|
52
|
+
'snapshots.plan.status.plugin': '卸载插件',
|
|
53
|
+
'snapshots.plan.status.hint': '人工提示',
|
|
54
|
+
'snapshots.plan.status.skip': '跳过',
|
|
55
|
+
'snapshots.plan.beforeLabel': '本机',
|
|
56
|
+
'snapshots.plan.afterLabel': '快照',
|
|
57
|
+
'snapshots.plan.loadingDiff': '正在读取差异…',
|
|
58
|
+
'snapshots.plan.diffIdentical': '两侧内容一致',
|
|
59
|
+
'snapshots.plan.diffBinary': '二进制文件',
|
|
60
|
+
'snapshots.plan.diffTooLarge': '文件过大({size})',
|
|
61
|
+
'snapshots.plan.diffUnreadable': '无法读取该文件',
|
|
62
|
+
'snapshots.plan.diffMissingBlob': '快照内缺少该文件内容',
|
|
63
|
+
'snapshots.plan.diffEscape': '路径越界,已拒绝读取',
|
|
64
|
+
'snapshots.plan.diffNotApplicable': '非文件内容变更',
|
|
65
|
+
'snapshots.plan.diffDegraded': '差异过大,已按整块显示',
|
|
66
|
+
'snapshots.plan.statSkipped.tooLarge': '体积超上限',
|
|
67
|
+
'snapshots.plan.statSkipped.binary': '二进制',
|
|
68
|
+
'snapshots.plan.statSkipped.budget': '超出数量上限',
|
|
69
|
+
'snapshots.plan.statSkipped.unreadable': '未统计',
|
|
70
|
+
} as const;
|
|
71
|
+
|
|
72
|
+
export const en: Record<keyof typeof zh, string> = {
|
|
73
|
+
'home.schedule.title': 'Schedule',
|
|
74
|
+
'snapshots.selectHint': 'Select a snapshot to preview its restore plan (read-only preview, changes nothing):',
|
|
75
|
+
'snapshots.status': 'Status',
|
|
76
|
+
'snapshots.delete': 'Delete',
|
|
77
|
+
'snapshots.deleted': 'Snapshot deleted',
|
|
78
|
+
'snapshots.deleteConfirmTitle': 'Delete Snapshot',
|
|
79
|
+
'snapshots.deleteConfirm': 'Delete the snapshot created at {time}? This pre-import rollback point will be permanently removed and cannot be recovered.',
|
|
80
|
+
'snapshots.status.pending': 'Pending',
|
|
81
|
+
'snapshots.status.done': 'Done',
|
|
82
|
+
'snapshots.status.rolled-back': 'Rolled back',
|
|
83
|
+
'snapshots.status.unknown': 'Unknown',
|
|
84
|
+
'snapshots.planTitle': 'Restore Plan Preview',
|
|
85
|
+
'snapshots.noActions': 'No restorable actions for this snapshot (or all skipped).',
|
|
86
|
+
'snapshots.execute': 'Restore now',
|
|
87
|
+
'snapshots.executing': 'Restoring…',
|
|
88
|
+
'snapshots.confirmTitle': 'Confirm restore',
|
|
89
|
+
'snapshots.confirmRestore': 'Confirm restore? Current files are first backed up to a safe location, then plugins added during the import are removed.',
|
|
90
|
+
'snapshots.reportTitle': 'Restore Report',
|
|
91
|
+
'snapshots.reportDone': 'Done',
|
|
92
|
+
'snapshots.restored': 'Restored',
|
|
93
|
+
'snapshots.removedPlugins': 'Removed plugins',
|
|
94
|
+
'snapshots.manualHints': 'Manual action needed',
|
|
95
|
+
'snapshots.failed': 'Failed',
|
|
96
|
+
'snapshots.skipped': 'Skipped',
|
|
97
|
+
// —— git-style restore preview (line-by-line) ——
|
|
98
|
+
'snapshots.plan.changed': '{count} {count, plural, file|files} to restore',
|
|
99
|
+
'snapshots.plan.added': '{count} added',
|
|
100
|
+
'snapshots.plan.deleted': '{count} to delete',
|
|
101
|
+
'snapshots.plan.plugins': '{count} plugin uninstall',
|
|
102
|
+
'snapshots.plan.hints': '{count} manual step',
|
|
103
|
+
'snapshots.plan.skips': '{count} no-op',
|
|
104
|
+
'snapshots.plan.noStats': 'No line stats',
|
|
105
|
+
'snapshots.plan.statsTruncated': 'Some files were not counted',
|
|
106
|
+
'snapshots.plan.group.changes': 'To restore',
|
|
107
|
+
'snapshots.plan.group.deletes': 'To delete',
|
|
108
|
+
'snapshots.plan.group.plugins': 'Plugin uninstall',
|
|
109
|
+
'snapshots.plan.group.hints': 'Manual steps',
|
|
110
|
+
'snapshots.plan.group.skips': 'No action',
|
|
111
|
+
'snapshots.plan.status.modified': 'Modified',
|
|
112
|
+
'snapshots.plan.status.added': 'Added',
|
|
113
|
+
'snapshots.plan.status.deleted': 'Deleted',
|
|
114
|
+
'snapshots.plan.status.plugin': 'Plugin',
|
|
115
|
+
'snapshots.plan.status.hint': 'Manual',
|
|
116
|
+
'snapshots.plan.status.skip': 'Skip',
|
|
117
|
+
'snapshots.plan.beforeLabel': 'This machine',
|
|
118
|
+
'snapshots.plan.afterLabel': 'Snapshot',
|
|
119
|
+
'snapshots.plan.loadingDiff': 'Loading differences…',
|
|
120
|
+
'snapshots.plan.diffIdentical': 'Both sides are identical',
|
|
121
|
+
'snapshots.plan.diffBinary': 'Binary file',
|
|
122
|
+
'snapshots.plan.diffTooLarge': 'File too large ({size})',
|
|
123
|
+
'snapshots.plan.diffUnreadable': 'Cannot read this file',
|
|
124
|
+
'snapshots.plan.diffMissingBlob': 'The snapshot has no content for this file',
|
|
125
|
+
'snapshots.plan.diffEscape': 'Path escapes the sandbox: read refused',
|
|
126
|
+
'snapshots.plan.diffNotApplicable': 'Not a file content change',
|
|
127
|
+
'snapshots.plan.diffDegraded': 'Diff too large: shown as whole blocks',
|
|
128
|
+
'snapshots.plan.statSkipped.tooLarge': 'Over the size limit',
|
|
129
|
+
'snapshots.plan.statSkipped.binary': 'Binary',
|
|
130
|
+
'snapshots.plan.statSkipped.budget': 'Over the file-count limit',
|
|
131
|
+
'snapshots.plan.statSkipped.unreadable': 'Not counted',
|
|
132
|
+
};
|