dsh-manage-session 0.1.0-alpha.0 → 0.3.3

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/INSTALL.zh.md CHANGED
@@ -44,7 +44,7 @@ dsh plugin --profile <profile> add dsh-manage-session -w
44
44
  显式安装指定版本:
45
45
 
46
46
  ```bash
47
- dsh plugin --profile <profile> add dsh-manage-session@0.1.0-alpha.0 -w
47
+ dsh plugin --profile <profile> add dsh-manage-session@0.1.0-alpha.6 -w
48
48
  ```
49
49
 
50
50
  官方 CLI 会自动更新 profile 依赖、锁文件与 `dsh.profile.bundles`。不要手工添加 YAML 行。
@@ -55,7 +55,7 @@ DSH 运行时使用 pnpm 11,其 `minimumReleaseAge` 策略可能拦截刚发
55
55
 
56
56
  ```yaml
57
57
  minimumReleaseAgeExclude:
58
- - dsh-manage-session@0.1.0-alpha.0
58
+ - dsh-manage-session@0.1.0-alpha.6
59
59
  ```
60
60
 
61
61
  ## 2. 重启宿主
@@ -128,8 +128,8 @@ dsh --profile <profile> --dump-default-config
128
128
 
129
129
  重启后,侧边栏入口 `dsh-manage-session` 可用,设置区使用 `session-steward` 命名空间。请确认:
130
130
 
131
- 1. 两个开关均开启时,**病案室**与**体检**两个页签都会渲染。
132
- 2. 关闭 `historyFiles` 后「病案室」页签消失,且所有 `session-history-*` 调用返回显式的 disabled 错误。
131
+ 1. 两个开关均开启时,**养老院**与**体检**两个页签都会渲染。
132
+ 2. 关闭 `historyFiles` 后「养老院」页签消失,且所有 `session-history-*` 调用返回显式的 disabled 错误。
133
133
  3. 关闭 `healthCheck` 后「体检」页签消失,且所有 `session-health-*` 调用返回显式的 disabled 错误。
134
134
  4. 对 `/session-steward/api` 调用未识别的方法时返回显式错误,而不是静默成功。
135
135
 
package/README.en.md CHANGED
@@ -1,63 +1,77 @@
1
- # dsh-manage-session (Session Steward)
2
-
3
- A DSH web plugin for **session history files** and **session health checks**. It never touches session data itself.
4
-
5
- - **Records Room (history files)** — browse the official archive set and prune ids in bulk
6
- (backup + atomic replace; a DSH restart is required for the host to reload it).
7
- - **Checkup (health)** — four gates → prescription (command list) → discharge (reversible repair with a
8
- before/after comparison).
9
-
10
- > Naming boundary: **this package ships no search or index features**. Search/indexing belongs to
11
- > `dsh-search-index`; neither side mentions or re-interprets the other's fields.
12
-
13
- ## Install
14
-
15
- ```bash
16
- dsh plugin --profile web add dsh-manage-session
17
- ```
18
-
19
- Restart the host process afterwards (refreshing the page is not enough).
20
-
21
- ## Routes
22
-
23
- Prefix `/session-steward/api`; every method name is `session-*` (never `index-*`), and an unrecognized
24
- method returns an explicit error instead of failing silently.
25
-
26
- | Method | Domain | Purpose |
27
- |---|---|---|
28
- | `session-history-list` | history | list the official archive set (with source and degradation notes) |
29
- | `session-history-prune` | history | bulk-remove ids from the archive array (auto backup, restart required) |
30
- | `session-health-status` | health | switch state and method table (panel polling) |
31
- | `session-health-scan` | health | batch checkup (defaults to non-ok sessions only) |
32
- | `session-health-session` | health | one session's four-gate report plus prescription |
33
- | `session-health-repair` | health | reversible repair (quarantine the projection-cache record) with before/after |
34
-
35
- Settings namespace `session-steward`; sidebar entry id `dsh-manage-session`.
36
-
37
- ## Switches (feature gates)
38
-
39
- | Switch | Field | When off |
40
- |---|---|---|
41
- | Session history files | `historyFiles` (default true) | `session-history-*` is not registered and the Records Room tab is not rendered |
42
- | Health check | `healthCheck` (default true) | `session-health-*` is not registered and the Checkup tab is not rendered |
43
-
44
- Closed domains return `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }` — no empty shells.
45
-
46
- ## Contract with `dsh-search-index`
47
-
48
- The archive file format (`global.archivedSessionIds` of `~/.dsh/storages/workspace.json`):
49
- **this plugin writes, the search-index plugin reads only**. See
50
- `dsh-docs-deliverables/dsh-归档文件格式契约-20260914.md`.
51
-
52
- ## Development
53
-
54
- ```bash
55
- pnpm install
56
- pnpm typecheck
57
- pnpm test
58
- pnpm build
59
- ```
60
-
61
- ## License
62
-
63
- MIT
1
+ # dsh-manage-session (Session Steward)
2
+
3
+ A DSH web plugin for **session history files** and **session health checks**. It never touches session data itself.
4
+
5
+ - **Retirement Home (history files)** — browse the official archive set and prune ids in bulk
6
+ (backup + atomic replace; a DSH restart is required for the host to reload it).
7
+ - **Checkup (health)** — four gates → prescription (command list) → discharge (reversible repair with a
8
+ before/after comparison).
9
+
10
+ > Naming boundary: **this package ships no search or index features**. Search/indexing belongs to
11
+ > `dsh-search-index`; neither side mentions or re-interprets the other's fields.
12
+
13
+ ## Screenshots
14
+
15
+ A **Session Steward** entry sits next to Search and Settings at the bottom of the sidebar:
16
+
17
+ ![Sidebar entry](assets/left-sidebar.png)
18
+
19
+ **Retirement Home (history files)** — the official archive set, each row carrying its size and whether the on-disk entity still exists; select rows to un-archive or purge:
20
+
21
+ ![Retirement Home](assets/archive.png)
22
+
23
+ **Checkup** — the entry point of the four-gate checkup, which ends in a reversible prescription:
24
+
25
+ ![Checkup](assets/doctor.png)
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ dsh plugin --profile web add dsh-manage-session
31
+ ```
32
+
33
+ Restart the host process afterwards (refreshing the page is not enough).
34
+
35
+ ## Routes
36
+
37
+ Prefix `/session-steward/api`; every method name is `session-*` (never `index-*`), and an unrecognized
38
+ method returns an explicit error instead of failing silently.
39
+
40
+ | Method | Domain | Purpose |
41
+ |---|---|---|
42
+ | `session-history-list` | history | list the official archive set (with source and degradation notes) |
43
+ | `session-history-prune` | history | bulk-remove ids from the archive array (auto backup, restart required) |
44
+ | `session-health-status` | health | switch state and method table (panel polling) |
45
+ | `session-health-scan` | health | batch checkup (defaults to non-ok sessions only) |
46
+ | `session-health-session` | health | one session's four-gate report plus prescription |
47
+ | `session-health-repair` | health | reversible repair (quarantine the projection-cache record) with before/after |
48
+
49
+ Settings namespace `session-steward`; sidebar entry id `dsh-manage-session`.
50
+
51
+ ## Switches (feature gates)
52
+
53
+ | Switch | Field | When off |
54
+ |---|---|---|
55
+ | Session history files | `historyFiles` (default true) | `session-history-*` is not registered and the Retirement Home tab is not rendered |
56
+ | Health check | `healthCheck` (default true) | `session-health-*` is not registered and the Checkup tab is not rendered |
57
+
58
+ Closed domains return `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }` — no empty shells.
59
+
60
+ ## Contract with `dsh-search-index`
61
+
62
+ The archive file format (`global.archivedSessionIds` of `~/.dsh/storages/workspace.json`):
63
+ **this plugin writes, the search-index plugin reads only**. See
64
+ `dsh-docs-deliverables/dsh-归档文件格式契约-20260914.md`.
65
+
66
+ ## Development
67
+
68
+ ```bash
69
+ pnpm install
70
+ pnpm typecheck
71
+ pnpm test
72
+ pnpm build
73
+ ```
74
+
75
+ ## License
76
+
77
+ MIT
package/README.ja.md CHANGED
@@ -1,63 +1,77 @@
1
- # dsh-manage-session(セッション・スチュワード)
2
-
3
- **セッション履歴ファイル**と**セッション健康チェック**のための DSH Web プラグインです。セッションデータそのものには一切触れません。
4
-
5
- - **カルテ室(履歴ファイル)** — 公式アーカイブ集合を閲覧し、ID を一括整理します
6
- (バックアップ + アトミック置換。ホストに再読み込みさせるには DSH の再起動が必要です)。
7
- - **健診(健康チェック)** — 四つのゲート → 処方(コマンド一覧)→ 退院(before/after 比較を伴う
8
- 可逆的な修復)。
9
-
10
- > 命名の境界:**本パッケージは検索・インデックス機能を一切提供しません**。検索/インデックスは
11
- > `dsh-search-index` に属し、双方が相手のフィールドに言及したり再解釈したりすることはありません。
12
-
13
- ## インストール
14
-
15
- ```bash
16
- dsh plugin --profile web add dsh-manage-session
17
- ```
18
-
19
- その後、ホストプロセスを再起動してください(ページの再読み込みでは不十分です)。
20
-
21
- ## ルート
22
-
23
- プレフィックスは `/session-steward/api`。メソッド名はすべて `session-*`(`index-*` は使いません)で、
24
- 未知のメソッドは黙って失敗せず明示的なエラーを返します。
25
-
26
- | メソッド | ドメイン | 用途 |
27
- |---|---|---|
28
- | `session-history-list` | history | 公式アーカイブ集合を一覧表示(取得元と縮退の注記付き) |
29
- | `session-history-prune` | history | アーカイブ配列から ID を一括削除(自動バックアップ、再起動が必要) |
30
- | `session-health-status` | health | スイッチの状態とメソッド一覧(パネルのポーリング用) |
31
- | `session-health-scan` | health | 一括健診(既定では非 ok のセッションのみ) |
32
- | `session-health-session` | health | 1 セッションの四ゲートレポートと処方 |
33
- | `session-health-repair` | health | 可逆的な修復(プロジェクションキャッシュのレコードを隔離)と before/after 対照 |
34
-
35
- 設定名前空間は `session-steward`、サイドバーエントリ ID は `dsh-manage-session`。
36
-
37
- ## スイッチ(フィーチャーゲート)
38
-
39
- | スイッチ | フィールド | オフのとき |
40
- |---|---|---|
41
- | セッション履歴ファイル | `historyFiles`(既定 true) | `session-history-*` は登録されず、カルテ室タブも描画されない |
42
- | 健康チェック | `healthCheck`(既定 true) | `session-health-*` は登録されず、健診タブも描画されない |
43
-
44
- 閉じられたドメインは `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }` を返します — 空の殻は残しません。
45
-
46
- ## `dsh-search-index` との契約
47
-
48
- アーカイブファイル形式(`~/.dsh/storages/workspace.json` の `global.archivedSessionIds`)は、
49
- **本プラグインが書き込み、検索インデックスプラグインは読み取りのみ**です。詳細は
50
- `dsh-docs-deliverables/dsh-归档文件格式契约-20260914.md` を参照してください。
51
-
52
- ## 開発
53
-
54
- ```bash
55
- pnpm install
56
- pnpm typecheck
57
- pnpm test
58
- pnpm build
59
- ```
60
-
61
- ## ライセンス
62
-
63
- MIT
1
+ # dsh-manage-session(セッション・スチュワード)
2
+
3
+ **セッション履歴ファイル**と**セッション健康チェック**のための DSH Web プラグインです。セッションデータそのものには一切触れません。
4
+
5
+ - **カルテ室(履歴ファイル)** — 公式アーカイブ集合を閲覧し、ID を一括整理します
6
+ (バックアップ + アトミック置換。ホストに再読み込みさせるには DSH の再起動が必要です)。
7
+ - **健診(健康チェック)** — 四つのゲート → 処方(コマンド一覧)→ 退院(before/after 比較を伴う
8
+ 可逆的な修復)。
9
+
10
+ > 命名の境界:**本パッケージは検索・インデックス機能を一切提供しません**。検索/インデックスは
11
+ > `dsh-search-index` に属し、双方が相手のフィールドに言及したり再解釈したりすることはありません。
12
+
13
+ ## スクリーンショット
14
+
15
+ サイドバー下部に **「会话管家」**(セッション・スチュワード)のエントリが追加され、検索・設定と並びます:
16
+
17
+ ![サイドバーのエントリ](assets/left-sidebar.png)
18
+
19
+ **カルテ室(履歴ファイル)** — 公式アーカイブ集合の一覧。各行にサイズとディスク上の実体の有無を表示し、選択してアーカイブ解除または整理ができます:
20
+
21
+ ![カルテ室](assets/archive.png)
22
+
23
+ **健診** — 四つのゲートによる健診の入口。スキャン後に可逆的な処方を提示します:
24
+
25
+ ![健診](assets/doctor.png)
26
+
27
+ ## インストール
28
+
29
+ ```bash
30
+ dsh plugin --profile web add dsh-manage-session
31
+ ```
32
+
33
+ その後、ホストプロセスを再起動してください(ページの再読み込みでは不十分です)。
34
+
35
+ ## ルート
36
+
37
+ プレフィックスは `/session-steward/api`。メソッド名はすべて `session-*`(`index-*` は使いません)で、
38
+ 未知のメソッドは黙って失敗せず明示的なエラーを返します。
39
+
40
+ | メソッド | ドメイン | 用途 |
41
+ |---|---|---|
42
+ | `session-history-list` | history | 公式アーカイブ集合を一覧表示(取得元と縮退の注記付き) |
43
+ | `session-history-prune` | history | アーカイブ配列から ID を一括削除(自動バックアップ、再起動が必要) |
44
+ | `session-health-status` | health | スイッチの状態とメソッド一覧(パネルのポーリング用) |
45
+ | `session-health-scan` | health | 一括健診(既定では非 ok のセッションのみ) |
46
+ | `session-health-session` | health | 1 セッションの四ゲートレポートと処方 |
47
+ | `session-health-repair` | health | 可逆的な修復(プロジェクションキャッシュのレコードを隔離)と before/after 対照 |
48
+
49
+ 設定名前空間は `session-steward`、サイドバーエントリ ID は `dsh-manage-session`。
50
+
51
+ ## スイッチ(フィーチャーゲート)
52
+
53
+ | スイッチ | フィールド | オフのとき |
54
+ |---|---|---|
55
+ | セッション履歴ファイル | `historyFiles`(既定 true) | `session-history-*` は登録されず、カルテ室タブも描画されない |
56
+ | 健康チェック | `healthCheck`(既定 true) | `session-health-*` は登録されず、健診タブも描画されない |
57
+
58
+ 閉じられたドメインは `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }` を返します — 空の殻は残しません。
59
+
60
+ ## `dsh-search-index` との契約
61
+
62
+ アーカイブファイル形式(`~/.dsh/storages/workspace.json` の `global.archivedSessionIds`)は、
63
+ **本プラグインが書き込み、検索インデックスプラグインは読み取りのみ**です。詳細は
64
+ `dsh-docs-deliverables/dsh-归档文件格式契约-20260914.md` を参照してください。
65
+
66
+ ## 開発
67
+
68
+ ```bash
69
+ pnpm install
70
+ pnpm typecheck
71
+ pnpm test
72
+ pnpm build
73
+ ```
74
+
75
+ ## ライセンス
76
+
77
+ MIT
package/README.ko.md CHANGED
@@ -1,61 +1,75 @@
1
- # dsh-manage-session (세션 스튜어드)
2
-
3
- **세션 히스토리 파일**과 **세션 상태 점검**을 위한 DSH 웹 플러그인입니다. 세션 데이터 자체는 건드리지 않습니다.
4
-
5
- - **기록 보관소(히스토리 파일)** — 공식 아카이브 집합을 조회하고 id를 일괄 정리합니다
6
- (백업 + 원자적 교체, 호스트가 다시 로드하려면 DSH 재시작이 필요합니다).
7
- - **점검(상태)** — 네 개의 gate → 처방(명령 목록) → 퇴원(전후 비교가 포함된 되돌릴 수 있는 복구).
8
-
9
- > 이름 경계: **이 패키지는 검색이나 인덱스 기능을 제공하지 않습니다**. 검색/인덱싱은
10
- > `dsh-search-index`에 속하며, 어느 쪽도 상대방의 필드를 언급하거나 재해석하지 않습니다.
11
-
12
- ## 설치
13
-
14
- ```bash
15
- dsh plugin --profile web add dsh-manage-session
16
- ```
17
-
18
- 이후 호스트 프로세스를 재시작하세요(페이지 새로고침만으로는 부족합니다).
19
-
20
- ## 라우트
21
-
22
- 접두사 `/session-steward/api`; 모든 메서드 이름은 `session-*`이며(`index-*`는 결코 아닙니다), 인식되지 않는
23
- 메서드는 조용히 실패하지 않고 명시적인 오류를 반환합니다.
24
-
25
- | 메서드 | 도메인 | 목적 |
26
- |---|---|---|
27
- | `session-history-list` | history | 공식 아카이브 집합 조회(출처 및 성능 저하 관련 주석 포함) |
28
- | `session-history-prune` | history | 아카이브 배열에서 id 일괄 제거(자동 백업, 재시작 필요) |
29
- | `session-health-status` | health | 스위치 상태와 메서드 표(패널 폴링) |
30
- | `session-health-scan` | health | 일괄 점검(기본값은 비정상 세션만) |
31
- | `session-health-session` | health | 단일 세션의 4-gate 리포트와 처방 |
32
- | `session-health-repair` | health | 되돌릴 수 있는 복구(프로젝션 캐시 레코드 격리)와 전후 비교 |
33
-
34
- 설정 네임스페이스 `session-steward`; 사이드바 항목 id `dsh-manage-session`.
35
-
36
- ## 스위치(기능 게이트)
37
-
38
- | 스위치 | 필드 | 꺼져 있을 때 |
39
- |---|---|---|
40
- | 세션 히스토리 파일 | `historyFiles`(기본값 true) | `session-history-*`가 등록되지 않고 기록 보관소 탭이 렌더링되지 않습니다 |
41
- | 상태 점검 | `healthCheck`(기본값 true) | `session-health-*`가 등록되지 않고 점검 탭이 렌더링되지 않습니다 |
42
-
43
- 닫힌 도메인은 `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }`를 반환합니다 — 빈 껍데기는 남지 않습니다.
44
-
45
- ## `dsh-search-index`와의 계약
46
-
47
- 아카이브 파일 형식(`~/.dsh/storages/workspace.json`의 `global.archivedSessionIds`):
48
- **이 플러그인이 쓰고, search-index 플러그인은 읽기만 합니다**. `dsh-docs-deliverables/dsh-归档文件格式契约-20260914.md`를 참고하세요.
49
-
50
- ## 개발
51
-
52
- ```bash
53
- pnpm install
54
- pnpm typecheck
55
- pnpm test
56
- pnpm build
57
- ```
58
-
59
- ## 라이선스
60
-
61
- MIT
1
+ # dsh-manage-session (세션 스튜어드)
2
+
3
+ **세션 히스토리 파일**과 **세션 상태 점검**을 위한 DSH 웹 플러그인입니다. 세션 데이터 자체는 건드리지 않습니다.
4
+
5
+ - **기록 보관소(히스토리 파일)** — 공식 아카이브 집합을 조회하고 id를 일괄 정리합니다
6
+ (백업 + 원자적 교체, 호스트가 다시 로드하려면 DSH 재시작이 필요합니다).
7
+ - **점검(상태)** — 네 개의 gate → 처방(명령 목록) → 퇴원(전후 비교가 포함된 되돌릴 수 있는 복구).
8
+
9
+ > 이름 경계: **이 패키지는 검색이나 인덱스 기능을 제공하지 않습니다**. 검색/인덱싱은
10
+ > `dsh-search-index`에 속하며, 어느 쪽도 상대방의 필드를 언급하거나 재해석하지 않습니다.
11
+
12
+ ## 스크린샷
13
+
14
+ 사이드바 하단에 **「会话管家」**(세션 스튜어드) 항목이 추가되어 검색, 설정과 나란히 표시됩니다:
15
+
16
+ ![사이드바 항목](assets/left-sidebar.png)
17
+
18
+ **기록 보관소(히스토리 파일)** — 공식 아카이브 집합 목록. 각 행에 용량과 디스크 실체 존재 여부를 표시하며, 선택하여 아카이브 해제 또는 정리를 할 수 있습니다:
19
+
20
+ ![기록 보관소](assets/archive.png)
21
+
22
+ **점검** — 네 개의 gate 점검 입구이며, 검사 후 되돌릴 수 있는 처방을 제시합니다:
23
+
24
+ ![점검](assets/doctor.png)
25
+
26
+ ## 설치
27
+
28
+ ```bash
29
+ dsh plugin --profile web add dsh-manage-session
30
+ ```
31
+
32
+ 이후 호스트 프로세스를 재시작하세요(페이지 새로고침만으로는 부족합니다).
33
+
34
+ ## 라우트
35
+
36
+ 접두사 `/session-steward/api`; 모든 메서드 이름은 `session-*`이며(`index-*`는 결코 아닙니다), 인식되지 않는
37
+ 메서드는 조용히 실패하지 않고 명시적인 오류를 반환합니다.
38
+
39
+ | 메서드 | 도메인 | 목적 |
40
+ |---|---|---|
41
+ | `session-history-list` | history | 공식 아카이브 집합 조회(출처 및 성능 저하 관련 주석 포함) |
42
+ | `session-history-prune` | history | 아카이브 배열에서 id 일괄 제거(자동 백업, 재시작 필요) |
43
+ | `session-health-status` | health | 스위치 상태와 메서드 표(패널 폴링) |
44
+ | `session-health-scan` | health | 일괄 점검(기본값은 비정상 세션만) |
45
+ | `session-health-session` | health | 단일 세션의 4-gate 리포트와 처방 |
46
+ | `session-health-repair` | health | 되돌릴 수 있는 복구(프로젝션 캐시 레코드 격리)와 전후 비교 |
47
+
48
+ 설정 네임스페이스 `session-steward`; 사이드바 항목 id `dsh-manage-session`.
49
+
50
+ ## 스위치(기능 게이트)
51
+
52
+ | 스위치 | 필드 | 꺼져 있을 때 |
53
+ |---|---|---|
54
+ | 세션 히스토리 파일 | `historyFiles`(기본값 true) | `session-history-*`가 등록되지 않고 기록 보관소 탭이 렌더링되지 않습니다 |
55
+ | 상태 점검 | `healthCheck`(기본값 true) | `session-health-*`가 등록되지 않고 점검 탭이 렌더링되지 않습니다 |
56
+
57
+ 닫힌 도메인은 `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }`를 반환합니다 — 빈 껍데기는 남지 않습니다.
58
+
59
+ ## `dsh-search-index`와의 계약
60
+
61
+ 아카이브 파일 형식(`~/.dsh/storages/workspace.json`의 `global.archivedSessionIds`):
62
+ **이 플러그인이 쓰고, search-index 플러그인은 읽기만 합니다**. `dsh-docs-deliverables/dsh-归档文件格式契约-20260914.md`를 참고하세요.
63
+
64
+ ## 개발
65
+
66
+ ```bash
67
+ pnpm install
68
+ pnpm typecheck
69
+ pnpm test
70
+ pnpm build
71
+ ```
72
+
73
+ ## 라이선스
74
+
75
+ MIT