dsh-transfer-export: DSH Session Export Plugin

Introduction

DSH (DeepSeek Harness) session data currently has no official export capability. If you want to back up conversations, perform secondary analysis, or organize them into notes, you can only copy and paste manually. Existing export solutions either provide only a single format or over-mask data, making it impossible to restore details. Below is a client-side plugin that exports sessions into two files: a JSON fidelity layer + a Markdown reading layer (dual-layer by default). It can also optionally export a single-file HTML, covering different use-case needs.

What It Is

dsh-transfer-export is a DSH client plugin published by maintainer vu345. It is triggered via the /transfer-export command or the message action bar button, exporting the current or a specified session into JSON, Markdown, and HTML formats. By default it outputs a JSON + MD dual layer: JSON handles the full normalized events and metadata, MD handles the reading layer, and HTML serves as an optional distribution layer.

Core Features

  1. Export Formats
    - JSON fidelity layer: complete normalized events + metadata, no truncation. Future conversions to docx/HTML/re-rendering can be derived from this layer.
    - Markdown reading layer: turn headings, collapsible tool calls, truncation with annotations for oversized outputs. Suited for manual review, note-taking, and diffing.
    - HTML single file (--html optional): self-contained, viewable offline, printable.

  2. Entry Points
    - Command: /transfer-export.
    - Message action bar button: each assistant reply’s action bar has a download tray icon at the end, with a tooltip reading “Backup export: JSON + Markdown.” Clicking it exports the current session with default options.

  3. Command Parameters

   /transfer-export                    # current session → JSON + MD dual files
   /transfer-export --html             # additionally export HTML
   /transfer-export --only md|json|html
   /transfer-export --id <sessionId>   # export any historical session (including pre-plugin)
   /transfer-export --last-turns 5     # only export the last 5 turns
   /transfer-export --out <dir>        # override default output location (flag goes before sub-flags)
   /transfer-export --mask             # anonymize (no masking by default: backup fidelity first)
  1. Output Location & File Naming
    - Default output path: ~/.dsh/exports/dsh-transfer-export/ ($DSH_HOME takes precedence).
    - File name: transfer-<id8>-<timestamp>.{json,md,html}.
    - Same-name files get an auto-incrementing -2 suffix; writes are atomic.

  2. Export Semantics
    Only exports “surface events actually seen by the user”: genuine user inputs (source.kind==='user', with injected events stripped and counted), assistant replies (text/reasoning/tool-call), tool calls and results (paired by callId; mismatches adopted by arrival order; unresolvable ones logged as orphan), and an output manifest. Reasoning goes into the JSON layer only, not the MD layer.

  3. Competitive Positioning (Comparison)
    | | This Plugin | dsh-transcript-export | dsh-session-export | dsh-session-exporter |
    |—|—|—|—|—|
    | Default output | JSON+MD dual layer | single format, user-chosen | primarily single command, single format | single format |
    | JSON fidelity layer | ✅ complete + schemaVersion | yes (with schema) | yes | JSONL |
    | Default masking | No (backup fidelity) | Yes | No (flag) | Yes |
    | Output location | centralized ~/.dsh/exports | ~/.dsh/exports | session cwd | specified path |
    | Entry point | command + message action bar button | message action bar button | 5 commands | command + tool |

Installation & Activation

  1. Web Version
   # npm (available after publication)
   dsh plugin --profile web add dsh-transfer-export

   # or from GitHub
   dsh plugin --profile web add github:vu345/dsh-transfer-export
  1. Desktop Version
    - Open Settings → Plugins, and search for dsh-transfer-export.

  2. Local Development Install
    - See docs/DEVELOPMENT.md.

Typical Usage

  1. Export the current session as the default dual layer (JSON + MD)
    - Run /transfer-export in DSH.

  2. Additionally export an HTML single file
    - Run /transfer-export --html.

  3. Export only a specific format
    - Run /transfer-export --only md or /transfer-export --only json or /transfer-export --only html.

  4. Export a historical session (including pre-plugin)
    - Run /transfer-export --id <sessionId>.

  5. Export only the last N turns
    - Run /transfer-export --last-turns 5.

  6. Specify the output directory
    - Run /transfer-export --out <dir>.

  7. Anonymized export
    - Run /transfer-export --mask.

Use Cases & Notes

  • Suitable for DSH users and developers who need to back up full conversations, perform secondary analysis, organize notes, or run diffs.
  • The plugin runs with the current DSH process permissions. Review the source code and license before installing.
  • Documentation entry points: docs/STATUS.md, docs/ARCHITECTURE.md, CHANGELOG.md.

Conclusion

dsh-transfer-export balances data completeness with reading experience through its JSON + MD dual-layer design, and provides flexible entry points via a unified command and action bar button. For scenarios requiring reliable session backup or secondary processing, it is a practical client-side plugin.

  • Directory page: https://www.skillhub.cn/plugins/vu345/dsh-transfer-export
  • GitHub: https://github.com/vu345/dsh-transfer-export
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye