docs(zh): sync remaining code mode-value prose to ptc

The review bot found stale 'code' configuration values in the zh tools
and agent-tool-presentation READMEs and the zh tool catalog, which the
runtime schema already rejects in favor of 'ptc'.
This commit is contained in:
Tianyi Cui
2026-08-28 00:16:29 +08:00
parent 84dd2447f3
commit b7c71d805a
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with: # after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/tool-catalog.md # pnpm run verify-translation-pairing --write docs/tool-catalog.md
tool-catalog.md: 91ff093e79cc05a2c08b5aa1130378440cd963f3 tool-catalog.md: 91ff093e79cc05a2c08b5aa1130378440cd963f3
tool-catalog.zh.md: 2cded94f48a01dca34f9433df48232aa9d726d58 tool-catalog.zh.md: 35daf5a7c6b1c27975721c0b9d8ddfe71eaeb803
+1 -1
View File
@@ -20,7 +20,7 @@
| 工具包 | 模型可见名称 | 依赖 | 写入/影响 | 随产品发布的别名 | 部署说明 | | 工具包 | 模型可见名称 | 依赖 | 写入/影响 | 随产品发布的别名 | 部署说明 |
| --- | --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- | --- |
| `@deepseek-ai/dsh-tool-ask-user` | `ask_user_question` | `ctx.tools``ctx.userQuestions` | `tool/call``tool/result after a UI/provider answers the question` | - | ask_user_question 会暂停工具调用,直到当前 UI 提供方返回人类答案。 | | `@deepseek-ai/dsh-tool-ask-user` | `ask_user_question` | `ctx.tools``ctx.userQuestions` | `tool/call``tool/result after a UI/provider answers the question` | - | ask_user_question 会暂停工具调用,直到当前 UI 提供方返回人类答案。 |
| `@deepseek-ai/dsh-tools` | `run_code` | `ctx.tools``ctx.codeRuntime (execution time)``ctx.systemPrompt` | `tool/call``one tool/code-dispatch-start + tool/code-dispatch pair per bridged sub-call``tool/result` | - | 在 `mode: ptc``mode: both` 下,它由工具注册表所有,作为可过滤能力层之外的保留传输机制(参见 PTC mode Agent Note)。在 `code` 下,它是注册表对协议格式(wire format)的唯一贡献;其他可见能力在使用已加载运行时语言生成的 SDK 章节中声明。程序通过 binding 调用这些能力,调用按照原生并发约定调度:启动顺序和策略遵循提交顺序,并发安全的函数体最多重叠执行 `maxParallelSubCalls` 个。调用会重新进入完整且受守卫保护的工具流水线,并将每个嵌套执行关联到此外层结果。 | | `@deepseek-ai/dsh-tools` | `run_code` | `ctx.tools``ctx.codeRuntime (execution time)``ctx.systemPrompt` | `tool/call``one tool/code-dispatch-start + tool/code-dispatch pair per bridged sub-call``tool/result` | - | 在 `mode: ptc``mode: both` 下,它由工具注册表所有,作为可过滤能力层之外的保留传输机制(参见 PTC mode Agent Note)。在 `ptc` 下,它是注册表对协议格式(wire format)的唯一贡献;其他可见能力在使用已加载运行时语言生成的 SDK 章节中声明。程序通过 binding 调用这些能力,调用按照原生并发约定调度:启动顺序和策略遵循提交顺序,并发安全的函数体最多重叠执行 `maxParallelSubCalls` 个。调用会重新进入完整且受守卫保护的工具流水线,并将每个嵌套执行关联到此外层结果。 |
| `@deepseek-ai/dsh-plan-mode` | `exit_plan_mode` | `ctx.tools``ctx.systemPrompt``ctx.userQuestions (execution time, opportunistic)` | `tool/call``plan/mode inactive on an approved review``tool/result` | - | 规划未激活时,exit_plan_mode 仍保留在面向模型的 schema 中,这样状态转换不会在规划策略变更之外额外造成工具目录变动。其执行路径会拒绝规划模式之外的调用;在规划模式下,它通过用户交互 seam 提交计划(批准/根据反馈继续规划),批准后会在步骤边界记录规划模式已停用。 | | `@deepseek-ai/dsh-plan-mode` | `exit_plan_mode` | `ctx.tools``ctx.systemPrompt``ctx.userQuestions (execution time, opportunistic)` | `tool/call``plan/mode inactive on an approved review``tool/result` | - | 规划未激活时,exit_plan_mode 仍保留在面向模型的 schema 中,这样状态转换不会在规划策略变更之外额外造成工具目录变动。其执行路径会拒绝规划模式之外的调用;在规划模式下,它通过用户交互 seam 提交计划(批准/根据反馈继续规划),批准后会在步骤边界记录规划模式已停用。 |
| `@deepseek-ai/dsh-tool-bash` | `bash` | `ctx.tools``ctx.shell``ctx.systemPrompt``ctx.shellEnv``ctx.jobs at call time for run_in_background` | `tool/call``tool/result` | - | bash 工具是 bash 执行器 seam 面向模型的消费方。使用 `run_in_background` 的运行会注册到通用 `ctx.jobs` 运行时,并通过 `job_*` 工具(来自 `@deepseek-ai/dsh-tool-jobs`)收集/停止;禁用 `enableRunInBackground` 配置(默认为 true)后,该参数会被完全移除。 | | `@deepseek-ai/dsh-tool-bash` | `bash` | `ctx.tools``ctx.shell``ctx.systemPrompt``ctx.shellEnv``ctx.jobs at call time for run_in_background` | `tool/call``tool/result` | - | bash 工具是 bash 执行器 seam 面向模型的消费方。使用 `run_in_background` 的运行会注册到通用 `ctx.jobs` 运行时,并通过 `job_*` 工具(来自 `@deepseek-ai/dsh-tool-jobs`)收集/停止;禁用 `enableRunInBackground` 配置(默认为 true)后,该参数会被完全移除。 |
| `@deepseek-ai/dsh-tool-pwsh` | `pwsh` | `ctx.tools``ctx.shell``ctx.systemPrompt``ctx.shellEnv``ctx.jobs at call time for run_in_background` | `tool/call``tool/result` | - | pwsh 工具是 Windows 组合中 bash 执行器 seam 的 PowerShell 方言消费方(由 `@deepseek-ai/dsh-pwsh-local` 等 PowerShell 执行器为 `ctx.shell` 提供后端);除沙箱接口外,它逐项对应 bash 工具调用。使用 `run_in_background` 的运行会注册到通用 `ctx.jobs` 运行时,并通过 `job_*` 工具收集/停止;托管的 `DSH_*` 环境来自 `@deepseek-ai/dsh-shell-env`。每次调用都在新进程中运行,不使用持久 PTY 会话。路径采用原生 `C:\...` 形式,变量采用 `$env:NAME`。 | | `@deepseek-ai/dsh-tool-pwsh` | `pwsh` | `ctx.tools``ctx.shell``ctx.systemPrompt``ctx.shellEnv``ctx.jobs at call time for run_in_background` | `tool/call``tool/result` | - | pwsh 工具是 Windows 组合中 bash 执行器 seam 的 PowerShell 方言消费方(由 `@deepseek-ai/dsh-pwsh-local` 等 PowerShell 执行器为 `ctx.shell` 提供后端);除沙箱接口外,它逐项对应 bash 工具调用。使用 `run_in_background` 的运行会注册到通用 `ctx.jobs` 运行时,并通过 `job_*` 工具收集/停止;托管的 `DSH_*` 环境来自 `@deepseek-ai/dsh-shell-env`。每次调用都在新进程中运行,不使用持久 PTY 会话。路径采用原生 `C:\...` 形式,变量采用 `$env:NAME`。 |
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with: # after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/core/agent-tool-presentation/README.md # pnpm run verify-translation-pairing --write packages/core/agent-tool-presentation/README.md
README.md: c57938f2b32bead9558b283112c09e8a46b6e866 README.md: c57938f2b32bead9558b283112c09e8a46b6e866
README.zh.md: bbe7801fba2e3f284be0146c1375f73a5dc00009 README.zh.md: ac511f0793c1f883d539fd05cc53655869f19f5d
@@ -25,7 +25,7 @@ kind: "package-reference"
<a id="use-this-package"></a> <a id="use-this-package"></a>
## 使用本包 ## 使用本包
把这一行加入 agent preset,以固定每个加入该 preset 的 agent 看到其工具的方式。`native` 以函数定义的形式呈现每个可见工具 schema;`code` 只呈现 `run_code` 传输、一份生成的 SDK 以及「只有 `run_code` 可被直接调用」这条规则;`both` 同时呈现两种形态。未作声明的 agent 会拿到 [`dsh-tools`](../tools/README.zh.md) 那一行上的部署级 `mode` 把这一行加入 agent preset,以固定每个加入该 preset 的 agent 看到其工具的方式。`native` 以函数定义的形式呈现每个可见工具 schema;`ptc` 只呈现 `run_code` 传输、一份生成的 SDK 以及「只有 `run_code` 可被直接调用」这条规则;`both` 同时呈现两种形态。未作声明的 agent 会拿到 [`dsh-tools`](../tools/README.zh.md) 那一行上的部署级 `mode`
### 把这一行加入 preset ### 把这一行加入 preset
@@ -37,7 +37,7 @@ kind: "package-reference"
| 字段 | 默认值 | 含义 | | 字段 | 默认值 | 含义 |
|---|---|---| |---|---|---|
| `mode` | 必填 | `native`——每个 schema`code`——`run_code` 加生成 SDK`both`——两种形态 | | `mode` | 必填 | `native`——每个 schema`ptc`——`run_code` 加生成 SDK`both`——两种形态 |
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-agent-tool-presentation)是每个受支持字段的穷尽式真源。`mode` 是必填而非有默认值,因为不带这一行的 preset 会继承部署默认值。 生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-agent-tool-presentation)是每个受支持字段的穷尽式真源。`mode` 是必填而非有默认值,因为不带这一行的 preset 会继承部署默认值。
+1 -1
View File
@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with: # after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/core/tools/README.md # pnpm run verify-translation-pairing --write packages/core/tools/README.md
README.md: f586b926ec9a8e426f48b62e4d03b1661201a76a README.md: f586b926ec9a8e426f48b62e4d03b1661201a76a
README.zh.md: 15282a7dff6d8da3a2a43315f1bc2ebe8dcd9a60 README.zh.md: 5f422dd848ee9a6e8e0afe96d3dd03238ecc3857
+2 -2
View File
@@ -61,7 +61,7 @@ ctx.tools.register(defineTool({
### 配置呈现模式 ### 配置呈现模式
`mode` 配置决定模型看到什么:`native`(每个可见 schema)、`code`(只有 `run_code` 加一份生成 SDK)或 `both` `mode` 配置决定模型看到什么:`native`(每个可见 schema)、`ptc`(只有 `run_code` 加一份生成 SDK)或 `both`
```yaml ```yaml
- name: '@deepseek-ai/dsh-tools' - name: '@deepseek-ai/dsh-tools'
@@ -122,7 +122,7 @@ ctx.tools.register(defineTool({
### PTC mode ### PTC mode
`ptc``both` 下,注册表公开保留的 `run_code` 传输以及按所加载运行时语言生成的确定性 SDK。每个 SDK 绑定调用都会在日志中与外层调用关联,重新进入完整工具流水线,并通过复用原生并发约定的每次运行独有池调度。在纯 `code` 下,模型直呼其他任何可见工具都会在策略之前解析为 `UNKNOWN_TOOL`——通告面与可调用面保持一致。中间绑定值只存在于执行局部;只有外层 `run_code` 结果有硬大小上限。[执行器塌缩 note](../../../.agents/notes/implemented/bug-fix/2026-08-07-ptc-executor-collapse.zh.md) 拥有该收束约定。 `ptc``both` 下,注册表公开保留的 `run_code` 传输以及按所加载运行时语言生成的确定性 SDK。每个 SDK 绑定调用都会在日志中与外层调用关联,重新进入完整工具流水线,并通过复用原生并发约定的每次运行独有池调度。在纯 `ptc` 下,模型直呼其他任何可见工具都会在策略之前解析为 `UNKNOWN_TOOL`——通告面与可调用面保持一致。中间绑定值只存在于执行局部;只有外层 `run_code` 结果有硬大小上限。[执行器塌缩 note](../../../.agents/notes/implemented/bug-fix/2026-08-07-ptc-executor-collapse.zh.md) 拥有该收束约定。
<a id="extension-points"></a> <a id="extension-points"></a>
### 扩展点 ### 扩展点