Wang-Lin-Chang/dsh-anchor

Wang-Lin-Chang★ 0TypeScript最后同步: 2026-08-20

在 GitHub 打开

README 摘要

dsh-anchor Long-running sessions without limits. Every high-entropy tool action gets a pre-committed intent and immediate reconciliation; the anchor tree on disk is the session's source of truth. Crash the process, rescan the tree, adopt, continue — nothing is lost. 长程任务执行无限制。 每个高熵工具动作预承诺意图 + 当场对账;磁盘上的锚点树就是会话真相源。进程崩了,扫树、收养、继续——进度零丢失。 为什么存在 / Why this exists 主流对"长程任务"的答案靠两样东西:上下文压缩(丢精度)和记忆检索(丢一致性)。真实的翻车史数据说: 失败的主因从来不是"忘了",是动作打到了环境的错误假设上 (副作用失控:编码损坏、杀错进程、状态泄漏)。 dsh-anchor 换一条路: 不记过去,锁定未来。 - 翻车在 当下 现形,不是事后追查 - 锚点树 = 会话进度真相: 会话死了,树还在 ;新会话扫树收养续跑(对齐官方 subagent 的 cold resume 语义,且比它多了环境对账) - 对应官方公开痛点:force-kill 丢 write-behind 尾部( 483)→ 我们零缓冲即时落盘;一条坏日志杀死会话( 1593)→ 我们的真相源是目录结构,坏了一个锚点只损失那一步 谁适合用它 / Who is this for - 长程会话 (几十上百步)的操盘手——被"动作打到错误假设"坑过的人:编码被改坏、杀错进程、状态泄漏; - 会话中途崩溃后想 找回进度真相 的人——锚点树在会话日志之外,冷启动扫树收养(clean / dirty / contaminated / fresh); - 需要 审计轨迹 的人——每个高熵动作的 intent/pre/post 当场落盘,"当时预期 vs 实际"可查可复现。 不适合 :三五步就结束的短会话——采样纪律(最小间隔 7)的锚点成本用不上。 For long multi-step sessions where a wrong assumption hits the environment — and for anyone who wants the session's progress truth to survive the session itself. Not for short conversations. 工作原理 / How it works 骑在官方扩展点上,零侵入: 官方 seam 我们的挂载 tools/pre-exec…

在 GitHub 查看完整 README →
工具/开发dshdsh-plugin

分类