At a glance
What it does
A DSH Web plugin for browsing archived sessions and diagnosing session health without rewriting session logs.
Web Profile
>=0.1.0-rc.6 <0.2.0-0
Evidence-verified
Checked Sep 16, 2026, 2:20 PM UTC
Code-evidenced contributions
What it adds to DSH
Adds sidebar settings and views for archived-session management and session health checks.
Mechanism evidence ↗Before you choose it
Session Steward adds two DSH Web areas: an archive view for listing and batch-pruning official archived-session IDs, and a health-check view that scans sessions, presents findings and prescriptions, and can reversibly quarantine damaged projection-cache records. Its stated boundary is not to modify session logs or historical session data.
Best for
DSH Web users who need to inspect archived sessions or investigate unhealthy session state before taking a reversible remediation step.
Common tasks
- Browse the official archived-session collection and remove selected archived IDs with backup and atomic replacement.
- Run batch health checks that report non-OK sessions by default.
- Inspect a single session across log integrity, projection cache, lossless JSON, and cold-read checks.
- Review before/after results when quarantining a damaged projection-cache record.
Permissions and data
Operates on local DSH session-related storage for archive management and health diagnostics.
Permissions- Reads session logs for integrity and cold-read checks.
- Reads projection-cache records under ~/.dsh/storages/session_projcache/sessions.
- Writes archive changes to the archived-session array and can isolate projection-cache records as reversible remediation.
- The project states that it does not rewrite session logs or historical session data.
- Archive pruning is described as backup plus atomic replacement.
- Projection-cache quarantine is described as occurring after backup with before/after comparison.
- No credential requirement is declared in the supplied evidence.
Limitations
- It does not provide search or indexing.
- Archive changes and plugin installation require a host-process restart to take effect.
- Feature gates can disable either archive management or health checks.
- The package is prerelease version 0.1.0-alpha.4, and the corresponding npm package version was not found in supplied distribution evidence.
What DSHub checked
- The immutable Git bundle, manifest structure, and Cordis patch were verified.
- The manifest declares DSH Web client integration, Node.js >=20, and DSH >=0.1.0-rc.6 <0.2.0-0.
- The README documents the archive and health-check functions, four health gates, and reversible-remediation boundary.
What DSHub did not check
- Installation and runtime behavior were not executed.
- The npm registry distribution was not found for the declared version.
- Actual effects on local session storage and compatibility with a specific host installation were not independently tested.
Pinned install
Install Session Steward
This plugin bundle does not have a DSH Plugin install action. Use its source documentation for the delivery method.
Maintainer source
Project README
dsh-session-steward(会话管家 / Session Steward)
DSH Web 插件:会话历史文件 + 会话健康检查。它只做两件事,且都不碰会话数据本身:
- 养老院(会话历史文件):浏览官方归档集合、批量清理(备份 + 原子替换,需重启宿主生效)。
- 体检(健康检查 / 会话医生):四门体检 → 处方(命令清单)→ 出院(可逆处置 + before/after 对照)。
命名边界:本插件不提供搜索与索引。搜索/独立索引属于另一片(
dsh-search-index), 两侧互不出现对方的子域字眼,也不互相解释对方字段。
安装
dsh plugin --profile web add dsh-session-steward
# 或本地开发目录
dsh plugin --profile web add "link:E:/test/rewrite-agently/mine-dsh-plugins/dsh-session-steward"
安装后必须重启宿主进程(仅刷新页面无效)。
路由契约
前缀 /session-steward/api,方法名一律 session-*(不得与搜索索引的 index-* 混用);
未识别的方法返回显式错误,绝不静默。
| 方法 | 子域 | 作用 |
|---|---|---|
session-history-list |
history | 列出官方归档集合(含来源与降级标注) |
session-history-prune |
history | 从归档数组批量移除 id(自动备份,需重启) |
session-health-status |
health | 开关状态与方法表(面板轮询用) |
session-health-scan |
health | 批量体检(默认只返回非 ok 的会话) |
session-health-session |
health | 单会话四门报告 + 处方 |
session-health-repair |
health | 可逆处置(隔离投影缓存记录)+ before/after |
设置命名空间:session-steward;侧边栏入口 id:dsh-session-steward。
两个开关(feature gate)
| 开关 | 字段 | 关闭效果 |
|---|---|---|
| 会话历史文件 | historyFiles(默认 true) |
不注册 session-history-*,不渲染「养老院」页签 |
| 健康检查 | healthCheck(默认 true) |
不注册 session-health-*,不渲染「体检」页签 |
关闭时对应方法返回 { ok: false, error: '子域已关闭(…=false):<method> 未注册' },不留空壳。
四门体检
| gate | 判据 | level |
|---|---|---|
log-integrity |
zstd 多帧扫描 → provenance 展开 → 打包行解包;seq 连续、无撕裂尾帧 | 有读取问题 fail;仅撕裂尾帧 warn |
projection-cache |
~/.dsh/storages/session_projcache/sessions/<id>.json 的 minSeq 与日志末 seq 的 lag + 未结算字段(openStep / activeStep.active / pendingTurnStart / turnBoundary=start) |
滞后且未结算 fail;任一 warn |
lossless-json |
热态 sessionProjections.checkpoint(session) 逐行判定无损 JSON(undefined / 非有限数 / -0 / 稀疏洞 / 非普通原型 / 函数·Symbol·BigInt / 环) |
命中 fail,并给出投影 key → 归属包 |
cold-read |
最后 turn/end 的原因、是否存在未收尾 open step、最后 user 消息之后是否还有 assistant 输出 |
open step fail;interrupted/无 turn/end warn |
处方只给三件可逆的事:① 隔离损坏的投影缓存记录(先备份)② 含未结算 step 时提示等待宿主结算 ③ 输出可执行命令清单。 禁止:改写会话日志、改历史数据、静默丢弃字段。
与 dsh-search-index 的唯一契约
归档文件格式(~/.dsh/storages/workspace.json 的 global.archivedSessionIds):
本插件写、搜索索引只读。格式说明见
dsh-docs-deliverables/dsh-归档文件格式契约-20260914.md。
开发
pnpm install
pnpm typecheck # tsc -b --pretty false
pnpm test # vitest run
pnpm build # tsc -b && tsdown → lib/index.js + lib/client.js
许可
MIT
Operate deliberately
Install and manage
Prerequisites and target Profile
Target: Web Profile
Delivery: Dsh Bundle Git — drscrewdriver/dsh-session-steward#c6d84146e2aa60d4f3ce8cc3b93d0082744d8579。
Verify, update, and remove
Show lifecycle commands
dsh plugin --profile web listCompatibility and access
DSH Web bundle; requires Node.js 20 or later: >=0.1.0-rc.6 <0.2.0-0。
Review compatibility evidence ↗
Risk facts
Reads session logs and projection-cache records; repairs can quarantine projection-cache records after backup.
Evidence ↗Batch archive cleanup removes IDs from the archived-session array with backup and atomic replacement; restart is required.
Evidence ↗Evidence and editorial reviewManifest, Bundle patch, distribution and freshness
Immutable evidence
Review status and source activity
Use the pinned Git bundle path if you need an immutable source reference; verify behavior in a non-critical profile before acting on diagnostic recommendations.
AI reviewed Sep 16, 2026, 2:20 PM UTC。GitHub facts last checked Sep 16, 2026, 2:20 PM UTC。
No material source change has been recorded since this evidence baseline.