편집자 노트

disyli/dsh-tool-call-stats

DeepSeek Harness plugin: per-process tool-call statistics (not token usage) — tool_stats tool with call counts, error counts, avg durations

이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.

업스트림에서 중국어 README를 제공하지 않아 저장소 원본 내용을 표시합니다.

dsh-tool-call-stats

awesome · DSH plugin

A tiny community plugin for DeepSeek Harness (dsh).

It records every committed tool call in the current harness process and exposes a tool_stats tool, so the model (or you) can ask at any point:

Which tools were used, how often did they fail, and where did the time go?

Not to be confused with the token/cost trackers in the ecosystem (dsh-token-stats, dsh-usage-report, ...) — this plugin counts tool-call dispatches, not tokens. Also unrelated to dsh-tool-stat (a descriptive-statistics math tool).

Status: built and verified end-to-end against the dsh v0.1 developer preview (headless profile, live DeepSeek session): both event listeners record real dispatches and tool_stats returns the table below. Upstream interfaces may still change during the preview.

Example output (from the verification run):

tool  calls  errors  avg_ms
----  -----  ------  ------
bash  1      0       23
read  1      0       8

How it works

Everything in dsh is a plugin, and this one is deliberately minimal — three seams, ~100 lines, no build step:

  • tools/execute (waterfall): wraps each dispatch to record its start time, then delegates via next().
  • tools/result (observer): counts each committed result per tool name and accumulates duration; result.isError drives the error counter.
  • ctx.tools.register(defineTool(...)): exposes tool_stats, which returns a canonical JSON array (output.schema) and renders a plain-text table for the model.

All state is in-memory and process-local. Nothing is persisted; restarting dsh resets the counters. When the plugin is unloaded, Cordis disposes both listeners and the tool automatically — no manual cleanup code.

Install

Into a profile (recommended)

dsh plugin --profile <name> add github:disyli/dsh-tool-call-stats

pnpm ≥ 10 will ask you to allow the package before running install scripts (this package has none, but the prompt may still gate the git install). Follow the hint dsh prints, then re-run add.

Verify the layer and start:

dsh --profile <name> --dump-config   # shows a "# == dsh-tool-call-stats" layer
dsh --profile <name>

As a local overlay (source checkout)

From a deepseek-harness checkout, point a patch at the local file:

# stats.cordis.yml
- insert:
    - id: tool-stats
      name: '/absolute/path/to/dsh-tool-call-stats/index.js'
pnpm dsh web --patch ./stats.cordis.yml

Use

Ask the agent things like:

  • "Use tool_stats to show tool usage so far."
  • "Which tool failed the most in this session?"

Limitations

  • Process-local only: counters reset on restart and are not shared across sessions.
  • Calls aborted before the registry commits a result are not counted (their timing entries are garbage-collected after 10 s).
  • Built against the dsh v0.1 developer preview; upstream interfaces may change ("THERE WILL BE COMPATIBILITY-BREAKING CHANGES").

License

MIT

REPOSITORY SIGNALS

보안 및 설치 증거

이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.

출처 추적 가능

공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.

라이선스

GitHub 메타데이터에서 라이선스가 감지되지 않았습니다.

유지보수 활동

최근 180일 내 코드 업데이트가 있습니다.

설치 증거

재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.

설치 라이프사이클 스크립트

검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.

주의 사항missing-license