Pular para o conteúdo principal
I

dsh-handoff-card

interrice/dsh-handoff-card

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.

Instalar

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

README

dsh-handoff-card

中文说明

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:

RouteMethodPurpose
/api/__handoff/generatePOSTRegenerate HANDOFF.md. Body: { "sessionId": "..." } (optional; defaults to the newest session). Returns a summary JSON.
/api/__handoff/statusGETWhether HANDOFF.md exists, plus size and mtime.
/api/__handoff/sessionsGETList 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.

Plugins relacionados