BlueOcean3214/dsh-handoff-session ↗★ 0
dsh-handoff-session
Durable session handoff for DeepSeek Harness: pressure-aware handoff docs, a searchable transcript, and automatic continuation in a fresh Session.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:BlueOcean3214/dsh-handoff-session说明文档
阅读完整 README ↗配置
配置在 cordis.patch.yml 的 config 里。改完把 bundle 关掉再打开(plugin_manager 的 set_bundle),Host 会重新读取包内 patch;只改 JS 不会热更新 Host 半。
| 键 | 默认 | 含义 |
|---|---|---|
turnsWatch / turnsSoft / turnsUrgent | 10 / 20 / 30 | 轮数阈值 |
stepsWatch / stepsSoft / stepsUrgent | 250 / 500 / 900 | 步数阈值 |
contextWatch / contextSoft / contextUrgent | 0.40 / 0.60 / 0.85 | 上下文占用比例阈值 |
handoffDir | .dsh/handoffs | 相对会话 cwd 的交接文档目录 |
language | zh | 文档和续接提示语言,zh 或 en |
concludeTurn | true | 交接成功后立刻结束旧回合 |
autoOpenNewSession | true | 交接成功后 Client 半自动切到新会话 |
transcript | true | 额外导出一份可检索的完整转录旁路 |
transcriptMaxChars | 120000 | 转录字符上限,超出时省略中段 |
transcriptReasoning | false | 是否把模型 reasoning 也写进转录 |
transcriptToolOutput | true | 是否把工具参数和工具结果写进转录 |
默认值参考了用户截图里的 22 轮 / 677 步 / 24%:这个状态会落在 recommended,模型会在下一个干净检查点交接,而不是每轮都打扰。
转录旁路
交接时除了 handoff-*.md,还会在同一个目录写一份 handoff-*.transcript.md:
- 只收录人类
user/message、助手正文、tool/call参数、tool/result输出;默认不写 reasoning,也不写运行时注入; - 不会自动塞进新会话的上下文,新会话第一轮只读摘要;缺细节时再
read/grep这份文件; - 超过
transcriptMaxChars时保留开头 25% 和结尾 75%,中间标注省略; - 文件里可能含命令输出、文件内容等敏感信息,交接目录应按项目需要清理或加入
.gitignore。