Skip to content

Commit 777bf3d

Browse files
committed
Refine docs version display and update workspace content
1 parent 99e0bfc commit 777bf3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1004
-954
lines changed

doc/app/globals.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,24 @@ samp {
313313
line-height: 1.6;
314314
}
315315

316+
.home-version-note {
317+
display: inline-flex;
318+
gap: 8px;
319+
align-items: center;
320+
margin: 16px 0 0;
321+
color: var(--page-fg-muted);
322+
font-size: 0.95rem;
323+
}
324+
325+
.home-version-note code {
326+
padding: 4px 8px;
327+
border: 1px solid var(--surface-border);
328+
border-radius: 999px;
329+
background: var(--surface-subtle);
330+
color: var(--page-fg);
331+
font-size: 0.9em;
332+
}
333+
316334
.home-actions {
317335
display: flex;
318336
flex-wrap: wrap;

doc/app/home-page.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Link from 'next/link'
22
import {HomeContributors} from '../components/home-contributors'
3+
import {HomeVersionNote} from '../components/home-version-note'
34
import {
45
capabilityCards,
56
heroProofPoints,
@@ -30,6 +31,7 @@ import {
3031
<div className="home-hero-lead">
3132
{siteConfig.productName} is a high-performance, Rust-first pipeline that synchronizes prompts, rules, and workspace memory into native tool configurations.
3233
</div>
34+
<HomeVersionNote />
3335

3436
<div className="home-actions">
3537
<Link href="/docs/quick-guide" className="hero-button hero-button-primary">
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export function HomeVersionNote() {
2+
const version = process.env.NEXT_PUBLIC_MEMORY_SYNC_VERSION
3+
4+
if (version == null || version === '') {
5+
return null
6+
}
7+
8+
return (
9+
<p className="home-version-note">
10+
Current version: <code>{version}</code>
11+
</p>
12+
)
13+
}

doc/content/_meta.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export default {
22
'index': {
3-
title: 'Overview'
3+
title: '概览'
44
},
55
'quick-guide': {
6-
title: 'Quick Guide'
6+
title: '快速指南'
77
},
88
'cli': {
99
title: 'CLI'
@@ -18,9 +18,9 @@ export default {
1818
title: 'GUI'
1919
},
2020
'technical-details': {
21-
title: 'Technical Details'
21+
title: '技术细节'
2222
},
2323
'design-rationale': {
24-
title: 'Design Rationale'
24+
title: '设计缘由'
2525
}
2626
}

doc/content/cli/_meta.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
export default {
2-
'index': 'Overview',
3-
'install': 'Installation and Requirements',
4-
'workspace-setup': 'Workspace and aindex',
5-
'first-sync': 'First Sync',
6-
'migration': 'Migrating from Older Docs',
7-
'cli-commands': 'CLI Commands',
8-
'dry-run-and-clean': 'dry-run and clean',
2+
'index': '概览',
3+
'install': '安装与要求',
4+
'workspace-setup': '工作区与 aindex',
5+
'first-sync': '第一次同步',
6+
'migration': '从旧文档迁移',
7+
'cli-commands': 'CLI 命令',
8+
'dry-run-and-clean': 'dry-run clean',
99
'plugin-config': 'plugin.config.ts',
1010
'schema': 'JSON Schema',
11-
'output-scopes': 'Output Scopes',
11+
'output-scopes': '输出范围',
1212
'frontmatter': 'Front Matter',
13-
'cleanup-protection': 'Cleanup Protection',
14-
'supported-outputs': 'Supported Outputs',
15-
'troubleshooting': 'Troubleshooting',
16-
'upgrade-notes': 'Upgrade Notes'
13+
'cleanup-protection': '清理保护',
14+
'supported-outputs': '支持的输出',
15+
'troubleshooting': '故障排查',
16+
'upgrade-notes': '升级说明'
1717
}
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
2-
title: Cleanup Protection
3-
description: Explains that `cleanupProtection` is now a legacy `.tnmsc.json` field and how cleanup safety works today.
4-
sidebarTitle: Cleanup Protection
2+
title: 清理保护
3+
description: 说明 `cleanupProtection` 现在已是遗留 `.tnmsc.json` 字段,以及当前清理安全机制如何工作。
4+
sidebarTitle: 清理保护
55
status: stable
66
---
77

8-
# Cleanup Protection
8+
# 清理保护
99

10-
`cleanupProtection` should now be treated as a legacy config block in `~/.aindex/.tnmsc.json`.
10+
`cleanupProtection` 现在应被视为 `~/.aindex/.tnmsc.json` 中的遗留配置块。
1111

12-
The `clean` command still has protection behavior, but it now comes from fixed runtime guardrails and plugin-declared cleanup boundaries rather than user-authored JSON rules in the global config file.
12+
`clean` 命令仍然具备保护行为,但它现在来自固定的运行时护栏和插件声明的清理边界,而不是全局配置文件里用户手写的 JSON 规则。
1313

14-
## What Still Protects Cleanup Today
14+
## 现在仍在保护清理行为的是什么
1515

16-
- `tnmsc clean --dry-run` lets you inspect the exact cleanup plan first.
17-
- Workspace-level reserved roots still stay protected.
18-
- Output plugins still declare their own cleanup and protection boundaries internally.
16+
- `tnmsc clean --dry-run` 允许你先检查精确的清理计划。
17+
- 工作区级保留根目录仍然受保护。
18+
- 输出插件仍会在内部声明自己的清理与保护边界。
1919

20-
## What You Should Do Instead
20+
## 你现在应该怎么做
2121

22-
- Keep hand-written files out of tnmsc-managed output directories.
23-
- Use `dry-run` before a real clean.
24-
- If a target needs different cleanup behavior, change the project/plugin assembly rather than adding a `cleanupProtection` block back into `~/.aindex/.tnmsc.json`.
22+
- 把手写文件放在 tnmsc 管理的输出目录之外。
23+
- 在真正清理前先运行 `dry-run`
24+
- 如果某个目标需要不同的清理行为,应该调整项目或插件装配,而不是重新把 `cleanupProtection` 加回 `~/.aindex/.tnmsc.json`
2525

26-
## What To Remove From Old Configs
26+
## 旧配置里该移除什么
2727

28-
If an older config still contains `cleanupProtection`, remove it. It is no longer part of the supported user-facing config surface.
28+
如果旧配置中仍包含 `cleanupProtection`,请移除它。它已经不再属于受支持的用户侧配置表面。

doc/content/cli/cli-commands.mdx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
---
2-
title: CLI Commands
3-
description: Summarizes the commands and behavior currently exposed by tnmsc --help.
4-
sidebarTitle: CLI Commands
2+
title: CLI 命令
3+
description: 汇总 `tnmsc --help` 当前暴露的命令及其行为。
4+
sidebarTitle: CLI 命令
55
status: stable
66
---
77

8-
# CLI Commands
8+
# CLI 命令
99

10-
The commands currently exposed by `tnmsc --help` are:
10+
`tnmsc --help` 当前暴露的命令如下:
1111

12-
| Command | Description |
12+
| 命令 | 说明 |
1313
| --- | --- |
14-
| `tnmsc` | Run the default sync pipeline |
15-
| `tnmsc help` | Show help |
16-
| `tnmsc version` | Show the version |
17-
| `tnmsc dry-run` | Preview the files that would be written |
18-
| `tnmsc clean` | Delete generated outputs and continue cleaning empty directories from the project source tree |
19-
| `tnmsc clean --dry-run` | Preview what would be cleaned, including empty directories that would be swept afterward |
14+
| `tnmsc` | 运行默认同步流水线 |
15+
| `tnmsc help` | 显示帮助 |
16+
| `tnmsc version` | 显示版本 |
17+
| `tnmsc dry-run` | 预览将要写入的文件 |
18+
| `tnmsc clean` | 删除生成输出,并继续清理项目源码树中的空目录 |
19+
| `tnmsc clean --dry-run` | 预览将被清理的内容,包括后续会一并移除的空目录 |
2020

21-
## Key Takeaways
21+
## 关键信息
2222

23-
### Global Config Is File-Based
23+
### 全局配置基于文件
2424

25-
The global user config lives at `~/.aindex/.tnmsc.json`. Edit that file directly. The authoritative field list and fixed aindex layout now live in [aindex and `.tnmsc.json`](/docs/quick-guide/aindex-and-config).
25+
全局用户配置位于 `~/.aindex/.tnmsc.json`。请直接编辑该文件。权威字段列表和固定的 aindex 布局现在统一说明在 [aindex and `.tnmsc.json`](/docs/quick-guide/aindex-and-config)
2626

27-
That includes the newer `codeStyles` block for lightweight user code-style preferences such as `indent` and `tabSize`.
27+
其中也包括较新的 `codeStyles` 配置块,用于保存 `indent``tabSize` 这类轻量级用户代码风格偏好。
2828

29-
### `logLevel` Is Also Strictly Enumerated
29+
### `logLevel` 也有严格枚举值
3030

31-
It can only be:
31+
它只能取以下值:
3232

3333
```text
3434
trace / debug / info / warn / error
3535
```
3636

37-
## Recommended Habits
37+
## 推荐习惯
3838

39-
1. Run `tnmsc help` first in a new environment.
40-
2. Run `tnmsc dry-run` before writing outputs.
41-
3. Run `tnmsc clean --dry-run` before cleanup.
42-
4. If you need to change global config, edit `~/.aindex/.tnmsc.json` and keep only supported user-facing fields.
39+
1. 在新环境里先运行 `tnmsc help`
40+
2. 在写出输出前先运行 `tnmsc dry-run`
41+
3. 在执行清理前先运行 `tnmsc clean --dry-run`
42+
4. 如果需要修改全局配置,编辑 `~/.aindex/.tnmsc.json`,并只保留受支持的用户侧字段。
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
---
2-
title: dry-run and clean
3-
description: Explains how tnmsc previews outputs, then performs cleanup, with dry-run and built-in guardrails used to control risk.
4-
sidebarTitle: dry-run and clean
2+
title: dry-run clean
3+
description: 说明 tnmsc 如何通过 `dry-run` 预览输出,再通过 `clean` 执行清理,并依靠内建护栏控制风险。
4+
sidebarTitle: dry-run clean
55
status: stable
66
---
77

8-
# dry-run and clean
8+
# `dry-run``clean`
99

10-
## What `dry-run` Does
10+
## `dry-run` 会做什么
1111

12-
`tnmsc dry-run` previews the files and directories that the current execution would write. It is especially useful in these situations:
12+
`tnmsc dry-run` 会预览当前执行将要写入的文件和目录。它在以下场景中特别有用:
1313

14-
- When integrating a project for the first time
15-
- Right after changing `plugin.config.ts`
16-
- Right after changing source prompt scope or global config
17-
- Before validating the impact of a large source-content change
14+
- 首次接入一个项目时
15+
- 修改 `plugin.config.ts` 之后
16+
- 修改源 prompt 作用域或全局配置之后
17+
- 想验证一次较大源内容变更的影响之前
1818

19-
## What `clean` Does
19+
## `clean` 会做什么
2020

21-
`tnmsc clean` removes generated output files. It is not a blind directory deletion command. It follows the current output model and the cleanup declarations built into the runtime.
21+
`tnmsc clean` 会移除生成出的输出文件。它不是一个盲删目录的命令,而是遵循当前输出模型和运行时内建的清理声明来执行。
2222

23-
After normal cleanup finishes, `tnmsc clean` also scans the current project source tree and removes remaining empty directories. That empty-dir sweep explicitly skips Git internals as well as dependency, build-output, and cache directory trees.
23+
常规清理完成后,`tnmsc clean` 还会扫描当前项目源码树,删除剩余的空目录。这个空目录扫描会明确跳过 Git 内部目录,以及依赖、构建输出和缓存目录树。
2424

25-
Before running it for real, prefer:
25+
在真正执行之前,优先先运行:
2626

2727
```sh
2828
tnmsc clean --dry-run
2929
```
3030

31-
`--dry-run` will also show the empty directories that would be removed afterward.
31+
`--dry-run` 也会显示后续将被移除的空目录。
3232

33-
## Risk Boundary
33+
## 风险边界
3434

35-
If your output directories also contain hand-written files or outputs from other tools, do not rely on a `cleanupProtection` block in `~/.aindex/.tnmsc.json`. Keep those files out of tnmsc-managed output paths, or adjust the project/plugin assembly before running a real clean.
35+
如果你的输出目录里还混有手写文件或其他工具生成的内容,不要依赖 `~/.aindex/.tnmsc.json` 中的 `cleanupProtection` 配置块。应把这些文件移出 tnmsc 管理的输出路径,或者在真正执行清理前调整项目或插件装配方式。
3636

37-
## Recommended Habits
37+
## 推荐习惯
3838

39-
1. Run `dry-run` first when you change config, source scope, or plugin assembly.
40-
2. Run `clean --dry-run` first when you really intend to clean.
41-
3. If something looks wrong, continue with [Troubleshooting](/docs/cli/troubleshooting).
39+
1. 当你修改配置、源作用域或插件装配时,先运行 `dry-run`
40+
2. 当你确实准备清理时,先运行 `clean --dry-run`
41+
3. 如果结果看起来不对,请继续查看 [故障排查](/docs/cli/troubleshooting)

doc/content/cli/first-sync.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
---
2-
title: First Sync
3-
description: Walk through tnmsc help, dry-run, the real sync run, and result verification in the shortest path.
4-
sidebarTitle: First Sync
2+
title: 第一次同步
3+
description: 用最短路径走完 tnmsc helpdry-run、真实同步运行和结果核验。
4+
sidebarTitle: 第一次同步
55
status: stable
66
---
77

8-
# First Sync
8+
# 第一次同步
99

10-
## Recommended Order
10+
## 推荐顺序
1111

12-
1. Run `tnmsc help` first to confirm that you are looking at the current command set.
13-
2. Run `tnmsc dry-run` next to see which files would be written.
14-
3. Only after confirming the scope should you run the default sync pipeline.
12+
1. 先运行 `tnmsc help`,确认你看到的是当前命令集。
13+
2. 然后运行 `tnmsc dry-run`,查看哪些文件将会被写入。
14+
3. 只有在确认范围之后,才运行默认 sync 流水线。
1515

16-
## Shortest Flow
16+
## 最短流程
1717

1818
```sh
1919
tnmsc help
2020
tnmsc dry-run
2121
tnmsc
2222
```
2323

24-
## Why You Should Not Skip `dry-run`
24+
## 为什么不要跳过 `dry-run`
2525

26-
The current system does more than write files. It also applies cleanup boundaries based on configuration. On a first integration, checking the preview is much cheaper than recovering from accidental writes or accidental deletions afterward.
26+
当前系统做的不只是写文件。它还会根据配置应用清理边界。对于第一次接入来说,先检查预览,比事后处理误写入或误删除的成本低得多。
2727

28-
If you are unsure about cleanup risk, read [dry-run and clean](/docs/cli/dry-run-and-clean) and [Cleanup Protection](/docs/cli/cleanup-protection) first.
28+
如果你不确定清理风险,先看 [dry-run clean](/docs/cli/dry-run-and-clean) [清理保护](/docs/cli/cleanup-protection)
2929

30-
## What to Verify After Sync
30+
## 同步后要核对什么
3131

32-
- Whether the target tool appears in [Supported Outputs](/docs/cli/supported-outputs)
33-
- Whether the actual write scope matches [Output Scopes](/docs/cli/output-scopes)
34-
- Whether field behavior matches the [JSON Schema](/docs/cli/schema)
32+
- 目标工具是否出现在[支持的输出](/docs/cli/supported-outputs)
33+
- 实际写入范围是否符合[输出范围](/docs/cli/output-scopes)
34+
- 字段行为是否符合 [JSON Schema](/docs/cli/schema)

0 commit comments

Comments
 (0)