DeepSeek Harness Plugin

interrice/dsh-handoff-card

Stars ★ 0 Category Sessions & Messages Added 2026-12-01

One-click handoff card: distills the current session log into HANDOFF.md (pending todos, recent requests, changed files, token cost summary) so a new session can continue from the card instead of switching models mid-session.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:interrice/dsh-handoff-card

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

中文说明

A sidebar panel plugin for DeepSeek Harness (DSH). One click distills the current DSH session log into a HANDOFF.md handoff card — pending todos, recent user requests, changed files, and a cost summary. In a new session, send read HANDOFF.md, then continue from the todos to pick the work up again, instead of switching models mid-session and paying for a cold prompt cache.

What it does

The plugin adds a "Handoff card" panel to the DSH sidebar. From the panel you can:

  • Pick a session from a dropdown (defaults to the most recently modified one).
  • Click Generate card to write HANDOFF.md into your workspace.
  • Copy the first message to send in the next session, and copy the generated file's path.

The generated card contains:

  • Project / current task (session title)
  • Pending todos (from the last todo/write in the session)
  • Recently completed todos
  • The last few real user requests, in order
  • Files recently changed by write/edit tool calls
  • Cost overview: user messages, model steps, model switches, input/output/cache-read token totals
  • Instructions for the new session

How it works

The Host half (index.js) registers three HTTP routes on the DSH connection:

Route Method Purpose
/api/__handoff/generate POST Regenerate HANDOFF.md. Body: { "sessionId": "..." } (optional; defaults to the newest session). Returns a summary JSON.
/api/__handoff/status GET Whether HANDOFF.md exists, plus size and mtime.
/api/__handoff/sessions GET List up to 80 sessions (id, title, mtime) found in the log directory.

The generator locates session logs under ~/.dsh/sessions, decodes the multi-frame zstd session.v4.jsonl.zstd files with Node's built-in zlib.zstdDecompressSync, extracts events (user/message, todo/write, tool/call, model/selection, assistant/message usage, …), and renders the Markdown card. The Client half (client.js) is a React sidebar panel that calls these routes.

Install

dsh plugin add github:interrice/dsh-handoff-card

Then restart or reload DSH so the bundle patch (cordis.patch.yml) is applied.

Configuration

By default the plugin uses process.cwd() of the DSH host process as the workspace — that is where HANDOFF.md is written. To pin a different workspace, add a config.workspace entry to the plugin in your profile's cordis patch:

- insert:
    - id: handoff-card
      name: '@interrice/handoff-card'
      config:
        workspace: 'D:/path/to/your/workspace'

Session logs are always read from ~/.dsh/sessions regardless of this setting; config.workspace only controls where HANDOFF.md is written and which session files are preferred when several workspaces share the log root.

Requirements

  • Node.js with zlib.zstdDecompressSync (Node 22.15+ / 23.8+) in the DSH host.
  • DSH with the zstd session-log format (session.v4.jsonl.zstd).

License

MIT, see LICENSE.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.