dsh-manage-session 0.5.4 → 0.5.6-beta.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
@@ -1,5 +1,27 @@
1
1
  # 変更履歴
2
2
 
3
+ ## 0.5.5 (2026-10-19)
4
+
5
+ ### 修正 —— issue #1:hollow セッションが増分同期で永久に補録されない
6
+ - スキップ判定を「version 一致ならスキップ」から「version 一致かつ本文あり(または再読込で空であることが確認済み)」に強化:
7
+ `sessions` 行はあるが `docs` が 0 件の hollow セッションは次の poll で補録され、全文検索から永久に姿を消さなくなる。
8
+ アーカイブ補完ループも同意味に強化(legacy な header のみのアーカイブ行は R1 に従い本文を補完)。
9
+ - 索引可能なテキストを一切含まない空セッションは初回再読込後にプロセス内 confirmedEmpty キャッシュへ登録され、
10
+ ホットループしない(宿主再起動後は各路最大 1 回の再読込のみ)。
11
+
12
+ ### 修正 —— issue #1 コメント:rebuild/インポートの swap 後のインデックス破損
13
+ - swap ウィンドウで主ファイル隣の `-wal`/`-shm` を主ファイルとともに archive へ移行
14
+ (主ファイルが無い孤児残留は直接クリーンアップ)。同名で入れ替わる新データベースが
15
+ 旧データベースの WAL をリプレイして `database disk image is malformed` 化する経路を断った。
16
+ - swap 後に `PRAGMA integrity_check` ゲートを追加:非 ok なら破損データベースを `.corrupt` へ改名し
17
+ 最新の archive から自動ロールバックして再開、rebuild state は error(「インデックス破損」を「前回スナップショットへ復帰」に格下げ)。
18
+ - `pruneArchives` は archive 削除時にその sidecar ファイルも削除する。
19
+
20
+ ### 新規 —— 可観測性
21
+ - `importIntoIndex` は空 docs のスナップショット記録に警告を残す(強制拒否はしない。修正後はこの種の行が次の同期で補完される)。
22
+ - 同期状態に `hollow` カウント(補完後も「header のみ」行の数)を追加。sync pass ログと index-status 面に表示。
23
+ エンジンの能力面に `hasSessionDocs` / `listHollowSessions` / `integrityCheck` を追加。
24
+
3
25
  ## 0.4.8
4
26
 
5
27
  ### 修正 —— ST1:変換が第一-party プロデューサー名でホストと食い違う問題
package/CHANGELOG.ko.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # 변경 이력
2
2
 
3
+ ## 0.5.5 (2026-10-19)
4
+
5
+ ### 수정 —— issue #1: hollow 세션이 증분 동기화에서 영원히 보완 색인되지 않음
6
+ - 스킵 판정을 “version 일치하면 스킵”에서 “version 일치 + 본문 존재(또는 재읽어들임 후 비었음을 확인)”로 강화:
7
+ `sessions` 행은 있으나 `docs`가 0개인 hollow 세션은 다음 poll에서 보완 색인되어 전문 검색에서 영구히 사라지지 않는다.
8
+ 아카이브 보완 루프도 같은 의미로 강화(header뿐인 legacy 아카이브 행은 R1에 따라 본문을 보완).
9
+ - 색인 가능 텍스트가 전혀 없는 빈 세션은 첫 재읽어들임 후 프로세스 내 confirmedEmpty 캐시에 등록되어
10
+ 핫 루프하지 않는다(호스트 재시동 후 각 최대 1회 재읽어들임만).
11
+
12
+ ### 수정 —— issue #1 댓글: rebuild/가져오기 swap 후 인덱스 손상
13
+ - swap 창에서 메인 파일 옆의 `-wal`/`-shm`을 메인 파일과 함께 archive로 이동
14
+ (메인 파일 없는 고아 잔류는 바로 정리). 같은 이름으로 교체된 새 데이터베이스가
15
+ 구 데이터베이스의 WAL을 리플레이해 `database disk image is malformed`가 되는 경로를 차단했다.
16
+ - swap 후 `PRAGMA integrity_check` 게이트 추가: ok가 아니면 손상된 데이터베이스를 `.corrupt`로 이름 바꾸고
17
+ 최신 archive에서 자동 롤백 후 다시 열며, rebuild state는 error(“인덱스 손상”을 “마지막 스냅샷으로 복구”로 격하).
18
+ - `pruneArchives`는 archive 삭제 시 해당 sidecar 파일도 함께 삭제한다.
19
+
20
+ ### 신규 —— 관측성
21
+ - `importIntoIndex`는 빈 docs 스냅샷 기록에 경고 로그를 남긴다(강제 거부는 하지 않음, 수정 후 이런 행은 다음 동기화에서 보완).
22
+ - 동기화 상태에 `hollow` 카운트(보완 후에도 “header뿐”인 행 수) 추가. sync pass 로그와 index-status면에 표시.
23
+ 엔진 능력면에 `hasSessionDocs` / `listHollowSessions` / `integrityCheck` 추가.
24
+
3
25
  ## 0.4.8
4
26
 
5
27
  ### 수정 —— ST1:변환이 제1자 프로듀서명에서 호스트와 불일치
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.5 (2026-10-19)
4
+
5
+ ### 修复 —— issue #1:hollow 会话增量同步永不补录
6
+ - 同步跳过判据从「version 相等即跳」收紧为「version 相等且有正文(或已确认重读产出为空)」:
7
+ `sessions` 行存在而 `docs` 为 0 的 hollow 会话下一轮 poll 即补录,不再永久对齐全文检索隐身。
8
+ 归档覆盖循环同语义收紧(legacy header-only 归档行按 R1 补正文)。
9
+ - 无可索引文本的真空会话重读一次后落进程内 confirmedEmpty 缓存,不热循环(宿主重启后最多各重读一次)。
10
+
11
+ ### 修复 —— issue #1 评论:重建/导入 swap 后索引损坏
12
+ - swap 窗口把主文件旁的 `-wal`/`-shm` 一并迁 archive(无主文件的孤儿残留直接清理),
13
+ 同名顶替的新库不再继承旧库 WAL 重放 → `database disk image is malformed`。
14
+ - swap 后新增 `PRAGMA integrity_check` 闸门:非 ok 则损坏库改名 `.corrupt` 并从最新 archive 自动回滚重开,
15
+ rebuild state 置 error(「索引损坏」降级为「回到上次快照」)。
16
+ - `pruneArchives` 清理归档时同步删除其 sidecar 文件。
17
+
18
+ ### 新增 —— 可观测面
19
+ - `importIntoIndex` 对空 docs 快照记录告警(不硬拒,修复后此类行下一轮同步即补录)。
20
+ - 同步状态新增 `hollow` 计数(补录后仍「有表头无正文」的行数),随 sync pass 日志与 index-status 面透出;
21
+ 引擎新增 `hasSessionDocs` / `listHollowSessions` / `integrityCheck` 能力面。
22
+
3
23
  ## 0.5.4 (2026-10-18)
4
24
 
5
25
  - hosts: 追加 0.2.1-rc.2 声明面枚举(34/34 @deepseek-ai/* 宿主 peer 逐包 npm 实测 rc.2 在版;本插件不触 ctx.web provider 与 conversation.input.model.label 槽,代码零改动,纯元数据发版;农场 rc.2 格挂账待命)
package/README.en.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # dsh-manage-session (Session Steward)
2
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
3
+ A DSH web plugin for the **session management console** and **session health checks**. It never touches session data itself.
4
+
5
+ - **Manage (session console, main tab)** — all sessions grouped by workspace with an
6
+ archived-domain filter; select rows to batch archive, un-archive (array-only, reversible)
7
+ or purge (deletes on-disk entities, irreversible; backup + atomic replace, a DSH restart
8
+ is required for the host to reload the store file).
9
+ (2026-10-20 UI change: the former standalone "Retirement Home" tab was merged into this page.)
10
+ - **Checkup (health, secondary tab)** — four gates → prescription (command list) → discharge (reversible repair with a
8
11
  before/after comparison).
9
12
 
10
13
  > Naming boundary: **this package ships no search or index features**. Search/indexing belongs to
@@ -20,11 +23,10 @@ A **Session Steward** entry sits next to Search and Settings at the bottom of th
20
23
 
21
24
  ![Sidebar entry](assets/left-sidebar.png)
22
25
 
23
- **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:
24
-
25
- ![Retirement Home](assets/archive.png)
26
+ **Manage (main tab)** — sessions grouped by workspace with active/archived/favorite filters, each row
27
+ carrying its size and whether the on-disk entity still exists; select rows to batch archive, un-archive or purge:
26
28
 
27
- **Checkup** — the entry point of the four-gate checkup, which ends in a reversible prescription:
29
+ **Checkup (secondary tab)** — the entry point of the four-gate checkup, which ends in a reversible prescription:
28
30
 
29
31
  ![Checkup](assets/doctor.png)
30
32
 
@@ -56,7 +58,7 @@ Settings namespace `session-steward`; sidebar entry id `dsh-manage-session`.
56
58
 
57
59
  | Switch | Field | When off |
58
60
  |---|---|---|
59
- | Session history files | `historyFiles` (default true) | `session-history-*` is not registered and the Retirement Home tab is not rendered |
61
+ | Session history files | `historyFiles` (default true) | `session-history-*` is not registered (the UI tab was merged into Manage on 2026-10-20 and no longer gates a tab) |
60
62
  | Health check | `healthCheck` (default true) | `session-health-*` is not registered and the Checkup tab is not rendered |
61
63
 
62
64
  Closed domains return `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }` — no empty shells.
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # dsh-manage-session(会话管家 / Session Steward)
2
2
 
3
- DSH Web 插件:**会话历史文件 + 会话健康检查**。
3
+ DSH Web 插件:**会话管理台 + 会话健康检查**。
4
4
 
5
- - **养老院(会话历史文件)**:浏览官方归档集合,两个**独立**操作 ——
6
- **取消归档状态**(只改数组,可逆)与 **清理归档文件**(真删磁盘实体,不可逆)。
5
+ - **管理(会话操作台,主页面)**:按工作区分组列出全部会话(含归档域筛选),
6
+ 勾选后批量执行三个**独立**操作 —— 归档、**取消归档状态**(只改数组,可逆)
7
+ 与 **清理归档文件**(真删磁盘实体,不可逆)。
8
+ (2026-10-20 页面调整:原「养老院」独立页签并入本页,不再单独存在。)
7
9
 
8
10
  > **两个操作不可互换,也不能合并**:
9
11
  >
@@ -23,7 +25,7 @@ DSH Web 插件:**会话历史文件 + 会话健康检查**。
23
25
  > (`pendingRestart`)。
24
26
  > 2. **操作后立刻重启 DSH** —— 存储层是全量重写、内存为准:宿主退出前**任何**归档或
25
27
  > 工作区改动都会把旧状态整份写回,本次操作归零。
26
- - **体检(健康检查 / 会话医生)**:四门体检 → 处方(命令清单)→ 出院(可逆处置 + before/after 对照)。
28
+ - **体检(健康检查 / 会话医生,备用页签)**:四门体检 → 处方(命令清单)→ 出院(可逆处置 + before/after 对照)。
27
29
 
28
30
  > 命名边界:**本插件不提供搜索与索引**。搜索/独立索引属于另一片(`dsh-search-index`),
29
31
  > 两侧互不出现对方的子域字眼,也不互相解释对方字段。
@@ -38,11 +40,10 @@ DSH Web 插件:**会话历史文件 + 会话健康检查**。
38
40
 
39
41
  ![侧边栏入口](assets/left-sidebar.png)
40
42
 
41
- **养老院(会话历史文件)**——官方归档集合一览,每条给出体积与磁盘实体状态;勾选后可取消归档或清理:
43
+ **管理(主页面)**——按工作区分组、活跃/归档/收藏筛选,每条给出体积与磁盘实体状态;
44
+ 勾选后可批量归档、取消归档或清理(不可逆操作需二次确认):
42
45
 
43
- ![养老院(全部收口状态)](assets/archive.png)
44
-
45
- **体检**——四门体检的入口,扫完给出可逆处方:
46
+ **体检(备用页签)**——四门体检的入口,扫完给出可逆处方:
46
47
 
47
48
  ![体检](assets/doctor.png)
48
49
 
@@ -77,7 +78,7 @@ dsh plugin --profile web add "link:E:/test/rewrite-agently/mine-dsh-plugins/dsh-
77
78
 
78
79
  | 开关 | 字段 | 关闭效果 |
79
80
  |---|---|---|
80
- | 会话历史文件 | `historyFiles`(默认 true) | 不注册 `session-history-*`,不渲染「养老院」页签 |
81
+ | 会话历史文件 | `historyFiles`(默认 true) | 不注册 `session-history-*` 路由(UI 页签已于 2026-10-20 并入管理台,不再单独控制界面) |
81
82
  | 健康检查 | `healthCheck`(默认 true) | 不注册 `session-health-*`,不渲染「体检」页签 |
82
83
 
83
84
  关闭时对应方法返回 `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }`,**不留空壳**。
package/dsh.plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "dsh-manage-session",
3
3
  "name": "dsh-manage-session",
4
- "version": "0.5.4",
4
+ "version": "0.5.6-beta.0",
5
5
  "description": {
6
6
  "en": "Session Steward (merged package): archive browsing & cleanup, a four-gate session health checkup with reversible prescriptions, plus an independent FTS5 content-search index (title/content modes, incremental sync, non-destructive rebuild, snapshot export/import). Never rewrites session logs.",
7
7
  "zh": "会话管家(合并包):归档浏览与清理、四门体检(可逆处方),外加独立 FTS5 会话内容搜索(标题/内容双模式、增量同步、非破坏性整理、快照导入导出)。不改写会话日志。"