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.

套件
dsh-handoff-session
相容性
待驗證
版本
0.6.1
授權
MIT
最近更新
2026年11月3日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:BlueOcean3214/dsh-handoff-session

配置

配置在 cordis.patch.yml 的 config 里。改完把 bundle 关掉再打开(plugin_manager 的 set_bundle),Host 会重新读取包内 patch;只改 JS 不会热更新 Host 半。

键默认含义
turnsWatch / turnsSoft / turnsUrgent10 / 20 / 30轮数阈值
stepsWatch / stepsSoft / stepsUrgent250 / 500 / 900步数阈值
contextWatch / contextSoft / contextUrgent0.40 / 0.60 / 0.85上下文占用比例阈值
handoffDir.dsh/handoffs相对会话 cwd 的交接文档目录
languagezh文档和续接提示语言,zh 或 en
concludeTurntrue交接成功后立刻结束旧回合
autoOpenNewSessiontrue交接成功后 Client 半自动切到新会话
transcripttrue额外导出一份可检索的完整转录旁路
transcriptMaxChars120000转录字符上限,超出时省略中段
transcriptReasoningfalse是否把模型 reasoning 也写进转录
transcriptToolOutputtrue是否把工具参数和工具结果写进转录

默认值参考了用户截图里的 22 轮 / 677 步 / 24%:这个状态会落在 recommended,模型会在下一个干净检查点交接,而不是每轮都打扰。

转录旁路

交接时除了 handoff-*.md,还会在同一个目录写一份 handoff-*.transcript.md:

  • 只收录人类 user/message、助手正文、tool/call 参数、tool/result 输出;默认不写 reasoning,也不写运行时注入;
  • 不会自动塞进新会话的上下文,新会话第一轮只读摘要;缺细节时再 read/grep 这份文件;
  • 超过 transcriptMaxChars 时保留开头 25% 和结尾 75%,中间标注省略;
  • 文件里可能含命令输出、文件内容等敏感信息,交接目录应按项目需要清理或加入 .gitignore。