Introduction

When debugging or reproducing a long session in DSH (DeepSeek Harness), a common issue is the interleaving of original messages, tool calls, and model requests, which makes direct context reading costly. dsh-recap summarizes the new data added in each model request (turn:step) into a single sentence and appends it to a chronological review chain, allowing for a quick view of what a session accomplished.

Overview

  • Name: Howardzhangdqs/dsh-recap
  • Maintainer: Howardzhangdqs
  • Position: Session Recap Plugin for DeepSeek Harness (DSH)
  • License: MIT

It targets DSH’s web/client scenarios, does not write events to the session log, nor does it inject messages; the summary results are persisted in the plugin’s own files.

Core Capabilities

Generate Review Sentence Per Request

The plugin listens to session/event, summarizes the new data of each model request into a sentence, and appends it to the review chain.

The review line is displayed within the conversation, interspersed after the full content of the model request that generated it.

Cache-friendly Incremental Generation

When generating summaries, existing sentences are used as a prefix character by character; apart from the latest new data Δ, the input can almost always hit the provider’s prefix cache.

Zero Write to Main Session

Captured as read-only listening, it does not write any events to the session log, nor does it inject messages.

Persistence writes to the plugin’s own files:

~/.dsh/recap/sessions/<sessionId>.jsonl

Configurable Summary Routing

You can specify the provider and model for the summary route separately.

If not specified, it first follows the session’s current route, then falls back to the host’s default model.

No Thinking Generation

Summary calls default to:

reasoningEffort: 'off'

The DeepSeek adapter maps this to:

thinking: disabled

If the route does not support off, it will automatically degrade to low or omit the field.

HTTP API

Provides the following interfaces:

POST /recap/api/list
POST /recap/api/generate
POST /recap/api/stats
POST /recap/api/clear
POST /recap/api/settings
POST /recap/api/settings.update
POST /recap/api/providers

The HTTP API uses the same browser trust verification as /api.

Model Tools

toolsEnabled is off by default.

When enabled, you can register model tools:

recap_read(limit?)
recap_refresh()

When enabled, the tool schema is sent with session requests.

Rate Limit Retry

When a generation request encounters RATE_LIMIT, it retries with exponential backoff; during the wait, a status indicator in the line will display the rate limit wait information.

Installation and Usage

Prebuilt Installation

This plugin is not published to npm; the official installation uses the prebuilt tarball from GitHub Releases.

Execute the following command:

dsh plugin --profile web add https://github.com/Howardzhangdqs/dsh-recap/releases/download/v0.1.0/dsh-recap-0.1.0.tgz

After installation, restart DSH and force refresh the page:

Cmd/Ctrl+Shift+R

To upgrade, modify the version number in the URL and re-execute.

Source Installation

First, clone and build the source code:

git clone https://github.com/Howardzhangdqs/dsh-recap.git ~/Code/dsh-recap
cd ~/Code/dsh-recap && pnpm install && pnpm build

Add the local dependency in the dependencies of ~/.dsh/profiles/web/package.json:

"dsh-recap": "link:/home/you/Code/dsh-recap"

Append the mount entry in ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: recap
      name: 'dsh-recap'

Then install dependencies:

cd ~/.dsh/profiles/web && pnpm install

If there are manually added mount entries in the profile, please delete them first to avoid duplication.

After the steps above, restart DSH and force refresh the page.

The source installation documentation states that README requires Node.js ≥ 22.13, pnpm ≥ 10; the engines field in package.json declares node >=20.

Typical Usage

Settings Page

Modify the following in the “Session Recap/recap” section of the DSH settings page:

enabled
interval
provider
model
effort

Changes take effect immediately.

Plugin settings are read/written via the plugin’s own /recap/api/settings* routes; DSH’s settings RPC does not open third-party namespaces to the config client.

API

You can manage the review chain via POST /recap/api/<method>:

POST /recap/api/list
POST /recap/api/generate
POST /recap/api/stats
POST /recap/api/clear
POST /recap/api/settings
POST /recap/api/settings.update
POST /recap/api/providers

Model Tools

If toolsEnabled is enabled, you can call:

recap_read(limit?)
recap_refresh()

Applicable Scenarios and Notes

Suitable for developers, debuggers, or operations personnel who need to view “what each request did” in a DSH session.

Notes:

  • It runs as a DSH plugin alongside DSH, reading session/event and writing to the plugin’s own files; check the source code and license before installing.
  • The license is MIT.
  • Whether effort: off truly disables thinking depends on the route adapter and the model’s reasoningEfforts declaration; if the route does not support off, it will silently downgrade to low or omit the field without error.
  • Modifying parameters related to truncation and prompt structure will invalidate the prefix cache, which is a one-time cost.
  • This plugin is not published to npm; please use the prebuilt tarball from GitHub Releases.

Links

GitHub Repository:

https://github.com/Howardzhangdqs/dsh-recap

The documentation does not provide a directory page URL.