docs: align zh subsystem pages with late en-side precision edits

The translators' clause-by-clause verification pass caught the English
pages' final wording refinements (tui built-in dialogs enumeration and
display()'s line-feed exception, invariants whitespace-padded/companion
phrasing, client-modules fiber-lifecycle parenthetical, storage strict
sequence, workspace first-successful-start) landing after the initial
zh versions; this aligns the eight pages and re-records their pairs.
This commit is contained in:
Tianyi Cui
2026-07-27 23:52:35 +08:00
parent 3f9c58855b
commit a8cf78630c
16 changed files with 30 additions and 30 deletions

View File

@@ -2,13 +2,13 @@
[English](permission.md) | 中文
[dsh-permission](../../packages/ui/permission) 的权限预设层(`ctx.permission``PermissionService`)把两个相互独立的强制执行旋钮,即[沙箱模式](sandbox.md)`sandbox/mode`)与[审批策略](approval.md)`approval/policy`捆绑成具名预设供客户端作为单个权限Permissions选择器提供。它是一项可选能力不属于 agent loop智能体循环主干也不拥有任何强制执行执行、提示词叙述与回放仍然读取各自旋钮的折叠结果预设切换只记录意图并通过每个旋钮各自的规范 setter 写入。[packageREADME](../../packages/ui/permission/README.md) 负责组合状态与限制;[沙箱切换设计](../../.agents/notes/implemented/feature/2026-07-06-sandbox.md)负责决策依据。
[dsh-permission](../../packages/ui/permission) 的权限预设层(`ctx.permission``PermissionService`)把两个相互独立的强制执行旋钮knob,即[沙箱模式](sandbox.md)`sandbox/mode`)与[审批策略](approval.md)`approval/policy`捆绑成具名预设供客户端作为单个权限Permissions选择器提供。它是一项可选能力不属于 agent loop智能体循环主干也不拥有任何强制执行执行、提示词叙述与回放仍然读取各自旋钮的折叠结果预设切换只记录意图并通过每个旋钮各自的规范 setter 写入。[packageREADME](../../packages/ui/permission/README.md) 负责组合状态与限制;[沙箱切换设计](../../.agents/notes/implemented/feature/2026-07-06-sandbox.md)负责决策依据。
源码:[`packages/ui/permission/src/index.ts`](../../packages/ui/permission/src/index.ts)
## 预设表
预设是一个表键,映射到一沙箱/审批组合,外加可选的客户端展示信息;默认预设表自带 `workspace-write``workspace-write` + `ask`)和 `danger-full-access``danger-full-access` + `never`)。
预设是一个表键,映射到一沙箱/审批组合,外加可选的客户端展示信息;默认预设表自带 `workspace-write``workspace-write` + `ask`)和 `danger-full-access``danger-full-access` + `never`)。
```ts type-equiv
/** One preset's sandbox/approval bundle and optional client presentation. */
@@ -36,7 +36,7 @@ interface Config {
}
```
该服务要求一个施加沙箱隔离的 `ctx.bash` 执行器和 `ctx.approval`,配置错误在插件加载时即失败:名为 `custom` 的表项会抛出异常(该名称保留给派生的「非预设」状态);在不施加隔离的 bash 执行器(没有 `sandboxMode` 能力事实)之上组合同样抛出异常,因为预设捆绑了一个沙箱模式。
该服务要求一个施加隔离的 `ctx.bash` 执行器和 `ctx.approval`,配置错误在插件加载时即失败:名为 `custom` 的表项会抛出异常(该名称保留给派生的「非预设」状态);在不施加隔离的 bash 执行器(没有 `sandboxMode` 能力事实)之上组合同样抛出异常,因为预设捆绑了一个沙箱模式。
## 当前预设与派生的 `custom`