john-walks-slow/dsh-clear-mind ↗★ 0

dsh-clear-mind

Model-autonomous context compaction for DeepSeek Harness: mind_map surveys the agent's own context surface (seqs, token weights, clear-boundary markers and the clear-mind playbook), clear_mind replaces a chosen span with a model-written checkpoint through the platform's native compaction transaction, and a proactive reminder nudges the model when the context grows long. dsh-clear-mind:让模型自主压缩自身上下文——mind_map 俯瞰上下文表面(seq/token/清理边界标记 + 清理手册),clear_mind 把一段对话历史替换成模型自写的检查点(走平台原生 compaction 事务,GUI 可展开审计),上下文涨长或单轮步数过多时主动提醒模型清理。 适合需要自动清理冗余上下文、防止超出模型窗口限制的长对话任务。

パッケージ
dsh-clear-mind
互換性
未検証
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/09/17

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:john-walks-slow/dsh-clear-mind

ドキュメント

README 全文を読む ↗

配置(可选)

- id: clear-mind
  name: dsh-clear-mind
  config:
    minClearTokens: 1000        # 最小可清理量(启发式 tokens),防琐碎清理
    minNotesChars: 200          # 检查点 notes 最短长度
    maxNotesChars: 16000        # 检查点 notes 最长长度
    selfCollapse: true          # 自动折叠 clear_mind / mind_map 调用对
    reminderEnabled: true       # 主动提醒开关
    reminderThresholdRatio: 0.70   # 上下文占模型窗口比例阈值(0.01~1)
    reminderThresholdTokens: 0     # 绝对 token 阈值(0 = 仅按比例)
    reminderThresholdSteps: 100    # 单轮步数阈值
    reminderStepInterval: 25       # 同一轮两次提醒的最小步数间隔

Web 前端可在设置页直接编辑以上全部参数(命名空间 clear-mind),保存即热生效,无需重启;headless profile 无设置服务时自动降级为仅配置文件生效。提醒触发还要求 token 数较上次提醒有增长——静止的会话不会重复打扰。