Areium/dsh-fail-logger 预览 preview

Areium/dsh-fail-logger

Plugin插件 Native原生 ⭐ 10 MIT Prompts & Skills提示词与技能

DeepSeek Harness(DSH)插件:自动记录所有执行模式(原生工具 / PTC run_code / 代码内嵌工具调用)的工具失败错因,去重、计数、确定性排序后沉淀进 skill 的机器维护实录区段——让 Agent 越用越少错。

Project Overview项目介绍

dsh-fail-logger is a native plugin built specifically for DeepSeek Harness, designed to automatically record tool call failures that occur during agent execution. It captures failures from both native tool mode and PTC Code mode, only logging failures that are explicitly marked with isError: true in the tool result. It processes the captured failures through normalization, deduplication, frequency counting, deterministic ranking, TTL-based pruning, and redaction before storing them in a machine-maintained section of the relevant skill. Non-zero exit codes that are not marked as explicit errors are not logged, per the plugin’s strict trigger conditions. This ensures only genuine execution failures are kept in the log.

The plugin operates as a pure observer, using the same session log event hook that the official DSH telemetry plugin uses. It does not inject any services or wrap runtime code, so it can never alter or interfere with the normal execution of the agent. It sorts failures by frequency, so the most common failure causes appear at the top of the log section, making them easily visible to the model in subsequent sessions. By default, it also injects a small set of always-on system prompt rules to help the model avoid common execution mistakes before they happen.

The plugin can be installed via multiple methods for DSH, including npm install, GitHub release tag install, or manual patching of your DSH profile’s cordis.patch.yml file. After installation, you just need to restart DSH for your target profile, and it works out of the box with zero required configuration. All configuration options are optional, and you can customize things like the log storage directory, maximum entries per category, TTL for old entries, extra redaction rules, and ignore patterns. It is released under the open source MIT license, and you can run a simple two-step smoke test to verify it is working correctly after installation.

dsh-fail-logger 是专为 DeepSeek Harness(DSH)开发的原生插件,核心功能是自动记录 DSH 代理运行过程中发生的工具调用失败事件。无论代理运行在原生工具模式还是 PTC 代码模式,只要工具运行结果被标记为错误,就会被记录到对应技能的机器维护分区中,经过归一化去重、频次计数、确定性排序、TTL过期修剪和敏感信息脱敏处理,整理后的失败记录会供后续会话加载该技能时供模型参考。

这个插件作为纯观察者,通过和官方遥测插件相同的会话日志钩子获取失败数据,不会注入服务、包装运行时,也不会影响代理的正常执行流程。它会按分类整理高频失败原因,将出现次数最多的失败排在前列,帮助模型在后续操作中避开同样的错误,逐步降低整体失败率。它还默认自带 Always-on 提示规则,帮助模型提前避免常见的执行错误。

安装可通过 npm 或 GitHub 标签完成,DSH 安装后重启对应配置文件即可开箱使用,所有配置项均为可选。插件采用 MIT 许可证开源,所有选项可自定义,包括日志目录、最大条目数、信息保留时间、脱敏规则、忽略列表等。用户还可以通过触发一个确定的失败来验证插件是否正常工作。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 10 stars - an early-stage project星标 10,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-fail-logger

把 Areium/dsh-fail-logger 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

中文 | English

dsh-fail-logger

CI Awesome DSH Plugin npm

An all-mode tool failure recorder for DeepSeek Harness: whether the agent runs in native mode or PTC (Code Mode), any tool failure is automatically written into the machine-maintained section of a skill — normalized-dedup, counted, deterministically ranked, TTL-pruned, and redacted — so the next session's model sees the most common failure causes when it loads the skill. Fail less over time.

Coverage matrix & trigger conditions

Execution mode Failure source Recorded as (kind / message)
Native tools (read/grep/write and third-party plugin tools…) tool/call + tool/result (tool-result block isError=true) tool / [read] ENOENT: no such file …
PTC run_code failures tool/result (isError=true) official kind (exception/timeout/abort/…) / raw message
Nested tool calls inside a code program (tools.* throwing) tool/code-dispatch (isError=true) tool / [bash] exit code: 1

Trigger condition: a failure is recorded only when the tool result is marked isError: true. A non-zero shell exit code does NOT trigger recording (e.g. exit 1 is presented as plain text [exit code: 1], not an error) — only genuinely thrown tool calls (read on a missing file, grep failure, run_code crash, …) enter the log.

The observation point is the session log (session/event) — the exact same hook the official telemetry plugin uses. Pure observer: no service injection, no runtime wrapping, can never affect execution.

Session failures (captured automatically) Skill auto-log section
Session failure example Skill auto-log section

Legend — left: tool failures in a session are captured automatically; right: the causes accumulate in the skill's auto-log section (deduplicated, counted, ranked by frequency).

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev hard-flash 下一个 Next task-passport →