dsh-perm-gate 0.2.1-beta.3 → 0.2.1-beta.5

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/CHANGELOG.ja.md CHANGED
@@ -5,8 +5,58 @@
5
5
  形式は [Keep a Changelog](https://keepachangelog.com/ja/1.1.0/) に従い、
6
6
  このプロジェクトは [Semantic Versioning](https://semver.org/spec/v2.0.0.html) に準拠します。
7
7
 
8
+ ## [0.2.1-beta.5] - 2026-09-11
9
+
10
+ ### 修正
11
+
12
+ - **DSH 0.1.2 ではゲートが全呼び出しで待機状態になり、「承認記録」ページが空のままでした。** セッションの
13
+ 権限プリセット fold はログを `exec.agent.session.events` として読んでいました。DSH 0.1.1 はこの配列を
14
+ 公開していましたが、0.1.2 はログを `Session.snapshotEvents()` / `ownEvents()` の背後に隠し `events`
15
+ メンバーを残していないため、読み取りは `undefined` を返し、`presetOf` も `undefined` を返し、
16
+ `presetInScope(undefined, ['permissive'])` によって `gateActive` が**すべての**呼び出しで false に
17
+ なりました —— ルール / grant / 拒否キーワード / 分類器 / P0 ハード拒否のいずれの判定も行われず、監査
18
+ イベントも記録されません(ゲート自身のティアを選択したセッションでも同様で、タブには失敗ではなく
19
+ 「本セッションにはまだ承認記録がありません」と表示されていました)。fold は既知のすべてのアクセサ形状
20
+ (`events` 配列、`snapshotEvents()`、`ownEvents()`)でログを読み、ホストが何も公開しない場合にのみ
21
+ 「イベントなし」に縮退します。fold キャッシュはログ長と末尾イベントの同一性をキーにします(0.1.2 の
22
+ スナップショットは同じ凍結イベントに対する毎回新しい配列のため)。`test/preset-scope.spec.ts` が両形状を
23
+ 固定します。
24
+
25
+ ### 変更
26
+
27
+ - **権限ティアの表示名を全サーフェスで「自动审查」に統一し、アイコンを廃止しました。**
28
+ `cordis.patch.yml` の preset `name:` が中国語の製品名になり、一般設定の既定行・入力欄のピッカー・
29
+ プラグイン設定タブのすべてで同じ表示になります。DSH 0.1.2 はプラグイン提供ティアの `name:` をそのまま
30
+ 描画し、ローカライズするのは組み込み 3 値(`仅可查看` / `工作区内修改` / `完全权限`)だけなので、zh
31
+ セッションが見るのはこの 1 つの文字列です。マシン値は `permissive` のままです(`gatePresets` が照合
32
+ する値)。権限ピッカーのアイコン装飾は削除しました(`src/client/permission-icon.ts` を削除):退役した
33
+ `auto` ティアの盾グリフに合わせるためのもので、0.1.2 では `aria-haspopup="menu"` セレクタ経由で設定行にも
34
+ 適用され、ピッカーのグリフは組み込み値にのみ紐づくためプラグイン ティアは描画しません。
35
+
8
36
  ## [Unreleased]
9
37
 
38
+ ### 追加
39
+
40
+ - Permissive ティアに `trustEscalation` 戦略を追加(ティア有効時に既定オン):ゲートがすでに許可した呼び出しの
41
+ サンドボックス昇格承認をここで `allowed-once` と回答し、プロンプトを出さなくする。昇格は shell / pwsh / edit
42
+ ツールの内部 — `tools/pre-execute` の決着後 — から発生するため、ゲート自身の allow はそこに届かず、
43
+ LLM が `safe` と判定した呼び出しでも広げの確認を求めていた。ゲートが許可した呼び出しのみ
44
+ (`callId` とツール名で一致)がプロンプトをスキップし、`workspace-write` / `danger-full-access` を
45
+ 命名する認識された昇格原因のみ適用。それ以外は変更なく人手へ委譲。自動回答はイベントフィードに記録
46
+ (`verdict: "escalation-auto"`、`mode: <ターゲット>`)。スイッチをオフにすると広げは人手ゲート化。
47
+
48
+ ### 修正
49
+
50
+ - 設定カードがルール ファイルから編集可能なホワイトリストをシードするようになりました。
51
+ `installSettingsSection` はホスト設定スコープで `scope.set('allowlist', …)` を呼んでいましたが、
52
+ ホスト スコープは `get` / `watch` / `update` / `replace` だけ expose —
53
+ `set(field, value)` は *クライアント* の `mutate()` 用 convenience ラッパーで異なるオブジェクトなので、
54
+ 呼び出しが投げて名前空間がシードされませんでした。
55
+ 今度は `scope.update({ allowlist: … })` を使います。
56
+ - `approval/request` リスナーが `prepend` で登録され、パッシブ オブザーバから回答ゲートになり、
57
+ ブラウザ プロンプトを描画するリモート ブリッジの前に位置するようになりました。
58
+ そのブリッジの後ろにリスナーがあれば、すでに示されたプロンプトしか記録できませんでした。
59
+
10
60
  ## [0.2.1-beta.3] - 2026-09-10
11
61
 
12
62
  ### 追加
package/CHANGELOG.ko.md CHANGED
@@ -5,8 +5,58 @@
5
5
  형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)을 따르며,
6
6
  이 프로젝트는 [Semantic Versioning](https://semver.org/spec/v2.0.0.html)을 준수합니다.
7
7
 
8
+ ## [0.2.1-beta.5] - 2026-09-11
9
+
10
+ ### 수정
11
+
12
+ - **DSH 0.1.2에서 게이트가 모든 호출에서 대기 상태가 되어 「승인 기록」 페이지가 비어 있었습니다.** 세션의
13
+ 권한 preset fold가 로그를 `exec.agent.session.events`로 읽었습니다. DSH 0.1.1은 이 배열을
14
+ 노출했지만 0.1.2는 로그를 `Session.snapshotEvents()` / `ownEvents()` 뒤로 감추고 `events` 멤버를
15
+ 남기지 않아, 읽기가 `undefined`를 반환하고 `presetOf`도 `undefined`를 반환했으며
16
+ `presetInScope(undefined, ['permissive'])` 때문에 `gateActive`가 **모든** 호출에서 false가
17
+ 되었습니다 —— 규칙 / grant / 거부 키워드 / 분류기 / P0 하드 거부 판정이 전혀 없고 감사 이벤트도
18
+ 기록되지 않았습니다(게이트 자체 티어를 선택한 세션에서도 마찬가지여서, 탭에는 실패가 아니라
19
+ 「이 세션에는 아직 승인 기록이 없습니다」가 표시되었습니다). fold는 알려진 모든 접근자 형태
20
+ (`events` 배열, `snapshotEvents()`, `ownEvents()`)로 로그를 읽고, 호스트가 아무것도 노출하지
21
+ 않을 때만 "이벤트 없음"으로 축소됩니다. fold 캐시는 로그 길이와 마지막 이벤트의 동일성을 키로
22
+ 사용합니다(0.1.2 스냅샷은 동일한 동결 이벤트에 대한 매번 새로운 배열입니다).
23
+ `test/preset-scope.spec.ts`가 두 형태를 고정합니다.
24
+
25
+ ### 변경
26
+
27
+ - **권한 티어의 표시 이름을 모든 화면에서 「自动审查」로 통일하고 아이콘을 제거했습니다.**
28
+ `cordis.patch.yml`의 preset `name:`이 중국어 제품명이 되어 일반 설정 기본 행, 입력창 선택기,
29
+ 플러그인 설정 탭이 모두 같은 이름을 표시합니다. DSH 0.1.2는 플러그인 티어의 `name:`을 그대로
30
+ 렌더링하고 내장 세 값(`仅可查看` / `工作区内修改` / `完全权限`)만 지역화하므로, zh 세션이 보는 것은
31
+ 이 하나의 문자열입니다. 머신 값은 `permissive` 그대로입니다(`gatePresets`가 대조하는 값).
32
+ 권한 선택기의 아이콘 장식은 제거했습니다(`src/client/permission-icon.ts` 삭제): 은퇴한 `auto` 티어의
33
+ 방패 글리프에 맞추기 위한 것이었고, 0.1.2에서는 `aria-haspopup="menu"` 선택자를 통해 설정 행에도
34
+ 적용되었으며, 선택기의 글리프는 내장 값에만 연결되므로 플러그인 티어는 그리지 않습니다.
35
+
8
36
  ## [Unreleased]
9
37
 
38
+ ### 추가
39
+
40
+ - Permissive 티어에 `trustEscalation` 전략 추가(티어 켜짐时 기본 켬): 게이트가 이미 허용한 호출의
41
+ 샌드박스 승격 승인을 여기서 `allowed-once`로 응답하여 프롬프트를 표시하지 않음. 승격은 shell / pwsh / edit
42
+ 도구 내부(`tools/pre-execute` 결착 후)에서 발생하므로 게이트의 allow는 여기에 닿지 않고,
43
+ LLM이 `safe`로 판정한 호출조차 승격 확인을 요구했음. 게이트가 허용한 호출만
44
+ (`callId` 및 툴 이름 일치) 프롬프트를 건너뛰고, `workspace-write` / `danger-full-access`를
45
+ 명시하는 알려진 승격 원인에만 적용. 나머지는 변경 없이 사람에게 위임. 자동 응답은 이벤트 피드에 기록
46
+ (`verdict: "escalation-auto"`, `mode: <대상>`). 스위치를 끄면 승격은 사람 게이트화.
47
+
48
+ ### 수정
49
+
50
+ - 설정 카드가 규칙 파일에서 편집 가능한 허용 목록을 시딩하도록 수정.
51
+ `installSettingsSection`은 호스트 설정 스코프에서 `scope.set('allowlist', …)`를 호출했지만,
52
+ 호스트 스코프는 `get` / `watch` / `update` / `replace`만 제공 —
53
+ `set(field, value)`는 *클라이언트*의 `mutate()`용 convenience 래퍼로 다른 객체이므로
54
+ 호출이 예외를 throw하고 네임스페이스가 시딩되지 않았음.
55
+ 이제 `scope.update({ allowlist: … })`를 사용.
56
+ - `approval/request` 리스너가 `prepend`로 등록되고 수동 옵서버에서 응답 게이트로 바뀌어,
57
+ 브라우저 프롬프트를 렌더링하는 원격 브리ჯ 앞에 위치하게 됨.
58
+ 그 브리ჯ 뒤에 리스너가 있으면 이미 표시된 프롬프트만 기록 가능했음.
59
+
10
60
  ## [0.2.1-beta.3] - 2026-09-10
11
61
 
12
62
  ### 추가
package/CHANGELOG.md CHANGED
@@ -5,7 +5,84 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.2.1-beta.5] - 2026-09-11
9
+
10
+ ### Fixed
11
+
12
+ - **The gate stood down on every call under DSH 0.1.2, so the Approvals page stayed empty.** The
13
+ session's permission-preset fold read the log as `exec.agent.session.events`. DSH 0.1.1 exposed
14
+ that array; 0.1.2 made the log private behind `Session.snapshotEvents()` / `ownEvents()` and kept
15
+ no `events` member, so the read returned `undefined`, `presetOf` answered `undefined`, and
16
+ `presetInScope(undefined, ['permissive'])` made `gateActive` false for **every** call: no rule,
17
+ grant, deny-keyword, classifier, or P0 hard-deny decision, and no audit event — including in
18
+ sessions that had selected the gate's own tier, which is why the tab showed "本会话暂无审批记录"
19
+ rather than a failure. The fold now reads the log through every known accessor shape
20
+ (`events` array, `snapshotEvents()`, `ownEvents()`) and degrades to "no events" only when the host
21
+ exposes none; the fold cache keys on the log's length plus its last event's identity, since a
22
+ 0.1.2 snapshot is a fresh array over the same frozen events on every read. `test/preset-scope.spec.ts`
23
+ pins both shapes: a `0.1.2`-shaped session must yield a decision (and a recorded event), and a
24
+ grown log must re-fold so a preset switch takes effect on the next call.
25
+
26
+ ### Changed
27
+
28
+ - **The permission tier is labelled 自动审查 on every surface, with no icon.** The preset's
29
+ `name:` in `cordis.patch.yml` is now the Chinese product string, and the General-settings default
30
+ row, the composer picker, and the plugin's settings tab all show it. DSH 0.1.2 renders a
31
+ plugin-contributed tier's `name:` verbatim and localizes only the three built-in values
32
+ (`仅可查看` / `工作区内修改` / `完全权限`), so the one host-supplied string is what a zh session sees;
33
+ the tier's machine value stays `permissive`, which is what `gatePresets` matches. The
34
+ permission-picker icon decoration is removed (`src/client/permission-icon.ts` deleted): it existed
35
+ to match the retired `auto` tier's shield glyph, it applied to the settings row through the
36
+ 0.1.2 `aria-haspopup="menu"` selector, and a plugin tier draws no glyph because the composer's
37
+ glyphs are keyed to the built-in values only.
38
+
39
+ ## [0.2.1-beta.4] - 2026-09-11
40
+
41
+ ### Added
42
+
43
+ - `trustEscalation` strategy in the Permissive tier (on by default while the tier is on): a
44
+ sandbox-escalation approval for a call this gate already allowed is answered `allowed-once`
45
+ here instead of prompting you. The escalation is raised by `approveEscalation` from *inside*
46
+ the shell / pwsh / edit tool body — after `tools/pre-execute` settled — so the gate's own
47
+ allow never reached it and a call the LLM graded `safe` still asked you to approve the
48
+ widening. Only the exact call the gate cleared (matched by `callId` and tool name) skips the
49
+ prompt, and only for a recognized escalation reason naming `workspace-write` /
50
+ `danger-full-access`; everything else delegates to the human unchanged. The auto-answer is
51
+ recorded on the event feed (`verdict:"escalation-auto"`, `mode:<target>`). Turn the switch
52
+ off to keep sandbox widening human-gated.
53
+
54
+ ### Fixed
55
+
56
+ - The settings card now seeds the editable whitelist from the rules file. `installSettingsSection`
57
+ called `scope.set('allowlist', …)` on the **host** settings scope, which exposes only
58
+ `get` / `watch` / `update` / `replace` — `set(field, value)` is the *client* convenience wrapper
59
+ over `mutate()`, a different object — so the call threw and the namespace stayed unseeded.
60
+ It now uses `scope.update({ allowlist: … })`.
61
+ - The `approval/request` listener is registered `prepend` and is now an answering gate rather than
62
+ a passive observer, so it sits ahead of the remote bridge that renders the browser prompt. A
63
+ listener behind that bridge could only ever record a prompt that had already been shown.
64
+ - The browser half no longer imports `@deepseek-ai/dsh-client-runtime`, which DSH removed in
65
+ `0.1.2-alpha.1`. `ClientContext` now comes from `@deepseek-ai/cordis` — the alias DSH 0.1.1
66
+ defined as `export type ClientContext = Context`, so it names the same type on both lines — and
67
+ the settings card declares the four scope members it uses locally (`SettingsScopeLike`), the
68
+ same local-face pattern the host half already uses for the host `settings` service. The client
69
+ contract is byte-identical on both lines; only its exporting package moved.
70
+
71
+ ### Changed
72
+
73
+ - DSH compatibility now ships as **two long-lived branches**, each with its own version series,
74
+ `engines.dsh`, and npm dist-tag: `main` / `0.2.x` / `>=0.1.2-alpha.1 <0.2.0-0` / `latest`, and
75
+ `legacy` / `1.x` / `>=0.1.0-rc.7 <0.1.2-alpha.1` / `legacy`. This branch is `main`. See
76
+ `RELEASING.md` for the branch layout and the cherry-pick flow.
77
+ - On this line `ctx.slots` is declared by `@deepseek-ai/dsh-client-ui-renderer/client` — from
78
+ `0.1.2-alpha.1` on, `@deepseek-ai/dsh-client-runtime` is gone — so the client entry imports it.
79
+ - Client devDependency floors raised from `^0.1.0-rc.7` to `^0.1.5-rc.2`, and
80
+ `@deepseek-ai/dsh-client-ui-renderer` added. The old floor meant the build could only ever
81
+ resolve the 0.1.0-rc.8 package set, so this line was never compiled against.
82
+ - `npm run verify:line` (`scripts/verify-line.mjs`) installs this branch's line packages with
83
+ `npm install --no-save` and runs typecheck + tests + build against them, so a build always
84
+ compiles against the packages the branch ships for. `npm run verify:lines` is an opt-in drift
85
+ check that builds on both lines and compares the bundles.
9
86
 
10
87
  ## [0.2.1-beta.3] - 2026-09-10
11
88
 
package/INSTALL.ja.md CHANGED
@@ -12,7 +12,7 @@
12
12
  - [日本語 changelog](./CHANGELOG.ja.md)
13
13
  - [한국어 changelog](./CHANGELOG.ko.md)
14
14
 
15
- `dsh-perm-gate` バージョン **0.2.1-beta.3**。判定チェーン、ルールファイル形式、Permissive
15
+ `dsh-perm-gate` バージョン **0.2.1-beta.5**。判定チェーン、ルールファイル形式、自动审查
16
16
  ティアについては [日本語 README](./README.ja.md) を参照してください。
17
17
 
18
18
  ## 必要条件
@@ -23,13 +23,28 @@
23
23
  - インストール先の profile。ブラウザ側は `web` profile 向けにのみビルドされます
24
24
  (`package.json` の `dsh.client.platform = "web"`)。
25
25
 
26
+ ## DSH のバージョンに合う tag を選ぶ
27
+
28
+ 単一ビルドが DSH 両ラインをカバーするため、どちらの tag を選んでも動作するコードが
29
+ インストールされます —— tag を残しておくのは、あなたがピン留めするバージョンが
30
+ 各ラインで意味を持つようにするためです。
31
+
32
+ | DSH のバージョン | インストール方法 |
33
+ |-----------------|-----------------|
34
+ | `0.1.2-alpha.1` 以上(`0.1.5-rc.2` を含む) | `dsh plugin --profile web add dsh-perm-gate`(tag `latest`) |
35
+ | `0.1.1-rc.2` まで | `dsh plugin --profile web add dsh-perm-gate@legacy` |
36
+
37
+ DSH は `engines.dsh` を強制しないため、tag が選択メカニズムであり、互換性ゲート
38
+ そのものではありません。単一ビルドが両ラインをカバーする理由と tag の公開方法については、
39
+ [RELEASING.md](./RELEASING.md) を参照してください。
40
+
26
41
  ## 公式 CLI でインストール
27
42
 
28
43
  ```sh
29
44
  dsh plugin --profile web add dsh-perm-gate
30
45
  ```
31
46
 
32
- 公開パッケージを取得し、`cordis.patch.yml`(Permissive セッション ティアとプラグイン
47
+ 公開パッケージを取得し、`cordis.patch.yml`(自动审查セッション ティアとプラグイン
33
48
  本体の挿入)を適用して、host / client の両方を組み込みます。
34
49
 
35
50
  ## ソースからインストール
@@ -84,7 +99,7 @@ dsh profile reload --profile web
84
99
  追加します。
85
100
  3. それらが提供していた preset の上書きを削除します。`cordis.patch.yml` は
86
101
  `permission.config.presets` を**丸ごと置換**するため、他プラグインの古い
87
- key 単位パッチが Permissive ティア(または組み込みティア)を黙って消すことがあります。
102
+ key 単位パッチが自动审查ティア(または組み込みティア)を黙って消すことがあります。
88
103
  4. profile を再読込し、後述の `--list` で検証します。
89
104
 
90
105
  ## 検証
@@ -105,11 +120,11 @@ dsh-perm-gate --rules permissions.yaml --tool bash --args '{"command":"pnpm inst
105
120
  "defaultAction": "ask",
106
121
  "ruleCount": 8,
107
122
  "permissive": false,
108
- "permissiveStrategies": { "trustAutoAllow": true, "alwaysConfirm": false, "llmAssist": false }
123
+ "permissiveStrategies": { "trustAutoAllow": true, "alwaysConfirm": false, "llmAssist": false, "trustEscalation": true }
109
124
  }
110
125
  ```
111
126
 
112
- UI では **設定 → プラグイン → Permissive 承認ティア** に、1 つのスイッチと 3 つの
127
+ UI では **設定 → プラグイン → 自动审查** に、1 つのスイッチと 4 つの
113
128
  バックエンド戦略トグルが表示されます。
114
129
 
115
130
  ## アンインストール
@@ -119,12 +134,12 @@ dsh plugin --profile web remove dsh-perm-gate
119
134
  dsh profile reload --profile web
120
135
  ```
121
136
 
122
- プラグインを削除するとパッチの寄与も失われるため、Permissive ティアはセッションの
137
+ プラグインを削除するとパッチの寄与も失われるため、自动审查ティアはセッションの
123
138
  権限ピッカーから再び消えます。
124
139
 
125
140
  ## トラブルシューティング
126
141
 
127
- **権限ピッカーに Permissive ティアが出ない。**
142
+ **権限ピッカーに自动审查ティアが出ない。**
128
143
  DSH の bundle patch は `permission.config.presets` を key 単位でマージせず**全体置換**
129
144
  します。profile を再読込して `cordis.patch.yml` を再適用し、後から読み込まれる
130
145
  プラグインが `presets` を上書きしていないか確認してください。
@@ -136,9 +151,16 @@ loud-fail し、暗黙に無効化されることはありません。
136
151
 
137
152
  **`llmAssist` が発火しない。**
138
153
  `classifierEndpoint` / `classifierModel` / `classifierApiKey` が必要です
139
- (**設定 → プラグイン → Permissive 承認ティア** または `cordis.yml` で設定)。
154
+ (**設定 → プラグイン → 自动审查** または `cordis.yml` で設定)。
140
155
  欠落や通信エラー時は人手のシームへフォールバックします。設計上 fail-closed です。
141
156
 
157
+ **「承認記録」ページが空のまま。**
158
+ ゲートが動作するのは `gatePresets` に列挙したティア(既定 `['permissive']`、
159
+ ピッカーでの表示名が「自动审查」)だけなので、他のティアのセッションでは
160
+ イベントを一切記録しません —— 記録したいセッションで権限ピッカーから
161
+ 「自动审查」を選んでください。preset を一度も選んでいないセッションも対象外です。
162
+ 新しいセッションの初期ティアは `permission.defaultPreset` 設定で決まります。
163
+
142
164
  **設定カードに「設定名前空間が利用できません」と出る。**
143
165
  プラグインが現在の profile に組み込まれていません。
144
166
  `dsh plugin --profile web add dsh-perm-gate` を実行して再読込してください。
package/INSTALL.ko.md CHANGED
@@ -12,7 +12,7 @@
12
12
  - [日本語 changelog](./CHANGELOG.ja.md)
13
13
  - [한국어 changelog](./CHANGELOG.ko.md)
14
14
 
15
- `dsh-perm-gate` 버전 **0.2.1-beta.3**. 결정 체인, 규칙 파일 형식, Permissive 티어는
15
+ `dsh-perm-gate` 버전 **0.2.1-beta.5**. 결정 체인, 규칙 파일 형식, 自动审查 티어는
16
16
  [한국어 README](./README.ko.md)를 참고하세요.
17
17
 
18
18
  ## 요구 사항
@@ -23,13 +23,28 @@
23
23
  - 설치할 profile. 브라우저 절반은 `web` profile용으로만 빌드됩니다
24
24
  (`package.json`의 `dsh.client.platform = "web"`).
25
25
 
26
+ ## DSH 버전에 맞는 tag 선택
27
+
28
+ 단일 빌드는 두 DSH 라인을 모두 커버하므로, 어느 tag를 골라도 작동하는 코드가
29
+ 설치됩니다 —— tag를 유지하는 이유는 당신이 고정하는 버전이 각 라인에서 의미 있게
30
+ 유지되도록 하기 위함입니다.
31
+
32
+ | DSH 버전 | 설치 방법 |
33
+ |----------|-----------|
34
+ | `0.1.2-alpha.1` 이상 (`0.1.5-rc.2` 포함) | `dsh plugin --profile web add dsh-perm-gate` (tag `latest`) |
35
+ | `0.1.1-rc.2` 이하 | `dsh plugin --profile web add dsh-perm-gate@legacy` |
36
+
37
+ DSH는 `engines.dsh`를 강제하지 않으므로, tag는 선택 메커니즘이지 호환성 게이트가
38
+ 아닙니다. 단일 아티팩트가 두 라인을 커버하는 이유와 tag가 게시되는 방식에 대해서는
39
+ [RELEASING.md](./RELEASING.md)를 참고하세요.
40
+
26
41
  ## 공식 CLI로 설치
27
42
 
28
43
  ```sh
29
44
  dsh plugin --profile web add dsh-perm-gate
30
45
  ```
31
46
 
32
- 게시된 패키지를 가져오고 `cordis.patch.yml`(Permissive 세션 티어 + 플러그인 항목)을
47
+ 게시된 패키지를 가져오고 `cordis.patch.yml`(自动审查 세션 티어 + 플러그인 항목)을
33
48
  적용하여 host / client 양쪽을 조립합니다.
34
49
 
35
50
  ## 소스에서 설치
@@ -83,7 +98,7 @@ dsh profile reload --profile web
83
98
  2. 위 네 플러그인을 `cordis.yml`에서 제거하고 `dsh-perm-gate` 항목만 추가합니다.
84
99
  3. 해당 플러그인들이 제공하던 preset 재정의를 삭제합니다. `cordis.patch.yml`은
85
100
  `permission.config.presets`를 **전체 교체**하므로, 다른 플러그인의 오래된
86
- key 단위 패치가 Permissive 티어(또는 내장 티어)를 조용히 없앨 수 있습니다.
101
+ key 단위 패치가 自动审查 티어(또는 내장 티어)를 조용히 없앨 수 있습니다.
87
102
  4. profile을 다시 불러오고 아래의 `--list`로 검증합니다.
88
103
 
89
104
  ## 검증
@@ -104,12 +119,12 @@ dsh-perm-gate --rules permissions.yaml --tool bash --args '{"command":"pnpm inst
104
119
  "defaultAction": "ask",
105
120
  "ruleCount": 8,
106
121
  "permissive": false,
107
- "permissiveStrategies": { "trustAutoAllow": true, "alwaysConfirm": false, "llmAssist": false }
122
+ "permissiveStrategies": { "trustAutoAllow": true, "alwaysConfirm": false, "llmAssist": false, "trustEscalation": true }
108
123
  }
109
124
  ```
110
125
 
111
- UI의 **설정 → 플러그인 → Permissive 승인 티어**에 스위치 하나와 백엔드 전략 토글
112
- 세 개가 표시되어야 합니다.
126
+ UI의 **설정 → 플러그인 → 自动审查**에 스위치 하나와 백엔드 전략 토글
127
+ 네 개가 표시되어야 합니다.
113
128
 
114
129
  ## 제거
115
130
 
@@ -118,12 +133,12 @@ dsh plugin --profile web remove dsh-perm-gate
118
133
  dsh profile reload --profile web
119
134
  ```
120
135
 
121
- 플러그인을 제거하면 패치 기여도 사라지므로 Permissive 티어가 세션 권한 선택기에서
136
+ 플러그인을 제거하면 패치 기여도 사라지므로 自动审查 티어가 세션 권한 선택기에서
122
137
  다시 사라집니다.
123
138
 
124
139
  ## 문제 해결
125
140
 
126
- **권한 선택기에 Permissive 티어가 없습니다.**
141
+ **권한 선택기에 自动审查 티어가 없습니다.**
127
142
  DSH 번들 패치는 `permission.config.presets`를 key 단위로 병합하지 않고 **전체 교체**
128
143
  합니다. profile을 다시 불러와 `cordis.patch.yml`을 재적용하고, 더 늦게 로드되는
129
144
  플러그인이 `presets`를 덮어쓰지 않는지 확인하세요.
@@ -135,9 +150,15 @@ DSH 번들 패치는 `permission.config.presets`를 key 단위로 병합하지
135
150
 
136
151
  **`llmAssist`가 동작하지 않습니다.**
137
152
  `classifierEndpoint`, `classifierModel`, `classifierApiKey`가 필요합니다
138
- (**설정 → 플러그인 → Permissive 승인 티어** 또는 `cordis.yml`에서 지정).
153
+ (**설정 → 플러그인 → 自动审查** 또는 `cordis.yml`에서 지정).
139
154
  값이 없거나 네트워크 오류가 나면 사람 승인 심으로 폴백합니다. 설계상 fail-closed입니다.
140
155
 
156
+ **「승인 기록」 페이지가 계속 비어 있습니다.**
157
+ 게이트는 `gatePresets`에 나열한 티어(기본 `['permissive']`, 선택기 표시명 「自动审查」)
158
+ 에서만 동작하므로 다른 티어의 세션에서는 이벤트를 전혀 기록하지 않습니다 —— 기록하려면
159
+ 해당 세션에서 권한 선택기로 「自动审查」를 고르세요. preset을 한 번도 선택하지 않은
160
+ 세션도 범위 밖입니다. 새 세션의 초기 티어는 `permission.defaultPreset` 설정이 정합니다.
161
+
141
162
  **설정 카드에 "설정 네임스페이스를 사용할 수 없습니다"가 표시됩니다.**
142
163
  플러그인이 현재 profile에 조립되지 않았습니다.
143
164
  `dsh plugin --profile web add dsh-perm-gate`를 실행하고 다시 불러오세요.
package/INSTALL.md CHANGED
@@ -12,8 +12,8 @@
12
12
  - [日本語 changelog](./CHANGELOG.ja.md)
13
13
  - [한국어 changelog](./CHANGELOG.ko.md)
14
14
 
15
- `dsh-perm-gate` version **0.2.1-beta.3**. Continue with the [README](./README.md) for the
16
- decision chain, the rules file format and the Permissive tier.
15
+ `dsh-perm-gate` version **0.2.1-beta.5**. Continue with the [README](./README.md) for the
16
+ decision chain, the rules file format and the 自动审查 tier.
17
17
 
18
18
  ## Requirements
19
19
 
@@ -23,13 +23,27 @@ decision chain, the rules file format and the Permissive tier.
23
23
  - A profile to install into — the browser half only ships for the `web` profile
24
24
  (`dsh.client.platform = "web"` in `package.json`).
25
25
 
26
+ ## Pick the tag for your DSH version
27
+
28
+ One build serves both DSH lines, so either tag installs working code — the tag
29
+ exists so a version you pin stays meaningful per line.
30
+
31
+ | Your DSH | Install |
32
+ |----------|---------|
33
+ | `0.1.2-alpha.1` or newer (incl. `0.1.5-rc.2`) | `dsh plugin --profile web add dsh-perm-gate` (tag `latest`) |
34
+ | up to `0.1.1-rc.2` | `dsh plugin --profile web add dsh-perm-gate@legacy` |
35
+
36
+ DSH does not enforce `engines.dsh`, so the tags are the selection mechanism rather
37
+ than a compatibility gate. See [RELEASING.md](./RELEASING.md) for why one artifact
38
+ covers both lines and how the tags are published.
39
+
26
40
  ## Install with the official CLI
27
41
 
28
42
  ```sh
29
43
  dsh plugin --profile web add dsh-perm-gate
30
44
  ```
31
45
 
32
- This pulls the published package, applies its `cordis.patch.yml` (the Permissive
46
+ This pulls the published package, applies its `cordis.patch.yml` (the 自动审查
33
47
  session tier plus the plugin entry) and assembles both halves.
34
48
 
35
49
  ## Install from source
@@ -86,7 +100,7 @@ and `dsh-movein-permissions`.
86
100
  entry above.
87
101
  3. Delete any preset overrides those plugins contributed — `cordis.patch.yml`
88
102
  **replaces** `permission.config.presets` wholesale, so stale per-key patches
89
- from other plugins can silently drop the Permissive tier (or a built-in one).
103
+ from other plugins can silently drop the 自动审查 tier (or a built-in one).
90
104
  4. Reload the profile and verify with `--list` (below).
91
105
 
92
106
  ## Verify
@@ -107,12 +121,12 @@ Expected `--list` output shape:
107
121
  "defaultAction": "ask",
108
122
  "ruleCount": 8,
109
123
  "permissive": false,
110
- "permissiveStrategies": { "trustAutoAllow": true, "alwaysConfirm": false, "llmAssist": false }
124
+ "permissiveStrategies": { "trustAutoAllow": true, "alwaysConfirm": false, "llmAssist": false, "trustEscalation": true }
111
125
  }
112
126
  ```
113
127
 
114
- In the UI, **Settings → Plugins → Permissive approval tier** should render one
115
- switch plus the three backend strategy toggles.
128
+ In the UI, **Settings → Plugins → 自动审查** should render one
129
+ switch plus the four backend strategy toggles.
116
130
 
117
131
  ## Uninstall
118
132
 
@@ -121,12 +135,12 @@ dsh plugin --profile web remove dsh-perm-gate
121
135
  dsh profile reload --profile web
122
136
  ```
123
137
 
124
- Removing the plugin also removes its patch contribution, so the Permissive tier
138
+ Removing the plugin also removes its patch contribution, so the 自动审查 tier
125
139
  disappears from the session permission picker again.
126
140
 
127
141
  ## Troubleshooting
128
142
 
129
- **The Permissive tier is missing from the permission picker.**
143
+ **The 自动审查 tier is missing from the permission picker.**
130
144
  The DSH bundle patch replaces the whole `permission.config.presets` map instead of
131
145
  merging per key. Reload the profile so `cordis.patch.yml` is re-applied, and make
132
146
  sure no later plugin overwrites `presets`.
@@ -138,10 +152,17 @@ fails loud at load — it is never silently disabled.
138
152
 
139
153
  **`llmAssist` never fires.**
140
154
  It needs `classifierEndpoint`, `classifierModel` and `classifierApiKey` (set them
141
- in **Settings → Plugins → Permissive approval tier** or in `cordis.yml`). Any
155
+ in **Settings → Plugins → 自动审查** or in `cordis.yml`). Any
142
156
  missing value or network error falls back to the human seam — the gate is
143
157
  fail-closed by design.
144
158
 
159
+ **The Approvals tab stays empty.**
160
+ The gate is scoped to the tiers listed in `gatePresets` (default
161
+ `['permissive']`), so it records nothing while the session runs in another tier —
162
+ pick 自动审查 in the permission picker for the session you want recorded. A
163
+ session that has never selected a preset is out of scope too. New sessions start
164
+ in the tier named by the `permission.defaultPreset` setting.
165
+
145
166
  **Settings card shows "Settings namespace unavailable".**
146
167
  The plugin is not assembled into the active profile. Run
147
168
  `dsh plugin --profile web add dsh-perm-gate` and reload.
package/INSTALL.zh.md CHANGED
@@ -12,7 +12,7 @@
12
12
  - [日本語 changelog](./CHANGELOG.ja.md)
13
13
  - [한국어 changelog](./CHANGELOG.ko.md)
14
14
 
15
- `dsh-perm-gate` 版本 **0.2.1-beta.3**。裁决链、规则文件格式与 Permissive 档位请见
15
+ `dsh-perm-gate` 版本 **0.2.1-beta.5**。裁决链、规则文件格式与自动审查档位请见
16
16
  [中文 README](./README.zh.md)。
17
17
 
18
18
  ## 前置条件
@@ -23,13 +23,26 @@
23
23
  - 需要一个目标 profile —— 浏览器端只为 `web` profile 构建(`package.json`
24
24
  里 `dsh.client.platform = "web"`)。
25
25
 
26
+ ## 按你的 DSH 版本选择 tag
27
+
28
+ 单一构建同时覆盖两条 DSH 线,所以任一 tag 安装的代码都能工作 —— 保留 tag
29
+ 是为了让你锁定的版本在每条线上都有意义。
30
+
31
+ | 你的 DSH | 安装方式 |
32
+ |----------|----------|
33
+ | `0.1.2-alpha.1` 或更高(含 `0.1.5-rc.2`) | `dsh plugin --profile web add dsh-perm-gate`(tag `latest`) |
34
+ | 不高于 `0.1.1-rc.2` | `dsh plugin --profile web add dsh-perm-gate@legacy` |
35
+
36
+ DSH 不强制 `engines.dsh`,因此 tag 是选择机制而非兼容性关卡。
37
+ 详见 [RELEASING.md](./RELEASING.md) 了解为何单一制品覆盖两条线以及 tag 的发布方式。
38
+
26
39
  ## 用官方 CLI 安装
27
40
 
28
41
  ```sh
29
42
  dsh plugin --profile web add dsh-perm-gate
30
43
  ```
31
44
 
32
- 该命令会拉取已发布的包、应用 `cordis.patch.yml`(Permissive 会话档位 + 插件条目),
45
+ 该命令会拉取已发布的包、应用 `cordis.patch.yml`(自动审查会话档位 + 插件条目),
33
46
  并装配 host / client 两半。
34
47
 
35
48
  ## 从源码安装
@@ -82,7 +95,7 @@ dsh profile reload --profile web
82
95
  2. 从 `cordis.yml` 删除上述四个插件,只加入唯一的 `dsh-perm-gate` 条目。
83
96
  3. 删除这些插件贡献的 preset 覆盖 —— `cordis.patch.yml` 是**整体替换**
84
97
  `permission.config.presets`,其他插件遗留的逐 key 补丁可能静默抹掉
85
- Permissive 档(或某个内置档)。
98
+ 自动审查档(或某个内置档)。
86
99
  4. 重载 profile,并用下面的 `--list` 验证。
87
100
 
88
101
  ## 验证
@@ -103,11 +116,11 @@ dsh-perm-gate --rules permissions.yaml --tool bash --args '{"command":"pnpm inst
103
116
  "defaultAction": "ask",
104
117
  "ruleCount": 8,
105
118
  "permissive": false,
106
- "permissiveStrategies": { "trustAutoAllow": true, "alwaysConfirm": false, "llmAssist": false }
119
+ "permissiveStrategies": { "trustAutoAllow": true, "alwaysConfirm": false, "llmAssist": false, "trustEscalation": true }
107
120
  }
108
121
  ```
109
122
 
110
- UI 里 **设置 → 插件 → Permissive 审批档** 应渲染出一个开关加三个后台策略开关。
123
+ UI 里 **设置 → 插件 → 自动审查** 应渲染出一个开关加四个后台策略开关。
111
124
 
112
125
  ## 卸载
113
126
 
@@ -116,11 +129,11 @@ dsh plugin --profile web remove dsh-perm-gate
116
129
  dsh profile reload --profile web
117
130
  ```
118
131
 
119
- 移除插件也会移除它的补丁贡献,Permissive 档位会重新从会话权限下拉框消失。
132
+ 移除插件也会移除它的补丁贡献,自动审查档位会重新从会话权限下拉框消失。
120
133
 
121
134
  ## 排查
122
135
 
123
- **权限下拉框里没有 Permissive 档。**
136
+ **权限下拉框里没有自动审查档。**
124
137
  DSH 的 bundle patch 是整体替换 `permission.config.presets`,而非逐 key 合并。
125
138
  请重载 profile 让 `cordis.patch.yml` 重新生效,并确认没有更晚加载的插件覆盖了
126
139
  `presets`。
@@ -131,9 +144,15 @@ DSH 的 bundle patch 是整体替换 `permission.config.presets`,而非逐 key
131
144
 
132
145
  **`llmAssist` 从不触发。**
133
146
  需要配置 `classifierEndpoint`、`classifierModel`、`classifierApiKey`
134
- (在 **设置 → 插件 → Permissive 审批档** 或 `cordis.yml` 中填写)。
147
+ (在 **设置 → 插件 → 自动审查** 或 `cordis.yml` 中填写)。
135
148
  任一缺失或网络错误都会回退到人工接缝 —— 门禁按设计 fail-closed。
136
149
 
150
+ **「审批记录」页一直是空的。**
151
+ 门禁只在 `gatePresets` 列出的档位里工作(默认 `['permissive']`,即下拉框里的
152
+ 「自动审查」),会话处在别的档位时它不记录任何事件——请在权限下拉框为本会话选择
153
+ 「自动审查」。从未选过档位的会话同样在范围之外。新会话的初始档位由
154
+ `permission.defaultPreset` 设置决定。
155
+
137
156
  **设置卡片显示「设置命名空间不可用」。**
138
157
  该插件未装配进当前 profile。执行 `dsh plugin --profile web add dsh-perm-gate`
139
158
  并重载。