context-guardian
为 compaction-basic 提供压缩兜底:当 LLM 摘要抛错、返回空内容或放不进上下文窗口时,改为确定性编译该区段,每行带 seq 指针(内置 dsh-compaction-instant 编译器)。提供 recall、search 工具与 /recall、/context 命令,占用超过窗口 45% 时空闲自动压缩,并将被压缩区段归档到磁盘。引擎以一行配置挂载到 agent preset(见 docs/dsh-integration.md)。
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).
怎么安装
dsh plugin add dsh-context-guardian npx -y dsh-context-guardian 简介
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…
推荐参考
信息
- 协议
- MIT
- 语言
- Python
- GitHub 星标
- 0
- 月下载
- –
- 最近更新
- 2026-09-20
- 创建于
- 2026-08-13
基础安全检查
- 检查结果
- 无
- 收录来源
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- 主题标签
- 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
同类推荐
billion-context
ranxianglei/billion-context
billion-context官方版:上下文压缩插件,兼顾小窗口(100k上下文足矣)省token(省5倍token)和超长会话(数月级别几十亿token单会话)。
dsh-chat-import
Nwflower/dsh-chat-import
把 13 家 coding agent(Claude Code、Codex、ChatGPT、Cursor、Gemini、opencode 等)的完整对话历史导入为可续聊的 DeepSeek Harness 会话,并支持反向导出回 Claude Code。
dsh-rewind
SiriLee/dsh-rewind
同一会话窗口内的 in-place 对话回退(不 fork,Claude Code /rewind 语义):每条消息的 ↶ 按钮把模型上下文回退到任意用户消息,可选用磁盘持久化的 before-backups 还原工作区文件。
dsh-recall-plugin
limbo947/dsh-recall-plugin
消息撤回:在用户消息旁加「撤回」按钮,把对话历史(官方会话 fork)与项目文件(逐消息影子 git 快照)一并回退到该消息发送之前,带差异预览确认面板。