dsh-perm-gate 1.0.0 → 2.1.0

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,6 +5,43 @@
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
+ ## [2.0.0] - 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
+ - **`main` ラインのバージョン系列を `2.x` に変更し、対応する DSH ラインを表すようにしました。**
28
+ `1.x` は DSH `<= 0.1.1` ライン、`2.x` は DSH `0.1.2+` ラインであり、プラグインのバージョンが
29
+ どの DSH 向けかを示します。`2.0.0` が新系列の最初のリリースで、`0.2.x`
30
+ (`0.2.0`、`0.2.1-beta.2`…`beta.5`)はこれに置き換わります。メジャー同士は互いを遮断するため
31
+ (`^1.0.0` は `2.0.0` を解決せず、`^2.0.0` は `1.0.0` を解決しません)、既存の
32
+ `^0.2.1-beta.4` インストール(これも `2.0.0` を解決しません)は明示的に更新する必要があります。
33
+ `engines.dsh` も同じ分界を述べています(こちらは `>=0.1.2-alpha.1 <0.2.0-0`、`legacy` は
34
+ `>=0.1.0-rc.7 <0.1.2-alpha.1`)が、DSH は決して読まないため、古い DSH を `1.x` に留めるのは
35
+ バージョン範囲と dist-tag です。
36
+ - **権限ティアの表示名を全サーフェスで「自动审查」に統一し、アイコンを廃止しました。**
37
+ `cordis.patch.yml` の preset `name:` が中国語の製品名になり、一般設定の既定行・入力欄のピッカー・
38
+ プラグイン設定タブのすべてで同じ表示になります。DSH 0.1.2 はプラグイン提供ティアの `name:` をそのまま
39
+ 描画し、ローカライズするのは組み込み 3 値(`仅可查看` / `工作区内修改` / `完全权限`)だけなので、zh
40
+ セッションが見るのはこの 1 つの文字列です。マシン値は `permissive` のままです(`gatePresets` が照合
41
+ する値)。権限ピッカーのアイコン装飾は削除しました(`src/client/permission-icon.ts` を削除):退役した
42
+ `auto` ティアの盾グリフに合わせるためのもので、0.1.2 では `aria-haspopup="menu"` セレクタ経由で設定行にも
43
+ 適用され、ピッカーのグリフは組み込み値にのみ紐づくためプラグイン ティアは描画しません。
44
+
8
45
  ## [Unreleased]
9
46
 
10
47
  ### 追加
package/CHANGELOG.ko.md CHANGED
@@ -5,6 +5,42 @@
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
+ ## [2.0.0] - 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
+ - **`main` 라인의 버전 계열을 `2.x`로 바꿔 대응하는 DSH 라인을 나타냅니다.** `1.x`는 DSH
28
+ `<= 0.1.1` 라인, `2.x`는 DSH `0.1.2+` 라인이라 플러그인 버전만 보고 어느 DSH용인지 알 수
29
+ 있습니다. `2.0.0`이 새 계열의 첫 릴리스이며 `0.2.x`(`0.2.0`, `0.2.1-beta.2`…`beta.5`)는
30
+ 이것으로 대체됩니다. 메이저가 서로를 차단하므로(`^1.0.0`은 `2.0.0`을, `^2.0.0`은 `1.0.0`을
31
+ 해석하지 않습니다) 기존 `^0.2.1-beta.4` 설치(역시 `2.0.0`을 해석하지 않습니다)는 명시적으로
32
+ 올려야 합니다. `engines.dsh`도 같은 경계를 적어 두지만(여기는
33
+ `>=0.1.2-alpha.1 <0.2.0-0`, `legacy`는 `>=0.1.0-rc.7 <0.1.2-alpha.1`) DSH는 이를 읽지 않으므로
34
+ 구버전 DSH를 `1.x`에 묶어 두는 것은 버전 범위와 dist-tag입니다.
35
+ - **권한 티어의 표시 이름을 모든 화면에서 「自动审查」로 통일하고 아이콘을 제거했습니다.**
36
+ `cordis.patch.yml`의 preset `name:`이 중국어 제품명이 되어 일반 설정 기본 행, 입력창 선택기,
37
+ 플러그인 설정 탭이 모두 같은 이름을 표시합니다. DSH 0.1.2는 플러그인 티어의 `name:`을 그대로
38
+ 렌더링하고 내장 세 값(`仅可查看` / `工作区内修改` / `完全权限`)만 지역화하므로, zh 세션이 보는 것은
39
+ 이 하나의 문자열입니다. 머신 값은 `permissive` 그대로입니다(`gatePresets`가 대조하는 값).
40
+ 권한 선택기의 아이콘 장식은 제거했습니다(`src/client/permission-icon.ts` 삭제): 은퇴한 `auto` 티어의
41
+ 방패 글리프에 맞추기 위한 것이었고, 0.1.2에서는 `aria-haspopup="menu"` 선택자를 통해 설정 행에도
42
+ 적용되었으며, 선택기의 글리프는 내장 값에만 연결되므로 플러그인 티어는 그리지 않습니다.
43
+
8
44
  ## [Unreleased]
9
45
 
10
46
  ### 추가
package/CHANGELOG.md CHANGED
@@ -5,7 +5,47 @@ 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
+ ## [2.0.0] - 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 `main` line's version series is now `2.x`, tracking the DSH line it serves.** `1.x`
29
+ is the DSH `<= 0.1.1` line and `2.x` is the DSH `0.1.2+` line, so a plugin version says
30
+ which DSH it was built for; `2.0.0` is the first release of the new series and the
31
+ `0.2.x` releases (`0.2.0`, `0.2.1-beta.2`…`beta.5`) are superseded by it. The majors
32
+ fence each other — `^1.0.0` does not resolve `2.0.0` and `^2.0.0` does not resolve
33
+ `1.0.0` — so an existing `^0.2.1-beta.4` install (which also does not resolve `2.0.0`)
34
+ must be bumped deliberately. `engines.dsh` states the same split
35
+ (`>=0.1.2-alpha.1 <0.2.0-0` here, `>=0.1.0-rc.7 <0.1.2-alpha.1` on `legacy`), but DSH
36
+ never reads it: the version ranges and dist-tags are what keep an old DSH on `1.x`.
37
+ - **The permission tier is labelled 自动审查 on every surface, with no icon.** The preset's
38
+ `name:` in `cordis.patch.yml` is now the Chinese product string, and the General-settings default
39
+ row, the composer picker, and the plugin's settings tab all show it. DSH 0.1.2 renders a
40
+ plugin-contributed tier's `name:` verbatim and localizes only the three built-in values
41
+ (`仅可查看` / `工作区内修改` / `完全权限`), so the one host-supplied string is what a zh session sees;
42
+ the tier's machine value stays `permissive`, which is what `gatePresets` matches. The
43
+ permission-picker icon decoration is removed (`src/client/permission-icon.ts` deleted): it existed
44
+ to match the retired `auto` tier's shield glyph, it applied to the settings row through the
45
+ 0.1.2 `aria-haspopup="menu"` selector, and a plugin tier draws no glyph because the composer's
46
+ glyphs are keyed to the built-in values only.
47
+
48
+ ## [0.2.1-beta.4] - 2026-09-11
9
49
 
10
50
  ### Added
11
51
 
@@ -41,12 +81,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
41
81
 
42
82
  - DSH compatibility now ships as **two long-lived branches**, each with its own version series,
43
83
  `engines.dsh`, and npm dist-tag: `main` / `0.2.x` / `>=0.1.2-alpha.1 <0.2.0-0` / `latest`, and
44
- `legacy` / `1.x` / `>=0.1.0-rc.7 <0.1.2-alpha.1` / `legacy`. **This branch is `legacy`**; the
45
- `1.x` series starts here. See `RELEASING.md` for the branch layout and the cherry-pick flow.
46
- - On this line `@deepseek-ai/dsh-client-runtime` still ships and carries `ctx.slots` onto
47
- `Context`, so the client entry's `@deepseek-ai/dsh-client-ui-renderer/client` import declares
48
- nothing new here — it exists so one source serves both lines.
49
- - Client devDependencies floor at `^0.1.1-rc.2`, the newest release of this line.
84
+ `legacy` / `1.x` / `>=0.1.0-rc.7 <0.1.2-alpha.1` / `legacy`. This branch is `main`. See
85
+ `RELEASING.md` for the branch layout and the cherry-pick flow.
86
+ - On this line `ctx.slots` is declared by `@deepseek-ai/dsh-client-ui-renderer/client` — from
87
+ `0.1.2-alpha.1` on, `@deepseek-ai/dsh-client-runtime` is gone — so the client entry imports it.
88
+ - Client devDependency floors raised from `^0.1.0-rc.7` to `^0.1.5-rc.2`, and
89
+ `@deepseek-ai/dsh-client-ui-renderer` added. The old floor meant the build could only ever
90
+ resolve the 0.1.0-rc.8 package set, so this line was never compiled against.
50
91
  - `npm run verify:line` (`scripts/verify-line.mjs`) installs this branch's line packages with
51
92
  `npm install --no-save` and runs typecheck + tests + build against them, so a build always
52
93
  compiles against the packages the branch ships for. `npm run verify:lines` is an opt-in drift
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` バージョン **1.0.0**。判定チェーン、ルールファイル形式、Permissive
15
+ `dsh-perm-gate` バージョン **2.0.0**。判定チェーン、ルールファイル形式、自动审查
16
16
  ティアについては [日本語 README](./README.ja.md) を参照してください。
17
17
 
18
18
  ## 必要条件
@@ -44,7 +44,7 @@ DSH は `engines.dsh` を強制しないため、tag が選択メカニズムで
44
44
  dsh plugin --profile web add dsh-perm-gate
45
45
  ```
46
46
 
47
- 公開パッケージを取得し、`cordis.patch.yml`(Permissive セッション ティアとプラグイン
47
+ 公開パッケージを取得し、`cordis.patch.yml`(自动审查セッション ティアとプラグイン
48
48
  本体の挿入)を適用して、host / client の両方を組み込みます。
49
49
 
50
50
  ## ソースからインストール
@@ -99,7 +99,7 @@ dsh profile reload --profile web
99
99
  追加します。
100
100
  3. それらが提供していた preset の上書きを削除します。`cordis.patch.yml` は
101
101
  `permission.config.presets` を**丸ごと置換**するため、他プラグインの古い
102
- key 単位パッチが Permissive ティア(または組み込みティア)を黙って消すことがあります。
102
+ key 単位パッチが自动审查ティア(または組み込みティア)を黙って消すことがあります。
103
103
  4. profile を再読込し、後述の `--list` で検証します。
104
104
 
105
105
  ## 検証
@@ -124,7 +124,7 @@ dsh-perm-gate --rules permissions.yaml --tool bash --args '{"command":"pnpm inst
124
124
  }
125
125
  ```
126
126
 
127
- UI では **設定 → プラグイン → Permissive 承認ティア** に、1 つのスイッチと 4 つの
127
+ UI では **設定 → プラグイン → 自动审查** に、1 つのスイッチと 4 つの
128
128
  バックエンド戦略トグルが表示されます。
129
129
 
130
130
  ## アンインストール
@@ -134,12 +134,12 @@ dsh plugin --profile web remove dsh-perm-gate
134
134
  dsh profile reload --profile web
135
135
  ```
136
136
 
137
- プラグインを削除するとパッチの寄与も失われるため、Permissive ティアはセッションの
137
+ プラグインを削除するとパッチの寄与も失われるため、自动审查ティアはセッションの
138
138
  権限ピッカーから再び消えます。
139
139
 
140
140
  ## トラブルシューティング
141
141
 
142
- **権限ピッカーに Permissive ティアが出ない。**
142
+ **権限ピッカーに自动审查ティアが出ない。**
143
143
  DSH の bundle patch は `permission.config.presets` を key 単位でマージせず**全体置換**
144
144
  します。profile を再読込して `cordis.patch.yml` を再適用し、後から読み込まれる
145
145
  プラグインが `presets` を上書きしていないか確認してください。
@@ -151,9 +151,16 @@ loud-fail し、暗黙に無効化されることはありません。
151
151
 
152
152
  **`llmAssist` が発火しない。**
153
153
  `classifierEndpoint` / `classifierModel` / `classifierApiKey` が必要です
154
- (**設定 → プラグイン → Permissive 承認ティア** または `cordis.yml` で設定)。
154
+ (**設定 → プラグイン → 自动审查** または `cordis.yml` で設定)。
155
155
  欠落や通信エラー時は人手のシームへフォールバックします。設計上 fail-closed です。
156
156
 
157
+ **「承認記録」ページが空のまま。**
158
+ ゲートが動作するのは `gatePresets` に列挙したティア(既定 `['permissive']`、
159
+ ピッカーでの表示名が「自动审查」)だけなので、他のティアのセッションでは
160
+ イベントを一切記録しません —— 記録したいセッションで権限ピッカーから
161
+ 「自动审查」を選んでください。preset を一度も選んでいないセッションも対象外です。
162
+ 新しいセッションの初期ティアは `permission.defaultPreset` 設定で決まります。
163
+
157
164
  **設定カードに「設定名前空間が利用できません」と出る。**
158
165
  プラグインが現在の profile に組み込まれていません。
159
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` 버전 **1.0.0**. 결정 체인, 규칙 파일 형식, Permissive 티어는
15
+ `dsh-perm-gate` 버전 **2.0.0**. 결정 체인, 규칙 파일 형식, 自动审查 티어는
16
16
  [한국어 README](./README.ko.md)를 참고하세요.
17
17
 
18
18
  ## 요구 사항
@@ -44,7 +44,7 @@ DSH는 `engines.dsh`를 강제하지 않으므로, tag는 선택 메커니즘이
44
44
  dsh plugin --profile web add dsh-perm-gate
45
45
  ```
46
46
 
47
- 게시된 패키지를 가져오고 `cordis.patch.yml`(Permissive 세션 티어 + 플러그인 항목)을
47
+ 게시된 패키지를 가져오고 `cordis.patch.yml`(自动审查 세션 티어 + 플러그인 항목)을
48
48
  적용하여 host / client 양쪽을 조립합니다.
49
49
 
50
50
  ## 소스에서 설치
@@ -98,7 +98,7 @@ dsh profile reload --profile web
98
98
  2. 위 네 플러그인을 `cordis.yml`에서 제거하고 `dsh-perm-gate` 항목만 추가합니다.
99
99
  3. 해당 플러그인들이 제공하던 preset 재정의를 삭제합니다. `cordis.patch.yml`은
100
100
  `permission.config.presets`를 **전체 교체**하므로, 다른 플러그인의 오래된
101
- key 단위 패치가 Permissive 티어(또는 내장 티어)를 조용히 없앨 수 있습니다.
101
+ key 단위 패치가 自动审查 티어(또는 내장 티어)를 조용히 없앨 수 있습니다.
102
102
  4. profile을 다시 불러오고 아래의 `--list`로 검증합니다.
103
103
 
104
104
  ## 검증
@@ -123,7 +123,7 @@ dsh-perm-gate --rules permissions.yaml --tool bash --args '{"command":"pnpm inst
123
123
  }
124
124
  ```
125
125
 
126
- UI의 **설정 → 플러그인 → Permissive 승인 티어**에 스위치 하나와 백엔드 전략 토글
126
+ UI의 **설정 → 플러그인 → 自动审查**에 스위치 하나와 백엔드 전략 토글
127
127
  네 개가 표시되어야 합니다.
128
128
 
129
129
  ## 제거
@@ -133,12 +133,12 @@ dsh plugin --profile web remove dsh-perm-gate
133
133
  dsh profile reload --profile web
134
134
  ```
135
135
 
136
- 플러그인을 제거하면 패치 기여도 사라지므로 Permissive 티어가 세션 권한 선택기에서
136
+ 플러그인을 제거하면 패치 기여도 사라지므로 自动审查 티어가 세션 권한 선택기에서
137
137
  다시 사라집니다.
138
138
 
139
139
  ## 문제 해결
140
140
 
141
- **권한 선택기에 Permissive 티어가 없습니다.**
141
+ **권한 선택기에 自动审查 티어가 없습니다.**
142
142
  DSH 번들 패치는 `permission.config.presets`를 key 단위로 병합하지 않고 **전체 교체**
143
143
  합니다. profile을 다시 불러와 `cordis.patch.yml`을 재적용하고, 더 늦게 로드되는
144
144
  플러그인이 `presets`를 덮어쓰지 않는지 확인하세요.
@@ -150,9 +150,15 @@ DSH 번들 패치는 `permission.config.presets`를 key 단위로 병합하지
150
150
 
151
151
  **`llmAssist`가 동작하지 않습니다.**
152
152
  `classifierEndpoint`, `classifierModel`, `classifierApiKey`가 필요합니다
153
- (**설정 → 플러그인 → Permissive 승인 티어** 또는 `cordis.yml`에서 지정).
153
+ (**설정 → 플러그인 → 自动审查** 또는 `cordis.yml`에서 지정).
154
154
  값이 없거나 네트워크 오류가 나면 사람 승인 심으로 폴백합니다. 설계상 fail-closed입니다.
155
155
 
156
+ **「승인 기록」 페이지가 계속 비어 있습니다.**
157
+ 게이트는 `gatePresets`에 나열한 티어(기본 `['permissive']`, 선택기 표시명 「自动审查」)
158
+ 에서만 동작하므로 다른 티어의 세션에서는 이벤트를 전혀 기록하지 않습니다 —— 기록하려면
159
+ 해당 세션에서 권한 선택기로 「自动审查」를 고르세요. preset을 한 번도 선택하지 않은
160
+ 세션도 범위 밖입니다. 새 세션의 초기 티어는 `permission.defaultPreset` 설정이 정합니다.
161
+
156
162
  **설정 카드에 "설정 네임스페이스를 사용할 수 없습니다"가 표시됩니다.**
157
163
  플러그인이 현재 profile에 조립되지 않았습니다.
158
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 **1.0.0**. Continue with the [README](./README.md) for the
16
- decision chain, the rules file format and the Permissive tier.
15
+ `dsh-perm-gate` version **2.0.0**. 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
 
@@ -43,7 +43,7 @@ covers both lines and how the tags are published.
43
43
  dsh plugin --profile web add dsh-perm-gate
44
44
  ```
45
45
 
46
- This pulls the published package, applies its `cordis.patch.yml` (the Permissive
46
+ This pulls the published package, applies its `cordis.patch.yml` (the 自动审查
47
47
  session tier plus the plugin entry) and assembles both halves.
48
48
 
49
49
  ## Install from source
@@ -100,7 +100,7 @@ and `dsh-movein-permissions`.
100
100
  entry above.
101
101
  3. Delete any preset overrides those plugins contributed — `cordis.patch.yml`
102
102
  **replaces** `permission.config.presets` wholesale, so stale per-key patches
103
- 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).
104
104
  4. Reload the profile and verify with `--list` (below).
105
105
 
106
106
  ## Verify
@@ -125,7 +125,7 @@ Expected `--list` output shape:
125
125
  }
126
126
  ```
127
127
 
128
- In the UI, **Settings → Plugins → Permissive approval tier** should render one
128
+ In the UI, **Settings → Plugins → 自动审查** should render one
129
129
  switch plus the four backend strategy toggles.
130
130
 
131
131
  ## Uninstall
@@ -135,12 +135,12 @@ dsh plugin --profile web remove dsh-perm-gate
135
135
  dsh profile reload --profile web
136
136
  ```
137
137
 
138
- Removing the plugin also removes its patch contribution, so the Permissive tier
138
+ Removing the plugin also removes its patch contribution, so the 自动审查 tier
139
139
  disappears from the session permission picker again.
140
140
 
141
141
  ## Troubleshooting
142
142
 
143
- **The Permissive tier is missing from the permission picker.**
143
+ **The 自动审查 tier is missing from the permission picker.**
144
144
  The DSH bundle patch replaces the whole `permission.config.presets` map instead of
145
145
  merging per key. Reload the profile so `cordis.patch.yml` is re-applied, and make
146
146
  sure no later plugin overwrites `presets`.
@@ -152,10 +152,17 @@ fails loud at load — it is never silently disabled.
152
152
 
153
153
  **`llmAssist` never fires.**
154
154
  It needs `classifierEndpoint`, `classifierModel` and `classifierApiKey` (set them
155
- in **Settings → Plugins → Permissive approval tier** or in `cordis.yml`). Any
155
+ in **Settings → Plugins → 自动审查** or in `cordis.yml`). Any
156
156
  missing value or network error falls back to the human seam — the gate is
157
157
  fail-closed by design.
158
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
+
159
166
  **Settings card shows "Settings namespace unavailable".**
160
167
  The plugin is not assembled into the active profile. Run
161
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` 版本 **1.0.0**。裁决链、规则文件格式与 Permissive 档位请见
15
+ `dsh-perm-gate` 版本 **2.0.0**。裁决链、规则文件格式与自动审查档位请见
16
16
  [中文 README](./README.zh.md)。
17
17
 
18
18
  ## 前置条件
@@ -42,7 +42,7 @@ DSH 不强制 `engines.dsh`,因此 tag 是选择机制而非兼容性关卡。
42
42
  dsh plugin --profile web add dsh-perm-gate
43
43
  ```
44
44
 
45
- 该命令会拉取已发布的包、应用 `cordis.patch.yml`(Permissive 会话档位 + 插件条目),
45
+ 该命令会拉取已发布的包、应用 `cordis.patch.yml`(自动审查会话档位 + 插件条目),
46
46
  并装配 host / client 两半。
47
47
 
48
48
  ## 从源码安装
@@ -95,7 +95,7 @@ dsh profile reload --profile web
95
95
  2. 从 `cordis.yml` 删除上述四个插件,只加入唯一的 `dsh-perm-gate` 条目。
96
96
  3. 删除这些插件贡献的 preset 覆盖 —— `cordis.patch.yml` 是**整体替换**
97
97
  `permission.config.presets`,其他插件遗留的逐 key 补丁可能静默抹掉
98
- Permissive 档(或某个内置档)。
98
+ 自动审查档(或某个内置档)。
99
99
  4. 重载 profile,并用下面的 `--list` 验证。
100
100
 
101
101
  ## 验证
@@ -120,7 +120,7 @@ dsh-perm-gate --rules permissions.yaml --tool bash --args '{"command":"pnpm inst
120
120
  }
121
121
  ```
122
122
 
123
- UI 里 **设置 → 插件 → Permissive 审批档** 应渲染出一个开关加四个后台策略开关。
123
+ UI 里 **设置 → 插件 → 自动审查** 应渲染出一个开关加四个后台策略开关。
124
124
 
125
125
  ## 卸载
126
126
 
@@ -129,11 +129,11 @@ dsh plugin --profile web remove dsh-perm-gate
129
129
  dsh profile reload --profile web
130
130
  ```
131
131
 
132
- 移除插件也会移除它的补丁贡献,Permissive 档位会重新从会话权限下拉框消失。
132
+ 移除插件也会移除它的补丁贡献,自动审查档位会重新从会话权限下拉框消失。
133
133
 
134
134
  ## 排查
135
135
 
136
- **权限下拉框里没有 Permissive 档。**
136
+ **权限下拉框里没有自动审查档。**
137
137
  DSH 的 bundle patch 是整体替换 `permission.config.presets`,而非逐 key 合并。
138
138
  请重载 profile 让 `cordis.patch.yml` 重新生效,并确认没有更晚加载的插件覆盖了
139
139
  `presets`。
@@ -144,9 +144,15 @@ DSH 的 bundle patch 是整体替换 `permission.config.presets`,而非逐 key
144
144
 
145
145
  **`llmAssist` 从不触发。**
146
146
  需要配置 `classifierEndpoint`、`classifierModel`、`classifierApiKey`
147
- (在 **设置 → 插件 → Permissive 审批档** 或 `cordis.yml` 中填写)。
147
+ (在 **设置 → 插件 → 自动审查** 或 `cordis.yml` 中填写)。
148
148
  任一缺失或网络错误都会回退到人工接缝 —— 门禁按设计 fail-closed。
149
149
 
150
+ **「审批记录」页一直是空的。**
151
+ 门禁只在 `gatePresets` 列出的档位里工作(默认 `['permissive']`,即下拉框里的
152
+ 「自动审查」),会话处在别的档位时它不记录任何事件——请在权限下拉框为本会话选择
153
+ 「自动审查」。从未选过档位的会话同样在范围之外。新会话的初始档位由
154
+ `permission.defaultPreset` 设置决定。
155
+
150
156
  **设置卡片显示「设置命名空间不可用」。**
151
157
  该插件未装配进当前 profile。执行 `dsh plugin --profile web add dsh-perm-gate`
152
158
  并重载。
package/README.ja.md CHANGED
@@ -12,7 +12,7 @@
12
12
  - [日本語 changelog](./CHANGELOG.ja.md)
13
13
  - [한국어 changelog](./CHANGELOG.ko.md)
14
14
 
15
- > **互換性に関する注記:** v1.0.0 は `ja` / `ko` 辞書を同梱しますが、公式 DSH の
15
+ > **互換性に関する注記:** v2.0.0 は `ja` / `ko` 辞書を同梱しますが、公式 DSH の
16
16
  > `LocaleRuntime` が公開するのは `zh` / `en` のみです(`LOCALE_IDS = ["zh", "en"]`)。
17
17
  > 素の DSH で `ja` / `ko` を選択すると `locale "<id>" is not registered` になります。
18
18
  > `LOCALE_IDS`(locale-settings.ts)と `LOCALES` ラベル(client/index.ts)を更新した
@@ -27,7 +27,12 @@
27
27
  > | DSH バージョン | ブランチ | バージョン | npm タグ |
28
28
  > | --- | --- | --- | --- |
29
29
  > | 0.1.0-rc.7 ~ 0.1.1-rc.x | `legacy` | `1.x` | `@legacy` |
30
- > | 0.1.2-alpha.1+(0.1.5-rc.2を含む) | `main` | `0.2.x` | `@latest` |
30
+ > | 0.1.2-alpha.1+(0.1.5-rc.2を含む) | `main` | `2.x` | `@latest` / `@dsh-0.1.2` (`@2.x` は範囲) |
31
+ >
32
+ > バージョン系列は **DSH ライン**を追います(`1.x` = DSH ≤ 0.1.1、`2.x` = DSH 0.1.2+)。
33
+ > メジャー同士が互いを遮断するため、`^1.x` のインストールが `2.x` を解決することは
34
+ > なく、その逆もありません。`engines.dsh` も同じ境界を述べていますが DSH は決して
35
+ > 読まないため、古い DSH を `1.x` に留めるのはバージョン範囲と dist-tag です。
31
36
  >
32
37
  > `@deepseek-ai/dsh-client-runtime` は `0.1.2-alpha.1` で**削除**されました ——
33
38
  > 単なる移動ではありません。`legacy` ラインは引き続きこれを通じて
@@ -40,7 +45,7 @@
40
45
  > メソッドであるため、`typeof` プロブで読み取り、欠落時やエラー時には「ポリシー
41
46
  > 不明」にフォールバックします。
42
47
 
43
- バージョン **1.0.0** — 変更履歴は [日本語 changelog](./CHANGELOG.ja.md) を参照。
48
+ バージョン **2.0.0** — 変更履歴は [日本語 changelog](./CHANGELOG.ja.md) を参照。
44
49
 
45
50
  DeepSeek Harness 向けの、単一・自己完結・決定論優先・fail-closed な権限ゲートです。
46
51
 
@@ -77,10 +82,11 @@ DSH の安全まわりのエコシステムでは、この役割が `dsh-permiss
77
82
  loud fail、ソースの内容ハッシュによるコンパイル キャッシュ。
78
83
  - **監査** — すべての判定を `callId` 付きの `{ignorable:true}` イベントとして記録。
79
84
  モデルに見える理由と記録される結果は常に一致します。
80
- - **Permissive ティア** — read-only / full-access / whitelist とは別の**独立した承認
81
- モード**。「自動承認」でもなく、包括的な権限付与でもありません。フロントが露出する
85
+ - **自动审查ティア**(`permissive`)— read-only / full-access / whitelist とは別の**独立した承認
86
+ モード**。汎用の「自動承認」でもなく、包括的な権限付与でもありません。フロントが露出する
82
87
  のは**単一スイッチ**(`permissive`)だけで、バックエンドの 4 つの戦略は**組み合わせ
83
88
  可能**でプラグイン設定から制御されます。P0 に対しては依然 fail-closed です。
89
+ 権限ピッカーと設定行はいずれも製品名「自动审查」で表示し、アイコンは描きません。
84
90
  - **サンドボックス昇格の自動回答**(`trustEscalation`)— サンドボックス昇格は shell /
85
91
  pwsh / edit ツールの**内部**(`tools/pre-execute` 後)から発生するためゲートはそれを
86
92
  見ておらず、ゲートが自動許可した呼び出しでも確認プロンプトが表示されます。この戦略を
@@ -141,13 +147,19 @@ permissions:
141
147
 
142
148
  完全な例: [examples/permissions.example.yaml](./examples/permissions.example.yaml)
143
149
 
144
- ## Permissive ティア
150
+ ## 自动审查ティア(マシン値 `permissive`)
145
151
 
146
- Permissive は権限ピッカーの中で Read Only / Workspace Write / Full access /
147
- Whitelist と並ぶ**独立した承認ティア**です。「自動承認」ではなく、包括的な権限を
152
+ 自动审查は権限ピッカーの中で 読み取り専用 / ワークスペース内変更 / 完全権限 /
153
+ 許可リストと並ぶ**独立した承認ティア**です。汎用の「自動承認」ではなく、包括的な権限を
148
154
  発行することもありません。人間/LLM のシーム**の前**で判定を狭めたり広めたりする
149
155
  だけで、P0 ハード拒否は単調かつ交渉不能のままです。
150
156
 
157
+ ピッカーの表示名は**ホストが供給する製品名**で、言語別辞書の項目ではありません。DSH 0.1.2 は
158
+ プラグイン提供ティアの `name:` を 2 つの権限サーフェス(一般設定の既定行と入力欄のピッカー)で
159
+ そのまま描画し、自前のローカライズ済みラベルは 3 つの組み込み値にしか与えないため、
160
+ `cordis.patch.yml` は全セッション共通で中国語ラベルを配布します。このティアは**アイコンを
161
+ 描きません** —— ピッカーのグリフは組み込み値にのみ紐づきます。
162
+
151
163
  `cordis.yml` では:
152
164
 
153
165
  ```yaml
@@ -187,7 +199,7 @@ Whitelist と並ぶ**独立した承認ティア**です。「自動承認」で
187
199
  キー化され、昇格リクエストがこれを繰り返す)を記憶し、昇格をここで `allowed-once` と自答します。
188
200
  **すべてが満たされる場合のみ**適用されます:
189
201
 
190
- - Permissive ティアがオンで `trustEscalation` がオン;
202
+ - 自动审查ティアがオンで `trustEscalation` がオン;
191
203
  - 呼び出しにゲートが許可した `callId` があり、ツール名が一致;
192
204
  - 理由は認識された昇格で `workspace-write` または `danger-full-access` を命名。
193
205
 
@@ -199,15 +211,15 @@ never` パススルー — は人手に変更なく委譲されるため、将
199
211
 
200
212
  ### 選択可能なセッション ティア
201
213
 
202
- `cordis.patch.yml` は DSH の `permission.config.presets` に、Workspace Write と
203
- Full access の間に `permissive` preset(`sandbox: workspace-write`、`approval: ask`、
204
- 名称 **Permissive**)を追加します。DSH の bundle patch はこの map を**全体置換**するため
214
+ `cordis.patch.yml` は DSH の `permission.config.presets` に、ワークスペース内変更と
215
+ 完全権限の間に `permissive` preset(`sandbox: workspace-write`、`approval: ask`、
216
+ 名称 **自动审查**)を追加します。DSH の bundle patch はこの map を**全体置換**するため
205
217
  (キー単位のマージではありません)、組み込み 3 ティア
206
218
  (`read-only` / `workspace-write` / `danger-full-access`、
207
219
  `@deepseek-ai/dsh-base/cordis.patch.yml` 由来)も再記載する必要があり、
208
220
  `test/patch-presets.spec.ts` がそのキー集合を固定しています。したがって
209
221
  セッションの権限ピッカーには「auto-approval」ではなく、**独立して選択できる承認
210
- ティア**として Permissive が並びます。
222
+ ティア**として「自动审查」が並びます。
211
223
 
212
224
  ゲートが動作するのは **`gatePresets` に列挙したティアの中だけ**です(既定 `['permissive']`、
213
225
  このプラグインが追加するティア)。それ以外のティア(Read Only / Workspace Write /
@@ -245,7 +257,9 @@ Full access / `custom`)では、ゲートの判定フローは**一切実行
245
257
 
246
258
  人手に回した `ask` は回答が返るまで追跡されます。受動的な `approval/request` オブザーバが閉じた結果を記録し(`allowed-once` → **承認**、`rejected` → **拒否**、`cancelled` → **キャンセル**、`unavailable` → 拒否=承認チャネルなし)、オブザーバが関連付けできない場合(`callId` 欠落・approval サービスなし・上流リスナーの短絡)は `tools/result` が同じ ask をフォールバックとして解決します。承認時には承認後の学習進捗(`n`/しきい値)を表示し、通知バーも 3 つの終態にラベルを付けます。
247
259
 
248
- さらにプリセットの**拒否キーワード黑名単**(dsh-approval-gate の `DEFAULT_DENY_KEYWORDS` を継承:`rm -rf`、`push --force`、`drop table`、`mkfs`、`git reset --hard`、`docker system prune` など)を備え、テキストがキーワードを含む呼び出し(大小文字を区別しない部分一致)は許可リスト / 許可 / LLM より先に拒否します。設定カードでリストとして編集でき(プリセット項目にはタグ付き、ワンクリック復元対応)、未設定・空ならプリセットを適用します——黑名単が静かに無効化されることはありません。Permissive ティアは権限ピッカーに盾アイコンを保持します(メニュー項目と折りたたみトリガーの両方)。
260
+ さらにプリセットの**拒否キーワード黑名単**(dsh-approval-gate の `DEFAULT_DENY_KEYWORDS` を継承:`rm -rf`、`push --force`、`drop table`、`mkfs`、`git reset --hard`、`docker system prune` など)を備え、テキストがキーワードを含む呼び出し(大小文字を区別しない部分一致)は許可リスト / 許可 / LLM より先に拒否します。設定カードでリストとして編集でき(プリセット項目にはタグ付き、ワンクリック復元対応)、未設定・空ならプリセットを適用します——黑名単が静かに無効化されることはありません。
261
+ このティアは権限ピッカーに**アイコンを表示しません** —— ピッカーのグリフは組み込み 3 値にのみ
262
+ 紐づき、プラグイン提供ティアはテキストのみです。
249
263
 
250
264
 
251
265
  ## CLI(スタンドアロン dry-run)