dsh-agent-control-center 0.1.0 → 0.3.0

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 (56) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +217 -83
  3. package/README.zh.md +159 -58
  4. package/client.js +7660 -2005
  5. package/cordis.patch.yml +5 -0
  6. package/docs/01-CONTRACT.md +3 -2
  7. package/docs/05-ACCEPTANCE-EVIDENCE.md +81 -0
  8. package/docs/06-UX-OPTIMIZATION.md +57 -0
  9. package/docs/07-GUIDE.md +327 -0
  10. package/docs/08-COMPATIBILITY.md +202 -0
  11. package/docs/09-ARCHITECTURE.md +333 -0
  12. package/docs/ROADMAP.md +448 -0
  13. package/index.js +67 -2
  14. package/lib/core/cache.js +277 -0
  15. package/lib/core/compat.js +877 -0
  16. package/lib/core/errors.js +14 -1
  17. package/lib/core/http.js +22 -0
  18. package/lib/core/index.js +53 -2
  19. package/lib/core/paths.js +6 -0
  20. package/lib/core/registry.js +21 -5
  21. package/lib/core/util.js +4 -1
  22. package/lib/modules/a-agents.js +104 -4
  23. package/lib/modules/b-tools.js +169 -26
  24. package/lib/modules/f-diagnostics.js +109 -17
  25. package/lib/modules/g-templates.js +18 -0
  26. package/lib/modules/i-recovery.js +84 -23
  27. package/lib/modules/j-instruction.js +624 -0
  28. package/lib/modules/k-export.js +540 -0
  29. package/package.json +1 -1
  30. package/scripts/release.mjs +81 -0
  31. package/scripts/verify.mjs +12 -0
  32. package/src/client/app.js +684 -118
  33. package/src/client/i18n/agents.js +96 -0
  34. package/src/client/i18n/common.js +36 -0
  35. package/src/client/i18n/diagnostics.js +52 -0
  36. package/src/client/i18n/export.js +174 -0
  37. package/src/client/i18n/instruction.js +236 -0
  38. package/src/client/i18n/meta.js +72 -0
  39. package/src/client/i18n/overview.js +38 -0
  40. package/src/client/i18n/recovery.js +66 -0
  41. package/src/client/i18n/sessions.js +64 -0
  42. package/src/client/i18n/templates.js +88 -0
  43. package/src/client/i18n/tools.js +96 -0
  44. package/src/client/i18n/usage.js +42 -0
  45. package/src/client/kernel.js +327 -40
  46. package/src/client/pages/agents.js +637 -354
  47. package/src/client/pages/diagnostics.js +526 -177
  48. package/src/client/pages/export.js +664 -0
  49. package/src/client/pages/instruction.js +648 -0
  50. package/src/client/pages/meta.js +553 -193
  51. package/src/client/pages/overview.js +255 -34
  52. package/src/client/pages/recovery.js +332 -131
  53. package/src/client/pages/sessions.js +470 -307
  54. package/src/client/pages/templates.js +691 -381
  55. package/src/client/pages/tools.js +559 -206
  56. package/src/client/pages/usage.js +235 -57
@@ -78,6 +78,9 @@ ACC.addI18n({
78
78
  'agents.overwrite': '覆盖并保存(先备份)',
79
79
  'agents.viewDiff': '查看差异',
80
80
  'agents.diffTitle': '差异(磁盘当前内容 → 编辑器内容)',
81
+ 'agents.diffFrom': 'on disk now',
82
+ 'agents.diffTo': 'editor content',
83
+ 'agents.conflictDetailGeneric': '磁盘内容与打开时不一致,保存被拒绝;磁盘未被覆盖。',
81
84
  'agents.diffUnavailable': '差异不可用',
82
85
  'agents.diffEmpty': '没有差异',
83
86
 
@@ -127,6 +130,51 @@ ACC.addI18n({
127
130
  'agents.discardTitle': '放弃未保存修改?',
128
131
  'agents.discardBody': '重新加载会丢弃编辑器里尚未保存的内容。',
129
132
  'agents.discardConfirm': '丢弃并重新加载',
133
+ 'agents.fileListHint': '点击文件切换编辑目标;选中态为高亮边框',
134
+ 'agents.fileCount': '共 {count} 个候选',
135
+ 'agents.metaToggle': '文件元信息(编码 / 换行 / 字节 / 哈希 / 预算)',
136
+ 'agents.issueKind': '类型',
137
+ 'agents.validationHint': '按严重度分组,每条都能跳到对应行',
138
+ 'agents.backupsHint': '时间 / 大小 / 备注;恢复前会二次确认',
139
+ 'agents.conflictReloadHint': '推荐顺序:先「重新加载磁盘内容」拿到最新文件,再把需要的改动重新输入(标题下的覆盖按钮是危险操作)。',
140
+ 'agents.conflictReloadPrimary': '重新加载磁盘内容(放弃我的修改)',
141
+ 'agents.conflictForcePrimary': '强制覆盖磁盘文件(先备份)',
142
+ 'agents.savingHint': '正在保存:会先写入备份,再原子替换源文件。',
143
+ 'agents.restoreCta': '恢复该备份并覆盖当前文件',
144
+ 'agents.restoreScope': '恢复只覆盖该指令文件本身,不会改动其它文件或会话数据。',
145
+ 'agents.rawHostText': '宿主原始文本(英文界面下默认收起)',
146
+ 'agents.warningsFallback': '指令链检测到告警;原始说明见下方折叠文本。',
147
+ 'agents.noBackupsAction': '刷新备份列表',
148
+ 'agents.addedRemoved': '新增 {added} 行 · 删除 {removed} 行',
149
+ 'agents.diffLoading': '正在计算差异…',
150
+ 'agents.saveConfirmTitle': '确认保存到磁盘',
151
+ 'agents.saveConfirmCta': '先备份再保存',
152
+ 'agents.saveConfirmBackup': '保存前会先把当前文件完整备份到插件的备份目录,然后用原子替换写入新内容。',
153
+ 'agents.saveConfirmScope': '只写这一个文件。若文件在你打开后被其它进程修改,保存会返回 409 冲突而不会覆盖。',
154
+ 'agents.rule.empty-file.reason': '文件为空或只有空白字符。',
155
+ 'agents.rule.empty-file.fix': '写入实际规则内容,或删除该文件以免占用指令链预算。',
156
+ 'agents.rule.bom.reason': '文件以 UTF-8 BOM 开头,BOM 会被当作内容。',
157
+ 'agents.rule.bom.fix': '以无 BOM 的 UTF-8 重新保存。',
158
+ 'agents.rule.mixed-eol.reason': '文件混用了多种换行风格(CRLF / LF / 孤立 CR)。',
159
+ 'agents.rule.mixed-eol.fix': '统一为一种换行风格;保存会沿用文件原有主风格。',
160
+ 'agents.rule.unclosed-fence.reason': '代码围栏未闭合,后续内容会被吞进代码块。',
161
+ 'agents.rule.unclosed-fence.fix': '在代码块末尾补一行闭合围栏。',
162
+ 'agents.rule.heading-jump.reason': '标题层级跳跃(例如 H1 直接到 H3)。',
163
+ 'agents.rule.heading-jump.fix': '补上中间层级,或调整标题级别。',
164
+ 'agents.rule.duplicate-heading.reason': '存在重复标题(归一化空白后相同)。',
165
+ 'agents.rule.duplicate-heading.fix': '合并两节内容,或给后一个标题改名。',
166
+ 'agents.rule.empty-section.reason': '存在没有任何内容的空章节。',
167
+ 'agents.rule.empty-section.fix': '补写该节内容,或删掉这个标题。',
168
+ 'agents.rule.duplicate-rule-line.reason': '存在完全重复的规则行。',
169
+ 'agents.rule.duplicate-rule-line.fix': '删除重复行,或说明两处为何必须同时存在。',
170
+ 'agents.rule.suspected-conflict.reason': '两行疑似互相冲突,需要人工确认。',
171
+ 'agents.rule.suspected-conflict.fix': '确认两行是否真的互斥;若都要保留,请写清适用条件与优先级。',
172
+ 'agents.rule.over-budget.reason': '指令链字节数超过宿主预算,较宽泛的文件会被省略或截断。',
173
+ 'agents.rule.over-budget.fix': '精简较宽泛的上层文件,或提高宿主 dsh-agent-instructions 的 maxBytes。',
174
+ 'agents.rule.missing-local-path.reason': '引用的本地路径不存在。',
175
+ 'agents.rule.missing-local-path.fix': '修正路径拼写,或删除这条引用。',
176
+ 'agents.rule.generic.reason': '校验发现问题。',
177
+ 'agents.rule.generic.fix': '按说明修正;原始宿主文本见折叠区。',
130
178
  },
131
179
  en: {
132
180
  'nav.agents': 'AGENTS.md',
@@ -205,6 +253,9 @@ ACC.addI18n({
205
253
  'agents.overwrite': 'Overwrite and save (backup first)',
206
254
  'agents.viewDiff': 'View diff',
207
255
  'agents.diffTitle': 'Diff (current disk content → editor content)',
256
+ 'agents.diffFrom': 'on disk now',
257
+ 'agents.diffTo': 'editor content',
258
+ 'agents.conflictDetailGeneric': 'The file on disk no longer matches what you opened, so the save was rejected; the disk was not overwritten.',
208
259
  'agents.diffUnavailable': 'Diff unavailable',
209
260
  'agents.diffEmpty': 'No differences',
210
261
 
@@ -254,5 +305,50 @@ ACC.addI18n({
254
305
  'agents.discardTitle': 'Discard unsaved changes?',
255
306
  'agents.discardBody': 'Reloading discards the content that has not been saved yet.',
256
307
  'agents.discardConfirm': 'Discard and reload',
308
+ 'agents.fileListHint': 'Click a file to edit it; the selected row keeps a highlighted border',
309
+ 'agents.fileCount': '{count} candidates',
310
+ 'agents.metaToggle': 'File metadata (encoding / EOL / bytes / hash / budget)',
311
+ 'agents.issueKind': 'Kind',
312
+ 'agents.validationHint': 'Grouped by severity; every finding jumps to its line',
313
+ 'agents.backupsHint': 'Time / size / note; restoring asks for confirmation',
314
+ 'agents.conflictReloadHint': 'Recommended order: reload the on-disk content first, then retype the changes you still want (the overwrite button is the dangerous path).',
315
+ 'agents.conflictReloadPrimary': 'Reload on-disk content (discard my edits)',
316
+ 'agents.conflictForcePrimary': 'Force-overwrite the disk file (backed up first)',
317
+ 'agents.savingHint': 'Saving: a backup is written first, then the source file is replaced atomically.',
318
+ 'agents.restoreCta': 'Restore this backup over the current file',
319
+ 'agents.restoreScope': 'A restore only overwrites this instruction file; other files and session data are untouched.',
320
+ 'agents.rawHostText': 'Raw host text (collapsed in the English UI)',
321
+ 'agents.warningsFallback': 'The instruction chain reported warnings; the original text is folded below.',
322
+ 'agents.noBackupsAction': 'Refresh the backup list',
323
+ 'agents.addedRemoved': '{added} lines added · {removed} removed',
324
+ 'agents.diffLoading': 'Computing the diff…',
325
+ 'agents.saveConfirmTitle': 'Confirm saving to disk',
326
+ 'agents.saveConfirmCta': 'Back up, then save',
327
+ 'agents.saveConfirmBackup': 'The current file is copied into the plugin backup directory first; the new content is then written with an atomic replace.',
328
+ 'agents.saveConfirmScope': 'Only this file is written. If another process changed it after you opened it, the save returns a 409 conflict instead of overwriting.',
329
+ 'agents.rule.empty-file.reason': 'The file is empty or contains whitespace only.',
330
+ 'agents.rule.empty-file.fix': 'Write real rules, or delete the file so it stops consuming the instruction budget.',
331
+ 'agents.rule.bom.reason': 'The file starts with a UTF-8 BOM, which counts as content.',
332
+ 'agents.rule.bom.fix': 'Re-save it as UTF-8 without a BOM.',
333
+ 'agents.rule.mixed-eol.reason': 'The file mixes newline styles (CRLF / LF / lone CR).',
334
+ 'agents.rule.mixed-eol.fix': 'Normalize to one newline style; saving keeps the file\'s dominant style.',
335
+ 'agents.rule.unclosed-fence.reason': 'A code fence is not closed, so later content is swallowed into the block.',
336
+ 'agents.rule.unclosed-fence.fix': 'Add a closing fence at the end of the block.',
337
+ 'agents.rule.heading-jump.reason': 'A heading level is skipped (for example H1 straight to H3).',
338
+ 'agents.rule.heading-jump.fix': 'Add the missing level or adjust the heading.',
339
+ 'agents.rule.duplicate-heading.reason': 'A heading is duplicated (equal after whitespace normalization).',
340
+ 'agents.rule.duplicate-heading.fix': 'Merge the two sections or rename the later heading.',
341
+ 'agents.rule.empty-section.reason': 'A section has no content until the next heading.',
342
+ 'agents.rule.empty-section.fix': 'Write the section content or remove the heading.',
343
+ 'agents.rule.duplicate-rule-line.reason': 'A rule line is duplicated verbatim.',
344
+ 'agents.rule.duplicate-rule-line.fix': 'Remove the duplicate or explain why both must exist.',
345
+ 'agents.rule.suspected-conflict.reason': 'Two lines look contradictory and need a human decision.',
346
+ 'agents.rule.suspected-conflict.fix': 'Decide whether they really conflict; if both are needed, state the applicable conditions and priority.',
347
+ 'agents.rule.over-budget.reason': 'The instruction chain exceeds the host budget, so broader files are omitted or truncated.',
348
+ 'agents.rule.over-budget.fix': 'Trim the broader upper-level files, or raise the host dsh-agent-instructions maxBytes.',
349
+ 'agents.rule.missing-local-path.reason': 'A referenced local path does not exist.',
350
+ 'agents.rule.missing-local-path.fix': 'Fix the path spelling or remove the reference.',
351
+ 'agents.rule.generic.reason': 'Validation reported an issue.',
352
+ 'agents.rule.generic.fix': 'Fix it as described; the raw host text is folded below.',
257
353
  },
258
354
  })
@@ -4,6 +4,20 @@ ACC.addI18n({
4
4
  'nav.title': 'Agent 控制台',
5
5
  'nav.description': 'AGENTS.md、工具、会话、用量、诊断与模板的统一入口',
6
6
  'nav.ariaLabel': '控制台页面导航',
7
+ 'nav.refreshStatus': '刷新状态',
8
+ 'nav.refreshStatusHint': '只刷新宿主健康状态,不重新加载当前页面',
9
+ 'nav.group.edit': '编辑与指令',
10
+ 'nav.group.insight': '会话与洞察',
11
+ 'nav.group.maintain': '维护',
12
+ 'nav.desc.overview': '环境、宿主能力与今天的关键数字',
13
+ 'nav.desc.agents': 'AGENTS.md 指令链的读取、编辑、校验与备份',
14
+ 'nav.desc.tools': '宿主导出的工具清单、定义状态与调用统计',
15
+ 'nav.desc.sessions': '浏览、检索与归档会话,并查看活动详情',
16
+ 'nav.desc.meta': '运行时 Agent、预设与导出相关的元信息',
17
+ 'nav.desc.usage': '按本地日聚合的 Token 与调用用量',
18
+ 'nav.desc.diagnostics': '宿主能力、权限与指令链的只读自检',
19
+ 'nav.desc.templates': '内置与用户模板的浏览、渲染与应用',
20
+ 'nav.desc.recovery': '只读检测中断的会话;不会自动续跑',
7
21
  'nav.empty': '还没有可用页面',
8
22
  'nav.emptyHint': '插件模块尚未就绪。打开「诊断」或查看宿主日志以确认原因。',
9
23
 
@@ -15,6 +29,10 @@ ACC.addI18n({
15
29
  'common.close': '关闭',
16
30
  'common.save': '保存',
17
31
  'common.loading': '正在读取…',
32
+ 'common.loadFailed': '加载失败',
33
+ 'common.networkError': '无法连接宿主',
34
+ 'common.protocolError': '宿主返回了无法解析的响应(HTTP {status})',
35
+ 'common.httpFailed': '请求失败(HTTP {status})',
18
36
  'common.hostUnavailable': '宿主不可用',
19
37
  'common.unavailable': '不可用',
20
38
  'common.unknown': '未知',
@@ -37,6 +55,20 @@ ACC.addI18n({
37
55
  'nav.title': 'Agent Control Center',
38
56
  'nav.description': 'One entry point for AGENTS.md, tools, sessions, usage, diagnostics and templates',
39
57
  'nav.ariaLabel': 'Control center page navigation',
58
+ 'nav.refreshStatus': 'Refresh status',
59
+ 'nav.refreshStatusHint': 'Refreshes host health only; the current page is not reloaded',
60
+ 'nav.group.edit': 'Editing & instructions',
61
+ 'nav.group.insight': 'Sessions & insights',
62
+ 'nav.group.maintain': 'Maintenance',
63
+ 'nav.desc.overview': 'Environment, host capabilities and today’s key numbers',
64
+ 'nav.desc.agents': 'Read, edit, validate and back up the AGENTS.md instruction chain',
65
+ 'nav.desc.tools': 'Tools exposed by the host, their definition state and call statistics',
66
+ 'nav.desc.sessions': 'Browse, search and archive sessions, and inspect activity',
67
+ 'nav.desc.meta': 'Runtime agents, presets and export-related metadata',
68
+ 'nav.desc.usage': 'Token and call usage aggregated by local day',
69
+ 'nav.desc.diagnostics': 'Read-only self-check of host capabilities, permissions and the instruction chain',
70
+ 'nav.desc.templates': 'Browse, render and apply built-in and user templates',
71
+ 'nav.desc.recovery': 'Detects interrupted sessions read-only; never resumes automatically',
40
72
  'nav.empty': 'No pages available yet',
41
73
  'nav.emptyHint': 'Plugin modules are not ready. Open Diagnostics or check the host log for the reason.',
42
74
 
@@ -48,6 +80,10 @@ ACC.addI18n({
48
80
  'common.close': 'Close',
49
81
  'common.save': 'Save',
50
82
  'common.loading': 'Loading…',
83
+ 'common.loadFailed': 'Could not load',
84
+ 'common.networkError': 'Cannot reach the host',
85
+ 'common.protocolError': 'The host returned an unreadable response (HTTP {status})',
86
+ 'common.httpFailed': 'Request failed (HTTP {status})',
51
87
  'common.hostUnavailable': 'Host unavailable',
52
88
  'common.unavailable': 'Unavailable',
53
89
  'common.unknown': 'Unknown',
@@ -138,6 +138,32 @@ ACC.addI18n({
138
138
  'diagnostics.action.storage.documents': '在「用量」页触发一次重算;审计按设计自动轮转。',
139
139
  'diagnostics.action.permission.tier': '检查 permissionPresets/shell/approval 是否加载;只读项。',
140
140
  'diagnostics.action.permission.egress': '如需确认,在宿主机侧测试网络;诊断不发起任何网络请求。',
141
+ 'diagnostics.copyFailed': '复制失败(浏览器未授权剪贴板)',
142
+ 'diagnostics.copyEvidence': '复制该条证据',
143
+ 'diagnostics.copyReport': '复制整份报告',
144
+ 'diagnostics.exportRedactionNote': '报告只含检查结论与证据摘要,不含凭据值或文件正文。下载或复制后可直接贴进 issue。',
145
+ 'diagnostics.downloaded': '已开始下载',
146
+ 'diagnostics.exporting': '导出中…',
147
+ 'diagnostics.fresh': '本次结果',
148
+ 'diagnostics.filterStatus': '按状态筛选检查项',
149
+ 'diagnostics.filterOnly': '只看「{status}」',
150
+ 'diagnostics.filterClear': '清除状态筛选',
151
+ 'diagnostics.filterActive': '正在只看「{status}」,共 {count} 项',
152
+ 'diagnostics.filterAllActive': '显示全部检查项',
153
+ 'diagnostics.expandAll': '展开全部分组',
154
+ 'diagnostics.collapseAll': '折叠全部分组',
155
+ 'diagnostics.noMatch': '当前筛选下没有检查项',
156
+ 'diagnostics.noMatchHint': '清除筛选即可看到全部检查项。',
157
+ 'diagnostics.fixCta': '执行修复并复检',
158
+ 'diagnostics.fixTarget': '修复对象',
159
+ 'diagnostics.fixScope': '修复范围:仅插件自有存储(缓存、临时文件、state.json);不改宿主配置、不删除会话。修复后立即复检并显示修复前 → 修复后。',
160
+ 'diagnostics.rawEvidence': '宿主原始证据(英文界面下默认收起)',
161
+ 'diagnostics.evidenceEmpty': '没有可机读的证据字段',
162
+ 'diagnostics.copyEvidenceFor': '复制 {id} 的证据',
163
+ 'diagnostics.noteBudgetUnknown': '宿主预算不可读,超预算检查已跳过。',
164
+ 'diagnostics.fixApplied': '修复已应用,并已复检该项。',
165
+ 'diagnostics.fixNoChange': '修复未改变该项状态,请按建议人工处理。',
166
+ 'diagnostics.capabilityDetailGeneric': '宿主补充说明已收起到折叠区。',
141
167
  },
142
168
  en: {
143
169
  'nav.diagnostics': 'Diagnostics',
@@ -278,5 +304,31 @@ ACC.addI18n({
278
304
  'diagnostics.action.storage.documents': 'Trigger a recompute on the Usage page; the audit rotates by design.',
279
305
  'diagnostics.action.permission.tier': 'Check whether permissionPresets/shell/approval are loaded; read-only.',
280
306
  'diagnostics.action.permission.egress': 'Confirm host-side network access if needed; diagnostics never makes network requests.',
307
+ 'diagnostics.copyFailed': 'Copy failed (clipboard not permitted)',
308
+ 'diagnostics.copyEvidence': 'Copy this evidence row',
309
+ 'diagnostics.copyReport': 'Copy the whole report',
310
+ 'diagnostics.exportRedactionNote': 'The report contains conclusions and evidence summaries only — no credential values or file bodies. Download or copy it straight into an issue.',
311
+ 'diagnostics.downloaded': 'Download started',
312
+ 'diagnostics.exporting': 'Exporting…',
313
+ 'diagnostics.fresh': 'Fresh run',
314
+ 'diagnostics.filterStatus': 'Filter checks by status',
315
+ 'diagnostics.filterOnly': 'Show only "{status}"',
316
+ 'diagnostics.filterClear': 'Clear the status filter',
317
+ 'diagnostics.filterActive': 'Showing only "{status}" ({count} checks)',
318
+ 'diagnostics.filterAllActive': 'Showing every check',
319
+ 'diagnostics.expandAll': 'Expand all groups',
320
+ 'diagnostics.collapseAll': 'Collapse all groups',
321
+ 'diagnostics.noMatch': 'No check matches the current filter',
322
+ 'diagnostics.noMatchHint': 'Clear the filter to see every check.',
323
+ 'diagnostics.fixCta': 'Apply fix and re-check',
324
+ 'diagnostics.fixTarget': 'Target check',
325
+ 'diagnostics.fixScope': 'Scope: the plugin\'s own storage only (cache, temp files, state.json). Host configuration is untouched and no session is deleted. The item is re-checked immediately and the result is shown as before → after.',
326
+ 'diagnostics.rawEvidence': 'Raw host evidence (collapsed in the English UI)',
327
+ 'diagnostics.evidenceEmpty': 'No machine-readable evidence fields',
328
+ 'diagnostics.copyEvidenceFor': 'Copy evidence for {id}',
329
+ 'diagnostics.noteBudgetUnknown': 'The host instruction budget could not be read, so the over-budget check was skipped.',
330
+ 'diagnostics.fixApplied': 'The fix was applied and the check re-ran.',
331
+ 'diagnostics.fixNoChange': 'The fix did not change this check; follow the suggested action instead.',
332
+ 'diagnostics.capabilityDetailGeneric': 'The host detail is folded below.',
281
333
  },
282
334
  })
@@ -0,0 +1,174 @@
1
+ /* Export page vocabulary (module K). Every user-visible string lives here.
2
+ * The build checks zh/en key parity, so both dictionaries stay in lockstep. */
3
+ ACC.addI18n({
4
+ zh: {
5
+ 'nav.export': '会话导出',
6
+ 'nav.desc.export': '把会话只读导出为 Markdown 或 JSON,可复制与下载',
7
+
8
+ 'export.policyNote': '只读导出:不删除、不归档、不上传。',
9
+ 'export.policySource': '宿主策略原文',
10
+ 'export.loading': '正在读取导出能力…',
11
+ 'export.loadFailed': '导出能力读取失败',
12
+ 'export.moduleMissing': '当前宿主插件构建没有加载 export 模块(版本 {version})。',
13
+ 'export.errorHint': '页面本身已加载;若当前宿主缺少导出方法,请升级并重启插件后重试,本页不会显示假数据。',
14
+ 'export.unavailableHint': '请升级并重启 Agent Control Center,确认宿主提供 export.* 方法后重试;本页不会显示假数据。',
15
+ 'export.capabilityHint': '导出需要宿主提供 sessionQuery 服务(含 readSession);请在支持该能力的版本中重启插件后重试。',
16
+ 'export.unknownReason': '宿主未返回原因',
17
+ 'export.reasonLabel': '原因',
18
+ 'export.nextStepLabel': '下一步',
19
+
20
+ 'export.pickTitle': '选择会话',
21
+ 'export.sessionsCount': '显示 {shown} / 共 {total} 个会话',
22
+ 'export.searchActive': '筛选:{query}',
23
+ 'export.searchPlaceholder': '按标题或会话 ID 搜索…',
24
+ 'export.searchAria': '搜索可导出的会话',
25
+ 'export.searchClear': '清空搜索',
26
+ 'export.sessionsListAria': '可导出的会话列表',
27
+ 'export.loadingSessions': '正在读取会话列表…',
28
+ 'export.loadFailedSessions': '会话列表加载失败',
29
+ 'export.emptySessions': '没有可导出的会话',
30
+ 'export.emptySessionsHint': '宿主没有返回可导出的会话记录;可以刷新后重试。',
31
+ 'export.emptySearch': '没有匹配的会话',
32
+ 'export.emptySearchHint': '换个关键词,或清空搜索。',
33
+ 'export.untitled': '未命名会话',
34
+ 'export.archived': '已归档',
35
+ 'export.originLabel': '来源',
36
+ 'export.eventCount': '{count} 个事件',
37
+
38
+ 'export.settingsTitle': '导出设置',
39
+ 'export.settingsHint': '格式、工具结果与字节上限只影响下一次生成。',
40
+ 'export.format': '格式',
41
+ 'export.formatAria': '导出格式',
42
+ 'export.formatMarkdown': 'Markdown',
43
+ 'export.formatJson': 'JSON',
44
+ 'export.includeToolResults': '包含工具结果',
45
+ 'export.includeToolResultsHint': '关闭后工具调用只保留摘要,导出更小。',
46
+ 'export.maxBytes': '字节上限',
47
+ 'export.maxBytesHint': '超过上限时按事件边界截断,不会留下半个事件。',
48
+ 'export.limit64': '64 KiB',
49
+ 'export.limit256': '256 KiB',
50
+ 'export.limit1m': '1 MiB',
51
+
52
+ 'export.resultTitle': '导出结果',
53
+ 'export.resultHint': '先看概况,再生成预览;生成不会写入任何会话记录。',
54
+ 'export.selectHint': '从左侧选择一个会话',
55
+ 'export.selectHintHint': '选中后会先显示概况,再按当前设置生成导出。',
56
+ 'export.summaryLoading': '正在统计会话…',
57
+ 'export.summaryFailed': '会话概况加载失败',
58
+ 'export.countEvents': '事件',
59
+ 'export.countUser': '用户消息',
60
+ 'export.countAssistant': '助手消息',
61
+ 'export.countToolCalls': '工具调用',
62
+ 'export.countToolResults': '工具结果',
63
+ 'export.countToolErrors': '工具错误',
64
+ 'export.countErrors': '错误',
65
+ 'export.estimatedMarkdown': 'Markdown 估算',
66
+ 'export.estimatedJson': 'JSON 估算',
67
+ 'export.generate': '生成导出',
68
+ 'export.generating': '正在生成…',
69
+ 'export.generateFailed': '生成导出失败',
70
+ 'export.generateHint': '设置改动后需要重新生成;复制与下载使用最近一次结果。',
71
+ 'export.resultBytes': '导出字节',
72
+ 'export.resultTotalBytes': '完整字节',
73
+ 'export.truncated': '截断',
74
+ 'export.truncatedYes': '已截断',
75
+ 'export.truncatedNo': '未截断',
76
+ 'export.omittedEvents': '省略事件',
77
+ 'export.generatedAt': '生成时间',
78
+ 'export.truncatedNotice': '超出字节上限,已按事件边界省略 {count} 个事件。',
79
+ 'export.warnings': '提示',
80
+ 'export.preview': '预览',
81
+ 'export.previewEmpty': '导出内容为空',
82
+ 'export.copy': '复制',
83
+ 'export.copied': '已复制',
84
+ 'export.copyFailed': '复制失败(浏览器未授权剪贴板)',
85
+ 'export.download': '下载',
86
+ 'export.downloaded': '已开始下载',
87
+ 'export.downloadFailed': '下载失败(浏览器不支持 Blob 下载)',
88
+ },
89
+ en: {
90
+ 'nav.export': 'Export',
91
+ 'nav.desc.export': 'Read-only session export to Markdown or JSON, with copy and download',
92
+
93
+ 'export.policyNote': 'Read-only export: it never deletes, archives or uploads anything.',
94
+ 'export.policySource': 'Host policy text',
95
+ 'export.loading': 'Reading export capabilities…',
96
+ 'export.loadFailed': 'Could not read export capabilities',
97
+ 'export.moduleMissing': 'The current host plugin build does not load the export module (version {version}).',
98
+ 'export.errorHint': 'The page itself loaded; if the host is missing the export methods, upgrade and restart the plugin, then retry. This page never shows made-up data.',
99
+ 'export.unavailableHint': 'Upgrade and restart Agent Control Center so the host exposes the export.* methods, then retry; this page never shows made-up data.',
100
+ 'export.capabilityHint': 'Export needs the host sessionQuery service with readSession; restart the plugin on a build that provides it, then retry.',
101
+ 'export.unknownReason': 'The host returned no reason',
102
+ 'export.reasonLabel': 'Reason',
103
+ 'export.nextStepLabel': 'Next step',
104
+
105
+ 'export.pickTitle': 'Choose a session',
106
+ 'export.sessionsCount': 'Showing {shown} of {total} sessions',
107
+ 'export.searchActive': 'Filtered by: {query}',
108
+ 'export.searchPlaceholder': 'Search by title or session ID…',
109
+ 'export.searchAria': 'Search exportable sessions',
110
+ 'export.searchClear': 'Clear search',
111
+ 'export.sessionsListAria': 'Exportable session list',
112
+ 'export.loadingSessions': 'Loading the session list…',
113
+ 'export.loadFailedSessions': 'Could not load the session list',
114
+ 'export.emptySessions': 'No sessions available for export',
115
+ 'export.emptySessionsHint': 'The host returned no exportable session records; refresh and retry.',
116
+ 'export.emptySearch': 'No sessions match the search',
117
+ 'export.emptySearchHint': 'Try another keyword, or clear the search.',
118
+ 'export.untitled': 'Untitled session',
119
+ 'export.archived': 'Archived',
120
+ 'export.originLabel': 'Origin',
121
+ 'export.eventCount': '{count} events',
122
+
123
+ 'export.settingsTitle': 'Export settings',
124
+ 'export.settingsHint': 'Format, tool results and the byte limit only affect the next generated export.',
125
+ 'export.format': 'Format',
126
+ 'export.formatAria': 'Export format',
127
+ 'export.formatMarkdown': 'Markdown',
128
+ 'export.formatJson': 'JSON',
129
+ 'export.includeToolResults': 'Include tool results',
130
+ 'export.includeToolResultsHint': 'When off, tool calls keep only summaries and the export is smaller.',
131
+ 'export.maxBytes': 'Byte limit',
132
+ 'export.maxBytesHint': 'Over the limit, events are dropped at event boundaries; never half an event.',
133
+ 'export.limit64': '64 KiB',
134
+ 'export.limit256': '256 KiB',
135
+ 'export.limit1m': '1 MiB',
136
+
137
+ 'export.resultTitle': 'Export result',
138
+ 'export.resultHint': 'Review the summary, then generate a preview; generation never writes session records.',
139
+ 'export.selectHint': 'Pick a session from the left',
140
+ 'export.selectHintHint': 'A selected session shows its summary first; then export with the current settings.',
141
+ 'export.summaryLoading': 'Counting the session…',
142
+ 'export.summaryFailed': 'Could not load the session summary',
143
+ 'export.countEvents': 'Events',
144
+ 'export.countUser': 'User messages',
145
+ 'export.countAssistant': 'Assistant messages',
146
+ 'export.countToolCalls': 'Tool calls',
147
+ 'export.countToolResults': 'Tool results',
148
+ 'export.countToolErrors': 'Tool errors',
149
+ 'export.countErrors': 'Errors',
150
+ 'export.estimatedMarkdown': 'Markdown estimate',
151
+ 'export.estimatedJson': 'JSON estimate',
152
+ 'export.generate': 'Generate export',
153
+ 'export.generating': 'Generating…',
154
+ 'export.generateFailed': 'Could not generate the export',
155
+ 'export.generateHint': 'Changing settings requires regenerating; copy and download use the latest result.',
156
+ 'export.resultBytes': 'Export bytes',
157
+ 'export.resultTotalBytes': 'Full size',
158
+ 'export.truncated': 'Truncation',
159
+ 'export.truncatedYes': 'Truncated',
160
+ 'export.truncatedNo': 'Not truncated',
161
+ 'export.omittedEvents': 'Omitted events',
162
+ 'export.generatedAt': 'Generated',
163
+ 'export.truncatedNotice': 'Over the byte limit; {count} events omitted at event boundaries.',
164
+ 'export.warnings': 'Warnings',
165
+ 'export.preview': 'Preview',
166
+ 'export.previewEmpty': 'The export is empty',
167
+ 'export.copy': 'Copy',
168
+ 'export.copied': 'Copied',
169
+ 'export.copyFailed': 'Copy failed (the browser denied clipboard access)',
170
+ 'export.download': 'Download',
171
+ 'export.downloaded': 'Download started',
172
+ 'export.downloadFailed': 'Download failed (Blob download unsupported)',
173
+ },
174
+ })