Introduction¶
DeepSeek Harness (DSH) faces context-space limitations when handling long conversations. The default compression mechanism clears uncompressed context after reaching a threshold, causing loss of historical conversations. dsh-session-archive-plugin provides a supplemental layer: it automatically archives the session before compression and supports full-text search of historical records after compression.
Plugin Overview¶
This is a DSH plugin maintained by honyKing, categorized as “Memory.” It packages the session-archive skill into an official DSH bundle plugin. After installation, it provides two model tools and one packaged skill, without manually configuring the ~/.agents/skills directory.
Installation and Activation¶
After installation, you must restart dsh web for the tools to take effect.
# GitHub(推荐)
dsh plugin --profile web add git+https://github.com/honyKing/dsh-session-archive-plugin.git
# Gitee(国内镜像)
dsh plugin --profile web add git+https://gitee.com/xiyoudada/dsh-session-archive-plugin.git
Core Features¶
archive_session Tool¶
This tool decodes the complete log of the current DSH session (zstd format) into a readable archive. It generates a plaintext jsonl file and a Markdown summary, saved to the session_archives/ directory in the workspace.
- Supports idempotent operations: automatically skips when new data is below the threshold (default 1MB).
- Supports the
statusOnlyparameter: only queries the current context usage percentage.
search_archive Tool¶
This tool performs full-text search over historical conversations.
- Prioritizes searching
session_archives/*.mdfiles. - If no match is found, automatically decodes recent session logs for direct scanning.
- Supports multi-word AND logic,
limitto restrict the number of results, and thedeepparameter.
Skill Integration¶
The plugin registers the session-archive skill via the skill-filesystem provider. After compression, the model can proactively fall back to searching this skill to retrieve historical information.
Configuration and Dependencies¶
Configuration Items¶
The plugin supports overriding default configuration in a profile’s cordis.patch.yml:
- id: session-archive
config:
scriptsDir: skills/session-archive/scripts
pythonBin: python
timeoutMs: 120000
reArchiveGapMb: 1
Environment Dependencies¶
- Requires a Python environment.
- Node.js version must be
^22.19.0or>=24.0.0. - Peer dependencies are
@deepseek-ai/cordis,@deepseek-ai/dsh-tools, and@deepseek-ai/schemastery.
Notes¶
- After installation, you must restart
dsh web. - The plugin runs with the permissions of the current dsh process; you should inspect the source code and license before installation.