dsh-plugin-guide 0.3.8 → 0.3.10
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/{README.es.md → README-es.md} +2 -2
- package/{README.hi.md → README-hi.md} +2 -2
- package/{README.pt.md → README-pt.md} +2 -2
- package/{README.zh.md → README-zh.md} +2 -2
- package/README.md +2 -2
- package/dist/dsh-plugin-dev.js +4 -4
- package/guide/links.md +1 -1
- package/guide/release-engineering.md +31 -2
- package/guide/release-engineering.zh-CN.md +31 -2
- package/package.json +7 -7
- package/references/harness-repo.md +2 -2
- package/references/official-docs/README.i18n.yaml +1 -1
- package/references/official-docs/README.md +1 -1
- package/references/official-docs/SNAPSHOT.md +1 -1
- package/references/official-docs/docs/architecture.zh.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +1 -1
- package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +2 -2
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +1 -1
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +2 -2
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +4 -4
- package/references/official-docs/docs/development.zh.md +3 -3
- package/references/official-docs/docs/i18n/README.i18n.yaml +1 -1
- package/references/official-docs/docs/i18n/README.md +1 -1
- package/references/official-docs/docs/i18n/style-samples.md +1 -1
- package/references/official-docs/docs/i18n/translation-prompt.md +4 -4
- package/references/official-docs/docs/i18n/translation-rules.zh.md +2 -2
- package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
- package/references/official-docs/docs/postmortem/README.md +1 -1
- package/references/official-docs/docs/postmortem/README.zh.md +1 -1
- package/references/official-docs/docs/subsystems/README.i18n.yaml +1 -1
- package/references/official-docs/docs/subsystems/README.md +1 -1
- package/references/official-docs/docs/subsystems/agent-team.zh.md +1 -1
- package/references/official-docs/docs/subsystems/client-modules.zh.md +2 -2
- package/references/official-docs/docs/subsystems/commands.zh.md +1 -1
- package/references/official-docs/docs/subsystems/compaction.zh.md +2 -2
- package/references/official-docs/docs/subsystems/conversation.zh.md +1 -1
- package/references/official-docs/docs/subsystems/core.zh.md +3 -3
- package/references/official-docs/docs/subsystems/extensions.zh.md +1 -1
- package/references/official-docs/docs/subsystems/filesystem.zh.md +1 -1
- package/references/official-docs/docs/subsystems/goal.zh.md +1 -1
- package/references/official-docs/docs/subsystems/invariants.zh.md +2 -2
- package/references/official-docs/docs/subsystems/jobs.zh.md +1 -1
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +2 -2
- package/references/official-docs/docs/subsystems/permission-presets.zh.md +1 -1
- package/references/official-docs/docs/subsystems/plan.zh.md +2 -2
- package/references/official-docs/docs/subsystems/sandbox.zh.md +2 -2
- package/references/official-docs/docs/subsystems/schedule.zh.md +2 -2
- package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-projection.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +2 -2
- package/references/official-docs/docs/subsystems/session.zh.md +1 -1
- package/references/official-docs/docs/subsystems/shell.zh.md +1 -1
- package/references/official-docs/docs/subsystems/slots.zh.md +1 -1
- package/references/official-docs/docs/subsystems/storage.zh.md +2 -2
- package/references/official-docs/docs/subsystems/subprocess.zh.md +1 -1
- package/references/official-docs/docs/subsystems/system-prompt.zh.md +1 -1
- package/references/official-docs/docs/subsystems/todo.zh.md +1 -1
- package/references/official-docs/docs/subsystems/web-client.zh.md +3 -3
- package/references/official-docs/docs/subsystems/web-server.zh.md +1 -1
- package/references/official-docs/docs/subsystems/workflow.zh.md +2 -2
- package/references/official-docs/docs/testing.zh.md +1 -1
- package/references/official-docs/docs/user/develop/basic/index.zh.md +1 -1
- package/references/official-docs/docs/user/develop/basic/publish.zh.md +3 -3
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +2 -2
- package/references/official-docs/docs/user/guide/index.zh.md +2 -2
- package/references/official-docs/docs/user/guide/mcp-memory.zh.md +1 -1
- package/references/official-docs/docs/user/guide/providers.zh.md +2 -2
- package/references/official-docs/docs/user/guide/python-sdk.zh.md +1 -1
- package/references/official-docs/docs/web-styling.zh.md +1 -1
- package/references/official-docs/packages/README.md +1 -1
- package/references/sources.md +2 -2
- package/references/website-pages.md +2 -2
- package/scripts/check-readme-sync.mjs +4 -4
- package/scripts/sync-official-docs.ps1 +4 -4
- package/scripts/verify-artifacts.mjs +1 -1
- package/scripts/verify-kit.ps1 +2 -2
- /package/templates/js/{README.es.md → README-es.md} +0 -0
- /package/templates/js/{README.hi.md → README-hi.md} +0 -0
- /package/templates/js/{README.pt.md → README-pt.md} +0 -0
- /package/templates/js/{README.zh.md → README-zh.md} +0 -0
- /package/templates/ts/{README.es.md → README-es.md} +0 -0
- /package/templates/ts/{README.hi.md → README-hi.md} +0 -0
- /package/templates/ts/{README.pt.md → README-pt.md} +0 -0
- /package/templates/ts/{README.zh.md → README-zh.md} +0 -0
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
17
17
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
18
18
|
|
|
19
|
-
[English](README.md) · [简体中文](README
|
|
19
|
+
[English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
| Surface | Status |
|
|
28
28
|
|---|---|
|
|
29
|
-
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.
|
|
29
|
+
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.2` (adaptado el 2026-09-09): el sobre de sesión conserva su campo ignorable solo para compatibilidad de lectura de logs almacenados - Session.append aún no puede estamparlo, por lo que el comportamiento de la puerta no cambia. Verificado el 2026-09-11 contra el checkout master dsh-v0.1.5-rc.2 (cadena completa de gates + smoke de instalación de perfil). |
|
|
30
30
|
| Node | `^22.19.0 || >=24.0.0` (runtime de DeepSeek Harness) |
|
|
31
31
|
| Platforms | Todas (bundle ESM plano; sin código nativo, sin red) |
|
|
32
32
|
| Model | Cualquiera (sin interacción con el modelo) |
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
17
17
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
18
18
|
|
|
19
|
-
[English](README.md) · [简体中文](README
|
|
19
|
+
[English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
| Surface | Status |
|
|
28
28
|
|---|---|
|
|
29
|
-
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.
|
|
29
|
+
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.2` (2026-09-09 को अनुकूलित): सत्र लिफ़ाफ़ा अपना ignorable फ़ील्ड केवल संग्रहीत-लॉग पठन संगतता के लिए रखता है - Session.append अभी भी इसे स्टैम्प नहीं कर सकता, इसलिए गेट व्यवहार अपरिवर्तित है। 2026-09-11 को dsh-v0.1.5-rc.2 master checkout के विरुद्ध सत्यापित (पूर्ण gate chain + profile install smoke)। |
|
|
30
30
|
| Node | `^22.19.0 || >=24.0.0` (DeepSeek Harness रनटाइम) |
|
|
31
31
|
| Platforms | सभी (सादा ESM बंडल; कोई नेटिव कोड नहीं, कोई नेटवर्क नहीं) |
|
|
32
32
|
| Model | कोई भी (कोई मॉडल अंतःक्रिया नहीं) |
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
17
17
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
18
18
|
|
|
19
|
-
[English](README.md) · [简体中文](README
|
|
19
|
+
[English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
| Surface | Status |
|
|
28
28
|
|---|---|
|
|
29
|
-
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.
|
|
29
|
+
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.2` (adaptado em 2026-09-09): o envelope de sessão mantém seu campo ignorable apenas para compatibilidade de leitura de logs armazenados - o Session.append ainda não consegue estampá-lo, então o comportamento da porta não muda. Verificado em 2026-09-11 contra o checkout master dsh-v0.1.5-rc.2 (cadeia completa de gates + smoke de instalação de perfil). |
|
|
30
30
|
| Node | `^22.19.0 || >=24.0.0` (runtime do DeepSeek Harness) |
|
|
31
31
|
| Platforms | Todas (bundle ESM puro; sem código nativo, sem rede) |
|
|
32
32
|
| Model | Qualquer (sem interação com o modelo) |
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
19
19
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
20
20
|
|
|
21
|
-
[English](README.md) · [简体中文](README
|
|
21
|
+
[English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
22
22
|
|
|
23
23
|
</div>
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
| Surface | Status |
|
|
30
30
|
|---|---|
|
|
31
|
-
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.
|
|
31
|
+
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.2`(2026-09-09 已适配):会话信封保留 ignorable 字段但仅用于存量日志读取兼容——Session.append 仍无法盖章,门控行为不变。已于 2026-09-11 对照 dsh-v0.1.5-rc.2 master checkout 核验(完整门禁链 + profile 安装冒烟)。 |
|
|
32
32
|
| Node | `^22.19.0 || >=24.0.0`(DeepSeek Harness 运行时) |
|
|
33
33
|
| Platforms | 全部(纯 ESM bundle;无原生代码、无网络) |
|
|
34
34
|
| Model | 任意(无模型交互) |
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
20
20
|
[](https://www.npmjs.com/package/dsh-plugin-guide)
|
|
21
21
|
|
|
22
|
-
[English](README.md) · [简体中文](README
|
|
22
|
+
[English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
23
23
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
| Surface | Status |
|
|
31
31
|
|---|---|
|
|
32
|
-
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.
|
|
32
|
+
| Harness | DeepSeek Harness `dsh-v0.1.5-rc.2` (adapted 2026-09-09): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged. Verified 2026-09-11 against the dsh-v0.1.5-rc.2 master checkout (full gate chain + profile install smoke). |
|
|
33
33
|
| Node | `^22.19.0 || >=24.0.0` (DeepSeek Harness runtime) |
|
|
34
34
|
| Platforms | All (plain ESM bundle; no native code, no network) |
|
|
35
35
|
| Model | Any (no model interaction) |
|
package/dist/dsh-plugin-dev.js
CHANGED
|
@@ -468,10 +468,10 @@ function unescapeDouble(text) {
|
|
|
468
468
|
//#region src/cli/commands/check.ts
|
|
469
469
|
const README_LANGS = [
|
|
470
470
|
"README.md",
|
|
471
|
-
"README
|
|
472
|
-
"README
|
|
473
|
-
"README
|
|
474
|
-
"README
|
|
471
|
+
"README-zh.md",
|
|
472
|
+
"README-es.md",
|
|
473
|
+
"README-pt.md",
|
|
474
|
+
"README-hi.md"
|
|
475
475
|
];
|
|
476
476
|
const EXCLUDED_DIRS = /* @__PURE__ */ new Set([
|
|
477
477
|
"node_modules",
|
package/guide/links.md
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
- [docs/defensive-patterns.md](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/defensive-patterns.md) — 防御性模式
|
|
48
48
|
- [docs/glossary.md](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/glossary.md) — 术语表
|
|
49
49
|
- [docs/testing.md](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/testing.md) — 测试政策
|
|
50
|
-
- 仓库根文件(本地副本 references/official-docs/):BENCHMARK.md、CLAUDE.md(symlink→AGENTS.md)、CONTRIBUTING.md/.zh.md/.i18n.yaml、README
|
|
50
|
+
- 仓库根文件(本地副本 references/official-docs/):BENCHMARK.md、CLAUDE.md(symlink→AGENTS.md)、CONTRIBUTING.md/.zh.md/.i18n.yaml、README-zh.md/.i18n.yaml、THIRD_PARTY_NOTICES.md、LICENSE
|
|
51
51
|
- 上游 Cordis 框架:https://github.com/cordiverse/cordis · Cordis 论文:https://github.com/cordiverse/paper · **Cordis 文档站源:https://github.com/cordiverse/docs(60+ md,本地 `downloads/github/cordis/docs/`)**
|
|
52
52
|
|
|
53
53
|
## 4. 社区开发文档(常用入口)
|
|
@@ -93,11 +93,28 @@ Publish once, mirror everywhere, make the mirror idempotent:
|
|
|
93
93
|
| Surface | Mechanism | Failure mode to watch |
|
|
94
94
|
|---|---|---|
|
|
95
95
|
| npm | tag-triggered workflow | dist-tag lands on the wrong line |
|
|
96
|
-
| GitHub Release | workflow
|
|
96
|
+
| GitHub Release | the same tag-triggered workflow (idempotent) | release notes drift from CHANGELOG |
|
|
97
97
|
| Gitee (mirror) | scheduled sync workflow | mirror HEAD behind upstream after a force-move |
|
|
98
98
|
|
|
99
99
|
Verify all three before calling a release done. A release that exists on npm but not in the mirror is a half release, and mirror users will report a bug you already fixed.
|
|
100
100
|
|
|
101
|
+
The GitHub Release is created by the **same tag workflow** that publishes to npm - never by hand. Manual creation is exactly how release notes drift from `CHANGELOG.md`, and the gap is invisible from the registry: a version that exists on npm but has no Release page looks complete to `npm view` and incomplete to anyone reading the repository. Keep the step idempotent, so a re-run, a backfilled tag, or an already-existing Release page cannot fail the job:
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
if gh release view "$TAG" >/dev/null 2>&1; then
|
|
105
|
+
echo "release $TAG already exists; skipping"
|
|
106
|
+
exit 0
|
|
107
|
+
fi
|
|
108
|
+
node scripts/changelog-section.mjs "$VERSION" > release-notes.md || true
|
|
109
|
+
if [ -s release-notes.md ]; then
|
|
110
|
+
gh release create "$TAG" --title "$TAG" --notes-file release-notes.md
|
|
111
|
+
else
|
|
112
|
+
gh release create "$TAG" --generate-notes
|
|
113
|
+
fi
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Three details carry the weight. The job needs `permissions: contents: write` (the publish job's `contents: read` is not enough, and job-level permissions override the workflow's). It belongs in a **separate job that `needs:` the publish job**, so a tag whose `CHANGELOG.md` lacks that section cannot turn a successful npm publish into a red release. And the `|| true` plus the `-s` test is what makes the missing-section case degrade to generated notes instead of failing - a release page with generated notes beats no release page at all.
|
|
117
|
+
|
|
101
118
|
---
|
|
102
119
|
|
|
103
120
|
## 5. README parity is part of the build
|
|
@@ -135,6 +152,7 @@ Before every tag push:
|
|
|
135
152
|
- [ ] package invariants: the `files` whitelist contains the built entry, and the entry exists
|
|
136
153
|
- [ ] README language parity plus encoding audit (no BOM, no mojibake, no replacement characters)
|
|
137
154
|
- [ ] `CHANGELOG.md` has a section for the version you are about to tag
|
|
155
|
+
- [ ] the tag workflow creates the GitHub Release itself, idempotently, from that section (section 4)
|
|
138
156
|
- [ ] the version bump matches intent (patch = wave, minor = feature, major = breaking)
|
|
139
157
|
- [ ] the tag does not already exist on the remote
|
|
140
158
|
|
|
@@ -158,7 +176,18 @@ Document these once so nobody debugs them twice:
|
|
|
158
176
|
|
|
159
177
|
---
|
|
160
178
|
|
|
161
|
-
## 9.
|
|
179
|
+
## 9. Local tooling that fakes a result
|
|
180
|
+
|
|
181
|
+
Each of these returns a confident wrong answer rather than an error, and each one cost a real debugging cycle. Written down so the next person recognises the shape:
|
|
182
|
+
|
|
183
|
+
- **`npm view <pkg>@<ver> A B --json` invents absences.** Asking for two fields at once can report a field that exists as empty, which reads as "the published package lost its `peerDependencies`". Query one field per call; when it matters, unpack the published tarball and read its `package.json` - that is the ground truth. An audit that flagged eight packages this way was wrong about all eight.
|
|
184
|
+
- **A content search that honours `.gitignore` returns false negatives.** Where the workspace root ignores everything (`*` plus a single negation), a search across it finds nothing, and "nothing" reads as proof of absence. Before concluding a pattern is absent, confirm it with a scan that does not consult ignore rules.
|
|
185
|
+
- **Windows PowerShell 5.1's `Set-Content -Encoding utf8` writes a BOM.** A JSON request body beginning `EF BB BF` fails to parse, and the error blames the payload's contents rather than its encoding. Write machine-read files through an explicit encoder: `[System.IO.File]::WriteAllText($path, $text, (New-Object System.Text.UTF8Encoding($false)))`.
|
|
186
|
+
- **On Windows, `rd /s /q` cannot remove a tree containing a reserved device name** (`NUL`, `CON`, `AUX`, `PRN`, `COM1`-`COM9`, `LPT1`-`LPT9`). It reports success and leaves the entire ancestor chain in place. Delete that entry through a `\\?\`-prefixed long path, then assert the directory is actually gone - a zero exit code is not evidence that the tree disappeared.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 10. What this buys you
|
|
162
191
|
|
|
163
192
|
A portfolio maintained this way behaves like a product: users on any harness line can install any plugin, every version is attested, mirrors agree, and a breaking upstream change costs one wave instead of an outage. It is also the strongest form of ecosystem contribution - the official project asks for exactly this, and explicitly does not rank official packages above community ones.
|
|
164
193
|
|
|
@@ -93,11 +93,28 @@ jobs:
|
|
|
93
93
|
| 面 | 机制 | 要盯的失败模式 |
|
|
94
94
|
|---|---|---|
|
|
95
95
|
| npm | tag 触发 workflow | dist-tag 落错线 |
|
|
96
|
-
| GitHub Release | workflow
|
|
96
|
+
| GitHub Release | 同一个 tag 触发的 workflow(幂等) | release notes 与 CHANGELOG 漂移 |
|
|
97
97
|
| Gitee(镜像) | 定时同步 workflow | 强制移动 tag 后镜像 HEAD 落后于上游 |
|
|
98
98
|
|
|
99
99
|
三面都验过,才算发布完成。只上了 npm 而镜像没有,是半个发布——镜像上的用户会来报一个你早已修好的 bug。
|
|
100
100
|
|
|
101
|
+
GitHub Release 由**发布 npm 的同一个 tag workflow** 创建,**绝不手工建**。手工建正是 release notes 与 `CHANGELOG.md` 漂移的来源,而且这个缺口在 registry 侧看不见:一个上了 npm 却没有 Release 页的版本,对 `npm view` 看起来是完整的,对任何读仓库的人却是不完整的。这一步必须幂等,这样重跑、补 tag、或 Release 页已存在都不会让 job 失败:
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
if gh release view "$TAG" >/dev/null 2>&1; then
|
|
105
|
+
echo "release $TAG already exists; skipping"
|
|
106
|
+
exit 0
|
|
107
|
+
fi
|
|
108
|
+
node scripts/changelog-section.mjs "$VERSION" > release-notes.md || true
|
|
109
|
+
if [ -s release-notes.md ]; then
|
|
110
|
+
gh release create "$TAG" --title "$TAG" --notes-file release-notes.md
|
|
111
|
+
else
|
|
112
|
+
gh release create "$TAG" --generate-notes
|
|
113
|
+
fi
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
三个细节是关键。该 job 需要 `permissions: contents: write`(publish job 的 `contents: read` 不够,且 job 级权限会覆盖 workflow 级)。它应当是**一个 `needs:` 发布 job 的独立 job**,这样一个 `CHANGELOG.md` 缺少该小节的 tag 就不会把已经成功的 npm 发布变成红灯。而 `|| true` 加 `-s` 判断,正是让「缺小节」这一情形退化为生成式 notes 而不是失败的原因——有生成式 notes 的 Release 页,胜过没有 Release 页。
|
|
117
|
+
|
|
101
118
|
---
|
|
102
119
|
|
|
103
120
|
## 5. README 一致性属于构建的一部分
|
|
@@ -135,6 +152,7 @@ jobs:
|
|
|
135
152
|
- [ ] 包不变量:`files` 白名单确实包含构建产物,且该产物存在
|
|
136
153
|
- [ ] 多语 README 一致 + 编码审计(无 BOM、无乱码、无替换字符)
|
|
137
154
|
- [ ] `CHANGELOG.md` 有即将打的这个版本的小节
|
|
155
|
+
- [ ] tag workflow 自己创建 GitHub Release,且幂等,正文取自该版本小节(见第 4 节)
|
|
138
156
|
- [ ] 版本号与意图一致(patch = 波,minor = 功能,major = 破坏性)
|
|
139
157
|
- [ ] 远端还没有这个 tag
|
|
140
158
|
|
|
@@ -158,7 +176,18 @@ jobs:
|
|
|
158
176
|
|
|
159
177
|
---
|
|
160
178
|
|
|
161
|
-
## 9.
|
|
179
|
+
## 9. 会伪造结论的本地工具
|
|
180
|
+
|
|
181
|
+
下面每一条都返回一个自信的错误答案,而不是报错;每一条都真实吃掉过一个排查周期。写下来,好让下一个人认得出这个形状:
|
|
182
|
+
|
|
183
|
+
- **`npm view <pkg>@<ver> A B --json` 会凭空造出「缺失」。** 一次问两个字段时,它可能把一个实际存在的字段报成空值,读起来就像「已发布的包丢了 `peerDependencies`」。每次只查一个字段;当真要下结论时,解开已发布的 tarball 读它的 `package.json`——那才是地面真相。曾有一次审计据此标出八个仓,八个全错。
|
|
184
|
+
- **遵守 `.gitignore` 的内容检索会返回假阴性。** 当工作区根目录忽略一切(`*` 加一条例外)时,在它上面做检索会一无所获,而「一无所获」会被读成「不存在」的证据。在断言某个模式不存在之前,先用一个不查忽略规则的扫描确认一遍。
|
|
185
|
+
- **Windows PowerShell 5.1 的 `Set-Content -Encoding utf8` 会写 BOM。** 以 `EF BB BF` 开头的 JSON 请求体会解析失败,而报错指向的是载荷内容而不是编码。机器要读的文件一律走显式编码器:`[System.IO.File]::WriteAllText($path, $text, (New-Object System.Text.UTF8Encoding($false)))`。
|
|
186
|
+
- **在 Windows 上,`rd /s /q` 删不掉含保留设备名的目录树**(`NUL`、`CON`、`AUX`、`PRN`、`COM1`-`COM9`、`LPT1`-`LPT9`)。它会报成功,却把整条祖先链原样留下。用 `\\?\` 前缀的长路径删除该条目,然后断言目录确实消失——退出码为 0 不能作为「树已消失」的证据。
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 10. 这样做换来什么
|
|
162
191
|
|
|
163
192
|
按这套方式维护的组合,表现得像一个产品:任何宿主线上的用户都能装到任何插件,每个版本都有凭证,镜像一致,上游的破坏性变更只花掉一波而不是一次事故。这同时也是最强的生态贡献形式——官方要的正是这个,并且明确否认"官方仓的包比社区的包更重要"。
|
|
164
193
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-guide",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "The dsh-plugin-guide knowledge base plus the dsh-plugin-dev CLI toolchain: official docs, Cordis primer, community deep-dives, and battle-tested pitfalls registered as an on-demand agent skill, with a scaffolder, static checker, and pack verifier for building DSH plugins.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"LICENSE",
|
|
25
25
|
"NOTICE.md",
|
|
26
26
|
"README.md",
|
|
27
|
-
"README
|
|
28
|
-
"README
|
|
29
|
-
"README
|
|
30
|
-
"README
|
|
27
|
+
"README-zh.md",
|
|
28
|
+
"README-es.md",
|
|
29
|
+
"README-pt.md",
|
|
30
|
+
"README-hi.md"
|
|
31
31
|
],
|
|
32
32
|
"keywords": [
|
|
33
33
|
"dsh",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@deepseek-ai/dsh-attachment": "0.1.5-rc.
|
|
66
|
+
"@deepseek-ai/dsh-attachment": "0.1.5-rc.2",
|
|
67
67
|
"@types/node": "^22.20.1",
|
|
68
68
|
"vitest": "^3.2.7"
|
|
69
69
|
},
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"filesystem:read"
|
|
106
106
|
],
|
|
107
107
|
"compatibility": {
|
|
108
|
-
"dshVersions": ["0.1.2-rc.1","0.1.5-rc.
|
|
108
|
+
"dshVersions": ["0.1.2-rc.1","0.1.5-rc.2"]
|
|
109
109
|
},
|
|
110
110
|
"capability": {
|
|
111
111
|
"id": "dsh-plugin-guide",
|
|
@@ -598,7 +598,7 @@ Agent Notes 的生命周期/分类/格式见 `.agents/notes/README.md`:路径
|
|
|
598
598
|
公开仓库 URL(经 web_search 核实存在):
|
|
599
599
|
|
|
600
600
|
- 仓库首页:https://github.com/deepseek-ai/deepseek-harness (标题 "DeepSeek Harness: Everything is a Plugin.")
|
|
601
|
-
- README:https://github.com/deepseek-ai/deepseek-harness/blob/master/README.md 与 `README
|
|
601
|
+
- README:https://github.com/deepseek-ai/deepseek-harness/blob/master/README.md 与 `README-zh.md`
|
|
602
602
|
- 架构文档:https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/architecture.md (及 `.zh.md`)
|
|
603
603
|
- 配置目录:https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/config-catalog.md
|
|
604
604
|
- 发布教程:https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md
|
|
@@ -644,7 +644,7 @@ Agent Notes 的生命周期/分类/格式见 `.agents/notes/README.md`:路径
|
|
|
644
644
|
**Web(web_search):**
|
|
645
645
|
- https://github.com/deepseek-ai/deepseek-harness
|
|
646
646
|
- https://github.com/deepseek-ai/deepseek-harness/blob/master/README.md
|
|
647
|
-
- https://github.com/deepseek-ai/deepseek-harness/blob/master/README
|
|
647
|
+
- https://github.com/deepseek-ai/deepseek-harness/blob/master/README-zh.md
|
|
648
648
|
- https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/architecture.md
|
|
649
649
|
- https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/config-catalog.md
|
|
650
650
|
- https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write README.md
|
|
5
5
|
README.md: 9f89db3d4502dea4a0d181799164f304d4976740
|
|
6
|
-
README
|
|
6
|
+
README-zh.md: aa66ef1d24a5e2165859e9337273d807dff3d070
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
| CLAUDE 入口(上游为 symlink,此处为其目标文本) | [`CLAUDE.md`](CLAUDE.md) | `CLAUDE.md` → `AGENTS.md` |
|
|
11
11
|
| 基准测试说明 | [`BENCHMARK.md`](BENCHMARK.md) | `BENCHMARK.md` |
|
|
12
12
|
| 贡献指引(中英 + i18n 元数据) | [`CONTRIBUTING.md`](CONTRIBUTING.md) · [`CONTRIBUTING.zh.md`](CONTRIBUTING.zh.md) · [`CONTRIBUTING.i18n.yaml`](CONTRIBUTING.i18n.yaml) | `CONTRIBUTING.*` |
|
|
13
|
-
| 上游中文 README 与 i18n 元数据 | [`README
|
|
13
|
+
| 上游中文 README 与 i18n 元数据 | [`README-zh.md`](README-zh.md) · [`README.i18n.yaml`](README.i18n.yaml) | `README-zh.md` · `README.i18n.yaml` |
|
|
14
14
|
| 三方声明 | [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) | `THIRD_PARTY_NOTICES.md` |
|
|
15
15
|
| 许可证 | [`LICENSE`](LICENSE) | `LICENSE` |
|
|
16
16
|
| packages 组红线 | [`packages/AGENTS.md`](packages/AGENTS.md) | `packages/AGENTS.md` |
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| Source ref | `origin/master` |
|
|
10
10
|
| Source commit | `d347e703908d0406b7a7ef80e3a0e594d86b2215` |
|
|
11
11
|
| Synced at (UTC) | 2026-09-04T13:53:48Z |
|
|
12
|
-
| Scope | tracked files at the ref: `docs/`, root `AGENTS.md`, `BENCHMARK.md`, `CLAUDE.md` (symlink target text), `CONTRIBUTING.md`/`.zh.md`/`.i18n.yaml`, `README
|
|
12
|
+
| Scope | tracked files at the ref: `docs/`, root `AGENTS.md`, `BENCHMARK.md`, `CLAUDE.md` (symlink target text), `CONTRIBUTING.md`/`.zh.md`/`.i18n.yaml`, `README-zh.md`/`.i18n.yaml` (the upstream English `README.md` is not in this dir; its snapshot lives in `downloads/github/harness/README.md`), `THIRD_PARTY_NOTICES.md`, `LICENSE`, `packages/AGENTS.md`, `packages/README.md`, `vendor/README.md`, `website/docs.ts` |
|
|
13
13
|
| File counts | docs/: 241 md files (118 .zh.md pairs) |
|
|
14
14
|
| Pruned this run | 15 out-of-scope/upstream-deleted entries |
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
两者都在各自的 `package.json` 中通过 `dsh` 字段声明自己:`dsh.profile` 列出一个 profile 的组合包,`dsh.bundle` 指向一个组合包的 patch 文件。
|
|
24
24
|
|
|
25
|
-
[`dsh-base`](../packages/bundle/base/README
|
|
25
|
+
[`dsh-base`](../packages/bundle/base/README-zh.md) 是 `web`、`headless`、`sdk` 与 `acp` profile 的共享第一层:模型适配器、工具、持久化、沙箱与审批策略、设置、凭据、遥测。[`dsh-web-app`](../packages/bundle/web-app/README-zh.md) 增加浏览器应用,[`dsh-headless`](../packages/bundle/headless/README-zh.md) 增加不带服务器的一次性运行器,[`dsh-sdk-app`](../packages/bundle/sdk-app/README-zh.md) 增加 SDK JSON-RPC 服务器,[`dsh-acp-app`](../packages/bundle/acp-app/README-zh.md) 增加仅用于自动化的 ACP 服务器。[`dsh-sdk-minimal`](../packages/bundle/sdk-minimal/README-zh.md) 是刻意保留的例外:一个组合包拥有完整的显式 SDK 配置树,不应用 `dsh-base`。
|
|
26
26
|
|
|
27
27
|
各层按此顺序应用在空条目列表之上:先按 profile 列出的顺序应用每个组合包,然后是 profile 的 `cordis.patch.yml`,然后是 home 级的那份,最后是任意 `--patch` overlay。一条 patch 按 id 定位某个条目并替换其整个 config,或插入新条目。
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ dsh --profile web --dump-config
|
|
|
36
36
|
|
|
37
37
|
它打印出的任何条目,都可以由你自己的 patch 替换。
|
|
38
38
|
|
|
39
|
-
组装机制见 [app-boot](../packages/boot/app-boot/README
|
|
39
|
+
组装机制见 [app-boot](../packages/boot/app-boot/README-zh.md#profiles);配置字段见生成的[配置目录](config-catalog.zh.md)。
|
|
40
40
|
|
|
41
41
|
## 应用启动
|
|
42
42
|
|
|
@@ -99,4 +99,4 @@ import { clientBundle } from '../tsdown.client.ts'
|
|
|
99
99
|
export default clientBundle('@deepseek-ai/dsh-client-my-plugin', ['lib/types/index.js', 'lib/types/invariant.js'])
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
没有已发布的预设暴露该包,因此本仓库之外的包得自行复刻同样的输出格式。bundle 纯净度门禁同时拒绝跨插件的值导入,所以卡片无法导入本分区的卡片外观或其暂存表单模型——它渲染自己的那一份,并自行拥有暂存与 revision 设栅。这两条限制都记在[本分区的已知限制](../../packages/client/ui-settings-plugins/README
|
|
102
|
+
没有已发布的预设暴露该包,因此本仓库之外的包得自行复刻同样的输出格式。bundle 纯净度门禁同时拒绝跨插件的值导入,所以卡片无法导入本分区的卡片外观或其暂存表单模型——它渲染自己的那一份,并自行拥有暂存与 revision 设栅。这两条限制都记在[本分区的已知限制](../../packages/client/ui-settings-plugins/README-zh.md#known-limitations-and-deferred-work)里。
|
|
@@ -58,11 +58,11 @@ producer 提供同步的 `cancel`、在资源清理后 settle 且不 reject 的
|
|
|
58
58
|
|
|
59
59
|
## 执行策略与观测
|
|
60
60
|
|
|
61
|
-
尽量不要把部署策略内建到工具中。使用 `tools/pre-execute` 实现可扩展的允许/拒绝/询问策略(见[权限门禁示例](extension-cookbook.zh.md#a-hook-plugin-permission-gate-example));使用 `ctx.tools.guard()` 设置最终的单调拒绝,后续监听器无法撤销;使用 `tools/execute` 为分发添加截止时间、重试或指标收集;使用 `tools/post-execute` 替换展示内容或返回值、阻止结果,或附加模型可见上下文;使用 `tools/result` 观测不可变的归一化结果而不改变它。替换内容不会阻止程序化访问 `value`;保密策略会屏蔽或替换该值。沙箱实现也可以在工具的执行器实现中运行;[`dsh-tools` README](../../packages/core/tools/README
|
|
61
|
+
尽量不要把部署策略内建到工具中。使用 `tools/pre-execute` 实现可扩展的允许/拒绝/询问策略(见[权限门禁示例](extension-cookbook.zh.md#a-hook-plugin-permission-gate-example));使用 `ctx.tools.guard()` 设置最终的单调拒绝,后续监听器无法撤销;使用 `tools/execute` 为分发添加截止时间、重试或指标收集;使用 `tools/post-execute` 替换展示内容或返回值、阻止结果,或附加模型可见上下文;使用 `tools/result` 观测不可变的归一化结果而不改变它。替换内容不会阻止程序化访问 `value`;保密策略会屏蔽或替换该值。沙箱实现也可以在工具的执行器实现中运行;[`dsh-tools` README](../../packages/core/tools/README-zh.md#extension-points) 定义每个扩展点的输入、顺序、返回值和失败行为。
|
|
62
62
|
|
|
63
63
|
## PTC mode 自动触达你的工具
|
|
64
64
|
|
|
65
|
-
在 [PTC mode](../../packages/core/tools/README
|
|
65
|
+
在 [PTC mode](../../packages/core/tools/README-zh.md) 中,每个可见的已注册工具都可通过 `await tools.<name>(args)` 调用,无需额外集成。生成的 `ToolArgsMap` 和 `ToolOutputMap` 会根据同一组 schema 分别派生精确的参数类型与规范返回类型,调用则重新进入正常的执行流水线。成功调用会解析为策略处理后的最终规范 JSON 值,而不是渲染后的 Native 内容。失败调用会以真正的 `ToolCallError` reject;程序只能检查其 `name`、`toolName` 和可供人阅读的 `message`,无法取得内部错误代码或失败联合。
|
|
66
66
|
|
|
67
67
|
请把 `output.schema` 设计为实用的程序化 API:直接返回句柄与字段;当标量、数组或 null 确实就是结果时,允许采用相应的根类型;将面向人类的解释放入 `output.render`。中间值只存在于执行期间,不会被持久化或按提示词上限截断,也不设字节上限,因此生产方如实声明的采集边界和进程内存仍然重要。只有外层 `run_code` 日志/结果会受到可配置输出上限和面向模型的 spill 流水线约束。
|
|
68
68
|
|
|
@@ -36,7 +36,7 @@ export function apply(ctx: Context, config: Config) {
|
|
|
36
36
|
|
|
37
37
|
## 实现结构
|
|
38
38
|
|
|
39
|
-
让协议格式(wire format)类型、请求序列化、传输解析、分片转换和适配器类分别承担独立职责;[`llm-deepseek`](../../packages/llm/llm-deepseek/README
|
|
39
|
+
让协议格式(wire format)类型、请求序列化、传输解析、分片转换和适配器类分别承担独立职责;[`llm-deepseek`](../../packages/llm/llm-deepseek/README-zh.md) 是参考布局。
|
|
40
40
|
|
|
41
41
|
## 验证
|
|
42
42
|
|
|
@@ -67,7 +67,7 @@ export function apply(ctx: Context) {
|
|
|
67
67
|
|
|
68
68
|
*协议驱动*将协议对端接入 `ctx.agents`;它可以服务于 UI 或自动化客户端。stdio 驱动拥有 stdout,通过工厂创建或恢复 agent(智能体),并将协议请求映射为 `followup()` 或 `cancel()`。底层提示词请求返回其持久入队回执;它不会通过关联 `MessageId` 与 `turn/end` 获得结果。整个 agent 的状态应单独发布。自动化方法可以从回执等待到下一次 idle,并概括这一显式拥有的区间;UI 通常则会持续观察开放式事件流。通过 `AgentHandle.dispose()` 拆除 agent,以使 dispose(资源释放)达到完全停稳。
|
|
69
69
|
|
|
70
|
-
[`packages/acp/acp`](../../packages/acp/acp) 是仅面向自动化的完整示例:它通过 ACP(Agent Client Protocol)JSON-RPC stdio 提供全新文本会话,发出已提交的助手文本,并为其拥有的 agent 注册一次性机器权限应答器。其 [README](../../packages/acp/acp/README
|
|
70
|
+
[`packages/acp/acp`](../../packages/acp/acp) 是仅面向自动化的完整示例:它通过 ACP(Agent Client Protocol)JSON-RPC stdio 提供全新文本会话,发出已提交的助手文本,并为其拥有的 agent 注册一次性机器权限应答器。其 [README](../../packages/acp/acp/README-zh.md) 定义确切的方法、事件顺序和生命周期约定。
|
|
71
71
|
|
|
72
72
|
```ts
|
|
73
73
|
import type { Context } from '@deepseek-ai/cordis'
|
|
@@ -123,7 +123,7 @@ export function apply(ctx: Context) {
|
|
|
123
123
|
| 单调终端轮次策略 | 从成功的终端工具调用 `ToolExecution.concludeTurn()`;同一响应中后续工具调用仍可由守卫阻止,循环在该步骤后停止 |
|
|
124
124
|
| 子进程沙箱(landlock / sandbox-exec) | 通过 `dsh-bash-sandbox` 使用 `ctx.sandbox` 后端;能力级别的拒绝使用 `tools/pre-execute` |
|
|
125
125
|
| 权限系统 / AskUserQuestion | 从 `tools/pre-execute` 返回 `ask` 并通过 `ctx.approval` 应答;为普通用户提问注册一个独立的面向模型的 ask 工具 |
|
|
126
|
-
| Plan mode | [`@deepseek-ai/dsh-plan-mode`](../../packages/plan/plan-mode/README
|
|
126
|
+
| Plan mode | [`@deepseek-ai/dsh-plan-mode`](../../packages/plan/plan-mode/README-zh.md):落日志的 `plan/mode` 状态、`plan:policy` 引导段、`/plan [message]` 入口、`/plan off` 直接退出,以及经用户评审的 `exit_plan_mode` 出口;强制约束留在独立的沙箱/审批轴上 |
|
|
127
127
|
| subagent 委派 | `ctx.subagents` 提供方注册表(`dsh-subagent-spawn-in-process`/`dsh-subagent-fork-in-process`/`dsh-subagent-acp`/`dsh-subagent-codex`/`dsh-subagent-claude-code`/`dsh-subagent-dsh-sdk`)+ `dsh-tool-subagent` 向模型暴露一个已配置的提供方 |
|
|
128
128
|
| MCP | 每个服务器一个插件:发现工具 → `ctx.tools.register()` |
|
|
129
129
|
| skill(技能) | section + 工具注册;调用时通过 `inject()` 注入 skill 内容 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](deepseek-llm-api-wire-extensions.md) | 中文
|
|
4
4
|
|
|
5
|
-
本参考文档定义 [`@deepseek-ai/dsh-llm-deepseek`](../packages/llm/llm-deepseek/README
|
|
5
|
+
本参考文档定义 [`@deepseek-ai/dsh-llm-deepseek`](../packages/llm/llm-deepseek/README-zh.md) 在 `deepseek-official` 聊天补全请求中发送的全部 DeepSeek Harness 特有 HTTP 标头和附加 JSON 字段。本文不重复定义 DeepSeek 上游 API 持有的字段。提供方无关的 LLM(大语言模型)接口与 `llm-pi-ai` 均不实现这些扩展。
|
|
6
6
|
|
|
7
7
|
适配器将这些扩展发送至已解析的 `baseURL`,包括已配置的网关。扩展位于 `messages`、系统提示词和工具 schema 之外,因此不会增加模型输入 token,也不会改变模型可见前缀。
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
每个正文扩展独立持有自身的 `version`。版本仅适用于包含该字段的对象;不同字段的版本之间不存在兼容或排序关系。JSON 成员顺序不属于协议。
|
|
19
19
|
|
|
20
|
-
[`DeepSeekLlmApiExtensionRegistry`](../packages/llm/deepseek-llm-api-extensions/README
|
|
20
|
+
[`DeepSeekLlmApiExtensionRegistry`](../packages/llm/deepseek-llm-api-extensions/README-zh.md) 为每个顶层扩展名保留一个提供方。空名称、两端带空白的名称、重复注册以及与 DeepSeek 基础请求冲突的名称都会在 HTTP 分派前失败。
|
|
21
21
|
|
|
22
22
|
## 请求标头
|
|
23
23
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
## `dsh_plugin_packages`
|
|
42
42
|
|
|
43
|
-
[`@deepseek-ai/dsh-plugin-package-inventory-deepseek`](../packages/llm/plugin-package-inventory-deepseek/README
|
|
43
|
+
[`@deepseek-ai/dsh-plugin-package-inventory-deepseek`](../packages/llm/plugin-package-inventory-deepseek/README-zh.md) 贡献完整存活的 Loader-backed 插件包清单。该字段默认启用。
|
|
44
44
|
|
|
45
45
|
```json
|
|
46
46
|
{
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
|
|
74
74
|
## `dsh_session_log`
|
|
75
75
|
|
|
76
|
-
[`@deepseek-ai/dsh-session-log-deepseek`](../packages/session/session-log-deepseek/README
|
|
76
|
+
[`@deepseek-ai/dsh-session-log-deepseek`](../packages/session/session-log-deepseek/README-zh.md) 贡献权威会话日志的一段连续后缀。该字段默认禁用。启用后,它适用于携带存活会话且至少存在一个事件的请求;直接请求、陈旧会话 id 或空日志会省略该字段。
|
|
77
77
|
|
|
78
78
|
```json
|
|
79
79
|
{
|
|
@@ -63,7 +63,7 @@ Host 与 Client 保持两个 aggregate program,是因为两侧在相同键下
|
|
|
63
63
|
- 构造全仓 `ts.Program` 的脚本显式以 `tsconfig.host.json` 或 `tsconfig.client.json` 为种子——根 solution 永不作为种子,因为把两个 aggregate 展平进一个 program 会撞上 `Context` 合并冲突。
|
|
64
64
|
- 新包只登记进一个 aggregate;只有上述拆分包同时携带两个 leaf 配置,共享 leaf 因两侧需要对同一份源码做类型检查而登记进两个 aggregate。包同时具有 Node loader 入口和 browser 入口并不构成拆分理由;普通 Client 插件的两份运行时产物都在 Client 构建阶段生成。
|
|
65
65
|
|
|
66
|
-
拆分 Host/Client tsconfig 的包有六个:`api/remotes`、`api/gateway`、`api/session-controller`、`api/workspace-controller`、`client/connection` 与 `session-query/session-log-export`。`api/remotes` 的 Host 入口进入 Host Typert 图,而 Client 入口导入生成的 `/remote` 声明;`session-log-export` 则让 Node archive 生产代码不进入浏览器 controller。每个拆分包根 `tsconfig.json` 因此只作为 solution,两个 aggregate 和直接消费方分别引用 `tsconfig.host.json` 或 `tsconfig.client.json`。workspace `constraints` 门禁遍历可达的 Project Reference 图,并按各引用 project 自身的 compiler face 检查:只有单一配置的目标可由任一 face 引用,拆分配置的目标则必须引用匹配的 leaf,不得引用 solution 根或另一侧 leaf;该门禁按「两个 leaf 配置同时存在」自动发现拆分包,所以新拆分的包会自动纳入管辖。[`api-remotes` README](../packages/api/remotes/README
|
|
66
|
+
拆分 Host/Client tsconfig 的包有六个:`api/remotes`、`api/gateway`、`api/session-controller`、`api/workspace-controller`、`client/connection` 与 `session-query/session-log-export`。`api/remotes` 的 Host 入口进入 Host Typert 图,而 Client 入口导入生成的 `/remote` 声明;`session-log-export` 则让 Node archive 生产代码不进入浏览器 controller。每个拆分包根 `tsconfig.json` 因此只作为 solution,两个 aggregate 和直接消费方分别引用 `tsconfig.host.json` 或 `tsconfig.client.json`。workspace `constraints` 门禁遍历可达的 Project Reference 图,并按各引用 project 自身的 compiler face 检查:只有单一配置的目标可由任一 face 引用,拆分配置的目标则必须引用匹配的 leaf,不得引用 solution 根或另一侧 leaf;该门禁按「两个 leaf 配置同时存在」自动发现拆分包,所以新拆分的包会自动纳入管辖。[`api-remotes` README](../packages/api/remotes/README-zh.md) 与 [`session-log-export` README](../packages/session-query/session-log-export/README-zh.md)分别说明其拆分。
|
|
67
67
|
|
|
68
68
|
根构建按生成依赖排序:
|
|
69
69
|
|
|
@@ -106,7 +106,7 @@ DEEPSEEK_BASE_URL=https://... # optional
|
|
|
106
106
|
|
|
107
107
|
### Git 集成
|
|
108
108
|
|
|
109
|
-
当两种语言的文件都使用 Git 默认文本策略且能干净合并时,配对合并驱动会根据已确认的祖先、当前和另一侧的配对文档 blob,推导出发生冲突的 `.i18n.yaml` 记录。配对文档发生冲突、存在非文本合并配置或记录无效时,它会拒绝处理并保留冲突;如果合并已经因冲突而停止,请运行 `pnpm run resolve-translation-pairing-conflicts`,该命令会暂存每份可安全生成的配对记录;如果其他配对冲突仍需手工处理,则以非零状态退出。[双语文档约定](i18n/README
|
|
109
|
+
当两种语言的文件都使用 Git 默认文本策略且能干净合并时,配对合并驱动会根据已确认的祖先、当前和另一侧的配对文档 blob,推导出发生冲突的 `.i18n.yaml` 记录。配对文档发生冲突、存在非文本合并配置或记录无效时,它会拒绝处理并保留冲突;如果合并已经因冲突而停止,请运行 `pnpm run resolve-translation-pairing-conflicts`,该命令会暂存每份可安全生成的配对记录;如果其他配对冲突仍需手工处理,则以非零状态退出。[双语文档约定](i18n/README-zh.md#the-pairing-contract)列出该驱动接受的确切文件和状态。
|
|
110
110
|
|
|
111
111
|
安装脚本在发布 worktree 配置前,会探测确切的 Node/tsx 驱动入口点。如果该运行时之后变得不可用,不依赖 Node 的启动器会写入 Git 的普通文本合并结果、让伴随文件保持未解决状态,并打印恢复路径;请恢复依赖后运行 `pnpm run resolve-translation-pairing-conflicts`,或运行 `git merge --abort`。如果 `pre-merge-commit` 拒绝原本能干净完成的合并,Git 会把完整结果留在暂存区但不创建提交;请修复失败后运行 `git commit`,或中止合并。确切的索引与 `MERGE_HEAD` 状态由[自动配对合并 Agent Note](../.agents/notes/implemented/process/2026-08-08-automatic-translation-pairing-merges.zh.md#failure-contract)负责记录。
|
|
112
112
|
|
|
@@ -164,7 +164,7 @@ pnpm run demo:ptc -- "summarize this workspace"
|
|
|
164
164
|
|
|
165
165
|
### 逐字记录类型定义(`ts type-equiv`)
|
|
166
166
|
|
|
167
|
-
[子系统](subsystems/README
|
|
167
|
+
[子系统](subsystems/README-zh.md)页面会把与源码等价的声明及其原始 JSDoc 一并粘贴,让读者看到确切类型定义和源码约定。为防止粘贴内容在源码变化时漂移,请将其围栏为 ` ```ts type-equiv `(而不是 ` ```ts `),并在 `scripts/type-equiv.manifest.json` 中登记它镜像的源文件和符号:
|
|
168
168
|
|
|
169
169
|
```json
|
|
170
170
|
{ "doc": "docs/subsystems/session.md", "symbol": "SessionEvent", "source": "packages/core/session/src/types.ts" }
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/i18n/README.md
|
|
5
5
|
README.md: aa075f588d00543b862583912a687722b434de67
|
|
6
|
-
README
|
|
6
|
+
README-zh.md: 08f4a1d1854d56c47b0bd9bbf0611304c892df90
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Bilingual documentation
|
|
2
2
|
|
|
3
|
-
English | [中文](README
|
|
3
|
+
English | [中文](README-zh.md)
|
|
4
4
|
|
|
5
5
|
This repo's documentation is read by people and agents both inside and outside the company, so every document in scope is maintained in English and Simplified Chinese. This page defines the pairing contract, checks, scope, and exclusions; [translation-rules.md](translation-rules.md) defines how to translate; [terminology.md](terminology.md) is the terminology source of truth. Routine agent work follows the lightweight path in [docs/AGENTS.md](../AGENTS.md); the extended [.agents/skills/dsh-translate-docs](../../.agents/skills/dsh-translate-docs/SKILL.md) workflow is available only through explicit user invocation.
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
> This document covers **behavior**; type definitions live in [subsystems/](../subsystems/core.md), the per-event/service reference lives in the generated regions of [subsystems/](../subsystems/core.md), and package contracts in the package READMEs state each package's required configuration and behavior ([map](../../packages/README.md)).
|
|
18
18
|
|
|
19
|
-
本文档描述整体行为逻辑;类型定义存放于 [subsystems/](../subsystems/core.zh.md);各类事件、服务的详细参考见 [subsystems/](../subsystems/core.zh.md) 中的生成区块;相应的 README 说明每个包(package)要求的配置和行为([索引](../../packages/README
|
|
19
|
+
本文档描述整体行为逻辑;类型定义存放于 [subsystems/](../subsystems/core.zh.md);各类事件、服务的详细参考见 [subsystems/](../subsystems/core.zh.md) 中的生成区块;相应的 README 说明每个包(package)要求的配置和行为([索引](../../packages/README-zh.md))。
|
|
20
20
|
|
|
21
21
|
## ② 防御模式规则
|
|
22
22
|
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
流水线使用**整篇文档**的中英对照作为 few-shot,不是模板内嵌的句子级正误例。以下 5 组配对文档均经过人工评审,以仓库当前版本为准、随仓库更新:
|
|
22
22
|
|
|
23
|
-
- `README.md` ↔ `README
|
|
23
|
+
- `README.md` ↔ `README-zh.md`
|
|
24
24
|
- `docs/development.md` ↔ `docs/development.zh.md`
|
|
25
|
-
- `docs/i18n/README.md` ↔ `docs/i18n/README
|
|
25
|
+
- `docs/i18n/README.md` ↔ `docs/i18n/README-zh.md`
|
|
26
26
|
- `docs/i18n/translation-rules.md` ↔ `docs/i18n/translation-rules.zh.md`
|
|
27
27
|
- `.agents/notes/implemented/process/2026-07-02-bilingual-docs-and-pairing-gate.md` ↔ 对应 `.zh.md`
|
|
28
28
|
|
|
@@ -253,8 +253,8 @@ Below are representative examples of common problems and their corrections. Foll
|
|
|
253
253
|
- Good: `# full-screen TUI coding agent (needs DEEPSEEK_API_KEY)` (keep exactly as-is, byte-for-byte)
|
|
254
254
|
|
|
255
255
|
### Language switcher — flip direction
|
|
256
|
-
- Source file (English) has: `English | [中文](README
|
|
257
|
-
- Bad (copying source unchanged): `English | [中文](README
|
|
256
|
+
- Source file (English) has: `English | [中文](README-zh.md)`
|
|
257
|
+
- Bad (copying source unchanged): `English | [中文](README-zh.md)`
|
|
258
258
|
- Good (flipped for Chinese file): `[English](README.md) | 中文`
|
|
259
259
|
|
|
260
260
|
---
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](translation-rules.md) | 中文
|
|
4
4
|
|
|
5
|
-
本文规定:如何在本仓库文档配对的中英文两种语言之间进行翻译。两种语言同权(见 [README.md](README
|
|
5
|
+
本文规定:如何在本仓库文档配对的中英文两种语言之间进行翻译。两种语言同权(见 [README.md](README-zh.md)):每次变更可以用任一语言撰写,被编辑的一侧即为本次更新的源;本文的规则约束如何产出或更新对侧文件。这些规则对人类和 agent(智能体)同等生效。日常工作中,agent 会在术语指导下直接一次完成有改动内容的翻译;扩展版 [.agents/skills/dsh-translate-docs](../../.agents/skills/dsh-translate-docs/SKILL.md) 工作流仅在用户显式调用时运行。规则级别沿用 RFC 2119 的用法:**必须(MUST)** / **禁止(MUST NOT)** 会卡门禁或评审;**应当(SHOULD)** 偏离时要说明理由;**可以(MAY)** 自行裁量。
|
|
6
6
|
|
|
7
7
|
## 忠实性
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
- 表格(相同的列、相同的行序;表头单元格按术语表翻译);
|
|
29
29
|
- 围栏代码块:**逐字节一致,包括注释**。配对签名比对信息字符串与内容,` ```ts ` 块还要通过 `doc-typecheck` 编译;
|
|
30
30
|
- 行内代码(命令、flag、配置键、文件路径、事件名、API 名、版本号):原样保留,从不翻译或重排;
|
|
31
|
-
- 链接与锚点:每个相对文档链接必须保持相同的语义目标和完全相同的 query/fragment 后缀。目标属于活跃双语语料时,英文侧使用其 `.md` 路径,中文侧使用其 `.zh.md` 路径;该范围内缺少对侧属于错误,范围外的目标保留原路径。外部 URL、图片与纯页内 fragment 保持不变。语言切换行仍是显式跨 locale 例外;在 GitHub 以外位置渲染的 README 可以按 [README.md](README
|
|
31
|
+
- 链接与锚点:每个相对文档链接必须保持相同的语义目标和完全相同的 query/fragment 后缀。目标属于活跃双语语料时,英文侧使用其 `.md` 路径,中文侧使用其 `.zh.md` 路径;该范围内缺少对侧属于错误,范围外的目标保留原路径。外部 URL、图片与纯页内 fragment 保持不变。语言切换行仍是显式跨 locale 例外;在 GitHub 以外位置渲染的 README 可以按 [README.md](README-zh.md) 的规定,使用指向确切对侧文件的规范公开仓库 URL。链接**文字**翻译。
|
|
32
32
|
|
|
33
33
|
本仓库的 Markdown 约定对 `.zh.md` 文件原样生效:一个段落一个物理行(`verify-md-wrap`)、相对链接必须可解析(`verify-md-links`)、文件末尾恰好一个换行。
|
|
34
34
|
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/postmortem/README.md
|
|
5
5
|
README.md: ffde0057304856b7c7718e3dd1f4743c48ee193f
|
|
6
|
-
README
|
|
6
|
+
README-zh.md: 4b3f8588cc1f6e162c72a5b6a78b996638baf7ae
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Post-mortems
|
|
2
2
|
|
|
3
|
-
English | [中文](README
|
|
3
|
+
English | [中文](README-zh.md)
|
|
4
4
|
|
|
5
5
|
Incident write-ups: a bug reached a place it shouldn't have (a real user, a merged PR, a release), and the interesting part is *why our process let it through*, not just the one-line fix.
|
|
6
6
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
事故复盘记录的是:一个 bug 出现在了不该出现的地方(真实用户、已合并的 PR(Pull Request)、已发布的版本),值得关注的是*为什么我们的流程放过了它*,而不仅仅是那一行修复。
|
|
6
6
|
|
|
7
|
-
事故复盘不是 [Agent Note](../../.agents/notes/README
|
|
7
|
+
事故复盘不是 [Agent Note](../../.agents/notes/README-zh.md)(Agent Note 记录一个经过深思熟虑的设计决策及其被否决的替代方案,或提出未来工作)。它是一份回顾性的失败记录:什么坏了、机制是什么、为什么每道安全网都没拦住、以及为此新增了哪些具体防护措施,以确保同类 bug 下次出现时会明确报错。
|
|
8
8
|
|
|
9
9
|
当一个 bug 满足以下条件时,请撰写事故复盘:**隐蔽**(机制不显而易见,即使是细心的工程师也得费力重新推导)、**系统性**(逃逸的原因是测试、工具、约定的缺口,而非一次性的笔误)、**重新发现的代价高**(它消耗了真实的调试时间,且下次还会如此)。请链接该事故复盘所推动建立的防护措施(测试、AGENTS.md 规则、ADR)。
|
|
10
10
|
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/README.md
|
|
5
5
|
README.md: 7ead36412136b00eb284897bb1114ead7d4d96d4
|
|
6
|
-
README
|
|
6
|
+
README-zh.md: bc7500c00d5bb68cb7d4bf607e3d3a58bd2c55cc
|