loonylabs-dev/dsh-cache-guard ↗★ 0

dsh-cache-guard

Host- and agent-layer DeepSeek Harness plugin that prices every automatic context rewrite before it lands, asks the human by default, and reports what the provider had to re-read cold. 适合需要监控和控制AI上下文重写Token消耗及费用的用户。

패키지
dsh-cache-guard
호환성
미검증
버전
0.4.0
라이선스
NOASSERTION
최근 업데이트
2026. 9. 19.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:loonylabs-dev/dsh-cache-guard

Configuration

The host row governs. A preset row's config applies only where the host half is absent — an engine is wrapped once, by whoever gets there first, and the host plane always announces before a preset row applies.

KeyDefaultMeaning
modemanualmanual asks before an automatic surface change; auto only reports it; off leaves the operation to the engine as shipped
pricePerMTokensunsetfull-price input rate per million tokens; adds a currency amount to the dialog and the pill
estimatedSummaryTokens4000assumed checkpoint size used when pricing a planned summarization

The trigger threshold belongs to the engine, not to the guard: it is the compaction-basic row's thresholdRatio (default 0.8, i.e. compact once 80% of the routed window is in use). The installer can set it — it patches that row's config in the generated preset, which is the whole of that row's config because a patch replaces rather than merges:

node tools/install-profile.mjs --threshold 0.9