返回目录
开发工具 插件

dsh-cache-stabilizer

dongsheng123132/dsh-cache-stabilizer

Cache-prefix stabilization and evidence-based cache metrics for DeepSeek Harness

Stars
2
Forks
0
Issues
0
更新
4 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:dongsheng123132/dsh-cache-stabilizer

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-cache-stabilizer

CI MIT license Node.js 22+ Awesome DSH Plugins

An MIT-licensed DeepSeek Harness plugin that improves the chance of provider prompt-cache reuse without hiding stale state.

It makes two semantics-preserving changes:

  • Moves the working directory out of DSH's known default persona sentence and into the runtime-context snapshot. Different projects can then share the same system-prompt prefix while each request still receives the correct cwd.
  • 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.

Install

dsh plugin --profile web add dsh-cache-stabilizer

Restart DSH, send a few messages, then enter /cache in a command-capable client.

For a custom profile, replace web with its profile name. To disable either optimization in a profile patch:

- id: dsh-cache-stabilizer
  config:
    relocateCwd: false
    canonicalizeTools: false

Safety boundary

Only the exact sentence used by DSH's standard/headless coding persona is relocated. A custom persona that mentions {{cwd}} in another form is left unchanged because blindly moving arbitrary prose can change meaning. The plugin does not freeze tool catalogs, reuse stale context, proxy model responses, or implement a second cache.

DeepSeek's provider cache is automatic and depends on an exact prefix match from token zero. Storage and eviction remain provider-controlled.

Development

npm test
npm run check

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类开发工具
规则置信度

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: developer-tools、prompt-caching。