YouHui1/dsh-sessions-diagnosis 预览 preview

YouHui1/dsh-sessions-diagnosis

Diagnose and repair DSH sessions that stopped opening after a harness upgrade — from the CLI, from an agent tool, or from a dashboard in the DSH web UI.

Project Overview项目介绍

dsh-sessions-diagnosis is a diagnostics-and-repair bundle built specifically for DSH (DeepSeek Harness), and it ships alongside a standalone CLI under the same repository. It targets sessions that survived a DSH 0.1.5 upgrade but refuse to open: the harness now performs a closed-vocabulary audit on every message during lazy migration, so any source.kind outside a fixed set of fifteen values aborts the whole migration and surfaces as a meaningless gateway/internal error. Diagnosis deliberately invokes DSH's own released migration chain rather than reimplementing it, so the reported reason matches what the harness hit, and classifies each session as ok, unmigrated, repairable, unrepairable, corrupt, too-new, empty, or unknown down to the offending field.

Installation is dsh plugin --profile web add . from a checkout, or dsh plugin --profile web add github:YouHui1/dsh-sessions-diagnosis for an unlinked copy; no build step, no dependency install, just restart DSH and hard-refresh the browser to see the dashboard under Settings → Session diagnosis. The plugin reads prebuilt JavaScript and resolves DSH's format catalog at runtime, which means the CLI, the agent-tool host half, and the browser dashboard panel all share one core. The CLI runs straight from node bin/dsh-session-doctor.mjs scan|diagnose|repair, and after one npm link it lives on PATH as dsh-session-doctor. This makes the project useful for anyone whose session list still shows conversations that now fail to open, plus archivists and operators who need to migrate a stored profile across DSH versions.

Limits and caveats: Node.js ≥ 22.15 is required for built-in node:zlib Zstandard, DSH 0.1.5-rc.2 is needed for the dashboard and strongest diagnosis, and the CLI degrades on older DSH builds by reporting unknown when no format catalog can be borrowed. If you extend it with a tool, remember ctx.tools.register() validates output.schema at profile boot and only accepts DSH's restricted JSON Schema subset (scalar type, object properties/required/boolean additionalProperties, array items, scalar enum/const, exact-one oneOf); a misplaced keyword throws and dsh web refuses to start. License is MIT, and node test/run.mjs skips real-session cases when .scratch/ is empty.

dsh-sessions-diagnosis 是为 DSH(DeepSeek Harness) 专门打造的会话诊断与修复插件, 配套一个独立 CLI。它针对 0.1.5 升级后无法打开的旧会话: DSH 在迁移时会做闭集词表审计, 消息必须携带固定的 source.kind, 否则整次迁移中止、抛出无意义的 gateway/internal 错误, 磁盘上也不留痕迹。诊断会调用 DSH 自身发布的迁移链(而非重新实现), 把每条会话归类为 ok/unmigrated/repairable/unrepairable/corrupt/too-new/empty/unknown, 并定位出错字段; 修复会生成合法的当前格式后继文件、原文件零修改, 写入前先校验。

安装方式两种: git clone 后在仓库目录执行 dsh plugin --profile web add ., dsh 通过 dsh.bundle.patch 把它软链进 profile 并写入 dsh.profile.bundles, 依赖以 link:<path> 形式保存; 或直接 dsh plugin --profile web add github:YouHui1/dsh-sessions-diagnosis 拉取独立副本。无需打包步骤, 重启 DSH 并在浏览器硬刷新后, 面板出现在 "设置 → 会话诊断"。CLI 可从 checkout 直接跑 node bin/dsh-session-doctor.mjs scan|diagnose|repair, 或 npm link 后用 dsh-session-doctor。该面板同时面向 DSH Web UI、命令行与宿主 Agent 工具调用, 适合升级到 0.1.5 后会话列表仍在但点击报错的用户、运维与归档者。

依赖与限制: 需要 Node.js ≥ 22.15(自带 node:zlib Zstandard)、DSH 0.1.5-rc.2 才能启用插件面板与最强诊断; CLI 在更早版本上可降级为扫描+最小诊断(没有 @deepseek-ai/dsh-session-format-catalog 时返回 unknown)。扩展自定义工具时注意 ctx.tools.register() 在 profile 启动期就校验 output.schema, 仅支持 DSH 受限的 JSON Schema 子集(对象 properties/required/布尔 additionalProperties、数组 items、标量 enum/const、oneOf), 否则 dsh web 拒绝启动。许可 MIT, 测试 node test/run.mjs 在干净 checkout 中即可跳过真实会话测试。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:YouHui1/dsh-sessions-diagnosis

把 YouHui1/dsh-sessions-diagnosis 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-sessions-diagnosis

Diagnose and repair DSH sessions that stopped opening after a harness upgrade — from the CLI, from an agent tool, or from a dashboard in the DSH web UI.

中文说明 · Root cause write-up


The problem

DSH stores each session as a directory holding one immutable file per format generation, and migrates old files lazily when you open them. Since 0.1.5 the final migration step is a closed-vocabulary audit: every message must carry a source.kind from a fixed set of fifteen values, and anything else aborts the whole migration.

One retired value is enough to make a conversation unopenable. The culprit in the wild is at-file-mention — the provenance tag older builds wrote for the synthetic user message created by an @path mention. So the breakage looks arbitrary: it hits exactly the sessions where somebody once typed @.

The session still lists (listing only reads the header), but opening it fails with a generic gateway/internal error that says nothing about the cause. And a failed migration writes nothing, so there is no evidence on disk to inspect.

→ Full root-cause analysis

What this does

Diagnose Runs DSH's own released migration chain over your stored logs, so the reported reason is exactly what the harness hit — not a reimplementation or a guess. Classifies every session as ok, unmigrated, repairable, unrepairable, corrupt, too-new, empty, or unknown (nothing was checked — this build of DSH ships no codec), down to the offending field — what each verdict means.
Repair Produces a valid current-format successor and lets DSH select it. Verified before anything is written. The original file is never modified.
Visualise A dashboard in the DSH web UI: every session with its verdict and reason, plus one-click repair with a dry-run confirmation step.

Screenshots

The dashboard — Settings → Session diagnosis. Every stored session with its verdict and the reason behind it, one Inspect per row, and a repair that always shows its planned edits before it writes anything.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-trust-check 下一个 Next dsh-plugin.github.io →