docs(i18n): localize Chinese internal links

This commit is contained in:
pku-xht
2026-08-18 19:00:37 +08:00
parent 721ff76d24
commit 8d3674695b
1519 changed files with 4137 additions and 3108 deletions
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/config.md
config.md: 21ba39fd7de1795e9139aff3e2b11743eedd4833
config.zh.md: a882c4d59b0ac8e8ec27a5b32da5376b534a7f62
config.zh.md: 642a413950e2d8deb8591bc688968607604c050d
+4 -4
View File
@@ -93,7 +93,7 @@ export interface Config {
### 配置错误要响亮
在 schema 中表达自身完备的约束,使无效配置在插件加载时失败。对服务或已注册资源的引用需要依赖注入;[服务教程](../framework/service.md) 会介绍这项约定。
在 schema 中表达自身完备的约束,使无效配置在插件加载时失败。对服务或已注册资源的引用需要依赖注入;[服务教程](../framework/service.zh.md) 会介绍这项约定。
## 配合 HMR
@@ -101,6 +101,6 @@ export interface Config {
## 下一步
- [打包与安装插件](./publish.md) — 把插件以可安装包的形式交付
- [插件与生命周期](../framework/) — 深入了解插件的完整生命周期
- [服务与依赖](../framework/service.md) — 让你的插件对外提供服务
- [打包与安装插件](./publish.zh.md) — 把插件以可安装包的形式交付
- [插件与生命周期](../framework/index.zh.md) — 深入了解插件的完整生命周期
- [服务与依赖](../framework/service.zh.md) — 让你的插件对外提供服务
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/index.md
index.md: 08199624e638aaf4a36b04446c39c228b2af6025
index.zh.md: c45a30d0bfffaf4a6c78303f9ca043c3397c8a08
index.zh.md: 2ea894079ffb3c5b8c4563fd535fe6e654861b1b
+5 -5
View File
@@ -2,7 +2,7 @@
[English](index.md) | 中文
本教程会创建一个最小的 Harness 插件,并将其加载到 Web UI 中。请从已完成[从源码运行路径](../../../../README.md#run-from-source)的仓库检出开始。
本教程会创建一个最小的 Harness 插件,并将其加载到 Web UI 中。请从已完成[从源码运行路径](../../../../README.zh.md#run-from-source)的仓库检出开始。
## 创建本地项目
@@ -135,10 +135,10 @@ export default class MyService extends Service {
}
```
大多数情况下,函数形式足够了。当插件需要向其他插件提供服务时,可使用类形式(见 [服务与依赖](../framework/service.md))。
大多数情况下,函数形式足够了。当插件需要向其他插件提供服务时,可使用类形式(见 [服务与依赖](../framework/service.zh.md))。
## 下一步
- [开发一个工具](./tool.md) — 了解工具定义 DSL
- [插件配置](./config.md) — 让插件接受用户配置
- [Cordis 框架教程](../../../cordis-tutorial/index.md) — 底层的插件框架,在临时目录中动手构建,无需 API 密钥
- [开发一个工具](./tool.zh.md) — 了解工具定义 DSL
- [插件配置](./config.zh.md) — 让插件接受用户配置
- [Cordis 框架教程](../../../cordis-tutorial/index.zh.md) — 底层的插件框架,在临时目录中动手构建,无需 API 密钥
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/publish.md
publish.md: 9548fe2f8e4636dd160c79cd0d50f01f8bdfd3d1
publish.zh.md: 2cff05edcca55bac5fde9d2e7d24ed9c8b48a6f5
publish.zh.md: 00b8885d6cbd39fa9899e110b1d31ef96175e127
+5 -5
View File
@@ -2,9 +2,9 @@
[English](publish.md) | 中文
前几篇教程通过 `--patch` overlay 加载本地插件。本教程把它打包成可安装的**组合包**(bundle),用 `dsh plugin add` 安装进一个 **profile**,并解释决定组合后配置的层顺序。本文假设 `dsh` CLI 已安装。请先完成[插件配置](./config.md)。
前几篇教程通过 `--patch` overlay 加载本地插件。本教程把它打包成可安装的**组合包**(bundle),用 `dsh plugin add` 安装进一个 **profile**,并解释决定组合后配置的层顺序。本文假设 `dsh` CLI 已安装。请先完成[插件配置](./config.zh.md)。
如果改用全新的源码 checkout,请先按照[从源码运行章节](../../../../README.md#run-from-source)完成准备,将本教程的 `hello-plugin` 目录放在仓库根目录,并从该目录把下文的 `dsh ...` 命令改为 `pnpm dsh ...`。构建与启动器行为见[源码执行](../../../../apps/cli/reference/README.md#source-execution)。
如果改用全新的源码 checkout,请先按照[从源码运行章节](../../../../README.zh.md#run-from-source)完成准备,将本教程的 `hello-plugin` 目录放在仓库根目录,并从该目录把下文的 `dsh ...` 命令改为 `pnpm dsh ...`。构建与启动器行为见[源码执行](../../../../apps/cli/reference/README.zh.md#source-execution)。
## 两个概念,两种 manifest
@@ -136,7 +136,7 @@ dsh --profile demo
name: 'dsh-hello-plugin/startup'
```
该插件导出 `inject = ['cmdlineArgs']`,使用自己的 commander program 调用 [`@deepseek-ai/dsh-cmdline`](../../../../packages/boot/cmdline/README.md) 中的 `parseCmdline`,再在 program 自己的 action 中把应用自有服务提供出去。启动器把自身 flag 之后的同一份不可变参数交给每个插件,因此添加应用专属 flag 无需修改启动器,多个插件也可以解析该快照。Loader 行不需要启动器标记或特殊类型。
该插件导出 `inject = ['cmdlineArgs']`,使用自己的 commander program 调用 [`@deepseek-ai/dsh-cmdline`](../../../../packages/boot/cmdline/README.zh.md) 中的 `parseCmdline`,再在 program 自己的 action 中把应用自有服务提供出去。启动器把自身 flag 之后的同一份不可变参数交给每个插件,因此添加应用专属 flag 无需修改启动器,多个插件也可以解析该快照。Loader 行不需要启动器标记或特殊类型。
受这些参数配置的行会注入提供方服务,并在自己的 `!!js` 选项中读取它,同时把部署取值写在旁边作为回退:
@@ -179,5 +179,5 @@ dsh plugin --profile demo add github:you/hello-plugin
## 下一步
- [插件与生命周期](../framework/) — 插件的完整生命周期
- [CLI(命令行界面)行为参考](../../../../apps/cli/reference/README.md) — 确切的层优先级、flag 与 profile 机制
- [插件与生命周期](../framework/index.zh.md) — 插件的完整生命周期
- [CLI(命令行界面)行为参考](../../../../apps/cli/reference/README.zh.md) — 确切的层优先级、flag 与 profile 机制
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/tool.md
tool.md: eb262d131a7f2b540827e86e56f8c0a28cb5f904
tool.zh.md: d33d9946a73881df2cd44ebf3695819d02d013ab
tool.zh.md: a07bef588f5a18093cf2eb1971b855bf40d1d0b6
+4 -4
View File
@@ -2,7 +2,7 @@
[English](tool.md) | 中文
本教程会在 Web UI 中添加一个 `greet` 工具。请先完成[第一个插件](./),并保留其中的 `scratch-plugin` 目录。
本教程会在 Web UI 中添加一个 `greet` 工具。请先完成[第一个插件](./index.zh.md),并保留其中的 `scratch-plugin` 目录。
## 创建工具插件
@@ -47,6 +47,6 @@ pnpm dsh web --patch ./scratch-plugin/cordis.yml
## 下一步
- [插件配置](./config.md) — 让问候语可配置。
- [工具编写参考](../../../cookbook/adding-a-tool.md) — 查阅嵌套 schema、规范值、后台工作、策略钩子、Code Mode 和 UI 卡片。
- [能力分层](../practice/) — 将可替换能力拆分为 Service Definition、Service Provider 和 Consumer 三类包。
- [插件配置](./config.zh.md) — 让问候语可配置。
- [工具编写参考](../../../cookbook/adding-a-tool.zh.md) — 查阅嵌套 schema、规范值、后台工作、策略钩子、Code Mode 和 UI 卡片。
- [能力分层](../practice/index.zh.md) — 将可替换能力拆分为 Service Definition、Service Provider 和 Consumer 三类包。
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/framework/events.md
events.md: 1d9fe5c8f5068de6ad8b2abaa85cf67be35c8459
events.zh.md: 8bb9447a270cc2db966b1e01298a831a60a1b9c1
events.zh.md: 6936a5ad6c51393d2fbcd5103d4e418ce010d569
+3 -3
View File
@@ -101,7 +101,7 @@ declare module '@deepseek-ai/cordis' {
## Cordis 事件与会话记录
Harness 的 Cordis 事件遵循 `namespace/action` 命名,例如 `agent/step`、`agent/request`、`agent/request-error`、`tools/result` 和 `session/event`。完整签名与触发模式见[子系统页面](../../../subsystems/core.md)上生成的 `cordis-surface` 区块。
Harness 的 Cordis 事件遵循 `namespace/action` 命名,例如 `agent/step`、`agent/request`、`agent/request-error`、`tools/result` 和 `session/event`。完整签名与触发模式见[子系统页面](../../../subsystems/core.zh.md)上生成的 `cordis-surface` 区块。
`turn/*`、`step/*`、`tool/call`、`tool/result` 和 `compaction/*` 是持久化的会话事件类型,不是同名 Cordis 事件。需要观察它们时,监听 `session/event` 并检查 `event.type`。
@@ -139,5 +139,5 @@ export function apply(ctx: Context) {
## 下一步
- [能力分层](../practice/) — 了解能力接口中的事件
- [LLM(大语言模型)适配器](../practice/llm-adapter.md) — 实现一个完整的 LLM 后端
- [能力分层](../practice/index.zh.md) — 了解能力接口中的事件
- [LLM(大语言模型)适配器](../practice/llm-adapter.zh.md) — 实现一个完整的 LLM 后端
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/framework/index.md
index.md: 8cc673148d7fec4f7d9b994907e17293bc3a6a97
index.zh.md: 1a1f7feb8685e124babb182544bde332b52da42c
index.zh.md: 8f55bd1cdd472b2f7b90e9280c58d15533ffce57
+3 -3
View File
@@ -132,6 +132,6 @@ effect cleaned up
## 下一步
- [服务与依赖](./service.md) — 让插件向其他插件提供能力
- [事件系统](./events.md) — 在插件之间通信
- [Cordis 框架教程](../../../cordis-tutorial/index.md) — 在 Cordis 运行时上逐步搭出同一套生命周期、服务与事件
- [服务与依赖](./service.zh.md) — 让插件向其他插件提供能力
- [事件系统](./events.zh.md) — 在插件之间通信
- [Cordis 框架教程](../../../cordis-tutorial/index.zh.md) — 在 Cordis 运行时上逐步搭出同一套生命周期、服务与事件
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/framework/service.md
service.md: 03f4e7dc4df934495a4b203066183753b621339e
service.zh.md: 2f4c01e0ea6a87a87ca694b265b07e07098f3e59
service.zh.md: b275c3d200fb50b1fab0e762d0154477c7ca4447
+3 -3
View File
@@ -142,9 +142,9 @@ export function apply(ctx: Context) {
## Harness 内置服务
服务名、公开方法和源码位置由仓库自动生成到各服务的[子系统页面](../../../subsystems/core.md)。开发插件时应以这些生成区块和服务的 TypeScript 接口为准,不要维护另一份静态清单。
服务名、公开方法和源码位置由仓库自动生成到各服务的[子系统页面](../../../subsystems/core.zh.md)。开发插件时应以这些生成区块和服务的 TypeScript 接口为准,不要维护另一份静态清单。
## 下一步
- [事件系统](./events.md) — 插件间松耦合通信
- [能力分层](../practice/) — 将服务用作能力接口
- [事件系统](./events.zh.md) — 插件间松耦合通信
- [能力分层](../practice/index.zh.md) — 将服务用作能力接口
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/practice/index.md
index.md: cc6bd7a234305f6fa193341f15354b40855f72e9
index.zh.md: aed13b00f9bc74946aace614953bed30705c8281
index.zh.md: 55ed3d3a93008f63a3e677de935c1de4be8872e5
+3 -3
View File
@@ -2,7 +2,7 @@
[English](index.md) | 中文
本文分为两部分:先参考三种角色能力模式的概念,再通过高级教程构建一项能力。请先完成[基础插件路径](../basic/)和[服务教程](../framework/service.md)。
本文分为两部分:先参考三种角色能力模式的概念,再通过高级教程构建一项能力。请先完成[基础插件路径](../basic/index.zh.md)和[服务教程](../framework/service.zh.md)。
## 概念参考
@@ -53,7 +53,7 @@
- Consumer 依赖 Service Definition。
- Service Provider 和 Consumer **互不依赖**
当前内置系列及其包链接由[能力 seam 参考](../../../capability-seams.md)负责。
当前内置系列及其包链接由[能力 seam 参考](../../../capability-seams.zh.md)负责。
## 教程:开发三种角色的能力
@@ -152,4 +152,4 @@ export function apply(ctx: Context) {
## 下一步
- [LLM(大语言模型)适配器](./llm-adapter.md):实现一个 LLM 提供方
- [LLM(大语言模型)适配器](./llm-adapter.zh.md):实现一个 LLM 提供方
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/guide/index.md
index.md: 2ae8847e3e04e131517e505bbc3c5f2c1047a45c
index.zh.md: 7e4a140e11ca409755d63ade41a31d9b3cc4d4b6
index.zh.md: 6cbfce0b884aee39d26797d38c78b33e05b71c63
+6 -6
View File
@@ -2,13 +2,13 @@
[English](index.md) | 中文
请先按照[根目录 README](../../../README.md#run) 中的说明启动 Web UI;命令会打印其访问地址。本指南从服务器已经运行的状态开始。`dsh` 进程会把启动时所在的目录作为默认文件系统位置;全新的 Web UI 则不会选中任何工作区,你需要添加一个工作区。
请先按照[根目录 README](../../../README.zh.md#run) 中的说明启动 Web UI;命令会打印其访问地址。本指南从服务器已经运行的状态开始。`dsh` 进程会把启动时所在的目录作为默认文件系统位置;全新的 Web UI 则不会选中任何工作区,你需要添加一个工作区。
## 配置模型
打开**设置 → 模型**,输入 [DeepSeek API 密钥](https://platform.deepseek.com/)并保存。模型路由会立即可用,不需要重启服务器。
[模型配置指南](./providers.md)介绍其他提供方和自定义 OpenAI 兼容端点。
[模型配置指南](./providers.zh.md)介绍其他提供方和自定义 OpenAI 兼容端点。
## 选择工作区
@@ -24,7 +24,7 @@ Agent(智能体)可以读取和编辑工作区文件、运行命令、委派
## 继续使用
- [配置模型](./providers.md)
- [使用 Python SDK](./python-sdk.md)
- [使用其他 CLI 模式](../../../apps/cli/README.md)
- [开发插件](../develop/basic/)
- [配置模型](./providers.zh.md)
- [使用 Python SDK](./python-sdk.zh.md)
- [使用其他 CLI 模式](../../../apps/cli/README.zh.md)
- [开发插件](../develop/basic/index.zh.md)
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/guide/providers.md
providers.md: 099f434ec4602aa402239e83c708d81fcadd7732
providers.zh.md: 367c90b525ad628b3cd86b2d22045c25064e88a1
providers.zh.md: b78bbd342428a738015db57692c19e77006d48c1
+2 -2
View File
@@ -2,7 +2,7 @@
[English](providers.md) | 中文
本指南假定你已按照[根 README](../../../README.md#run)启动 Web UI。模型变更会在下一次请求时生效,不需要重启服务器。
本指南假定你已按照[根 README](../../../README.zh.md#run)启动 Web UI。模型变更会在下一次请求时生效,不需要重启服务器。
## 配置 DeepSeek
@@ -95,4 +95,4 @@ llm-pi-ai:
## 进阶配置
自动生成的[插件配置目录](../../config-catalog.md)列出所有受支持的字段与默认值。[`dsh-llm-pi-ai`](../../../packages/llm/llm-pi-ai/README.md) 和 [`dsh-llm-deepseek`](../../../packages/llm/llm-deepseek/README.md) 参考文档负责直接 `settings.yaml` 配置、目录解析、推理控制、凭据与适配器错误。
自动生成的[插件配置目录](../../config-catalog.zh.md)列出所有受支持的字段与默认值。[`dsh-llm-pi-ai`](../../../packages/llm/llm-pi-ai/README.zh.md) 和 [`dsh-llm-deepseek`](../../../packages/llm/llm-deepseek/README.zh.md) 参考文档负责直接 `settings.yaml` 配置、目录解析、推理控制、凭据与适配器错误。
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/guide/python-sdk.md
python-sdk.md: 71c588ce8c22a8de7ea6c8ed79989b310dcf812a
python-sdk.zh.md: e273477a3d7639a1f8da39f1a3b5f7fd1d072f60
python-sdk.zh.md: 00723640ae8f9cff099dfd49816bb3e358f84f6a
+2 -2
View File
@@ -24,7 +24,7 @@ python -m venv .venv
python -m pip install deepseek-harness-sdk
```
安装后的运行时不需要系统提供 Node.js。需要从源码构建运行时或 wheel 包的仓库贡献者应使用 [Python 贡献者工作流](../../../python/development.md)。
安装后的运行时不需要系统提供 Node.js。需要从源码构建运行时或 wheel 包的仓库贡献者应使用 [Python 贡献者工作流](../../../python/development.zh.md)。
## 运行仓库内置示例
@@ -101,4 +101,4 @@ print(result.final_response)
该组合使用 `danger-full-access`。只能在可丢弃的 checkout 或容器内运行:Bash 与编辑器可以修改运行时进程有权访问的任何路径。持久 PTY 后端需要 POSIX 终端环境,因此该组合不支持 Windows agent。
准确的组合内容归 [`jsonrpc-agent` 示例参考](../../../examples/jsonrpc-agent/README.md)所有。[Python SDK 参考](../../../python/sdk/README.md)介绍生命周期、结果、通知、运行时选择和配置;[Cordis primer](../../cordis-primer.md)介绍组合语法。
准确的组合内容归 [`jsonrpc-agent` 示例参考](../../../examples/jsonrpc-agent/README.zh.md)所有。[Python SDK 参考](../../../python/sdk/README.zh.md)介绍生命周期、结果、通知、运行时选择和配置;[Cordis primer](../../cordis-primer.zh.md)介绍组合语法。