Icstick/dsh-context-maid0

dsh-context-maid

自动上下文策展:tool 输出瘦身 + 无效日志清理 + 工作流/记忆钉扎保护 + 先归档后压缩

AI 分析

核心用途是防止超长工具输出和冗余日志撑爆模型上下文窗口。通过智能裁剪和归档,大幅延长对话寿命。适合频繁运行复杂 Agent 任务、产生大量工具调用日志的 DSH 用户。

パッケージ
dsh-context-maid
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/09/03

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Icstick/dsh-context-maid

ドキュメント

README 全文を読む ↗

配置(用户可调)

默认说明
trigger.userRatio0.4主旋钮:上下文阈值(占模型窗口比例)。映射官方 thresholdRatio,0.05-0.95
trigger.minTokens30000低于此总 token 不触发
slim.thresholdChars4000tool 输出超过即内容感知瘦身
slim.headChars / tailChars800 / 800瘦身保留预算
sweep.enabled / aggressivetrue / false无效日志清理(aggressive 档待定)
fold.retainRatio0.16压缩保留尾比例
pin.enabled / injecttrue / true钉扎保护(M3)
archive.enabledtrue先归档后压缩(M3,需 ACP)
summarization.provider / model'' / ''摘要模型可配(空=跟随对话模型;可填便宜模型或本地 OpenAI 兼容网关)
auditDir$DSH_HOME/context-maid审计库位置