DeepSeek Harness 插件

JoblessJoe/deep-toolbox

Star 数 ★ 0 下载量(近 30 天) 280 分类 用量与计费 收录于 2026-11-27 npm deep-toolbox

工具用量与启动成本:在插件页新增标签,显示智能体调用了哪些工具、哪些经常出错,以及每个工具定义(内置、插件或 MCP 服务器)在每次请求中占用多少 token,附启动上下文图和该关掉哪些工具的通俗建议;只读的 toolbox_report 智能体工具提供同样的数据。在本机读取 dsh 会话日志,无钩子。

安装

# npm 包(预构建)

dsh plugin --profile web add deep-toolbox

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:JoblessJoe/deep-toolbox

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

该插件的 README 只有英文版本。

A DeepSeek Harness (dsh) plugin that shows which tools your agents actually use, which ones fail, and what each one costs you in every request. Every tool you install (built-in, plugin or MCP server) sends its full definition with every model request. A 37-tool MCP server can add thousands of tokens to each prompt, even if no agent ever calls it. deep-toolbox finds that dead weight so you can drop it.

npx @deepseek-ai/dsh plugin --profile web add deep-toolbox

Then restart your dsh web server and reload the tab. A Tool usage & startup cost tab appears on the Plugins page. Full details under Install.

What you see

  • A new chat starts with: the tokens every new chat carries before you type, and how much of that is tool definitions.
  • Paid for, never used: tools whose definitions go out with every request, but no agent called them in the chosen range.
  • Failed calls: the error rate, with the latest error messages per tool.
  • What stands out: plain-language tips, like "math adds 4.6K tok to every new chat but was not used in the last 30 days".
  • Startup context: a chart of the built-in tools, each MCP server and plugin, each AGENTS.md, the system prompt and the skill list.
  • Tool sources: one row per source, tagged used a lot, rarely used or never used. Open one for calls (main agent and subagents), errors, average time, result size, tokens per chat and last use of each tool.
  • Ranges: last 7, 30 or 90 days. Show removed adds tools you used before but no longer have installed.

For agents

Every agent gets a read-only toolbox_report tool with the same numbers as short text. An agent can notice "this MCP server costs 4.6K tok per chat and was never used" and offer to turn it off with dsh's built-in plugin_manager, which asks you first.

How it works

No hooks, no database, no tracking code in the agent loop. dsh already records every tool call, result and request in its session logs (~/.dsh/sessions/**/session.v*.jsonl.zstd). deep-toolbox reads those logs when you open the tab and adds them up. Parsed files are cached until they change. Nothing leaves your machine.

  • Host: one JSON route, /api/deep-toolbox/stats, plus the toolbox_report agent tool. It also notes which plugin registers which tool, so plugin tools don't count as built-in.
  • Client: one self-contained bundle on dsh's own design tokens, so it looks native in both themes.

Token numbers are estimates (characters ÷ 4). "Sent" is the raw volume before prompt caching.

Install

Into your dsh web profile (web below is the profile name; use whichever profile backs your web GUI). From a source checkout, use pnpm dsh instead of npx @deepseek-ai/dsh:

npx @deepseek-ai/dsh plugin --profile web add deep-toolbox

Restart the dsh web server afterwards, then reload the browser tab.

Other sources:

# straight from GitHub
npx @deepseek-ai/dsh plugin --profile web add github:JoblessJoe/deep-toolbox
# from a local checkout
npx @deepseek-ai/dsh plugin --profile web add file:/path/to/deep-toolbox

The agent tool also works in headless and TUI profiles. The tab needs the web GUI.

Requirements: dsh 0.2.2 or newer (engines.dsh: >=0.2.2-rc.1 <0.4.0), Node 22.15+ (built-in zstd).

CLI

The same report in a terminal, or for an agent through bash:

npx deep-toolbox                       # last 30 days
npx deep-toolbox 7                     # last 7 days
npx deep-toolbox --errors web_fetch    # latest errors of one tool
npx deep-toolbox --json
npx deep-toolbox --agent               # the toolbox_report text

Set DSH_HOME (or DSH_SESSIONS) if your sessions are not under ~/.dsh.

Develop

npm install
npm run build   # lib/index.js (host) + lib/client.js (web) + lib/cli.js
npm test

License

MIT

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。