DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Session Migration Repair — DSH Plugin for DeepSeek Harness
← Plugins
S

dsh-session-migration-repair

Session Migration Repair

Repair legacy DSH session logs (format v0) that the current build refuses to migrate: scan defects, back up, fix in place, and verify offline against the real migration chain.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:zzdhsxk/dsh-session-migration-repair#82e63bd5a10d2cde5ba8f47ccc100ac36cd5534e
READMECompatibilityVersions

Compatibility and provenance

Session Migration Repair is published as dsh-session-migration-repair and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
9/11/2026

Versions

0.1.0stable
9/11/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/11/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in memory-context.

Memory Plugin@openviking/dsh-memory-pluginOpenViking memory and context bundle for DeepSeek HarnessContextdsh-contextA DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.Weknora@wxg-prc-cpg/dsh-weknoraWeKnora knowledge retrieval tools for DeepSeek Harness (dsh): semantic search, document reading and RAG/agent answers over your own knowledge bases.Memsearch Dsh@zilliz/memsearch-dshMemSearch plugin for DeepSeek Harness: shared markdown memory across agents, with capture, pre-step context injection, memory-recall skill, and a skill-candidate review panel.

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