DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Session Migration Repair — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
S

dsh-session-migration-repair

Session Migration Repair

修复当前构建版本拒绝迁移的旧版 DSH 会话日志(格式 v0):扫描缺陷、备份、就地修复,并根据真实迁移链进行离线验证。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:zzdhsxk/dsh-session-migration-repair#82e63bd5a10d2cde5ba8f47ccc100ac36cd5534e
README兼容性版本

兼容性与来源证明

Session Migration Repair 以 dsh-session-migration-repair 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/11

版本

0.1.0stable
2026/9/11

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/9/11
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Memory Plugin@openviking/dsh-memory-plugin适用于 DeepSeek Harness 的 OpenViking 记忆与上下文套件Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。

README

dsh-session-migration-repair

Repair legacy (format v0) DSH session logs that the current build refuses to migrate: scan → back up → fix → verify offline against the host's own migration chain → write.

English | 中文

The problem

Since DSH 0.1.5 a stored session is migrated through v0 → v1 → v2 → v3 on open, and every step is validated strictly. Fields that older builds wrote empty are rejected by the migration chain, surfacing as "history unavailable" for that session. This tool fixes exactly those logs.

Four deterministic defect classes, all auto-repairable:

ErrorRoot causeFix
released tool-call-chunks row N id and optional name must be stringsstreamed tool-call chunk rows carry an empty id (only the first row used to have it)recover the real id/name from the assistant/chunk tool-call-delta of the same turn|step|index
assistant/message N message content[k] name must be a non-empty stringtool-call block name is empty (often after an earlier repair tool rewrote the chain)recover the tool name from the same step's delta
format v2 assistant/message ... invalid message content kind "tool-call": user/message 0 content[0] id must be a non-empty stringthe block-end tool-call block inside assistant/chunk has an empty id (the outer message is misleading)fill it from the delta as well
tool/call ... does not match one advertised tool calltool/call.arguments no longer equals the advertised block's argumentsalign both sides, preferring the side free of replacement characters (U+FFFD)

Install

As a DSH plugin (registers one model-callable tool plus a bundled skill):

dsh plugin --profile web add dsh-session-migration-repair        # from npm
dsh plugin --profile web add github:<owner>/dsh-session-migration-repair   # from GitHub
# restart dsh web and reload the page

Or use the CLI standalone — zero dependencies, Node ≥ 22.15 (Node 20's node:zlib has no zstd API):

node bin/cli.mjs --help

CLI

dsh-session-migration-repair list                      # list sessions (generation + quarantined files)
dsh-session-migration-repair scan   <session-id|path>  # read-only diagnosis
dsh-session-migration-repair validate <session-id|path># run the full migration chain offline
dsh-session-migration-repair fix    <session-id|path> --yes   # backup → repair → verify → write

Options: --dry-run, --no-fix-arguments, --dsh-home <dir>, --dsh-root <dir>, --json.

Safety

  • Backup first: the original is copied into $DSH_HOME/session-migration-repair/backups/<timestamp>/ and an audit line is appended to audit/repair-log.jsonl.
  • Minimal diff: only lines that actually change are re-serialized (a real 59,289-line session: 148 lines changed).
  • Verify before write: the repaired log must pass the v0→v1→v2→v3 chain locally; the write itself is atomic (temp file + rename).
  • Zero dependencies: multi-frame zstd read/write is built in — DSH logs are multi-frame and the first frame must contain exactly the header line, while Node's own zstd decoder only reads the first frame.

How it works

  1. Multi-frame zstd (lib/core/zstd.mjs): walks physical frame boundaries (frame and block headers only), decompresses frame by frame and decodes UTF-8 once — concatenating per-chunk decodes corrupts multi-byte characters that straddle a boundary.
  2. Defect index: every streamed tool call is announced by an assistant/chunk tool-call-delta carrying the real id and tool name, so every empty field can be recovered.
  3. Offline verification: DSH exposes its own load path as sessionFormatCatalog.createRestore(); this tool drives it, so the verdict matches what the server would do — no restart-and-click loops.

Limitations

  • Only logs that still exist (including .corrupt-* quarantined backups) can be repaired; a session directory removed with rm -rf is unrecoverable.
  • Only the four defect classes above are handled; any other migration error makes fix refuse to write.
  • Text already damaged (U+FFFD) cannot be restored — the tool only guarantees it will not add new damage.

Development

node --test test/*.test.mjs                 # unit tests
DSH_REAL_V0_LOG=/path/to/defective.jsonl.zstd node --test test/*.test.mjs   # regression on a real log

License

MIT