easerlee/dsh-session-handoff ↗★ 0

dsh-session-handoff

DSH 插件:上下文压力到阈值时,把当前工作交接给一个新会话(文件式交接包 + handoff_now 工具 + HTTP 接口)。 适合进行超长对话的用户,在Token即将超限时平滑过渡,避免丢失关键上下文。

패키지
dsh-session-handoff
호환성
미검증
Harness peer 범위
*
버전
0.1.2
라이선스
MIT
최근 업데이트
2026. 10. 1.

같은 패키지 이름의 다른 저장소

설치

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

配置

在 profile 的 cordis.patch.yml 里:

- id: dsh-session-handoff
  config:
    enabled: true
    thresholdRatio: 0.85     # 出厂默认 0.6;与 compaction 一起用时调高
    maxCompactions: 2        # 本会话被 compaction 压过几次就交接(0 = 只看压力)
    cooldownMs: 300000
    handoffDir: .dsh/handoff
    recentMessages: 14
    maxChars: 24000
    renameOldSuffix: " [已交接]"
    dryRun: false
键默认说明
enabledtrue关掉就只留 HTTP 接口与工具,不做自动交接
thresholdRatio0.6压力到多少比例触发(0.6 = 60%)。与 compaction 一起用时调高,见下
maxCompactions2本会话被 compaction 压过几次就触发交接(0 = 只看压力)
cooldownMs300000同一会话两次交接的最小间隔
handoffDir.dsh/handoff交接包落盘目录(相对工作区;写绝对路径也行)
recentMessages14交接包里带多少条最近用户消息
maxChars24000交接包字数上限
renameOldSuffix [已交接]旧会话改名时加的后缀
dryRunfalsetrue = 只生成交接包,不建新会话(首次验证用)

⚠️ patch 的 config 是整段替换,覆盖时必须把不想改的键一起写上。