context-guardian
Compaction fallback for compaction-basic: when its LLM summary throws, comes back empty or cannot fit the window, the span is compiled deterministically with a seq pointer on every line (vendored dsh-compaction-instant compiler). Adds recall and search tools, /recall and /context commands, an idle trigger at 45% of the window and an on-disk span archive. The engine mounts as one row in the agent preset (docs/dsh-integration.md).
为 compaction-basic 提供压缩兜底:当 LLM 摘要抛错、返回空内容或放不进上下文窗口时,改为确定性编译该区段,每行带 seq 指针(内置 dsh-compaction-instant 编译器)。提供 recall、search 工具与 /recall、/context 命令,占用超过窗口 45% 时空闲自动压缩,并将被压缩区段归档到磁盘。引擎以一行配置挂载到 agent preset(见 docs/dsh-integration.md)。
How to install
dsh plugin add dsh-context-guardian npx -y dsh-context-guardian About
Compaction for local models that actually fires, and never takes the conversation down with it. Two front doors, one idea: a **proxy** that sits in front of any OpenAI-compatible backend (Ollama, LiteLLM, Headroom, vLLM, LM Studio) for any CLI or agent, and a **native engine** for DeepSeek Harness. Both keep the full original on disk, and both fail **open**. *The /guardian/health compaction monitor: a request grows past the window, Guardian compacts it, and the session keeps going instead of hard-erroring.* | | Without Context Guardian | With it | |---|---|---| | Claude-Code-style CLI on a loc…
Recommendation signals
Meta
- License
- MIT
- Language
- Python
- GitHub stars
- 0
- mo. downloads
- –
- Last push
- 2026-09-20
- Created
- 2026-08-13
Links
Basic safety check
- Findings
- None
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- Topics
- ai-tool, coding-assistant, compaction, context-management, context-window, deepseek-harness, deepseek-harness-plugin, dsh-plugin, litellm, llm, local-llm, mcp, ollam, openai-ap, python
Related plugins
billion-context
ranxianglei/billion-context
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
dsh-chat-import
Nwflower/dsh-chat-import
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
dsh-rewind
SiriLee/dsh-rewind
In-place conversation rewind in the same session window without forking (Claude Code /rewind semantics): a per-message ↶ button cuts the model context back to any user message, with an optional Claude-Code-style file restore from disk-persisted before-backups.
dsh-recall-plugin
limbo947/dsh-recall-plugin
Recall any user message: rolls the conversation (official session fork) and workspace files (per-message shadow git snapshots) back to before it, with a diff-preview confirmation panel.