Repository navigation
Releases: snailium/dsh-repeat-tool-breaker
Release list
v0.1.2
Published to npm as dsh-repeat-tool-breaker@0.1.2 — https://www.npmjs.com/package/dsh-repeat-tool-breaker
Changed
- Publishing now uses npm Trusted Publishing (OIDC) — no long-lived npm token.
The release workflow authenticates with the short-lived OIDC token GitHub mints
for the run, and provenance is generated automatically. - The workflow upgrades the npm CLI before publishing, because Trusted Publishing
requires npm >= 11.5.1 while Node 22 bundles an older one. - The workflow still honours a repository
NPM_TOKENsecret as a fallback. - README: npm badge, install instructions for the published package, and corrected
advisory-tier documentation.
Verified
- 6/6 published files are sha256-identical to this tag's tree.
- Provenance attestation records this repository and
.github/workflows/publish.ymlas the build source. - Installing
0.1.2from the public registry and exercising the gate reproduces
the documented behaviour: first identical call allowed, second blocked with
REPEAT_TOOL_BLOCKED, a different path allowed.
v0.1.1
Bug-fix release found in code review.
Fixed
- The advisory no longer fires on ordinary calls. The
warnAfternotice was
keyed only oncount === warnAfter; because every fresh tool call starts a new
run at count 1, the defaultwarnAfter: 1attached a misleading
"you just ran X with identical arguments 1 time(s)" message to every tool
call. The advisory is now inert unless2 <= warnAfter < denyAfter, the default
is raised to 2, and the wording describes a real repeat. - Caller-provided config arrays are copied before being frozen.
- Removed a dead
denyAfteroverflow check; post-execute computes its signature
once instead of twice.
Tests
20 -> 29 assertions (advisory reachability, no-advisory regressions on fresh
calls, fail-loud config, caller-array ownership). CI green on Node 20 and 22.
v0.1.0
Initial release.
A dependency-free DeepSeek Harness (DSH) plugin that hard-blocks an agent's
repeated identical tool calls through the synchronous monotonic
ctx.tools.guard gate. The denied call never executes: the model receives a
REPEAT_TOOL_BLOCKED tool result that quotes the previous successful result and
tells it to advance or conclude instead of retrying.
Highlights
- Denies the 2nd identical (tool name + canonically-equal arguments,
property order ignored) call per agent by default. - Same-path read cap (
maxSamePath) so read-like tools re-reading one file with
varying arguments are still bounded. - Per-agent
WeakMapstate; a new user message clears the chain via
agent/pre-step; excluded tools (defaulttodo_write) neither count nor reset. - Advisory
warnAfternotice viatools/post-execute— never a deny, and it
never increments the chain (counting lives only in the guard). - Fail-loud configuration validation at plugin load.
Verification
- Deterministic guard-logic suite (20 assertions) runs with no model or endpoint:
npm test. - CI green on Node 20 and 22.
- Loads and applies on a real DSH boot against
@deepseek-ai/dsh0.1.2-rc.1:
applyruns withctx.tools.guardreachable afterinject: ['tools'].
Not included: an end-to-end model-driven trajectory (see the README's
"Scope and verification status").