xoykor/dsh-community-plugins--packages-context-guard ↗★ 0
dsh-context-guard
Unofficial DSH context guard and SearXNG search adapter maintained by xoykor 适合需要限制Token消耗、防止无节制执行,并使用SearXNG搜索的用户。
同名パッケージの別リポジトリ
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xoykor/dsh-community-plugins#efaf6f88b63516cf38cd38a404ddfe731db7828a&path:packages/context-guardドキュメント
README 全文を読む ↗Context guard compatibility and configuration
The guard injects tools, tokenMeter, and compaction; these services must exist. Default limits remain 48 calls, 48 steps and 900000 ms. Defaults are not suitable for every model context size; inspect the source's threshold settings before enabling.
Example loader entry configuration for sustained productive work:
config:
maxTurnSteps: null
maxTurnToolCalls: null
maxTurnMs: null
Unlimited execution can consume unbounded time and provider credits. Cancellation, permission checks, and no-progress safeguards still matter.
Advanced checkpoint mode is not a drop-in upstream feature. Setting contextWindow and reserve fields requires the matching custom checkpointNow runtime patch from my backup. Without it, the guard fails closed. Managed-job observation exemptions similarly require the custom executor capability, and automatic goal-round resumption requires the compatible goal driver patch. Those patched third-party runtime artifacts are deliberately not bundled here. Base guard operation does not establish compatibility with every upstream release.
When upgrading, verify the code actually installed in each profile's node_modules: updating the source plugin directory alone may leave an old installed copy. An old validator rejects null and can prevent DSH startup. Back up your profile and verify service health beyond the initial process start.