dsh-session-guard 0.3.1 → 3.0.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
@@ -6,6 +6,64 @@
6
6
  - [日本語 changelog](./CHANGELOG.ja.md)
7
7
  - [한국어 changelog](./CHANGELOG.ko.md)
8
8
 
9
+ ## 0.4.0 — 2026-09-18(誤ったバージョン番号。3.0.0 に置き換え)
10
+
11
+ ### 修正
12
+
13
+ - **バージョン識別**:本ラインは `0.4.0` として公開されましたが、`dsh.plugin.json` と本変更履歴は
14
+ すでに `3.0.0` を名乗っており、1 つの成果物に 2 つのバージョン番号が存在していました。
15
+ `package.json` を `3.0.0` に統一し、パッケージ版・マニフェスト版・変更履歴が一致しました。
16
+ npm のバージョンは不変のため `0.4.0` は歴史的記録として残します。`3.0.0` 公開後は
17
+ `dist-tag dsh-0.1.5` を `3.0.0` に向け直すべきです。
18
+ - **ドキュメント**:README/INSTALL(zh/en/ja/ko)が兄弟ラインを `main` にあると説明していたのを
19
+ 修正。0.1.2 ラインのリリースブランチは **`legacy/0.1.2`**(npm dist-tag `dsh-0.1.2`、
20
+ バージョン `0.3.1`)で、`main` は `0.2.0-beta.1` で凍結されています。INSTALL.zh/ja/ko の
21
+ 重複したブランチ断片を修正し、dist-tag を明示したインストールコマンドを
22
+ 記載。「2.x / 3.x」は**ラインの通称**でありバージョン番号ではないことを明記しました。
23
+
24
+ ### 備考
25
+
26
+ - **ソース変更なし**(`3.0.0` 比)。`0.4.0` は同一ツリーのパッケージングのみの公開です。
27
+
28
+ ## 3.0.0 — 2026-09-14
29
+
30
+ ### 変更
31
+
32
+ - **DSH v0.1.5-rc.2 専用ライン(`compat/0.1.5`)。** `engines.dsh` と `dsh-client-*` の peer
33
+ 範囲を `>=0.1.5-rc.2 <0.2.0-0` に狭めました(semver のプレリリース規則上、旧
34
+ `>=0.1.0-rc.7` は `0.1.5-rc.2` に一致しません)。`dsh.plugin.json` に `engines.dsh` を追加。
35
+ 旧ホスト向けには `main` 上の 2.x / 0.2.x ラインが継続します。
36
+ - **`session.events` → `snapshotEvents()`。** DSH 0.1.5 で `session.events` 配列アクセサが
37
+ 削除されたため(compatibility-guide §20.3)、`pause-gate.js` はデュアルパスのヘルパーで
38
+ セッションイベントを読みます:まず `snapshotEvents()`、防御的に旧 `events` 配列へフォール
39
+ バック、どちらも無ければ `null`(fail-open)。対象は `findToolOutcome` と `lastUserPrompt`
40
+ のみで、イベント型のマッチングは不変です。
41
+
42
+ ### 変更なし
43
+
44
+ - その他の接続面は一切変更なし:自前の webServer prefix ルート(`/session-guard/rpc`)、
45
+ `settings.register`、`settings.plugin.item` スロット、クライアント注入、
46
+ `llm.listConfigurableProviders()` は公開済み 0.1.5-rc.2 バンドルに対して検証済み
47
+ (`tools/check-api-drift.ps1`、必須アサーション 12/12)。
48
+
49
+ ### 未実施
50
+
51
+ - 実機 DSH 0.1.5-rc.2 ホストでのライブスモーク(perm-gate の 0.1.5 ラインと同じ状態)。
52
+
53
+ ## 0.2.0-beta.2 — 2026-09-13
54
+
55
+ ### 修正(DSH 0.1.5 互換 — `compat/0.1.5` ブランチ)
56
+
57
+ - **レジューム入隊のデュアルパス。** DSH 0.1.5 では Inbox が agent-loop の読み取り専用
58
+ 投影に変わるため、`agent.followup` が存在しない可能性があります。レジューム時は
59
+ `agent.followup` → `agent.send` → warn 降級(例外は投げない)の順で試行します。
60
+ - **レジュームメッセージの `source` に `form: 'instructions'` を追加**(0.1.5 の
61
+ `ContextFormed` 契約。旧バージョンは未知フィールドを無視します)。
62
+ - **`webServer.register` を try/catch で保護**:ルート登録の失敗はログのみで、
63
+ `apply` から例外を投げてホストのプラグイン読み込みを壊しません。
64
+ - 0.1.5-rc.2 ソースに対し `WebRoute`(exact/prefix + SSE)契約が不変であることを確認。
65
+ クライアントの `fetch('/session-guard/...')` に `/api` プレフィックスは不要です。
66
+
9
67
  ## 0.2.0-beta.1 — 2026-09-10
10
68
 
11
69
  ### 追加
package/CHANGELOG.ko.md CHANGED
@@ -6,6 +6,64 @@
6
6
  - [日本語 changelog](./CHANGELOG.ja.md)
7
7
  - [한국어 changelog](./CHANGELOG.ko.md)
8
8
 
9
+ ## 0.4.0 — 2026-09-18 (잘못된 버전 번호, 3.0.0으로 대체됨)
10
+
11
+ ### 수정
12
+
13
+ - **버전 식별**: 본 라인은 `0.4.0`으로 배포되었지만 `dsh.plugin.json`과 본 변경 기록은 이미
14
+ `3.0.0`을 표기하고 있어, 하나의 산출물에 두 개의 버전 번호가 존재했습니다. `package.json`을
15
+ `3.0.0`으로 통일하여 패키지 버전·매니페스트 버전·변경 기록이 일치합니다. npm 버전은 불변이므로
16
+ `0.4.0`은 역사적 기록으로 남깁니다. `3.0.0` 배포 후에는 `dist-tag dsh-0.1.5`를 `3.0.0`으로
17
+ 다시 지정해야 합니다.
18
+ - **문서**: README/INSTALL(zh/en/ja/ko)이 형제 라인을 `main`에 있다고 설명하던 것을 수정.
19
+ 0.1.2 라인의 릴리스 브랜치는 **`legacy/0.1.2`**(npm dist-tag `dsh-0.1.2`, 버전 `0.3.1`)이며
20
+ `main`은 `0.2.0-beta.1`에서 동결되었습니다. INSTALL.zh/ja/ko의 중복된
21
+ 브랜치 조각을 수정하고, dist-tag를 명시한 설치 명령을 기재했습니다.
22
+ "2.x / 3.x"는 **라인 통칭**이며 버전 번호가 아님을 명시.
23
+
24
+ ### 비고
25
+
26
+ - **소스 변경 없음**(`3.0.0` 대비). `0.4.0`은 동일 트리의 패키징 전용 배포입니다.
27
+
28
+ ## 3.0.0 — 2026-09-14
29
+
30
+ ### 변경
31
+
32
+ - **DSH v0.1.5-rc.2 전용 라인(`compat/0.1.5`).** `engines.dsh`와 `dsh-client-*` peer 범위를
33
+ `>=0.1.5-rc.2 <0.2.0-0`으로 좁혔습니다(semver 프리릴리스 규칙상 기존 `>=0.1.0-rc.7`은
34
+ `0.1.5-rc.2`와 일치하지 않음). `dsh.plugin.json`에 `engines.dsh`를 추가했습니다. 구버전
35
+ 호스트용으로는 `main`의 2.x / 0.2.x 라인이 계속 유지됩니다.
36
+ - **`session.events` → `snapshotEvents()`.** DSH 0.1.5에서 `session.events` 배열 접근자가
37
+ 제거됨에 따라(compatibility-guide §20.3) `pause-gate.js`는 듀얼 패스 헬퍼로 세션 이벤트를
38
+ 읽습니다: 우선 `snapshotEvents()`, 방어적으로 구 `events` 배열로 폴백, 둘 다 없으면 `null`
39
+ (fail-open). 대상은 `findToolOutcome`과 `lastUserPrompt` 두 곳뿐이며 이벤트 타입 매칭은
40
+ 불변입니다.
41
+
42
+ ### 변경 없음
43
+
44
+ - 나머지 연동면은 전부 무변경: 자체 webServer prefix 라우트(`/session-guard/rpc`),
45
+ `settings.register`, `settings.plugin.item` 슬롯, 클라이언트 주입,
46
+ `llm.listConfigurableProviders()`는 공개된 0.1.5-rc.2 번들 기준으로 검증 완료
47
+ (`tools/check-api-drift.ps1`, 필수 어설션 12/12).
48
+
49
+ ### 보류
50
+
51
+ - 실제 DSH 0.1.5-rc.2 호스트에서의 라이브 스모크(perm-gate 0.1.5 라인과 동일 상태).
52
+
53
+ ## 0.2.0-beta.2 — 2026-09-13
54
+
55
+ ### 수정 (DSH 0.1.5 호환 — `compat/0.1.5` 브랜치)
56
+
57
+ - **재개 큐잉 듀얼 경로.** DSH 0.1.5에서는 Inbox가 agent-loop의 읽기 전용 프로젝션으로
58
+ 바뀌어 `agent.followup`이 존재하지 않을 수 있습니다. 재개 시 `agent.followup` →
59
+ `agent.send` → warn 강등(예외 없음) 순으로 시도합니다.
60
+ - **재개 메시지 `source`에 `form: 'instructions'` 추가** (0.1.5 `ContextFormed` 계약;
61
+ 구버전은 알 수 없는 필드를 무시합니다).
62
+ - **`webServer.register` try/catch 보호**: 라우트 등록 실패는 로그만 남기고 `apply`에서
63
+ 예외를 던져 호스트 플러그인 로딩을 깨뜨리지 않습니다.
64
+ - 0.1.5-rc.2 소스 기준 `WebRoute`(exact/prefix + SSE) 계약이 불변임을 확인했습니다.
65
+ 클라이언트 `fetch('/session-guard/...')`에 `/api` 접두사는 불필요합니다.
66
+
9
67
  ## 0.2.0-beta.1 — 2026-09-10
10
68
 
11
69
  ### 추가
package/CHANGELOG.md CHANGED
@@ -6,6 +6,66 @@ All notable changes to `dsh-session-guard` are recorded here. Versions follow se
6
6
  - [日本語 changelog](./CHANGELOG.ja.md)
7
7
  - [한국어 changelog](./CHANGELOG.ko.md)
8
8
 
9
+ ## 0.4.0 — 2026-09-18 (mis-versioned; superseded by 3.0.0)
10
+
11
+ ### Fixed
12
+
13
+ - **Version identity.** This line was published as `0.4.0` while `dsh.plugin.json` and this
14
+ changelog already said `3.0.0` — one artifact with two version numbers. `package.json` is now
15
+ `3.0.0`, so the package version, the manifest version and the changelog agree. `0.4.0` is kept
16
+ here as a historical record because npm versions are immutable; `dist-tag dsh-0.1.5` should be
17
+ repointed to `3.0.0` once it is published.
18
+ - **Docs.** README/INSTALL (zh/en/ja/ko) no longer describe the sibling line as living on `main`.
19
+ The 0.1.2 line's release branch is **`legacy/0.1.2`** (npm dist-tag `dsh-0.1.2`, version `0.3.1`);
20
+ `main` is frozen at `0.2.0-beta.1`. The duplicated branch fragment in the INSTALL.zh/ja/ko install
21
+ command is fixed, explicit dist-tag install commands are documented, and "2.x / 3.x" is
22
+ now marked as a **line nickname** rather than a version number.
23
+
24
+ ### Notes
25
+
26
+ - **No source changes** relative to `3.0.0`; `0.4.0` is a packaging-only publish of the same tree.
27
+
28
+ ## 3.0.0 — 2026-09-14
29
+
30
+ ### Changed
31
+
32
+ - **DSH v0.1.5-rc.2 dedicated line (`compat/0.1.5`).** `engines.dsh` and the `dsh-client-*`
33
+ peer ranges narrow to `>=0.1.5-rc.2 <0.2.0-0` (strict-semver prerelease matching means the
34
+ old `>=0.1.0-rc.7` range never matches `0.1.5-rc.2`); `dsh.plugin.json` gains `engines.dsh`.
35
+ The 2.x / 0.2.x line on `main` keeps serving DSH 0.1.0-rc.7 … 0.1.2-rc.1.
36
+ - **`session.events` → `snapshotEvents()`.** DSH 0.1.5 removed the `session.events` array
37
+ accessor (compatibility-guide §20.3). `pause-gate.js` now reads session events through a
38
+ dual-path helper: `snapshotEvents()` first, the legacy `events` array as a defensive
39
+ fallback, `null` (fail-open) when neither exists. Affects `findToolOutcome` and
40
+ `lastUserPrompt` only; event-type matching is unchanged.
41
+
42
+ ### Unchanged
43
+
44
+ - Zero changes on every other integration seam: the self-held webServer prefix route
45
+ (`/session-guard/rpc`), `settings.register`, the `settings.plugin.item` card slot,
46
+ client injections, and `llm.listConfigurableProviders()` are all verified intact against
47
+ the published 0.1.5-rc.2 bundle (`tools/check-api-drift.ps1`, 12/12 required assertions).
48
+
49
+ ### Pending
50
+
51
+ - Live smoke on a real DSH 0.1.5-rc.2 host (same status as the perm-gate 0.1.5 line).
52
+
53
+ ## 0.2.0-beta.2 — 2026-09-13
54
+
55
+ ### Fixed (DSH 0.1.5 compat — `compat/0.1.5` branch)
56
+
57
+ - **Dual-path resume enqueue.** DSH 0.1.5 turns the Inbox into an agent-loop read-only
58
+ projection, so `agent.followup` may no longer exist. The resume flow now tries
59
+ `agent.followup` first, falls back to `agent.send`, and degrades to a warn (never throws)
60
+ when neither is available — a failed enqueue can no longer break resume.
61
+ - **Resume messages carry `source.form: 'instructions'`** per the 0.1.5 `ContextFormed`
62
+ message-source contract (`kind: 'plugin'` is a built-in kind; older DSH versions ignore
63
+ the extra field).
64
+ - **`webServer.register` is wrapped in try/catch**: a failed route registration now logs an
65
+ error instead of throwing out of `apply` and breaking host plugin loading.
66
+ - Verified against the 0.1.5-rc.2 source: the `WebRoute` contract (exact/prefix + SSE) is
67
+ unchanged, so client `fetch('/session-guard/...')` paths need no `/api` prefix.
68
+
9
69
  ## 0.2.0-beta.1 — 2026-09-10
10
70
 
11
71
  ### Added
package/INSTALL.ja.md CHANGED
@@ -22,9 +22,23 @@ dsh --version
22
22
  ## 1. インストール
23
23
 
24
24
  ```bash
25
- dsh plugin --profile web add github:drscrewdriver/dsh-session-guard
25
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
26
+
27
+ # または git ブランチを直接指定
28
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
26
29
  ```
27
30
 
31
+ `compat/0.1.5` は DSH `0.1.5-rc.x` 専用ラインです:npm パッケージバージョン **`3.0.0`**、
32
+ dist-tag **`dsh-0.1.5`**、`package.json` と `dsh.plugin.json` の `engines.dsh` はいずれも
33
+ `>=0.1.5-rc.2 <0.2.0-0`。
34
+
35
+ DSH `0.1.2-rc.x` ホストは **`legacy/0.1.2`** ブランチ(npm dist-tag `dsh-0.1.2`、バージョン `0.3.1`)
36
+ を使用してください。`main` は `0.2.0-beta.1` で凍結済みで、**0.1.2 ラインのリリースブランチではありません**。
37
+
38
+ > ⚠️ 裸のパッケージ名 `dsh-session-guard` に依存しないでください:npm の `latest` タグは
39
+ > 排他的な 2 つのバージョンライン(`engines.dsh` が semver プレリリース照合で排他)を
40
+ > 同時に提供できません。必ず dist-tag を明示してください。
41
+
28
42
  dsh web を再起動し、ページをリフレッシュ。
29
43
 
30
44
  ## 2. 検証
@@ -52,7 +66,7 @@ npm test
52
66
 
53
67
  ```bash
54
68
  dsh plugin --profile web remove dsh-session-guard
55
- dsh plugin --profile web add github:drscrewdriver/dsh-session-guard
69
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
56
70
  ```
57
71
 
58
72
  dsh web を再起動しページをリフレッシュ。設定は `$DSH_HOME/settings.yaml` の `session-guard`
package/INSTALL.ko.md CHANGED
@@ -22,9 +22,23 @@ dsh --version
22
22
  ## 1. 설치
23
23
 
24
24
  ```bash
25
- dsh plugin --profile web add github:drscrewdriver/dsh-session-guard
25
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
26
+
27
+ # 또는 git 브랜치 직접 지정
28
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
26
29
  ```
27
30
 
31
+ `compat/0.1.5`는 DSH `0.1.5-rc.x` 전용 라인입니다: npm 패키지 버전 **`3.0.0`**,
32
+ dist-tag **`dsh-0.1.5`**, `package.json`과 `dsh.plugin.json`의 `engines.dsh` 모두
33
+ `>=0.1.5-rc.2 <0.2.0-0`.
34
+
35
+ DSH `0.1.2-rc.x` 호스트는 **`legacy/0.1.2`** 브랜치(npm dist-tag `dsh-0.1.2`, 버전 `0.3.1`)를
36
+ 사용하세요. `main`은 `0.2.0-beta.1`에서 동결되었고 **0.1.2 라인의 릴리스 브랜치가 아닙니다**.
37
+
38
+ > ⚠️ 맨 패키지명 `dsh-session-guard`에 의존하지 마세요: npm `latest` 태그는
39
+ > 상호 배타적인 두 버전 라인(`engines.dsh`가 semver 프리릴리스 매칭상 배타)을
40
+ > 동시에 제공할 수 없습니다. 반드시 dist-tag를 명시하세요.
41
+
28
42
  dsh web을 재시작하고 페이지를 새로고침.
29
43
 
30
44
  ## 2. 검증
@@ -52,7 +66,7 @@ npm test
52
66
 
53
67
  ```bash
54
68
  dsh plugin --profile web remove dsh-session-guard
55
- dsh plugin --profile web add github:drscrewdriver/dsh-session-guard
69
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
56
70
  ```
57
71
 
58
72
  dsh web을 재시작하고 페이지를 새로고침. 설정은 `$DSH_HOME/settings.yaml`의 `session-guard`
package/INSTALL.md CHANGED
@@ -24,9 +24,24 @@ dsh --version
24
24
  ## 1. Install
25
25
 
26
26
  ```bash
27
- dsh plugin --profile web add github:drscrewdriver/dsh-session-guard
27
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
28
+
29
+ # or straight from the git branch
30
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
28
31
  ```
29
32
 
33
+ `compat/0.1.5` is the DSH `0.1.5-rc.x` line: npm package version **`3.0.0`**, dist-tag
34
+ **`dsh-0.1.5`**, with `engines.dsh = >=0.1.5-rc.2 <0.2.0-0` in **both** `package.json` and
35
+ `dsh.plugin.json`.
36
+
37
+ DSH `0.1.2-rc.x` hosts should use the **`legacy/0.1.2`** branch (npm dist-tag `dsh-0.1.2`,
38
+ version `0.3.1`). **`main` is frozen at `0.2.0-beta.1` and is no longer the 0.1.2 line's
39
+ release branch.**
40
+
41
+ > ⚠️ Do not rely on the bare package name `dsh-session-guard`: npm's `latest` tag cannot
42
+ > serve two mutually exclusive version lines (their `engines.dsh` ranges are exclusive under
43
+ > semver prerelease matching) — always pin the dist-tag explicitly.
44
+
30
45
  Restart dsh web and refresh the page.
31
46
 
32
47
  ## 2. Verify
@@ -55,16 +70,17 @@ npm test
55
70
 
56
71
  ```bash
57
72
  dsh plugin --profile web remove dsh-session-guard
58
- dsh plugin --profile web add github:drscrewdriver/dsh-session-guard
73
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
59
74
  ```
60
75
 
61
76
  Restart dsh web and refresh the page. Settings live in `$DSH_HOME/settings.yaml` under the
62
77
  `session-guard` namespace and survive the upgrade; new keys (`providerGuard`, `deferredMode`, …)
63
78
  fall back to their defaults until you touch them.
64
79
 
65
- From `0.1.3`/`0.1.4-beta.1` to `0.1.5-beta.1` the only behavior change is that peak hours now
80
+ From **plugin** `0.1.3` / `0.1.4-beta.1` to **plugin** `0.1.5-beta.1` the only behavior change is that peak hours now
66
81
  block **only** official-source targets by default. To restore the old blanket behavior set
67
82
  `providerGuard: false` (or `officialProviders` / `officialBaseURLs` to narrow the verdict).
83
+ (Those are plugin versions, not DSH versions — do not confuse them with the host ranges above.)
68
84
 
69
85
  ## 4. Troubleshooting
70
86
 
package/INSTALL.zh.md CHANGED
@@ -22,9 +22,21 @@ dsh --version
22
22
  ## 1. 安装
23
23
 
24
24
  ```bash
25
- dsh plugin --profile web add github:drscrewdriver/dsh-session-guard
25
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
26
+
27
+ # 或直接走 git 分支
28
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
26
29
  ```
27
30
 
31
+ `compat/0.1.5` 是 DSH `0.1.5-rc.x` 专线:npm 包版本号 **`3.0.0`**,dist-tag **`dsh-0.1.5`**,
32
+ `package.json` 与 `dsh.plugin.json` 的 `engines.dsh` 均为 `>=0.1.5-rc.2 <0.2.0-0`。
33
+
34
+ DSH `0.1.2-rc.x` 宿主请改用 **`legacy/0.1.2`** 分支(npm dist-tag `dsh-0.1.2`,版本 `0.3.1`)。
35
+ `main` 已冻结在 `0.2.0-beta.1`,**不再是 0.1.2 线的发布分支**。
36
+
37
+ > ⚠️ 不要依赖裸包名 `dsh-session-guard`:npm 的 `latest` 标签无法同时服务两条互斥版本线
38
+ > (两条线的 `engines.dsh` 按 semver 预发布规则互斥),必须显式指定 dist-tag。
39
+
28
40
  重启 dsh web 并刷新页面。
29
41
 
30
42
  ## 2. 验证
@@ -52,7 +64,7 @@ npm test
52
64
 
53
65
  ```bash
54
66
  dsh plugin --profile web remove dsh-session-guard
55
- dsh plugin --profile web add github:drscrewdriver/dsh-session-guard
67
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
56
68
  ```
57
69
 
58
70
  重启 dsh web 并刷新页面。设置在 `$DSH_HOME/settings.yaml` 的 `session-guard` 命名空间下,升级不会丢;
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 dsh-session-guard contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-session-guard contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md CHANGED
@@ -30,22 +30,38 @@
30
30
  >
31
31
  > | DSH version | Load | Settings registration | Session events / gate | Client half |
32
32
  > | --- | --- | --- | --- | --- |
33
- > | 0.1.0-rc.7 ~ 0.1.1-rc.x | ✅ | `ctx.settings.register(ns, schema, { base })` | ✅ same shape | ✅ no platform value imports |
34
- > | 0.1.2-alpha.2+ / 0.1.2-rc.1 | ✅ | `register` still present (`installSection` added) | ✅ same shape | ✅ no platform value imports |
35
- > | 0.1.3+ / 0.1.5-alpha.1 | APIs still present (unverified) | `register` unchanged | | ✅ |
33
+ > | 0.1.0-rc.7 ~ 0.1.1-rc.x | ✅ (2.x / 0.2.x line) | `ctx.settings.register(ns, schema, { base })` | ✅ same shape | ✅ no platform value imports |
34
+ > | 0.1.2-alpha.2+ / 0.1.2-rc.1 | ✅ (2.x / 0.2.x line) | `register` still present (`installSection` added) | ✅ same shape | ✅ no platform value imports |
35
+ > | **0.1.5-rc.2** | ✅ (**3.x dedicated line `compat/0.1.5`**) | `register` unchanged (string namespaces) | ✅ events read via `snapshotEvents()` dual path | ✅ |
36
36
  >
37
- > One artifact covers both. `session/event`, `agent.cancel`, `goals.pause`,
37
+ > **3.x is the 0.1.5 dedicated line**: engines/peers narrow to `>=0.1.5-rc.2 <0.2.0-0`;
38
+ > 0.1.0-rc.7~0.1.2 hosts should stay on the 2.x / 0.2.x line (`main`).
39
+ > **0.1.5 adaptation (compat/0.1.5 branch, v3.0.0)**:
40
+ > ① dual-path resume enqueue — 0.1.5 turns Inbox into an agent-loop read-only projection;
41
+ > if `agent.followup` is gone the plugin falls back to `agent.send`, and degrades to a warn
42
+ > (never throws) when neither exists; ② resume messages now carry
43
+ > `source.form: 'instructions'` (0.1.5 ContextFormed contract; older versions ignore it);
44
+ > ③ `webServer.register` is wrapped in try/catch so a failed registration only logs instead
45
+ > of breaking host loading; ④ 0.1.5 removes the `session.events` array accessor — events are
46
+ > now read via `snapshotEvents()` (legacy array kept as fallback), affecting only the
47
+ > `findToolOutcome` / `lastUserPrompt` helper paths.
48
+ > Verified that 0.1.5 `WebRoute` (exact/prefix + SSE) contract is
49
+ > unchanged — client `fetch('/session-guard/...')` needs no `/api` prefix.
50
+ > The 2.x-line table (one artifact, both versions) is kept below. `session/event`, `agent.cancel`, `goals.pause`,
38
51
  > `agent.followup`, `commands.register`, `timer.interval`, `webServer.register`,
39
52
  > `agent/request`, `llm.listConfigurableProviders` and `settings.register/get`
40
53
  > are signature-identical between `dsh-v0.1.1-rc.2` and `dsh-v0.1.2-rc.1`
41
- > (verified through `0.1.5-alpha.1`). The one
54
+ > (3.x verified against `dsh-v0.1.5-rc.2`). The one
42
55
  > seam that needs a dual read is the `tool/result` call id (`content[].toolCallId`
43
56
  > first, `source.callId` as fallback) — both forms appear in replay logs of both
44
57
  > versions. It now lives in `src/tool-call-id.js` with unit tests.
58
+ > Since 0.1.5 the `session.events` array accessor is removed; 3.x reads events
59
+ > through `snapshotEvents()` (with the legacy array as fallback), affecting only
60
+ > the `findToolOutcome` / `lastUserPrompt` helper paths.
45
61
  > The `model/selection` event exists **only on 0.1.2+** and is feature-probed; the
46
62
  > settings surface uses only the `register` + `get` intersection (never
47
63
  > `installSection`, never the removed `installSettingsSection`). Drift guard:
48
- > `tools/check-api-drift.ps1`.
64
+ > `tools/check-api-drift.ps1` (3.x defaults to asserting against `dsh-v0.1.5-rc.2`).
49
65
 
50
66
  > Automatically pause running sessions during peak pricing hours and resume during off-peak/weekend; pair with input-traffic's freeze button for **per-session** locking; backend **auto-retry** yields during freeze/gate. Core based on a custom session gate (`agent.cancel keepInbox + goals.pause + session/event safe boundary + followup resume`), no longer depending on dsh-task-control.
51
67
 
@@ -66,9 +82,24 @@ A cordis plugin assembled via the `dsh plugin` command and a bundle patch — no
66
82
  ## Installation
67
83
 
68
84
  ```bash
69
- dsh plugin --profile web add github:<owner>/dsh-session-guard
85
+ # DSH 0.1.5-rc.x hosts (this line, dist-tag dsh-0.1.5)
86
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
87
+
88
+ # or straight from the git branch
89
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
90
+
91
+ # DSH 0.1.2-rc.x hosts must use the 0.1.2 line instead
92
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.2
70
93
  ```
71
94
 
95
+ `compat/0.1.5` is the DSH `0.1.5-rc.x` line, npm version **`3.0.0`**. DSH `0.1.2-rc.x` hosts must
96
+ use the **`legacy/0.1.2`** branch (npm dist-tag `dsh-0.1.2`, version `0.3.1`). **`main` is frozen at
97
+ `0.2.0-beta.1` and is no longer the 0.1.2 line's release branch.**
98
+
99
+ > ⚠️ Do not rely on the bare package name `dsh-session-guard`: npm's `latest` tag cannot serve two
100
+ > mutually exclusive version lines (their `engines.dsh` ranges are exclusive under semver
101
+ > prerelease matching) — always pin the dist-tag explicitly.
102
+
72
103
  Restart dsh web and refresh the page after installation.
73
104
 
74
105
  ## Settings (Settings → Plugins → session-guard, simple toggles)
package/README.ja.md CHANGED
@@ -26,6 +26,29 @@
26
26
 
27
27
  > **互換性について:** v0.1.1 には日本語(`ja`)と韓国語(`ko`)の辞書が含まれていますが、現在の公式 DSH リリースは `LocaleRuntime` 経由で `zh` と `en` のみを提供しています。純正 DSH で `ja` または `ko` を選択すると `locale "<id>" is not registered` で失敗します。公式 DSH が对应的 locale ID を追加するまで利用できません。上級ユーザーは DSH フォークを保守して更新してください。
28
28
 
29
+ > **▼ DSH バージョン適合**
30
+ >
31
+ > | DSH バージョン | ロード | 設定登録 | セッションイベント / ゲート | クライアント側 |
32
+ > | --- | --- | --- | --- | --- |
33
+ > | 0.1.0-rc.7 ~ 0.1.1-rc.x | ➖ 本ライン対象外(`legacy/0.1.2` 以前の歴史バージョン) | `ctx.settings.register(ns, schema, { base })` | ✅ 形状一致 | ✅ プラットフォーム値の import なし |
34
+ > | 0.1.2-alpha.2+ / 0.1.2-rc.1 | ➖ 本ライン対象外 → `legacy/0.1.2`(npm `@dsh-0.1.2`) | `register` は維持(`installSection` 追加) | ✅ 形状一致 | ✅ プラットフォーム値の import なし |
35
+ > | **0.1.5-rc.2** | ✅(**本ライン**、dist-tag `dsh-0.1.5`) | `register` は維持(文字列名前空間) | ✅ イベントは `snapshotEvents()` の二重経路で読み取り | ✅ |
36
+ >
37
+ > **本ラインの識別情報**:ブランチ `compat/0.1.5`、npm バージョン **`3.0.0`**(semver)、
38
+ > dist-tag **`dsh-0.1.5`**。`package.json` と `dsh.plugin.json` の `engines.dsh`、および
39
+ > 3 つの `@deepseek-ai/dsh-client-*` peer の下限は、いずれも `>=0.1.5-rc.2 <0.2.0-0` に統一されています。
40
+ > 過去の README は「2.x / 3.x」を**ラインの呼称**として使っていましたが、それは叙述上の慣習であり、
41
+ > **レジストリから取得できるバージョン番号ではありません**。npm バージョン `0.3.1`(0.1.2 ライン)と
42
+ > `3.0.0`(0.1.5 ライン)を基準にしてください。
43
+ >
44
+ > **他ラインの落点**:DSH `0.1.2-rc.x` ホストはブランチ **`legacy/0.1.2`**(npm dist-tag
45
+ > `dsh-0.1.2`、バージョン `0.3.1`)を使用してください。**`main` は `0.2.0-beta.1` で凍結済みで、
46
+ > 0.1.2 ラインのリリースブランチではありません。** DSH `0.1.0-rc.7` ~ `0.1.1-rc.x` ホストは
47
+ > `0.1.2` 以下の歴史バージョンを使用してください。フィールドソースの正規定義:
48
+ > `mine-dsh-plugins/improve-dsh-plugins/DSH-PLUGIN-VERSION-DISTRIBUTION-STRATEGY.md` §2.2。
49
+ >
50
+ > ドリフトガード:`tools/check-api-drift.ps1`(本ラインは既定で `dsh-v0.1.5-rc.2` に対して必須 API の存在を検証)。
51
+
29
52
  > ピーク課金時間帯に実行中のセッションを自動一時停止し、オフピーク/週末に自動再開。input-traffic の凍結ボタンと連携して**セッション級**ロックを実現。バックエンド**自動リトライ**は凍結/ゲート期間中は譲歩。カスタムセッションゲート(`agent.cancel keepInbox + goals.pause + session/event 安全境界 + followup 再開`)に基づき、dsh-task-control に依存しません。
30
53
 
31
54
  `dsh plugin` コマンドで组装 + バンドルパッチで装配する cordis プラグイン。dsh ソース変更も PR も不要。
@@ -45,9 +68,24 @@
45
68
  ## インストール
46
69
 
47
70
  ```bash
48
- dsh plugin --profile web add github:<owner>/dsh-session-guard
71
+ # DSH 0.1.5-rc.x ホスト(本ライン、dist-tag dsh-0.1.5)
72
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
73
+
74
+ # または git ブランチを直接指定
75
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
76
+
77
+ # DSH 0.1.2-rc.x ホストは 0.1.2 ラインを使用
78
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.2
49
79
  ```
50
80
 
81
+ `compat/0.1.5` は DSH `0.1.5-rc.x` 専用ラインで、npm バージョンは **`3.0.0`**。DSH `0.1.2-rc.x`
82
+ ホストは **`legacy/0.1.2`** ブランチ(npm dist-tag `dsh-0.1.2`、バージョン `0.3.1`)を使用してください。
83
+ **`main` は `0.2.0-beta.1` で凍結済みで、0.1.2 ラインのリリースブランチではありません。**
84
+
85
+ > ⚠️ 裸のパッケージ名 `dsh-session-guard` に依存しないでください:npm の `latest` タグは
86
+ > 排他的な 2 つのバージョンライン(`engines.dsh` が semver プレリリース照合で排他)を
87
+ > 同時に提供できません。必ず dist-tag を明示してください。
88
+
51
89
  インストール後 dsh web を再起動し、ページをリフレッシュ。
52
90
 
53
91
  ## 設定(設定 → プラグイン → session-guard)
package/README.ko.md CHANGED
@@ -26,6 +26,29 @@
26
26
 
27
27
  > **호환성 참고:** v0.1.1에는 일본어(`ja`)와 한국어(`ko`) 사전이 포함되어 있지만, 현재 공식 DSH 릴리스는 `LocaleRuntime`을 통해 `zh`와 `en`만 제공합니다. 순정 DSH에서 `ja` 또는 `ko`를 선택하면 `locale "<id>" is not registered` 오류가 발생합니다. 공식 DSH가 해당 locale ID를 추가할 때까지 사용할 수 없습니다. 고급 사용자는 DSH 포크를 유지하면서 업데이트하세요.
28
28
 
29
+ > **▼ DSH 버전 적합성**
30
+ >
31
+ > | DSH 버전 | 로드 | 설정 등록 | 세션 이벤트 / 게이트 | 클라이언트 측 |
32
+ > | --- | --- | --- | --- | --- |
33
+ > | 0.1.0-rc.7 ~ 0.1.1-rc.x | ➖ 본 라인 대상 아님(`legacy/0.1.2` 이전 역사 버전) | `ctx.settings.register(ns, schema, { base })` | ✅ 형태 동일 | ✅ 플랫폼 값 import 없음 |
34
+ > | 0.1.2-alpha.2+ / 0.1.2-rc.1 | ➖ 본 라인 대상 아님 → `legacy/0.1.2`(npm `@dsh-0.1.2`) | `register` 유지(`installSection` 추가) | ✅ 형태 동일 | ✅ 플랫폼 값 import 없음 |
35
+ > | **0.1.5-rc.2** | ✅(**본 라인**, dist-tag `dsh-0.1.5`) | `register` 유지(문자열 네임스페이스) | ✅ 이벤트는 `snapshotEvents()` 이중 경로로 읽음 | ✅ |
36
+ >
37
+ > **본 라인 식별 정보**: 브랜치 `compat/0.1.5`, npm 버전 **`3.0.0`**(semver),
38
+ > dist-tag **`dsh-0.1.5`**. `package.json`과 `dsh.plugin.json`의 `engines.dsh`, 그리고
39
+ > 3개의 `@deepseek-ai/dsh-client-*` peer 하한은 모두 `>=0.1.5-rc.2 <0.2.0-0`로 통일되어 있습니다.
40
+ > 과거 README는 "2.x / 3.x"를 **라인 호칭**으로 사용했지만, 이는 서술 관습이며
41
+ > **레지스트리에서 받을 수 있는 버전 번호가 아닙니다**. npm 버전 `0.3.1`(0.1.2 라인)과
42
+ > `3.0.0`(0.1.5 라인)을 기준으로 하세요.
43
+ >
44
+ > **다른 라인의 낙점**: DSH `0.1.2-rc.x` 호스트는 브랜치 **`legacy/0.1.2`**(npm dist-tag
45
+ > `dsh-0.1.2`, 버전 `0.3.1`)를 사용하세요. **`main`은 `0.2.0-beta.1`에서 동결되었고
46
+ > 0.1.2 라인의 릴리스 브랜치가 아닙니다.** DSH `0.1.0-rc.7` ~ `0.1.1-rc.x` 호스트는
47
+ > `0.1.2` 이하의 역사 버전을 사용하세요. 필드 소스 정식 정의:
48
+ > `mine-dsh-plugins/improve-dsh-plugins/DSH-PLUGIN-VERSION-DISTRIBUTION-STRATEGY.md` §2.2.
49
+ >
50
+ > 드리프트 가드: `tools/check-api-drift.ps1`(본 라인은 기본적으로 `dsh-v0.1.5-rc.2`에 대해 필수 API 존재를 검증).
51
+
29
52
  > 피크 과금 시간대에 실행 중인 세션을 자동 일시정지하고 오피크/주말에 자동 재개; input-traffic의 동결 버튼과 페어링하여 **세션급** 잠금 구현; 백엔드 **자동 재시도**는 동결/게이트 기간 중 양보. 커스텀 세션 게이트(`agent.cancel keepInbox + goals.pause + session/event 안전 경계 + followup 재개`) 기반, dsh-task-control 의존성 제거.
30
53
 
31
54
  `dsh plugin` 명령으로 조립 + 번들 패치로 장착하는 cordis 플러그인. dsh 소스 변경이나 PR 필요 없음.
@@ -45,9 +68,24 @@
45
68
  ## 설치
46
69
 
47
70
  ```bash
48
- dsh plugin --profile web add github:<owner>/dsh-session-guard
71
+ # DSH 0.1.5-rc.x 호스트(본 라인, dist-tag dsh-0.1.5)
72
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
73
+
74
+ # 또는 git 브랜치 직접 지정
75
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
76
+
77
+ # DSH 0.1.2-rc.x 호스트는 0.1.2 라인 사용
78
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.2
49
79
  ```
50
80
 
81
+ `compat/0.1.5`는 DSH `0.1.5-rc.x` 전용 라인이며 npm 버전은 **`3.0.0`**입니다. DSH `0.1.2-rc.x`
82
+ 호스트는 **`legacy/0.1.2`** 브랜치(npm dist-tag `dsh-0.1.2`, 버전 `0.3.1`)를 사용하세요.
83
+ **`main`은 `0.2.0-beta.1`에서 동결되었고 0.1.2 라인의 릴리스 브랜치가 아닙니다.**
84
+
85
+ > ⚠️ 맨 패키지명 `dsh-session-guard`에 의존하지 마세요: npm `latest` 태그는
86
+ > 상호 배타적인 두 버전 라인(`engines.dsh`가 semver 프리릴리스 매칭상 배타)을
87
+ > 동시에 제공할 수 없습니다. 반드시 dist-tag를 명시하세요.
88
+
51
89
  설치 후 dsh web을 재시작하고 페이지를 새로고침.
52
90
 
53
91
  ## 설정 (설정 → 플러그인 → session-guard)