dongsheng123132/dsh-cache-stabilizer
Cache-prefix stabilization and evidence-based cache metrics for DeepSeek Harness
Improves the chance of provider prompt-cache reuse without hiding stale state, via two semantics-preserving changes: (1) moves the working directory out of DSH's known default persona sentence into the runtime-context snapshot, so different projects can share the same system-prompt prefix while each request still receives the correct cwd; (2) canonicalizes object-key order inside tool schemas (tool order itself is already deterministic in DSH). It also adds /cache, a human-only command that reports the provider's durable cacheReadTokens, uncached inputTokens, and cache-write tokens — it never invents a cache hit. Safety boundary: only the exact sentence used by DSH's standard/headless coding persona is relocated; a custom persona mentioning {{cwd}} in another form is left unchanged.
Install
dsh plugin --profile web add github:dongsheng123132/dsh-cache-stabilizerdsh plugin --profile web add github:dongsheng123132/dsh-cache-stabilizer (npm name returns 404 — verified 2026-08-29; GitHub route documented in the sibling dsh-terminal README). Restart DSH, send a few messages, then enter /cache in a command-capable client. For a custom profile, replace web with its profile name. Optional config in the profile patch: relocateCwd: false / canonicalizeTools: false. English README.
Compatibility
DSH (web or any profile); Node.js 22+; MIT; works alongside dsh-terminal; does not freeze tool catalogs, reuse stale context, proxy model responses, or implement a second cache.
Details
- Repo: dongsheng123132/dsh-cache-stabilizer
- Category: Coding & Development
- Stars: 2
- Version: GitHub source (npm 404 verified)
- Last push: 2026-09-07
- First seen: 2026-08-14
Recent updates
cwd moved to runtime-context snapshot for prompt-cache reuse; tool-schema key canonicalization; /cache reports real cacheReadTokens; never invents hits.
FAQ
- What does it change?
- Moves cwd out of the default persona sentence into the runtime-context snapshot, and canonicalizes object-key order in tool schemas — both semantics-preserving.
- What does /cache report?
- The provider's durable cacheReadTokens, uncached inputTokens, and cache-write tokens — it never invents a cache hit.
- Is it safe with custom personas?
- Yes — only the exact default coding-persona sentence is relocated; custom persona prose mentioning {{cwd}} is left unchanged.
Alternatives
towzai-dsh-cache-precision · dongsheng123132/dsh-cache-stabilizer · MAXeaglet/dsh-bash-terminal