dsh-session-handoff(中文)
English | 中文
DSH 宿主插件(薄适配层):观测 → 阈值触发 → append-only 建议注入 → approval 门 → 调用 harness-automation CLI。 完整设计与验收记录见 README.md、docs/designs/session-handoff.md(v0.3)、docs/acceptance-p2.md。
一句话定位
- 观测(投影单元
sessionHandoff+ change feed)→ 阈值判定(turns/steps/llmMs/titles/retries/splices)
→ 下一 open turn 注入确定性建议(append-only、零重复)→ approval 门 → 允许后 spawn harness-automation session handoff(dry-run 默认 true,零写入)。
- 插件不含任何交接/状态机/模板逻辑;阈值只读项目
.harness/session-workflow.yaml(缺失时用 CLI 包内默认)。
安装(web profile)
dsh plugin --profile web add dsh-session-handoff或开发快捷方式:在 ~/.dsh/profiles/web/cordis.patch.yml 插入 - id: dsh-session-handoff / name: 'file:///Users/zhichao/DSH/dsh-session-handoff/lib/index.js' 行,重启 web。
验收结论(P2,全部通过)
- web profile 装配成功;信号命中 → 下一 open turn 注入建议(本会话实测:llmMs 31min、titles 2、steps 151 三次触发,零重复)。
- 注入前后前缀对比:
cacheObs {before:1280, after:222464},KV 缓存命中未下降。 - 批准 → CLI 完成一次 handoff(dry-run):
approval/decided{allowed-once}→ spawn CLI →
{"ok":true,"phase":"draft","seed":"…"} → seed 注入会话;零写入已核验。
仓库
- 主:
github.com/realpkuasule/dsh-session-handoff;镜像:github.com/xiaozhiaixue/dsh-session-handoff - 仓库带
dsh-plugintopic(DeepSeek Harness 插件生态发现要求)。 - 插件清单:
dsh.plugin.json;bundle 装配:cordis.patch.yml(package.jsondsh.bundle.patch声明)。 - License: MIT