DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Tool Failure Journal — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
T

@dsh-external/dsh-tool-failure-journal

Tool Failure Journal

失败日志:每次异常退出的工具调用都会写入磁盘上的持久化 JSONL 日志,按错误特征进行聚类,并可由代理通过 `failure_journal` 工具读取。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:catsenior507/dsh-tool-failure-journal#8aa4fbfc243d4eee33510c2e51a6b5f55e65f640
README兼容性版本

兼容性与来源证明

Tool Failure Journal 以 @dsh-external/dsh-tool-failure-journal 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/10

版本

0.1.0stable
2026/9/10

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/9/10
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序

README

Failure Journal

The same error, five times, is one row — written to disk before it scrolls away.

A DeepSeek Harness host plugin that appends every tool call that exits abnormally to a durable JSONL journal, folds near-identical failures into signatures with counts, and exposes the whole thing to the agent as one tool: failure_journal.

English · 简体中文


The problem

A coding agent does not only fail. It fails the same way over and over, and the evidence leaves the context window before anyone can see the pattern: the tool result is folded, compacted, or simply buried under the next four attempts.

The harness keeps a session log — but the session log is the model's context. It is rewritten, folded, and pruned. It cannot be the place a failure history lives.

So this plugin keeps a second record, outside the context window, in a format that outlives the process.

What it captures

One listener on tools/result, which is the harness's own final notification for a call — emitted after pre-policy, guards, the body, post-policy, and output validation. That single hook covers:

  • a tool that threw
  • a tool whose return value violated its declared output schema
  • an unknown tool name
  • a call denied before dispatch
  • a call cancelled by the caller

One hook instead of four, and no polling.

Each record carries its own context, because a record has to stay useful after the session it came from is gone:

{"v":1,"at":"2026-09-11T00:31:07.412Z","sessionId":"session-c9a2…","callId":"call_00_…",
 "turn":12,"step":3,"tool":"pwsh","aborted":false,"errorCode":"COMMAND_NOT_FOUND",
 "message":"'lake' is not recognized as an error…","messageHead":"…","argsChars":41,
 "args":"{\"command\":\"lake build\"}","content":"…","signature":"9f2c1ab73e04",
 "tag":"failure","recurrence":3,"recurring":true,"firstSeenAt":"2026-09-11T00:28:51.003Z",
 "remediation":["The binary is not on PATH for this shell; …"]}

What makes it more than a log

Signatures. Every failure is hashed to a stable id built from the tool, the error code, and a normalized message — paths, timestamps, UUIDs, and long numbers replaced by placeholders. Forty near-identical failures become one row with a count, which is the unit a reader can act on.

regression: true. A tool that already succeeded earlier in the session and fails afterwards is marked. That is the strongest signal in the journal: something that worked has stopped working, and it points at whatever changed in between.

aborted is not failure. A withdrawn call is tagged separately and never counted as a defect. Counting cancellations as failures would poison the recurrence numbers that make the journal worth reading.

Shipped remediation. For the failure classes whose fix is unambiguous — EDIT_NO_MATCH, EDIT_NOT_UNIQUE, COMMAND_NOT_FOUND, TIMEOUT, PERMISSION_DENIED, SYNTAX, BAD_ARGS — the record carries the cause and the next action that is actually different from the one that just failed.

The tool

ActionWhat it answers
statsWhat keeps breaking, folded by signature. Start here.
listWhat failed most recently, newest first
showEvery occurrence of one signature, by prefix
sessionsWhich journal files exist on disk, with sizes
clearArchive the live page and start fresh
selftestProve the observer is attached and the directory is writable

stats is the one that changes behaviour. "The same error five times" printed as one row with count=5, recurring=true is a different instruction to a reader than five separate stack traces.

Install

The plugin is installed as a package into a dsh profile, the same way every other dsh plugin is. dsh plugin forwards to pnpm inside the profile directory, so any spec pnpm accepts works.

# from GitHub (the published form)
dsh plugin --profile web add github:catsenior507/dsh-tool-failure-journal

# a local checkout, while developing
dsh plugin --profile web add /absolute/path/to/dsh-tool-failure-journal

web is the shipped GUI profile; substitute headless, sdk, acp, or your own profile name. On Windows, use forward slashes in a path.

Then restart the host so the profile recomposes, and confirm with:

failure_journal action=selftest

selftest reports whether the observer is attached and writes a probe file into the journal directory to prove writability.

What install does not do

  • No build step. The published JavaScript is the source — there is no dist, no bundler, and no prepare script, so nothing runs on install.
  • No dependencies. dependencies and peerDependencies are both empty; the plugin needs only the harness it is loaded into. Cordis is provided by the host at runtime.
  • No native code, no compiler, no network at run time.

Node.js 20 or newer, because the harness itself requires it.

Where it writes

<DSH_HOME>/failure-journal/sessions/<sessionId>.jsonl, one file per session, rotated by size (maxBytes, default 4 MiB, maxRotated generations kept).

Rotated generations are kept, not deleted: a session that loops on one error fifty times is the case worth reading afterwards, and truncating the file at the moment it becomes interesting would defeat the point.

Configure

dsh plugin add already inserted the plugin row. To change the defaults, edit that row's config in the profile's cordis.patch.yml:

- insert:
    - id: tool-failure-journal
      name: '@dsh-external/dsh-tool-failure-journal'
      config:
        maxBytes: 4194304
        clusterThreshold: 3
        excludeTools: ['todo_write']
        recordSuccesses: false
        exposeTool: true

recordSuccesses: true also journals successful calls — useful for "what did the command actually do". Note that success tracking for the regression signal runs regardless; the flag only controls what reaches the disk.

Design constraints worth stating

  • The observer runs on every tool call in the process, so it must never throw and must never block. Every derived field reads through a total accessor, and every write is a synchronous one-line append — microseconds, and it survives the process dying mid-turn. An async queue would lose exactly the records this plugin exists to keep.
  • A store failure is counted, not hidden. selftest reports records written, dropped, and rotated, so a journal that stopped working says so.
  • A tool call is never failed by this plugin. Writing happens in a listener the harness contains; the journal cannot break the tool it observes.

Development

npm test        # 31 tests, including a real cordis mount and a real event

npm test needs @deepseek-ai/cordis resolvable, which comes with a dsh installation. Running from a checkout rather than an installed package, point node_modules at the profile's copy — on Windows a directory junction works.

The mount test registers a fake tools service on a real cordis Context, emits the genuine tools/result event, and reads the journal file back through the tool — because "inject was declared wrong so the observer never attached" is exactly the failure a hand-rolled fake context cannot catch.

FileRole
lib/index.jsCordis plugin: resolve config, attach, register
lib/observer.jsThe tools/result and session/event listeners
lib/store.jsJSONL storage, rotation, archiving
lib/signature.jsFailure identity, normalization, remediation catalog
lib/tool.jsThe failure_journal tool

License

MIT