插件目录 / Developer / dsh-todo-freshness-guard
dsh-todo-freshness-guard
已验证 · 实测可装 lamost423
✓ 持续维护 基于 7 个官方 DSH 包 纯 TypeScript
1Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-15最近推送
跨平台平台
功能简介
树外DeepSeek Harness守卫,防止过期的todo_write状态
我们的评价
可用 — 实测通过,早期项目
可用 — 实测通过,早期项目
树外DeepSeek Harness守卫,防止过期的todo_write状态 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
DSH Todo Freshness Guard|DSH 待办新鲜度守卫
English | [简体中文](README.zh-CN.md) **Problem it solves:** During long agent turns, the model may keep calling tools without updating its unfinishedtodo_write list. The visible plan then stops matching the work actually being done.
**Most painful failure:** The agent is still active, but the user is looking at stale status—completed work still appears pending, new blockers are missing, and the next step is unclear. This removes progress visibility exactly when a long task needs it most.
**How it fixes it:** This out-of-tree https://github.com/deepseek-ai/deepseek-harness Guard reminds the model to reconcile the complete Todo list, then blocks ordinary tools if the list remains stale. todo_write and the outer run_code recovery path always remain available.
**解决的问题:**Agent 在长任务中可能持续调用工具,却不更新未完成的 todo_write 列表,导致用户看到的计划与真实执行状态脱节。
**最痛的问题:**Agent 明明还在运行,用户看到的却是过期状态——已完成事项仍显示未完成,新阻塞没有记录,下一步也无法判断。任务越长,进度越不可信。

Behavior
After a successfultodo_write contains unfinished items, the Guard counts non-bookkeeping tool attempts for that Session:
- At reminderAfterCalls, it injects one model-visible reminder to reconcile the complete todo list.
- After blockAfterCalls, it denies ordinary tools until another complete todo_write replaces the list.
- Native calls and Code Mode SDK sub-dispatches share the counter.
- todo_write always remains reachable.
- The outer run_code transport remains reachable so Code Mode can call todo_write.
- A completed or empty todo list disables enforcement.
This plugin fixes stale todo_write state. It does not replace or patch the filesystem Write tool.
Compatibility
- DeepSeek Harness:0.1.0-rc.6
- Node.js: ^22.19.0 || >=24.0.0
- Package status: community preview
Install
Install the compatible DSH CLI, then add the release archive to the profile that should enforce the Guard: ``sh
npm install --global @deepseek-ai/[email protected]
dsh plugin --profile web add https://github.com/lamost423/dsh-todo-freshness-guard/releases/download/v0.1.1/dsh-todo-freshness-guard-0.1.1.tgz
dsh web
`
To install from a checkout instead:
`sh
git clone https://github.com/lamost423/dsh-todo-freshness-guard.git
cd dsh-todo-freshness-guard
corepack enable
pnpm install --frozen-lockfile
pnpm build
dsh plugin --profile web add .
dsh web
`
The package contributes this default patch layer:
`yaml
- insert:
- id: todo-freshness-guard
name: dsh-todo-freshness-guard
config:
reminderAfterCalls: 5
blockAfterCalls: 8
`
Profile and command-line patch layers applied after this bundle may replace the row configuration. blockAfterCalls must be an integer greater than reminderAfterCalls; both values must be positive integers.
Remove it with:
`sh
dsh plugin --profile web remove dsh-todo-freshness-guard
`
Verify
`sh
pnpm check
pnpm pack --pack-destination /tmp
`
The test suite covers the native and Code Mode policies, concurrent resets, Loader composition, the packed Bundle contract, and an actual Web startup through official DSH 0.1.0-rc.6.
License
MIT. Derived portions retain the DeepSeek Harness license; see [NOTICE`](NOTICE).
安装
🧩 让 Agent 自动装(推荐)
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-todo-freshness-guard」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:lamost423/dsh-todo-freshness-guard Headless(CLI)profile:
dsh plugin --profile headless add github:lamost423/dsh-todo-freshness-guard 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。
适合谁
想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。
二次开发建议
工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。