How to use dsh-session-health
Frame-level scan diagnostics for session files (torn/corrupt/empty detection).
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
Frame-level scan diagnostics for session files (torn/corrupt/empty detection).
— source: plugins.ai_summary
Install & verify
dsh plugin --profile web add github:omdsh-dev/dsh-session-health
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- 只读保证:绝不修改/删除任何文件(测试覆盖"扫描后文件字节数不变",见 files.spec SH-06 用例)
- 路径围栏:session id 严格目录名白名单(防
../穿越);绝对路径与最终文件均做fs.realpath真实路径 containment(防符号链接/junction 逃逸);枚举用 lstat 拒绝 symlink - 零业务依赖:zstd 帧扫描器为独立实现(DataView 读字节,RFC 8878 结构,与官方
scanZstdFrames差分一致) - 深度分析可选:
deep: true时动态 import 官方解码器;解析失败明确降级deep: "unavailable",绝不静默 - 输入范围固定(sessions 目录),无网络、无执行面
— source: plugin_wiki.readme_en (fallback readme_raw)
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule