xoykor/dsh-community-plugins--packages-context-guard ↗★ 0
dsh-context-guard
提供上下文守护及SearXNG搜索适配器的工具 适合需要限制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.