Skip to content

dsh-session-health

Type plugin Category Memory & context
Stars ⭐9 Status ✅ active
Capabilities observability, files Updated 2026-08-14

📖 About

English DSH 会话健康检查插件 —— 对 $DSH_HOME/sessions 下的多帧 zstd 会话文件做帧级扫描诊断(torn / 损坏 / 空会话 / stray 文件),输出健康报告与清理建议。只读:绝不修改或删除任何文件。 仓库:https://github.com/omdsh-dev/dsh-session-health(public)

✨ Key Features

  • 只读保证:绝不修改/删除任何文件(测试覆盖"扫描后文件字节数不变",见 files.spec SH-06 用例)
  • 路径围栏:session id 严格目录名白名单(防 ../ 穿越);绝对路径与最终文件均做 fs.realpath 真实路径 containment(防符号链接/junction 逃逸);枚举用 lstat 拒绝 symlink
  • 零业务依赖:zstd 帧扫描器为独立实现(DataView 读字节,RFC 8878 结构,与官方 scanZstdFrames 差分一致)
  • 深度分析可选deep: true 时动态 import 官方解码器;解析失败明确降级 deep: "unavailable",绝不静默

📦 Install

# 交互式(web)profile
dsh plugin --profile web add github:omdsh-dev/dsh-session-health
# 一次性任务(headless)profile —— dsh run 默认使用 headless
dsh plugin --profile headless add github:omdsh-dev/dsh-session-health

🚀 Quick Start

dsh plugin --profile web add dsh-session-health-*.tgz