WeiYe6/dsh-session-handoff

Plugin插件 Native原生 ⭐ 4 MIT Sessions & Context会话与上下文

将你长时间的DSH会话交接给一个干净的会话:/handoff 会使用LLM总结对话,在同一工作空间中创建新的会话和代理,注入交接文档,并自动打开它。

Project Overview项目介绍

This is a native command plugin built exclusively for DeepSeek Harness (DSH), designed to solve context bloat in long running DSH conversations. To install the plugin, you can either download a pre-built release tarball, or clone the source repository, run npm install to pull dependencies, then execute npm run build and npm pack to generate the installable tarball. After that, you run the DSH CLI command dsh plugin --profile <your-profile> add ./<tarball-path> to add it to your DSH configuration, then restart DSH to activate the plugin.

After installation, you can run the /handoff command in any DSH conversation input box to trigger a session handoff. By default, the command summarizes the last 8 user messages, but you can also specify a custom number of messages or add the all flag to summarize every message in the current conversation. Once the LLM generates a structured summary covering task goals, progress, key decisions, relevant files, next steps, and open questions, the plugin creates a new session with the same workspace and agent settings, then automatically opens it for you. It is ideal for DSH users working on long-running tasks that hit context limits.

The plugin requires Node.js version 22.19 or newer, and only officially supports DSH versions from 0.1.0-rc.5 through 0.1.0-rc.8, plus 0.1.1-rc.2. It is released under the open source MIT license, so you can modify and redistribute it freely per the license terms. Currently, the generated handoff summary is only stored in the new session, and there is no option to save it to a local file like HANDOFF.md, which is planned as a future enhancement. When generating the summary, your selected conversation text is sent to your configured LLM, so you should be aware of this privacy note.

这是一个专为DeepSeek Harness(DSH)开发的原生命令插件,核心功能是帮用户完成长对话的会话交接,可通过LLM总结当前对话内容,在同一工作区内新建干净的会话和代理,保留原会话不变,自动打开新会话让模型从总结继续任务,避免上下文膨胀。安装可通过下载预构建压缩包,也可克隆源码后执行npm install、npm run build、npm pack生成压缩包,再通过dsh plugin命令安装到用户配置文件。

用户可在任意对话输入框中执行/handoff命令,默认总结最近8条用户消息,也可指定总结条数或总结全部对话。执行命令后,插件会生成结构化总结,包含任务目标、当前进度、关键决策、涉及文件、下一步计划和遗留问题,完成后自动跳转到新建的会话。适合需要处理超长对话、避免上下文过载的DSH用户使用。

该插件要求Node.js版本为^22.19或>=24,仅支持DSH 0.1.0-rc.5到rc.8以及0.1.1-rc.2版本,暂不支持0.1.2-alpha.1及以上。插件采用MIT许可证开源,当前总结文档仅存储在会话中,暂不支持写入本地磁盘,使用时会将选中的对话内容发送给配置的LLM生成总结,需要注意隐私。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:WeiYe6/dsh-session-handoff

把 WeiYe6/dsh-session-handoff 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-session-handoff

License: MIT Node dsh

English | 中文

Hand your long DSH session over to a clean one. /handoff summarizes the recent conversation with an LLM, creates a brand-new session + agent in the same workspace (no history copied), injects a structured handoff document as its first message, and auto-opens it — the model continues from the summary instead of replaying the whole old history. The origin session is untouched.

Features

  • One command — /handoff [<N>|all] (defaults to the last 8 user messages; all covers everything)
  • Clean handoff — a fresh session with the origin's workspace, model route, and agent preset (system prompt / tools / skills), no context bloat
  • Structured summary — 任务目标 / 当前进度 / 关键决策 / 涉及文件 / 下一步 / 遗留问题
  • Auto-open — the client half waits for the new session to be ready and navigates to it (each child auto-opens once; history replay never re-jumps)
  • Robust by default — summaries run with thinking off (fast, cheap), oversized excerpts keep the newest messages instead of erroring, and finish reasons (max-tokens / error / aborted) are translated into actionable errors
  • Zero core changes — a single dsh.bundle.patch row; only public services are used

Install

# 1. Build the bundle from source (or grab a release tarball)
npm install && npm run build && npm pack     # → dsh-session-handoff-0.2.1.tgz

# 2. Install into your web profile
dsh plugin --profile web add ./dsh-session-handoff-0.2.1.tgz

# 3. Restart and verify the row is mounted
dsh web
dsh --profile web --dump-config | grep handoff
# expected: # == dsh-session-handoff / - id: handoff / - name: dsh-session-handoff

Dev-time source link (dsh plugin --profile web add D:/path/to/dsh-session-handoff) requires the source dir's node_modules to resolve @deepseek-ai/* peers; prefer the tarball.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-tailscale-sync 下一个 Next dsh-session-timeline →