Introduction¶
DeepSeek Harness (DSH) emphasizes a plugin-based architecture, and developers extend core capabilities through plugins. When developing and debugging agents, obtaining auditable, reproducible session evidence is a common requirement. The official /export command usually only provides raw log downloads, with a limited format and low readability. As a plugin, dsh-session-export directly reads ctx.sessionQuery, bypasses the traditional recorder-style data collection approach, and provides DSH with a deterministic session evidence layer.
Plugin Positioning¶
dsh-session-export is a session evidence layer plugin, maintained by developer kittimzhe and licensed under MIT.
It does not handle memory optimization or context compression, but focuses on three directions:
* Auditability: records what happened, in what order, and with what failures.
* Reproducibility: generates stable output files (HTML/Markdown/JSON) and portable reports.
* Operability: supports batch archiving, host path persistence, and real-time terminal statistics.
Core Features¶
The plugin does not rely on in-memory residency or additional recorders, avoiding data drift risks and supporting reads from the canonical session log.
- Session Export
Reads sessions viactx.sessionQuery. Supports exporting as single-file HTML, Markdown, or JSON. The HTML report includes KPI cards, turn timeline, tool-call rankings, error highlighting, and dark/light themes. - Terminal Statistics
Provides the/statscommand to print a statistics card in the terminal, including message count, turns, duration, token consumption, cost estimation, and tool rankings. - Session Archiving
Provides the/archivecommand to package the current session, including sub-agents, into a ZIP file. - Diff Comparison
Provides the/diff <id1> <id2>command to compare differences between two sessions, including common prefix, unique tail, and statistic deltas. - Review Packaging
Provides the/bundlecommand to generate a ZIP package containing the transcript report, raw archive, and evidence manifest, facilitating audit workflows. - Full History
Supports exporting session history from before the plugin was installed.
Installation and Enablement¶
Install the plugin package via npm:
npm install dsh-session-export
After installation, enable the module in DSH’s plugin configuration so that it exposes commands as ctx.commands.
Typical Usage¶
The plugin provides four core commands, all of which run at the human instruction layer, do not enter model history, and do not consume tokens.
- Export Current Session
By default, export Markdown text:
/transcript
Generate an HTML styled report, supporting PDF printing and dark mode:
/transcript --html
- View Statistics
Print a session statistics card in the terminal:
/stats
- Archive Session
Package the current session into a ZIP file:
/archive
- Compare Sessions
Compare differences between two sessions:
/diff <id1> <id2>
- Generate Review Package
Generate a packaged file containing masked information and an evidence manifest:
/bundle --mask --manifest
Applicable Scenarios and Notes¶
- Applicable Scenarios: developers who need to deeply review dialogue quality, troubleshoot tool-call failure causes, generate compliance audit reports, or perform dialogue retrospectives.
- Technical Notes: the plugin runs with the permissions of the current DSH process and does not support direct model writes to files unless tool-exposure mode is enabled. It is recommended to review the source code and license (MIT) before installation.